/* THEME: loud  (new version)
   The app's own look (Courier Prime, lowercase, pills, hairline cards, the
   layout and every component rule from the kaiunta theme) wearing the colors
   of the welcome page:

     header + "voices" bars ... ink black   #1a1714
     hero ..................... red           #c8283a
     highlights / CTAs ........ yellow        #ffe600
     alternate surfaces ....... warm sand     #efe9de
     footer ................... deep black     #0f0d0b
     small accents (badges, reply, "#") ...... app brick red #c0392b

   Colored blocks (header, hero, prompt banner, footer) re-declare the colour
   tokens on themselves, so everything inside them (icons, buttons, links)
   switches to light-on-dark automatically, in light and dark mode alike.

   Replaces the old loudtheme.css. Fonts: Courier Prime only (already loaded
   for kaiunta), so Bricolage Grotesque / Figtree / DM Mono are no longer
   needed. Dark mode: data-kai-dark="1", as in kaiunta. */

/* ── 1. Palette + fonts ── */
html[data-theme="loud"] {
  --paper:      #f7f4ee;
  --ink:        #1a1714;
  --ink-mid:    #4f4941;
  --ink-faint:  #6b645b;
  --rule:       #e0dad0;
  --red:        #c0392b;   /* small accents on paper */
  --yellow:     #ffe600;   /* real yellow now: banner, CTAs, "recording" */
  --black:      #1a1714;
  --surface:    #ffffff;   /* cards lift off the paper */
  --on-accent:  #ffffff;
  --icon-fill:  rgba(26,23,20,.07);
  --notif-unread-bg: #fdf6f5;

  --loud-red:      #c8283a;  /* hero + primary buttons */
  --loud-red-dark: #a81e2f;
  --night:         #1a1714;  /* header, newsletter-style blocks */
  --night-deep:    #0f0d0b;  /* footer */
  --sand:          #efe9de;  /* alternate surface */
  --hot:           #ff5468;  /* red accent on dark blocks */
  --card-radius:   20px;     /* cards, modals, panels (set 8px for the old square look) */

  --font-display: 'Courier Prime', monospace;
  --font-mono:    'Courier Prime', monospace;
  --font-accent:  'Courier Prime', monospace;
  --hdr-h: 64px;
}

/* ── 1b. Dark variant (data-kai-dark="1") ── */
html[data-theme="loud"][data-kai-dark="1"] {
  --paper:      #18140f;
  --ink:        #ece6d8;
  --ink-mid:    #b6ad9c;
  --ink-faint:  #958c7b;
  --rule:       #332d24;
  --red:        #e2604f;
  --yellow:     #ffe600;
  --black:      #ece6d8;
  --surface:    #221c14;
  --on-accent:  #18140f;
  --icon-fill:  rgba(236,230,216,.08);
  --notif-unread-bg: rgba(226,96,79,.14);
  --sand:       #2a2318;
}

/* Use overscroll-behavior-y:none, as the base stylesheet does, to stop iOS
   rubber-band bounce. "contain" left the bounce in place. */
html[data-theme="loud"],
html[data-theme="loud"] body {
  overscroll-behavior-y: none;
}

/* ── 2. Shape overrides ── */

/* Header: thick red bar → thin hairline on paper */
html[data-theme="loud"] .hdr {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0 2rem;
}
html[data-theme="loud"] .hdr-logo {
  color: var(--ink);
  font-style: normal;
  letter-spacing: -0.02em;
  font-size: .95rem;
  text-transform: lowercase;

}
/* The red slash before the wordmark is the theme's only mark, styled as a
   tuning notch. */
html[data-theme="loud"] .hdr-logo::before {
  content: "/";
  display: inline-block;
  color: var(--red);
  margin-right: .3em;
  font-style: normal;
}
html[data-theme="loud"] .hdr-user { color: var(--ink-mid); }
/* Soft filled circle (--icon-fill) instead of the old hairline pill, matching
   the other header/footer icon buttons. */
html[data-theme="loud"] .hdr-btn {
  height: 34px;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: var(--icon-fill);
  color: var(--ink-mid);
  letter-spacing: .12em;
  text-transform: lowercase;
  font-size: .72rem;
  transition: background .15s, color .15s;
}
html[data-theme="loud"] .hdr-btn:hover { background: var(--ink); color: var(--paper); }
html[data-theme="loud"] .hdr-btn-primary {
  height: 36px;
  padding: 0 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}
html[data-theme="loud"] .hdr-btn-primary:hover { background: var(--ink); color: var(--paper); opacity: .8; }

/* 5K displays: these override style.css's 1800px tier on specificity, so they
   need their own sizes here. */
@media (min-width: 1800px) {
  html[data-theme="loud"] .hdr { padding: 0 2.5rem; }
  html[data-theme="loud"] .hdr-logo { font-size: 1.15rem; }
  html[data-theme="loud"] .hdr-btn {
    height: 42px;
    padding: 0 1.3rem;
    font-size: .82rem;
  }
  html[data-theme="loud"] .hdr-btn-primary { height: 44px; padding: 0 1.6rem; }
}

/* The header search icon duplicates the search box already on the feed
   layout, so it is hidden. */
html[data-theme="loud"] #btnSearchHeader {
  display: none;
}
/* Drop the arrow hardcoded in the button label ("START WITTERING→") with a
   text override; other themes keep it. */
html[data-theme="loud"] #btnHdrSignup {
  font-size: 0;
}
html[data-theme="loud"] #btnHdrSignup::before {
  content: "start wittering";
  font-size: .72rem;
}

/* Mobile: lowercase Courier Prime is wider than Bangers, so tighten sizing to
   keep the header CTAs and logo on one line. */
@media (max-width: 480px) {
  html[data-theme="loud"] .hdr,
  html[data-theme="loud"] .hdr * {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  html[data-theme="loud"] .hdr { padding: 0 .75rem; }
  html[data-theme="loud"] .hdr-actions { gap: .3rem; }
  /* Matches kaiunta.com's .hdr-brand (.95rem at all widths). Ellipsis is a
     safety net for very long site names. */
  html[data-theme="loud"] .hdr-logo {
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
  }
}
html[data-theme="loud"] #btnHdrLogin,
html[data-theme="loud"] #btnHdrSignup {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
html[data-theme="loud"] #btnHdrLogin::before,
html[data-theme="loud"] #btnHdrSignup::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
html[data-theme="loud"] #btnHdrLogin::before {
  background-color: var(--ink-mid);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}
html[data-theme="loud"] #btnHdrSignup::before {
  background-color: var(--paper);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
}

html[data-theme="loud"] .hdr-bell {
  background: var(--icon-fill);
  color: var(--ink-mid);
  font-size: 0; /* hide the color emoji glyph; a flat mask icon replaces it below */
}
html[data-theme="loud"] .hdr-bell:hover { background: var(--ink); }
/* The bell is a 🔔 emoji, which ignores CSS color. Hide the glyph and draw a
   flat bell with a mask so it follows the ink palette and inverts on hover. */
html[data-theme="loud"] .hdr-bell::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  background-color: var(--ink-mid);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color .15s;
}
html[data-theme="loud"] .hdr-bell:hover::before { background-color: var(--paper); }

/* Feed/Stations/Search titles are redundant here (tab label, search
   placeholder). Visually hidden, kept for screen readers. */
html[data-theme="loud"] #feedTitle,
html[data-theme="loud"] #stationsTitle,
html[data-theme="loud"] #searchTitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Stations subtitle explains the sort order. Visually hidden, kept for screen
   readers. */
html[data-theme="loud"] #stationsSubtitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Profile and Notifications headings get the same visually-hidden treatment.
   Thread is not included. */
html[data-theme="loud"] #viewProfile .feed-title,
html[data-theme="loud"] #viewNotifications .feed-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html[data-theme="loud"] .hdr-bell:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Hero: quiet editorial layout with the CTAs built in (the only theme where
   the hero is actionable). */
html[data-theme="loud"] .hero {
  background: var(--paper);
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: calc(var(--hdr-h) + 2rem) clamp(1.5rem, 8vw, 6rem) 5rem;
}
html[data-theme="loud"] .hero::before { display: none; }

html[data-theme="loud"] .hero-bangers { display: none; }

html[data-theme="loud"] .hero-kaiunta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0;
}
html[data-theme="loud"] .hero-eyebrow {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--ink-faint);
  margin: 0;
}
html[data-theme="loud"] .hero-kai-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.15;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  color: var(--ink);
  margin: 0;
}
html[data-theme="loud"] .hero-kai-copy {
  font-family: var(--font-mono);
  font-style: italic;
  color: var(--ink-mid);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.8;
  max-width: 58ch;
  margin: 0;
}
html[data-theme="loud"] .hero-kai-ctas {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: .25rem;
}
html[data-theme="loud"] .hero-kai-ctas .btn-primary {
  width: auto;
  height: 48px;
  padding: 0 1.75rem;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
}
html[data-theme="loud"] .hero-kai-login {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-style: italic;
  font-size: .9rem;
  color: var(--ink-mid);
  cursor: pointer;
  transition: color .15s;
  display: inline-flex;
  align-items: center;
  gap: .4em;
}
html[data-theme="loud"] .hero-kai-login:hover { color: var(--ink); }
/* Icons use currentColor so they follow each button's hover and mobile
   states. */
html[data-theme="loud"] .hero-kai-cta-icon {
  flex-shrink: 0;
}

/* Hide the hero CTAs once the prompt card is up: the card is the hero's
   action, and login/signup are in the header. Not gated on .hero-actionable.
   app.js adds .hero-cta-fallback if the prompt hasn't loaded after 4s,
   restoring the buttons. */
html[data-theme="loud"] #viewHero:not(.hero-cta-fallback) .hero-kai-ctas {
  display: none;
}

/* Hero prompt card (after app.js adds .hero-copy-prompts): hairline border,
   flat surface, no shadow, matching the feed's .prompt-banner. Fixed width
   and line reservation so nothing below jumps as prompts rotate. */
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts {
  display: flex;
  align-items: center;
  gap: .75rem;
  box-sizing: border-box;
  width: min(30rem, 84vw);
  max-width: 100%;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  font-style: italic;
  font-size: clamp(.85rem, 1.3vw, .95rem);
  line-height: 1.6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, translate .1s;
}
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts::after {
  content: "\2192";
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink-faint);
}
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts:hover {
  border-color: var(--ink-faint);
  translate: -1px -1px;
}
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts:active {
  translate: 1px 1px;
}
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* 1800px and up: raise the hero size ceilings (title, copy, column width).
   The clamp() values above are tuned for normal desktop widths. */
@media (min-width: 1800px) {
  html[data-theme="loud"] .hero-kaiunta {
    max-width: 1180px;
    gap: 2rem;
  }
  html[data-theme="loud"] .hero-eyebrow {
    font-size: .85rem;
  }
  html[data-theme="loud"] .hero-kai-title {
    font-size: clamp(3.4rem, 4.8vw, 5.6rem);
  }
  html[data-theme="loud"] .hero-kai-copy {
    font-size: 1.35rem;
    max-width: 62ch;
  }
  html[data-theme="loud"] .hero-kai-ctas .btn-primary {
    height: 56px;
    padding: 0 2.25rem;
    font-size: .88rem;
  }
  html[data-theme="loud"] .hero-kai-login {
    font-size: 1.02rem;
  }
}

/* Background watermark: the red "/" + wordmark from .hdr-logo, scaled up
   behind the hero text (z-index 0). Hidden when the hero shows a video or
   image backdrop.

   Own 1024px breakpoint: shown on laptops and up, hidden on phones. Sized in
   vw so it scales on large screens.

   Gated on the .hero-jvi-mark class, which index.php prints only when
   $site_brand === 'justvoiceit'. A data-theme/data-brand selector kept
   showing up on justwitter.com. */
@media (min-width: 1024px) {
  html[data-theme="loud"] #viewHero.hero-jvi-mark:not([data-hero-media="video"]):not([data-hero-media="image"])::after {
    content: "/jvi";
    position: absolute;
    top: 50%;
    right: 3vw;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 10vw;
    letter-spacing: -.04em;
    line-height: 1;
    white-space: nowrap;
    /* Flat and static: "/" and "jvi" both at 1% ink, one background layer, no
       animation. */
    background: color-mix(in srgb, var(--ink) 1%, transparent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    z-index: 0;
    pointer-events: none;
    user-select: none;
  }
}

/* Stack the hero CTAs at a wider breakpoint than the header's 480px cutoff;
   three side-by-side CTAs wrap badly on small laptops. Placed after the
   desktop .hero-kai-ctas .btn-primary rule so it wins on source order. */
@media (max-width: 640px) {
  html[data-theme="loud"] .hero-kai-ctas {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  /* Plain-text style when stacked, like the other two links. letter-spacing
     and box-shadow must be reset because the base .btn-primary sets both and
     they leaked through. */
  html[data-theme="loud"] .hero-kai-ctas .btn-primary {
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    align-self: flex-start;
    text-align: left;
    color: var(--ink);
    font-family: var(--font-mono);
    font-style: italic;
    font-weight: 400;
    font-size: .9rem;
    letter-spacing: normal;
    display: inline-flex;
    align-items: center;
    gap: .4em;
  }
  html[data-theme="loud"] .hero-kai-ctas .btn-primary::after {
    content: "→";
    margin-left: .35em;
  }
  /* Force flush-left; base button styles (centered text, min-width) left the
     stacked links indented. */
  html[data-theme="loud"] .hero-kai-login {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    width: auto;
    min-width: 0;
    text-align: left;
    align-self: flex-start;
    margin: 0;
  }
}

/* Quiet staggered fade-up (eyebrow, title, copy). Only targets
   .hero-kaiunta's children. */
html[data-theme="loud"] .hero-eyebrow,
html[data-theme="loud"] .hero-kai-title,
html[data-theme="loud"] .hero-kai-copy,
html[data-theme="loud"] .hero-kai-ctas {
  opacity: 0;
  transform: translateY(.6em);
  animation: loudHeroIn .8s ease forwards;
}
html[data-theme="loud"] .hero-eyebrow  { animation-delay: .1s; }
html[data-theme="loud"] .hero-kai-title { animation-delay: .25s; }
html[data-theme="loud"] .hero-kai-copy  { animation-delay: .45s; }
html[data-theme="loud"] .hero-kai-ctas  { animation-delay: .65s; }

@keyframes loudHeroIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="loud"] .hero-eyebrow,
  html[data-theme="loud"] .hero-kai-title,
  html[data-theme="loud"] .hero-kai-copy,
  html[data-theme="loud"] .hero-kai-ctas {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Hero waveform: a thin low-opacity equalizer strip pinned to the bottom of
   the hero, pure CSS. */
html[data-theme="loud"] #viewHero[data-hero-media="wave"] .hero-kai-wave {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  padding: 0 clamp(1.5rem, 8vw, 6rem) .5rem;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="loud"] .hero-kai-wave span {
  flex: 1 1 0;
  max-width: 3px;
  min-height: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--ink);
  opacity: .1;
  animation: loudWave 2.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.09s);
}
/* Vary each bar's duration slightly so the strip doesn't pulse in unison. */
html[data-theme="loud"] .hero-kai-wave span:nth-child(3n) { animation-duration: 1.7s; }
html[data-theme="loud"] .hero-kai-wave span:nth-child(5n) { animation-duration: 2.6s; }
html[data-theme="loud"] .hero-kai-wave span:nth-child(7n) { animation-duration: 1.4s; }

@keyframes loudWave {
  0%, 100% { height: 4px; opacity: .08; }
  50%      { height: 34px; opacity: .16; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="loud"] .hero-kai-wave span {
    animation: none;
    height: 12px;
    opacity: .1;
  }
}

/* Keep the strip clear of the CTAs on short/mobile viewports. */
@media (max-width: 480px) {
  html[data-theme="loud"] .hero-kai-wave { height: 32px; }
}

/* ── Hero background media (video / image) ──
   One layer fills .hero behind the copy. Only the option set by #viewHero's
   data-hero-media renders.

   The scrim is a left-to-right gradient (solid paper behind the text,
   transparent past it) so the media shows on the right. .hero-kaiunta has
   z-index:1 to sit above it. */
html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-media,
html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-media {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
html[data-theme="loud"] .hero-kai-media-video,
html[data-theme="loud"] .hero-kai-media-image {
  display: none; /* only the matching option turns its element on */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-media-video {
  display: block;
}
html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-media-image {
  display: block;
}
html[data-theme="loud"] .hero-kai-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--paper) 0%,
    var(--paper) 34%,
    rgba(247, 244, 238, .82) 50%,
    rgba(247, 244, 238, .35) 68%,
    rgba(247, 244, 238, 0) 85%
  );
}

/* Sound toggle: shown only for the video option. Bottom-right over the
   unscrimmed video, with a near-solid paper background for legibility. */
html[data-theme="loud"] .hero-kai-mute {
  display: none;
}
html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-mute {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  /* .hero is min-height:100vh, so clear the fixed footer's height before
     adding spacing. */
  bottom: calc(var(--ftr-h) + clamp(1rem, 3vw, 2rem));
  z-index: 2;
  height: 38px;
  padding: 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(247, 244, 238, .88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--ink-mid);
  font-family: var(--font-mono);
  font-style: italic;
  font-size: .72rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-mute:hover {
  border-color: var(--ink);
  color: var(--ink);
}
html[data-theme="loud"] .hero-kai-mute-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  /* Muted (default): speaker with an X. */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
}
/* Unmuted: speaker with sound waves. Swapped via aria-pressed, which the JS
   toggle keeps in sync. */
html[data-theme="loud"] .hero-kai-mute[aria-pressed="true"] .hero-kai-mute-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M18.36 5.64a9 9 0 0 1 0 12.73'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M18.36 5.64a9 9 0 0 1 0 12.73'/%3E%3C/svg%3E");
}
/* Mobile: keep the button in the visible band of the video (the scrim flips
   to top-to-bottom). */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-mute {
    right: 1rem;
    bottom: calc(var(--ftr-h) + 1rem);
    font-size: .68rem;
    padding: 0 .85rem;
  }
}
/* Portrait phones: .hero is position:fixed and already ends at the footer, so
   drop the extra var(--ftr-h) offset (same as justwitter.css's
   .hero-kai-mute). */
@media (max-width: 640px) and (orientation: portrait) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-mute {
    bottom: 1rem;
  }
}
/* The text stack must sit above the media layer. */
html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kaiunta,
html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kaiunta {
  position: relative;
  z-index: 1;
}

/* Mobile: darken the video with the scrim below and switch the text to light
   tones, instead of giving each text group its own paper chip. */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kaiunta,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kaiunta {
    width: 100%;
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-eyebrow,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-eyebrow {
    color: rgba(247, 244, 238, .78);
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-title,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-title {
    color: var(--paper);
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-copy,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-copy {
    color: rgba(247, 244, 238, .88);
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-login,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-login,
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-ctas .btn-primary,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-ctas .btn-primary {
    color: var(--paper);
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-login:hover,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-login:hover {
    color: var(--red);
  }
}

/* Reduced motion: hide the video and show the still image (same asset as the
   video's poster=) instead. */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-media-video {
    display: none;
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-media-image {
    display: block;
  }
}

/* Mobile: show the still image instead of the video (lighter, no autoplay
   decode or battery cost), unless #viewHero has data-mobile-video="on" (set
   by $mobile_hero_video in index.php), in which case none of the rules below
   apply.

   With the flag off the image is hidden too, leaving plain paper. The JS
   pause is what actually stops decoding; display:none alone doesn't. */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"]:not([data-mobile-video="on"]) .hero-kai-media-video {
    display: none;
  }
  html[data-theme="loud"] #viewHero[data-hero-media="video"]:not([data-mobile-video="on"]) .hero-kai-media-image {
    display: none;
  }
  /* Nothing to unmute when no video plays. */
  html[data-theme="loud"] #viewHero[data-hero-media="video"]:not([data-mobile-video="on"]) .hero-kai-mute {
    display: none;
  }
}

/* Mobile scrim: a flat light wash. Fully transparent looked punchier than
   desktop, whose gradient never fades completely clear, so keep a light paper
   tint over the video. */
@media (max-width: 640px) {
  html[data-theme="loud"] .hero-kai-media-scrim {
    background: linear-gradient(
      180deg,
      rgba(15, 13, 10, .78) 0%,
      rgba(15, 13, 10, .5) 45%,
      rgba(15, 13, 10, .72) 100%
    );
  }
}

/* ── Hero mark ──
   The mic icon (same SVG as .footer-feed-btn::before and
   .menu-nav-icon-voices) as a large faint watermark in the lower right,
   behind the copy. */
html[data-theme="loud"] #viewHero[data-hero-media="mark"] .hero-kai-mark {
  display: block;
  position: absolute;
  right: clamp(-2rem, 4vw, 3rem);
  bottom: clamp(-1rem, 4vw, 2rem);
  width: clamp(260px, 34vw, 480px);
  height: clamp(260px, 34vw, 480px);
  background-color: var(--ink);
  opacity: .05;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="loud"] #viewHero[data-hero-media="mark"] .hero-kaiunta {
  position: relative;
  z-index: 1;
}
/* Keep it from crowding the copy at narrow widths. */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewHero[data-hero-media="mark"] .hero-kai-mark {
    width: 55vw;
    height: 55vw;
    right: -6vw;
    bottom: -4vw;
    opacity: .045;
  }
}

/* Quiet the duration: it helps people decide whether to play, unlike
   like/play counts. */
html[data-theme="loud"] .cast-duration {
  color: var(--ink-faint);
  font-size: .9rem;
}

html[data-theme="loud"] .btn-primary,
html[data-theme="loud"] .btn-ghost {
  height: 52px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: none;
  letter-spacing: .12em;
  font-style: normal;
  text-transform: lowercase;
  font-size: .72rem;
  transition: opacity .15s, transform .12s;
}
html[data-theme="loud"] .btn-primary { background: var(--ink); color: var(--paper); }
/* The base button:disabled rule loses on specificity to the rule above, so a
   disabled Post (see syncPostGate() in app.js) looked enabled. Restate the
   disabled look here. */
html[data-theme="loud"] .btn-primary:disabled,
html[data-theme="loud"] .btn-primary[disabled] {
  background: none;
  color: var(--ink-faint);
  border-color: var(--rule);
  cursor: not-allowed;
}
html[data-theme="loud"] .btn-primary:hover,
html[data-theme="loud"] .btn-ghost:hover { transform: none; opacity: .8; box-shadow: none; }
html[data-theme="loud"] .btn-primary:active,
html[data-theme="loud"] .btn-ghost:active { transform: scale(.97); box-shadow: none; }
html[data-theme="loud"] .btn-ghost { background: none; color: var(--ink-mid); }
html[data-theme="loud"] .btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: none; }

/* Cards: hairline only, no panel, thick border or shadow. Solid var(--rule)
   rather than a translucent ink border, which was too faint at 1px. */
html[data-theme="loud"] .auth-card,
html[data-theme="loud"] .record-card,
html[data-theme="loud"] .cast-card,
html[data-theme="loud"] .modal,
html[data-theme="loud"] .profile-header,
html[data-theme="loud"] .notif-item,
html[data-theme="loud"] .search-user {
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 6%, transparent);
  background: var(--surface);
}

/* .record-card sits on the dark .record-overlay backdrop, where the shared
   hairline nearly vanished. In dark mode give it a lighter border, a real
   shadow and a lifted background. */
html[data-theme="loud"][data-kai-dark="1"] .record-card {
  border-color: var(--ink-mid);
  background: color-mix(in srgb, var(--surface) 85%, var(--ink) 15%);
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
}
/* Warm the .record-overlay backdrop in dark mode. --yellow's dark value
   (#2a2318) tints it visibly; --surface was too close to the original grey.
   Mostly visible on desktop; #recordCard is full-screen on mobile. */
html[data-theme="loud"][data-kai-dark="1"] .record-overlay {
  background: color-mix(in srgb, var(--sand) 82%, transparent);
}
html[data-theme="loud"] .notif-item:active,
html[data-theme="loud"] .search-user:active { transform: none; box-shadow: none; }
/* More space between feed cards on phones, where the hairline border alone
   separates them. */
@media (max-width: 480px) {
  html[data-theme="loud"] .feed-list { gap: 1.5rem; }
}
html[data-theme="loud"] .notif-item.unread { border-color: var(--red); background: var(--notif-unread-bg); }
/* Restate the focus border-color: the .cast-card rule above sets the full
   border shorthand, which would override style.css's .cast-card-focus. */
html[data-theme="loud"] .cast-card-focus { border-color: var(--red); }
html[data-theme="loud"] .auth-title,
html[data-theme="loud"] .record-title {
  color: var(--ink);
  font-style: italic;
  letter-spacing: -.01em;
}
/* New-station dialog title matches the log-in panel heading
   (.auth-panel-heading, not italic). */
html[data-theme="loud"] #confirmStationOverlay .record-title {
  font-style: normal;
  letter-spacing: .05em;
}
html[data-theme="loud"] .profile-lock-card { box-shadow: none; border-radius: 8px; }

/* Modal titles are focused on open (enterDialog() in the JS). Use a thin ring
   with more offset instead of the base 3px hard ring. */
html[data-theme="loud"] .record-title:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 6px;
  border-radius: 0;
}

/* Record modal tags label: lowercase and lighter than the base bold
   uppercase. The "#" stays red. */
html[data-theme="loud"] .record-caption-label {
  font-weight: 400;
  text-transform: none;
  font-style: italic;
  letter-spacing: 0;
  color: var(--ink-mid);
}
html[data-theme="loud"] .record-caption-label .tag-accent {
  font-weight: 400;
}

/* Station tags: hairline pill like .btn-ghost. Only the "#" is red. */
html[data-theme="loud"] .tag-pill {
  border: 1px solid var(--rule);
  background: none;
  color: var(--ink-mid);
  font-style: italic;
  font-size: .82rem;
}

/* Avatars: fill colors already follow the theme (AVATAR_COLORS uses tokens),
   but the base 3px border doesn't, so use the hairline. */
html[data-theme="loud"] .cast-avatar,
html[data-theme="loud"] .profile-avatar {
  border: 1px solid var(--rule);
}

/* Hide .cast-reply-voice-dot on #btnReply and .cast-reply-voice; the red
   accent would compete with ink. */
html[data-theme="loud"] .cast-reply-voice-dot {
  display: none;
}

/* Remaining .feed-title headings (e.g. thread): mono italic, no comic shadow. */
html[data-theme="loud"] .feed-title {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-shadow: none;
}

/* Follow/share/report and upgrade-account/save-tags buttons carry an inline
   box-shadow from the shared JS, so flattening it needs !important. */
html[data-theme="loud"] #btnFollow,
html[data-theme="loud"] #btnShareStation,
html[data-theme="loud"] #btnReportUser,
html[data-theme="loud"] #btnUpgradeAccount,
html[data-theme="loud"] #btnSaveTags,
html[data-theme="loud"] #btnCopyToken,
html[data-theme="loud"] #btnCopyProfileUrl {
  box-shadow: none !important;
}

/* Auth panel "switch" buttons (← back, forgot password?, etc.) have no base
   styling and fell back to native button chrome. Style them as quiet text
   links (ink-mid → ink). */
html[data-theme="loud"] .auth-switch {
  background: none;
  border: none;
  padding: .3rem 0;
  width: auto;
  box-shadow: none;
  color: var(--ink-mid);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
}
html[data-theme="loud"] .auth-switch:hover {
  background: none;
  color: var(--ink);
  text-decoration: underline;
}

/* Slide-out menu "← close": same quiet text-link style as .auth-switch. */
html[data-theme="loud"] .section-back {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-mid);
}
html[data-theme="loud"] .section-back:hover {
  opacity: 1;
  color: var(--ink);
}

/* Tabs / pills: comic outline + all-black active → understated */
html[data-theme="loud"] .auth-tab,
html[data-theme="loud"] .feed-tab {
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-mid);
}
html[data-theme="loud"] .auth-tab.active { background: var(--ink); color: var(--paper); }
html[data-theme="loud"] .feed-tab.active { background: var(--ink); color: var(--paper); }

/* Legal sub-nav: same hairline pill as auth-tab/feed-tab. */
html[data-theme="loud"] .legal-subnav-btn {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: lowercase;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-mid);
  box-shadow: none;
  padding: .5em 1.1em;
}
html[data-theme="loud"] .legal-subnav-btn:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ink);
  color: var(--ink);
}
html[data-theme="loud"] .legal-subnav-btn:active { transform: none; box-shadow: none; }
html[data-theme="loud"] .legal-subnav-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Station tuner ("FM dial"): the base radio-dial look has no kaiunta
   equivalent, so it is redrawn as a hairline track with faint ink ticks and a
   plain pill readout. */
html[data-theme="loud"] .stations-dial-readout {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: .8rem;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: none;
}
html[data-theme="loud"] .stations-dial-readout:hover,
html[data-theme="loud"] .stations-dial-readout:active {
  transform: none;
  box-shadow: none;
  border-color: var(--ink);
}
html[data-theme="loud"] .stations-dial-range::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  border: none;
  background:
    repeating-linear-gradient(90deg, var(--ink-faint) 0 1px, transparent 1px 4%),
    var(--rule);
}
html[data-theme="loud"] .stations-dial-range::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  border: none;
  background:
    repeating-linear-gradient(90deg, var(--ink-faint) 0 1px, transparent 1px 4%),
    var(--rule);
}
html[data-theme="loud"] .stations-dial-range::-webkit-slider-thumb {
  width: 3px;
  height: 18px;
  margin-top: -8px;
  background: var(--ink);
  border: none;
  border-radius: 1px;
  box-shadow: none;
}
html[data-theme="loud"] .stations-dial-range::-moz-range-thumb {
  width: 3px;
  height: 18px;
  background: var(--ink);
  border: none;
  border-radius: 1px;
  box-shadow: none;
}

/* The readout is taken out of flow so JS (positionDialReadout) can place it
   above the thumb. */
html[data-theme="loud"] .stations-dial {
  position: relative;
  padding-top: 2.25rem;
}
html[data-theme="loud"] .stations-dial-readout {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

/* Record / FAB circles: hairline border. The FAB keeps the red accent because
   it is a single persistent element; record-circle and cast-play repeat, so
   they stay on ink. */
html[data-theme="loud"] .record-fab {
  border: 1px solid var(--black);
  box-shadow: none;
  /* Always a light dot; --on-accent goes near-black in dark mode. */
  color: #fff;
}
/* .record-fab is fixed and can cover a card's action row (share/flag).
   Reserve space at the bottom of the list. */
html[data-theme="loud"] .feed-list,
html[data-theme="loud"] #threadList {
  padding-bottom: 6rem;
}
html[data-theme="loud"] .record-circle,
html[data-theme="loud"] .cast-play {
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: none;
}
html[data-theme="loud"] .cast-reply-voice {
  border: 1px solid var(--black);
  box-shadow: none;
}
/* Dark mode: the bubble icon takes currentColor = --on-accent, which is near-black
   here, so it read as a black box on the red pill. Make it white, like the FAB dot. */
html[data-theme="loud"][data-kai-dark="1"] .cast-reply-voice {
  color: #fff;
}
/* Hide .cast-reply-voice-dot (see #btnReply above). */
html[data-theme="loud"] .cast-reply-voice-dot {
  display: none;
}
html[data-theme="loud"] .record-circle.recording { background: var(--yellow); color: #1a1714; }

/* Back/close circle: hairline border, transparent, ink-mid arrow, inverts on
   hover (as kaiunta.com's overlay-close). */
html[data-theme="loud"] .feed-back {
  background: none;
  border: 1px solid var(--rule);
  box-shadow: none;
  color: var(--ink-mid);
  transition: background .15s, border-color .15s, color .15s;
}
html[data-theme="loud"] .feed-back:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Hide #feedBack and #stationsBack: they only go to viewFeed/viewHero, which
   the logo already does. !important because JS also toggles #feedBack inline
   on login state. */
html[data-theme="loud"] #feedBack,
html[data-theme="loud"] #stationsBack {
  display: none !important;
}

/* Stations toolbar: drop the base top padding so the search box gap matches
   feed, and use a hairline divider. */
html[data-theme="loud"] .stations-toolbar {
  padding-top: 0;
  border-bottom: 1px solid var(--rule);
}

/* Inputs / search / scan: hard shadow → hairline */
html[data-theme="loud"] .auth-field input,
html[data-theme="loud"] .feed-search,
html[data-theme="loud"] .feed-scan-btn,
html[data-theme="loud"] .search-box input,
html[data-theme="loud"] .record-caption,
html[data-theme="loud"] .modal select,
html[data-theme="loud"] .modal textarea,
html[data-theme="loud"] .profile-edit textarea {
  border: 1px solid var(--rule);
  box-shadow: none;
}
html[data-theme="loud"] .auth-field input:focus,
html[data-theme="loud"] .record-caption:focus { box-shadow: none; border-color: var(--ink); }

/* #tagsInput and #profileShareUrlInput set their border and radius inline in
   the shared markup, which beats the rule above, so match with !important. */
html[data-theme="loud"] #tagsInput,
html[data-theme="loud"] #profileShareUrlInput {
  border: 1px solid var(--rule) !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
  color: var(--ink-mid);
}
html[data-theme="loud"] #tagsInput:focus,
html[data-theme="loud"] #profileShareUrlInput:focus {
  outline: none;
  border-color: var(--ink) !important;
}

/* Footer nav: icon-only circles. Text is hidden with font-size:0 (markup
   untouched) and icons are CSS masks, like .hdr-bell. Sized to match
   .hdr-btn/.hdr-bell. */
html[data-theme="loud"] .footer-link,
html[data-theme="loud"] .footer-feed-btn,
html[data-theme="loud"] .footer-stations-btn,
html[data-theme="loud"] .footer-autostream-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mid);
  background: var(--icon-fill);
  border: none;
  border-radius: 50%;
  font-size: 0;
  transition: background .15s;
}
html[data-theme="loud"] .footer-feed-btn::before,
html[data-theme="loud"] .footer-stations-btn::before,
html[data-theme="loud"] .footer-autostream-btn::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--ink-mid);
  transition: background-color .15s;
}
/* voices = mic icon */
html[data-theme="loud"] .footer-feed-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* stations = broadcast-tower icon (same as the station-avatar fallback) */
html[data-theme="loud"] .footer-stations-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.93 4.93a10 10 0 0 0 0 14.14'/%3E%3Cpath d='M7.76 7.76a6 6 0 0 0 0 8.49'/%3E%3Cpath d='M16.24 7.76a6 6 0 0 1 0 8.49'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000' stroke='none'/%3E%3Cline x1='12' y1='13.5' x2='12' y2='20'/%3E%3Cline x1='9.5' y1='20' x2='14.5' y2='20'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.93 4.93a10 10 0 0 0 0 14.14'/%3E%3Cpath d='M7.76 7.76a6 6 0 0 0 0 8.49'/%3E%3Cpath d='M16.24 7.76a6 6 0 0 1 0 8.49'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000' stroke='none'/%3E%3Cline x1='12' y1='13.5' x2='12' y2='20'/%3E%3Cline x1='9.5' y1='20' x2='14.5' y2='20'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* stream = play triangle */
html[data-theme="loud"] .footer-autostream-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Cpolygon points='6,4 20,12 6,20'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Cpolygon points='6,4 20,12 6,20'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-theme="loud"] .footer-feed-btn:hover,
html[data-theme="loud"] .footer-stations-btn:hover,
html[data-theme="loud"] .footer-autostream-btn:hover { background: var(--ink); }
html[data-theme="loud"] .footer-feed-btn:hover::before,
html[data-theme="loud"] .footer-stations-btn:hover::before,
html[data-theme="loud"] .footer-autostream-btn:hover::before { background-color: var(--paper); }

/* Streaming (.active): pause icon in --red, the accent for "live". */
html[data-theme="loud"] .footer-autostream-btn.active {
  background: var(--red);
  border-color: var(--red);
}
html[data-theme="loud"] .footer-autostream-btn.active::before {
  background-color: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Crect x='5' y='4' width='5' height='16'/%3E%3Crect x='14' y='4' width='5' height='16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Crect x='5' y='4' width='5' height='16'/%3E%3Crect x='14' y='4' width='5' height='16'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-theme="loud"] .footer-autostream-btn.active:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* Footer: black bar + thick red top border → flat paper with hairline */
html[data-theme="loud"] .site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
html[data-theme="loud"] .hdr-burger { background: var(--icon-fill); }
html[data-theme="loud"] .hdr-burger:hover { background: var(--ink); }
html[data-theme="loud"] .hdr-burger span { background: var(--ink); }
html[data-theme="loud"] .hdr-burger:hover span { background: var(--paper); }

/* Menu hero teaser (#menuHeroTeaser): the hero's eyebrow/title/copy reused
   via the same classes, rescaled for a menu row. Left-aligned, no border;
   tapping opens the full hero. */
html[data-theme="loud"] .menu-hero-teaser {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  padding: 0 0 1.25rem;
  margin-bottom: 1rem;
  cursor: pointer;
}
html[data-theme="loud"] .menu-hero-teaser .hero-eyebrow {
  font-size: .68rem;
}
html[data-theme="loud"] .menu-hero-teaser .hero-kai-title {
  font-size: 1.5rem;
  margin: .35rem 0;
}
html[data-theme="loud"] .menu-hero-teaser .hero-kai-copy {
  font-size: .85rem;
  line-height: 1.5;
}
html[data-theme="loud"] .menu-hero-teaser:hover .hero-kai-title {
  color: var(--red);
}

/* Slide-out menu: thick borders + shouty accordion → hairline + italic */
html[data-theme="loud"] .menu-logout-btn {
  border: none;
  border-radius: 999px;
  color: var(--red);
  font-style: normal;
  letter-spacing: .08em;
  text-transform: lowercase;
  font-size: .78rem;
}
html[data-theme="loud"] .menu-logout-btn:hover { background: var(--red); color: var(--paper); }
html[data-theme="loud"] .menu-guest-ctas {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
html[data-theme="loud"] .menu-guest-ctas .hdr-btn,
html[data-theme="loud"] .menu-guest-ctas .hdr-btn-primary {
  width: 100%;
  height: 44px;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
}
/* Person/plus glyphs from the header's login/signup circles, shown inline
   next to the label since the menu keeps full text. */
html[data-theme="loud"] .menu-cta-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
html[data-theme="loud"] .menu-cta-icon-login {
  background-color: var(--ink-mid);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
}
html[data-theme="loud"] .menu-guest-ctas .hdr-btn:hover .menu-cta-icon-login {
  background-color: var(--paper);
}
html[data-theme="loud"] .menu-cta-icon-signup {
  background-color: var(--paper);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
}

/* Voices / stations menu rows: same mic/tower glyphs as the footer circles,
   with text labels. */
html[data-theme="loud"] .menu-nav-links {
  display: flex;
  flex-direction: column;
  margin-top: .75rem;
}
html[data-theme="loud"] .menu-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-family: var(--font-mono);
  font-style: italic;
  letter-spacing: -.01em;
  color: var(--ink);
  font-size: 1.05rem;
  padding: .85rem .25rem;
  cursor: pointer;
  transition: color .15s;
}
html[data-theme="loud"] .menu-nav-link:hover { color: var(--red); }
html[data-theme="loud"] .menu-nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  background-color: var(--ink-mid);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: background-color .15s;
}
html[data-theme="loud"] .menu-nav-link:hover .menu-nav-icon { background-color: var(--red); }
html[data-theme="loud"] .menu-nav-icon-voices {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M3.6 15.5v-2.7a8.4 8.4 0 0 1 16.8 0v2.7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3Crect x='1.6' y='13.6' width='4.6' height='8' rx='2.2'/%3E%3Crect x='17.8' y='13.6' width='4.6' height='8' rx='2.2'/%3E%3Cpath fill-rule='evenodd' d='M8.02 14.57L8.78 18.60L11.10 15.94A5.2 4.0 0 1 0 8.02 14.57zM8.95 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0zM11.05 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0zM13.15 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M3.6 15.5v-2.7a8.4 8.4 0 0 1 16.8 0v2.7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3Crect x='1.6' y='13.6' width='4.6' height='8' rx='2.2'/%3E%3Crect x='17.8' y='13.6' width='4.6' height='8' rx='2.2'/%3E%3Cpath fill-rule='evenodd' d='M8.02 14.57L8.78 18.60L11.10 15.94A5.2 4.0 0 1 0 8.02 14.57zM8.95 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0zM11.05 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0zM13.15 11.90a.95 .95 0 1 0 1.9 0a.95 .95 0 1 0-1.9 0z'/%3E%3C/svg%3E");
}
html[data-theme="loud"] .menu-nav-icon-stations {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.93 4.93a10 10 0 0 0 0 14.14'/%3E%3Cpath d='M7.76 7.76a6 6 0 0 0 0 8.49'/%3E%3Cpath d='M16.24 7.76a6 6 0 0 1 0 8.49'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000' stroke='none'/%3E%3Cline x1='12' y1='13.5' x2='12' y2='20'/%3E%3Cline x1='9.5' y1='20' x2='14.5' y2='20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.93 4.93a10 10 0 0 0 0 14.14'/%3E%3Cpath d='M7.76 7.76a6 6 0 0 0 0 8.49'/%3E%3Cpath d='M16.24 7.76a6 6 0 0 1 0 8.49'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000' stroke='none'/%3E%3Cline x1='12' y1='13.5' x2='12' y2='20'/%3E%3Cline x1='9.5' y1='20' x2='14.5' y2='20'/%3E%3C/svg%3E");
}
/* Menu bookmarks row: same ribbon glyph as .cast-bookmark svg in index.php. */
html[data-theme="loud"] .menu-nav-icon-bookmarks {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* Menu stream row: play triangle as in the footer stream button, swapped to
   pause via .active (kept in sync by setAutoStreamBtnState() in
   index-theme.php). Red when active. */
html[data-theme="loud"] .menu-nav-icon-stream {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Cpolygon points='6,4 20,12 6,20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Cpolygon points='6,4 20,12 6,20'/%3E%3C/svg%3E");
}
html[data-theme="loud"] .menu-nav-stream.active {
  color: var(--red);
}
html[data-theme="loud"] .menu-nav-stream.active .menu-nav-icon {
  background-color: var(--red);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Crect x='5' y='4' width='5' height='16'/%3E%3Crect x='14' y='4' width='5' height='16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='none'%3E%3Crect x='5' y='4' width='5' height='16'/%3E%3Crect x='14' y='4' width='5' height='16'/%3E%3C/svg%3E");
}

/* Stream loading toast: flat card like .search-user, italic mono. */
html[data-theme="loud"] .stream-loading-toast {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 3px rgba(26, 26, 26, .06);
  font-family: var(--font-mono);
  font-style: italic;
  letter-spacing: -.01em;
}

html[data-theme="loud"] .menu-accordion-item { border-bottom: 1px solid var(--rule); }
html[data-theme="loud"] .menu-accordion-trigger {
  color: var(--ink);
  font-style: italic;
  letter-spacing: -.01em;
  text-transform: none;
  font-size: 1.3rem;
}

html[data-theme="loud"] .menu-accordion-trigger:hover { color: var(--red); }

/* Menu body copy (about, use cases, legal, etc.): drop the base comic box and
   lowercase the whole paragraph. text-transform also reaches <strong> and
   <a>. */
html[data-theme="loud"] .legal-text {
  display: block;
  width: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  padding: 0;
  text-transform: lowercase;
}

html[data-theme="loud"] .story-signoff {
  font-style: italic;
}

/* Badges */
html[data-theme="loud"] .bell-badge,
html[data-theme="loud"] .feed-new-pill {
  box-shadow: none;
  border: 1px solid var(--ink);
}

/* Hidden-count note: make the "hit scan" action italic with no underline,
   like .sites-list-link and .story-signoff. */
html[data-theme="loud"] .feed-hidden-note-action {
  font-style: italic;
  text-decoration: none;
  letter-spacing: -.01em;
}
html[data-theme="loud"] .feed-hidden-note-action:hover {
  color: var(--ink);
}

/* Today's-prompt banner: flatten the base sticker (yellow fill, thick border,
   hard shadow, all-caps red label). */
html[data-theme="loud"] .prompt-banner {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: none;
}
html[data-theme="loud"] .prompt-banner-label {
  font-family: var(--font-mono);
  font-style: italic;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--ink-faint);
}

/* Mascot and expand list: same subtle surface card as .prompt-banner above. */
html[data-theme="loud"] .prompt-banner-mascot {
  border-radius: 8px;
  border: 1px solid var(--rule);
}
html[data-theme="loud"] .feed-prompt-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: none;
}

/* "Our sites" links: flat italic mono, matching the legal-text links. */
html[data-theme="loud"] .sites-list-link {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-shadow: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .3em;
}
html[data-theme="loud"] .sites-list-link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* Titles & buttons: lowercase, not the base ALL CAPS, including UI chrome. */
html[data-theme="loud"] button,
html[data-theme="loud"] h1,
html[data-theme="loud"] h2,
html[data-theme="loud"] .auth-panel-heading,
html[data-theme="loud"] .record-title,
html[data-theme="loud"] .modal th {
  text-transform: lowercase;
}

/* Desktop: #anonTokenOverlay (recovery code) and #welcomeOverlay are
   important enough to outgrow the 380px modal card: wider card, larger type,
   bigger input and buttons, still centered over the backdrop. Scoped to
   min-width so it hands off to the mobile full-bleed block at 600px.
   #recordOverlay is excluded; it needs its own layout. */
@media (min-width: 601px) {
  html[data-theme="loud"] #anonTokenOverlay .record-card,
  html[data-theme="loud"] #welcomeOverlay .record-card {
    width: min(480px, 90vw);
    padding: 2.5rem 2.25rem;
    gap: 1.5rem;
  }
  html[data-theme="loud"] #anonTokenOverlay .record-title,
  html[data-theme="loud"] #welcomeOverlay .record-title {
    font-size: 1.75rem;
  }
  html[data-theme="loud"] #anonTokenOverlay .record-hint,
  html[data-theme="loud"] #welcomeOverlay .record-hint {
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 38ch;
  }
  html[data-theme="loud"] #anonTokenInput {
    font-size: 1rem !important;
    height: 56px !important;
    letter-spacing: .02em;
  }
  html[data-theme="loud"] #anonTokenOverlay .btn-ghost,
  html[data-theme="loud"] #anonTokenOverlay .btn-primary,
  html[data-theme="loud"] #welcomeOverlay .btn-primary {
    height: 52px;
    font-size: .8rem;
  }
}

/* Mobile: #anonTokenOverlay and #welcomeOverlay go full-bleed so they aren't
   skimmed past. Kaiunta-only. #recordOverlay is excluded because its
   timer/caption/preview stack needs its own layout. */
@media (max-width: 600px) {
  html[data-theme="loud"] #anonTokenOverlay,
  html[data-theme="loud"] #welcomeOverlay {
    padding: 0;
  }
  html[data-theme="loud"] #anonTokenOverlay .record-card,
  html[data-theme="loud"] #welcomeOverlay .record-card {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    justify-content: center;
    padding: 2.5rem 1.75rem;
    gap: 1.75rem;
  }
  html[data-theme="loud"] #anonTokenOverlay .record-title,
  html[data-theme="loud"] #welcomeOverlay .record-title {
    font-size: 1.6rem;
  }
  html[data-theme="loud"] #anonTokenOverlay .record-hint,
  html[data-theme="loud"] #welcomeOverlay .record-hint {
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 32ch;
  }
  html[data-theme="loud"] #anonTokenInput {
    font-size: 1rem !important;
    height: 58px !important;
    letter-spacing: .02em;
  }
  html[data-theme="loud"] #anonTokenOverlay .btn-ghost,
  html[data-theme="loud"] #anonTokenOverlay .btn-primary,
  html[data-theme="loud"] #welcomeOverlay .btn-primary {
    height: 58px;
    font-size: .8rem;
  }
}

/* Profile anonymous-account notice and its two buttons (upgrade account /
   copy recovery code): wrapped in one bordered card so it doesn't read like
   helper text.

   Uses an explicit .profile-anon-card class (index-theme.php) rather than
   :has() or :first-child, which can break on markup reorder or in browsers
   without :has(). font-size/color need !important because the <p> has inline
   styles. */
html[data-theme="loud"] .profile-anon-card {
  margin-top: 1.25rem;
  background: var(--sand);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 1rem 1.1rem 1.1rem;
}
html[data-theme="loud"] .profile-anon-card > p:first-child {
  font-size: 1rem !important;
  color: var(--ink) !important;
  line-height: 1.6;
  margin: 0 0 .2rem;
}
/* ── Go Live (per-station live mic broadcasting) ──
   Flat paper; red only for the live dot/border. Rendered only when
   LIVE_BROADCASTING_ENABLED (index.php), so these rules just style the
   markup. */
html[data-theme="loud"] .go-live-panel {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: var(--surface);
}
html[data-theme="loud"] .btn-go-live {
  width: 100%;
  height: 48px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--paper);
  cursor: pointer;
  transition: opacity .15s;
}
html[data-theme="loud"] .btn-go-live:hover {
  opacity: .8;
}
html[data-theme="loud"] .go-live-hint {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--ink-mid);
  text-align: center;
  margin: .5rem 0 0;
}
html[data-theme="loud"] .go-live-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
html[data-theme="loud"] .live-pill,
html[data-theme="loud"] .live-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: .35rem .75rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--red);
}
html[data-theme="loud"] .live-badge {
  padding: .2rem .5rem;
  font-size: .68rem;
  margin-left: .5rem;
  vertical-align: middle;
  cursor: pointer;
  transition: opacity .15s;
}
html[data-theme="loud"] .live-badge:hover {
  opacity: .75;
}
html[data-theme="loud"] .live-badge.active {
  background: var(--red);
  color: var(--paper);
}
html[data-theme="loud"] .live-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: loudLivePulse 1.2s infinite;
}
@keyframes loudLivePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
html[data-theme="loud"] .live-pill-timer {
  color: var(--ink-mid);
  font-family: var(--font-mono);
}
html[data-theme="loud"] .go-live-url-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-top: .85rem;
}

/* ── Global on-air bar ──
   Fixed below the header on every view. Flat paper, hairline border, no
   shadow (like .go-live-panel). */
html[data-theme="loud"] .on-air-bar {
  position: fixed;
  top: var(--hdr-base, var(--hdr-h));
  left: 0;
  right: 0;
  z-index: 99; /* one below .hdr's z-index:100 */
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: var(--surface);
  border-bottom: 1px solid var(--red);
  padding: 0 1rem;
}
/* Needed for [hidden] (toggled by setGoLiveUiLive() in index.php); otherwise
   the display:flex rule above wins. See the matching comment in
   justwitter.css. */
html[data-theme="loud"] .on-air-bar[hidden] {
  display: none;
}
html[data-theme="loud"] .on-air-bar .on-air-label {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--red);
}
html[data-theme="loud"] .on-air-bar .live-pill-timer {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-mid);
}
html[data-theme="loud"] .on-air-bar .live-pill-timer.on-air-ending-soon {
  color: var(--red);
  animation: loudLivePulse 1.2s infinite;
}
html[data-theme="loud"] .on-air-end-btn {
  height: 26px;
  padding: 0 .7rem;
  background: var(--ink);
  border: none;
  border-radius: 4px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: .65rem;
  letter-spacing: .02em;
  cursor: pointer;
  margin-left: .4rem;
}
html[data-theme="loud"] .on-air-end-btn:hover {
  opacity: .8;
}

/* New-station dialog buttons match the log-in panel's. style.css pins
   #confirmStationOverlay's buttons to the 60/66px hard-shadow look, so
   restate the 52px flat pill values at higher specificity. */
html[data-theme="loud"] #confirmStationOverlay .record-actions .btn-primary,
html[data-theme="loud"] #confirmStationOverlay .record-actions .btn-ghost {
  height: 52px;
  box-shadow: none;
  font-size: .72rem;
}

/* Footer icon buttons: center the icon absolutely. font-size:0 still leaves
   Safari a sliver of label width, which pushed the icon 3-4px off center. */
html[data-theme="loud"] .footer-feed-btn,
html[data-theme="loud"] .footer-stations-btn,
html[data-theme="loud"] .footer-autostream-btn {
  position: relative;
  letter-spacing: 0;
  word-spacing: 0;
}
html[data-theme="loud"] .footer-feed-btn::before,
html[data-theme="loud"] .footer-stations-btn::before,
html[data-theme="loud"] .footer-autostream-btn::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}

/* ── Feed controls (all widths) ──
   Hairline pills and ghost buttons instead of the base sticker buttons.
   CSS only; no markup or JS changes. */

/* The empty .feed-header (hidden title and back button) still adds a flex
   gap. Take it out of flow; it stays readable to screen readers. */
html[data-theme="loud"] #feedControlsExtra .feed-header {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search already runs on typing and Enter, so the feed's GO button is
   redundant. The topic page's GO button stays. */
html[data-theme="loud"] #feedSearchGo { display: none; }

html[data-theme="loud"] .feed-search-row .feed-search {
  border-radius: 999px;
  padding: 0 1.2rem;
}
html[data-theme="loud"] .feed-search-row .feed-scan-btn {
  background: transparent;
  color: var(--ink-mid);
  border-radius: 999px;
  padding: 0;
  aspect-ratio: 1;
}
html[data-theme="loud"] .feed-search-row .feed-scan-btn.active {
  background: var(--ink);
  color: var(--paper);
}

/* all / signed / unsigned: hairline pills like the tabs. Border and radius
   are set inline in the markup, so they need !important. The active fill is
   still set inline by switchFrameFilter(). */
html[data-theme="loud"] .frame-filter-btn {
  border: 1px solid var(--rule) !important;
  border-radius: 999px !important;
  letter-spacing: 0 !important;
}
html[data-theme="loud"] .frame-filter-btn:not(.active) { color: var(--ink-mid) !important; }
html[data-theme="loud"] .frame-filter-btn.active { border-color: var(--ink) !important; }

/* Sidebar layout (900px and up): the pills are narrow, and "signed" wrapped
   its emoji onto a separate line. Keep each label on one line. The search
   row is 44px tall, as on mobile. */
@media (min-width: 900px) {
  html[data-theme="loud"] .feed-search-row .feed-search,
  html[data-theme="loud"] .feed-search-row .feed-scan-btn { height: 44px; }
  html[data-theme="loud"] #feedFrameFilter .frame-filter-btn {
    white-space: nowrap;
    min-width: 0;
    padding: .4rem .2rem !important;
    font-size: .66rem !important;
  }
}

/* ── Mobile feed controls: get the first voice closer to the top ── */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewFeed { gap: .7rem; }

  html[data-theme="loud"] .feed-search-row .feed-search,
  html[data-theme="loud"] .feed-search-row .feed-scan-btn { height: 44px; }

  /* Prompt banner: smaller mascot, and three lines of text so questions
     aren't cut off. */
  html[data-theme="loud"] #feedPromptBanner {
    gap: .65rem;
    padding: .65rem .8rem;
    font-size: .8rem;
  }
  html[data-theme="loud"] #feedPromptBanner .prompt-banner-mascot {
    width: 2.4rem;
    height: 2.4rem;
  }
  html[data-theme="loud"] #feedPromptBanner .prompt-banner-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* Footer: hide the voices (mic) and stations (tower) circles. The tabs, the
   burger menu and the logo already cover both. The stream button and the
   layout toggle stay. To bring them back, delete this rule. */
html[data-theme="loud"] .footer-feed-btn,
html[data-theme="loud"] .footer-stations-btn {
  display: none !important;
}

/* Footer side padding follows the header at each width, so the footer icons
   line up with the header icons above them. */
html[data-theme="loud"] .site-footer { padding: 0 2rem; }
@media (min-width: 1800px) {
  html[data-theme="loud"] .site-footer { padding: 0 2.5rem; }
}
@media (max-width: 480px) {
  html[data-theme="loud"] .site-footer { padding: 0 .75rem; }
}
/* Record modal mode pill + reply context card (base rules in style.css).
   Hairline and flat like the rest of the theme: no sticker fill, no thick
   border. Reply mode is marked by an ink border and text, not the base's
   inverted black pill, which would be a heavy block in this theme. */
html[data-theme="loud"] .record-mode {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
  font-style: italic;
  letter-spacing: 0;
}
html[data-theme="loud"] .record-mode[data-mode="reply"] {
  background: none;
  border-color: var(--ink);
  color: var(--ink);
}
html[data-theme="loud"] .record-mode-icon,
html[data-theme="loud"] .record-mode[data-mode="reply"] .record-mode-icon {
  color: var(--red);
}
html[data-theme="loud"] .record-reply-ctx {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--ink);
  border-radius: 8px;
}
html[data-theme="loud"] .record-reply-ctx-avatar {
  border: 1px solid var(--rule);
  color: var(--ink);
}
html[data-theme="loud"] .record-reply-ctx-meta { color: var(--ink); }
html[data-theme="loud"] .record-reply-ctx-text {
  color: var(--ink-mid);
  font-style: italic;
}
/* Large screens (1600px and up): style.css raises the burger, bell and toggle
   circles to 42px at this width, but the login/plus icon buttons and the
   footer stream button are fixed at 34px above (ID selector / no large-screen
   rule), so the header and footer icons ended up in two sizes. Match them at
   42px, with the inner icons scaled up to suit. Below 1600px all stay 34px. */
@media (min-width: 1600px) {
  html[data-theme="loud"] #btnHdrLogin,
  html[data-theme="loud"] #btnHdrSignup,
  html[data-theme="loud"] .footer-autostream-btn {
    width: 42px;
    height: 42px;
  }
  html[data-theme="loud"] #btnHdrLogin::before,
  html[data-theme="loud"] #btnHdrSignup::before,
  html[data-theme="loud"] .footer-autostream-btn::before {
    width: 18px;
    height: 18px;
  }
}

/* ── Go Live panel fixes ─────────────────────────────────────────────────────
   1) .go-live-active sets display:flex above, which overrode its hidden attribute, so the
      "LIVE 00:00 / end stream" row showed while the station was NOT live. Re-assert hidden.
   2) A disabled GO LIVE (scheduled-only mode, no slot open) must look unavailable. The theme's
      .btn-go-live background beat the generic button:disabled rule, so it still looked active. */
html[data-theme="loud"] .go-live-idle[hidden],
html[data-theme="loud"] .go-live-active[hidden] {
  display: none;
}
html[data-theme="loud"] .btn-go-live:disabled {
  background: var(--rule);
  color: var(--ink-mid);
  border: 1px dashed var(--ink-mid);
  cursor: not-allowed;
}
html[data-theme="loud"] .btn-go-live:disabled:hover {
  opacity: 1;
}
html[data-theme="loud"] .btn-go-live[data-gated]:disabled::after {
  content: " · scheduled only";
}

/* ── Residents page ──
   Its rules live in index.php with base-theme values (16px radius, 2px black
   avatar ring). Bring the cards and chips in line with the other kaiunta
   cards: 8px radius, hairline border, soft shadow, pill chips. */
html[data-theme="loud"] .resident-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 6%, transparent);
  background: var(--surface);
}
html[data-theme="loud"] .resident-card:hover { border-color: var(--ink-mid); }
html[data-theme="loud"] .resident-avatar { border: 1px solid var(--rule); }
html[data-theme="loud"] .resident-chip,
html[data-theme="loud"] .residents-admin-chip { border-color: var(--rule); color: var(--ink-mid); }
html[data-theme="loud"] .resident-next { border-top-color: var(--rule); }
html[data-theme="loud"] .residents-admin-note { border-radius: 8px; }

/* Resident badge: --red is brightened in dark mode, so white text on it falls short of AA. Use the dark paper tone. */
html[data-theme="loud"][data-kai-dark="1"] .resident-badge { color: #1a1512; }

/* ════════════════════════════════════════════════════════════════════════
   LOUD COLOUR LAYER: the welcome page's colours on the app's shapes
   ════════════════════════════════════════════════════════════════════════ */

/* ── Header: ink black, white wordmark, hot-red slash, yellow CTA ── */
html[data-theme="loud"] .hdr {
  background: var(--night);
  border-bottom: 0;
  --paper:     #1a1714;
  --ink:       #ffffff;
  --ink-mid:   #d9d2c6;
  --ink-faint: #b8b0a3;
  --rule:      #332e29;
  --red:       #ff5468;
  --icon-fill: rgba(255,255,255,.14);
}
html[data-theme="loud"] .hdr-btn-primary,
html[data-theme="loud"] #btnHdrSignup {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1714;
}
html[data-theme="loud"] .hdr-btn-primary:hover,
html[data-theme="loud"] #btnHdrSignup:hover { background: #ffffff; border-color: #ffffff; color: #1a1714; opacity: 1; }
html[data-theme="loud"] #btnHdrSignup::before { background-color: #1a1714; }

/* ── Hero: red, white type, yellow CTA ── */
html[data-theme="loud"] .hero {
  background: var(--loud-red);
  color: var(--ink);
  --paper:     #c8283a;
  --ink:       #ffffff;
  --ink-mid:   rgba(255,255,255,.92);
  --ink-faint: rgba(255,255,255,.8);
  --rule:      rgba(255,255,255,.4);
  --red:       #ffe600;
}
@media (min-width: 641px) {
  html[data-theme="loud"] .hero-kai-ctas .btn-primary {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #1a1714;
  }
  html[data-theme="loud"] .hero-kai-ctas .btn-primary:hover { background: #ffffff; border-color: #ffffff; opacity: 1; }
  /* the media scrim fades into red instead of paper */
  html[data-theme="loud"] .hero-kai-media-scrim {
    background: linear-gradient(90deg,
      #c8283a 0%, #c8283a 34%,
      rgba(200,40,58,.82) 50%, rgba(200,40,58,.35) 68%, rgba(200,40,58,0) 85%);
  }
}
html[data-theme="loud"] .hero-kai-login:hover { color: var(--yellow); }
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts {
  background: #f7f4ee;
  color: #1a1714;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(26,10,10,.25);
}
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts::after { color: var(--loud-red); }
html[data-theme="loud"] #viewHero .hero-kai-copy.hero-copy-prompts:focus-visible { outline-color: var(--yellow); }
/* phones with a video/image behind the hero: text stays white */
@media (max-width: 640px) {
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-eyebrow,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-eyebrow,
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-title,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-title,
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-copy,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-copy,
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-login,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-login,
  html[data-theme="loud"] #viewHero[data-hero-media="video"] .hero-kai-ctas .btn-primary,
  html[data-theme="loud"] #viewHero[data-hero-media="image"] .hero-kai-ctas .btn-primary { color: #ffffff; }
}

/* ── Buttons: red primary, hairline ghost ── */
html[data-theme="loud"] .btn-primary {
  background: var(--loud-red);
  border-color: var(--loud-red);
  color: #ffffff;
}
html[data-theme="loud"] .btn-primary:hover { background: var(--loud-red-dark); border-color: var(--loud-red-dark); opacity: 1; }

/* ── Cards: white on paper, rounder corners ── */
html[data-theme="loud"] .auth-card,
html[data-theme="loud"] .record-card,
html[data-theme="loud"] .cast-card,
html[data-theme="loud"] .modal,
html[data-theme="loud"] .profile-header,
html[data-theme="loud"] .notif-item,
html[data-theme="loud"] .search-user,
html[data-theme="loud"] .resident-card,
html[data-theme="loud"] .go-live-panel { border-radius: var(--card-radius); }
html[data-theme="loud"] .profile-lock-card { border-radius: var(--card-radius); }

/* ── Tabs / filters: sand track, black active ── */
html[data-theme="loud"] .feed-tab:not(.active),
html[data-theme="loud"] .auth-tab:not(.active) { background: var(--sand); }
html[data-theme="loud"] .tag-pill { background: var(--surface); }

/* ── Today's prompt = the welcome page's yellow band ── */
html[data-theme="loud"] .prompt-banner {
  background: var(--yellow);
  border: 2px solid #1a1714;
  border-radius: var(--card-radius);
  color: #1a1714;
  --ink:       #1a1714;
  --ink-mid:   #3d3600;
  --ink-faint: #5a4f00;
  --red:       #c8283a;
}
html[data-theme="loud"] .prompt-banner-label { color: #3d3600; }
html[data-theme="loud"] .prompt-banner-mascot { border-color: #1a1714; }
html[data-theme="loud"] .feed-prompt-item { background: var(--surface); }

/* ── Record button: red with a cream ring (reads on the dark footer) ── */
html[data-theme="loud"] .record-fab {
  background: var(--loud-red);
  border: 3px solid #f7f4ee;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* ── Footer: deep black, light icons ── */
html[data-theme="loud"] .site-footer {
  background: var(--night-deep);
  border-top: 0;
  color: #d9d2c6;
  --paper:     #0f0d0b;
  --ink:       #ffffff;
  --ink-mid:   #d9d2c6;
  --ink-faint: #d9d2c6;
  --rule:      #332e29;
  --red:       #ff5468;
  --icon-fill: rgba(255,255,255,.12);
}
/* ── v2026-11-27.3: voice cards get a coloured top edge (from the welcome page's cards) ──
   Every voice card gets a red top edge; in the main feed the edge cycles red, blue, green down the list.
   To undo: delete this whole block (and set loudtheme.css back to ?v=1 in index.php). */
html[data-theme="loud"] .cast-card {
  border-top: 6px solid var(--card-accent, var(--loud-red));
}
/* v2026-11-27.5: six colours, the same cycle and hex values as the welcome page cards (welcome.html: #fresh / #recent). The 1st colour is the default above. */
html[data-theme="loud"] #feedList > .cast-card:nth-child(6n+2) { --card-accent: #3f5fc4; }
html[data-theme="loud"] #feedList > .cast-card:nth-child(6n+3) { --card-accent: #2b8a4b; }
html[data-theme="loud"] #feedList > .cast-card:nth-child(6n+4) { --card-accent: #6a3fa6; }
html[data-theme="loud"] #feedList > .cast-card:nth-child(6n+5) { --card-accent: #c4472f; }
html[data-theme="loud"] #feedList > .cast-card:nth-child(6n+6) { --card-accent: #1b8394; }
/* v2026-11-27.4: the same top edge on the show cards (the "out now" list in the shows tab and on station pages), cycling the same six colours.
   Delete these show-card rules to undo just this part. (nth-of-type skips the date labels between the cards.) */
html[data-theme="loud"] .show-card { border-top: 6px solid var(--card-accent, var(--loud-red)); }
html[data-theme="loud"] .show-card:nth-of-type(6n+2) { --card-accent: #3f5fc4; }
html[data-theme="loud"] .show-card:nth-of-type(6n+3) { --card-accent: #2b8a4b; }
html[data-theme="loud"] .show-card:nth-of-type(6n+4) { --card-accent: #6a3fa6; }
html[data-theme="loud"] .show-card:nth-of-type(6n+5) { --card-accent: #c4472f; }
html[data-theme="loud"] .show-card:nth-of-type(6n+6) { --card-accent: #1b8394; }