:root {
  --bg: #07110d;
  --bg-soft: #0c1813;
  --panel: rgba(7, 18, 13, 0.84);
  --panel-strong: rgba(10, 22, 16, 0.96);
  --panel-glass: rgba(15, 29, 22, 0.72);
  --line: rgba(106, 231, 164, 0.16);
  --line-strong: rgba(106, 231, 164, 0.34);
  --text: #e8fff0;
  --muted: #90caaa;
  --accent: #79f0ae;
  --accent-strong: #41e18f;
  --accent-dim: #1b9d62;
  --warning: #d9ff7d;
  --danger: #ff7f9f;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --voice-activity: 0.12;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top right, rgba(58, 179, 115, 0.18), transparent 28%),
    radial-gradient(circle at left center, rgba(31, 96, 60, 0.18), transparent 28%),
    linear-gradient(180deg, #06100c 0%, #08120e 48%, #050a08 100%);
  color: var(--text);
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  overflow-x: hidden;
}

button,
input,
select,
audio {
  font: inherit;
}

.bg-noise,
.bg-grid,
.screen-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-noise {
  opacity: 0.1;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px);
  background-size: 8px 8px, 10px 10px;
  mix-blend-mode: screen;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(102, 255, 143, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 255, 143, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 94%);
  opacity: 0.5;
}

.screen-scan {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(102, 255, 143, 0.05) 45%,
    rgba(102, 255, 143, 0.13) 50%,
    rgba(102, 255, 143, 0.05) 55%,
    transparent 100%
  );
  animation: globalScan 9s linear infinite;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 1.8rem;
  padding: 1.35rem;
  margin-bottom: 1.35rem;
  overflow: hidden;
  position: relative;
  animation: rise 0.55s ease-out;
  align-items: stretch;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(102, 255, 143, 0.08) 40%, transparent 72%),
    linear-gradient(180deg, rgba(102, 255, 143, 0.03), transparent 60%);
  pointer-events: none;
}

.hero-copy-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.readout-label,
.current-label,
.status-label,
.episode-date {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Bahnschrift", "Consolas", "Lucida Console", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin-top: 0.55rem;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.92;
  text-shadow:
    1px 0 0 rgba(217, 255, 125, 0.12),
    -1px 0 0 rgba(31, 255, 104, 0.08);
}

h2 {
  font-size: 1.65rem;
}

.hero-copy {
  margin-top: 0.9rem;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.hero-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.3rem;
  max-width: 40rem;
}

.hero-step {
  padding: 0.62rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 255, 143, 0.18);
  background: rgba(102, 255, 143, 0.04);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(31, 255, 104, 0.03);
}

.crt-stage {
  --voice-activity: 0.12;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  align-content: start;
  height: 100%;
}

.portrait-card {
  position: relative;
  display: block;
  margin: 0;
  padding: 1rem;
  overflow: hidden;
  border-radius: 24px;
  height: 100%;
  min-height: 520px;
  background:
    radial-gradient(circle at top center, rgba(138, 255, 178, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(18, 35, 22, 0.92), rgba(4, 8, 5, 0.99)),
    linear-gradient(135deg, rgba(31, 255, 104, 0.08), transparent 42%);
  border: 1px solid rgba(102, 255, 143, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 22px 36px rgba(0, 0, 0, 0.48),
    0 0 32px rgba(31, 255, 104, 0.08);
}

.hero-map-card {
  flex: 1;
}

.crt-stage {
  display: flex;
  flex-direction: column;
}

.hero-map-card .listener-map-body {
  padding: 0.85rem;
}

.hero-map-card .listener-map-screen {
  min-height: 0;
  height: 100%;
}

.hero-map-card .listener-map-legend {
  display: none;
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border-radius: 18px;
  border: 1px solid rgba(102, 255, 143, 0.14);
  pointer-events: none;
  }

.portrait-card::after {
  content: "";
  position: absolute;
  inset: 1.55rem;
  pointer-events: none;
  border-radius: 16px;
  background:
    linear-gradient(
      180deg,
      rgba(179, 255, 196, 0.1),
      transparent 12%,
      transparent 72%,
      rgba(0, 0, 0, 0.32)
    ),
    repeating-linear-gradient(
      180deg,
      rgba(232, 255, 232, 0.035) 0 1px,
      rgba(0, 0, 0, 0.18) 1px 3px
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(31, 255, 104, calc(0.025 + (var(--voice-activity) * 0.08))) 48%,
      transparent 100%
    );
  mix-blend-mode: screen;
  animation: portraitDrift 9s ease-in-out infinite;
}

.portrait-card-hud {
  position: absolute;
  top: 1.15rem;
  left: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.portrait-card-chip {
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(102, 255, 143, 0.22);
  border-radius: 999px;
  background: rgba(2, 14, 8, 0.78);
  color: var(--accent);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(31, 255, 104, 0.06);
}

.portrait-card-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 24%;
  border-radius: 16px;
  border: 1px solid rgba(102, 255, 143, 0.18);
  background: #050b07;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 18px rgba(31, 255, 104, 0.06);
  filter:
    grayscale(0.7)
    contrast(1.08)
    brightness(0.78)
    sepia(0.28)
    hue-rotate(34deg)
    saturate(1.18);
  opacity: 0.8;
}

.portrait-card-reticle {
  position: absolute;
  inset: 1.9rem 2rem 3.9rem;
  z-index: 1;
  border: 1px solid rgba(150, 255, 194, 0.18);
  border-radius: 12px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(31, 255, 104, 0.06),
    0 0 18px rgba(31, 255, 104, 0.05);
}

.portrait-card-reticle::before,
.portrait-card-reticle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.9rem;
  border-top: 1px solid rgba(217, 255, 125, 0.28);
}

.portrait-card-reticle::before {
  left: 0.9rem;
}

.portrait-card-reticle::after {
  right: 0.9rem;
}

.portrait-board-ticker {
  position: absolute;
  left: 1.9rem;
  right: 1.9rem;
  top: 7.8rem;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0.28;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.portrait-board-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: max-content;
  padding-right: 0.9rem;
  animation: boardTicker 28s linear infinite;
}

.portrait-board-message,
.portrait-board-separator {
  color: rgba(223, 255, 229, 0.92);
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(31, 255, 104, 0.12);
}

.portrait-board-separator {
  color: rgba(217, 255, 125, 0.72);
}

.portrait-monitor-copy {
  position: absolute;
  left: 1.8rem;
  right: 1.8rem;
  bottom: 4.85rem;
  z-index: 2;
  display: grid;
  gap: 0.24rem;
  width: auto;
  padding: 0.62rem 0.78rem 0.62rem;
  border: 1px solid rgba(102, 255, 143, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(3, 15, 9, 0.96), rgba(2, 10, 6, 0.93)),
    linear-gradient(135deg, rgba(31, 255, 104, 0.06), transparent 58%);
  box-shadow:
    0 0 24px rgba(31, 255, 104, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 28px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(6px);
}

.portrait-monitor-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(217, 255, 125, 0.05), transparent 34%),
    repeating-linear-gradient(
      180deg,
      rgba(232, 255, 232, 0.02) 0 1px,
      transparent 1px 4px
    );
  mix-blend-mode: screen;
}

.portrait-monitor-label {
  position: relative;
  z-index: 1;
  color: var(--accent);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portrait-monitor-title {
  position: relative;
  z-index: 1;
  font-size: clamp(0.86rem, 1vw, 1rem);
  line-height: 1.18;
  letter-spacing: 0.03em;
  text-shadow: 0 0 16px rgba(31, 255, 104, 0.08);
  max-width: 38ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portrait-monitor-meta,
.portrait-monitor-description {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.45;
}

.portrait-monitor-meta {
  font-size: 0.66rem;
}

.portrait-monitor-scroller {
  position: relative;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
}

.portrait-monitor-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
  padding-right: 0.75rem;
  animation: monitorTicker 22s linear infinite;
}

.portrait-monitor-description {
  font-size: 0.66rem;
  opacity: 0.88;
}

.portrait-monitor-separator {
  color: var(--warning);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.portrait-monitor-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.portrait-monitor-strip span {
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 255, 143, 0.18);
  background: rgba(6, 19, 11, 0.82);
  color: var(--warning);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portrait-card-caption {
  position: absolute;
  left: 1.8rem;
  right: 1.8rem;
  bottom: 1.8rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(102, 255, 143, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(4, 18, 10, 0.82), rgba(2, 10, 6, 0.92));
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warning);
  box-shadow: 0 0 15px rgba(31, 255, 104, 0.08);
  text-align: center;
  z-index: 1;
}

.signal-readout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background: var(--panel-glass);
  max-height: 18rem;
  overflow: hidden;
}

.episode-intel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.episode-intel-preview {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.98rem;
  line-height: 1.35;
  max-width: 46ch;
}

.episode-intel-status {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  min-width: 8rem;
}

.episode-intel-status-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.episode-intel-list {
  margin-top: 0.25rem;
  overflow: auto;
  max-height: 12.25rem;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

.episode-intel-list .tile-meta-row {
  grid-template-columns: minmax(6.5rem, 0.35fr) minmax(0, 1fr);
}

.episode-intel-list .tile-meta-value {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.signal-readout strong,
.meter-block strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.1rem;
  color: var(--text);
}

.meter-block span,
.voice-meter-label,
.field span,
.muted,
.episode-description {
  color: var(--muted);
}

.voice-meter {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.35rem;
}

.voice-meter-track {
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(102, 255, 143, 0.22);
  height: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
}

.voice-meter-fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0.08);
  background: linear-gradient(90deg, rgba(102, 255, 143, 0.35), rgba(217, 255, 125, 0.95));
  box-shadow: 0 0 12px rgba(31, 255, 104, 0.32);
}

.workspace {
  display: grid;
  grid-template-columns: 388px minmax(0, 1fr);
  gap: 1.35rem;
}

.panel {
  padding: 1.2rem;
}

.controls-panel,
.library-panel {
  animation: rise 0.75s ease-out;
}

.library-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
}

.episode-browser {
  flex: 1;
  min-height: 18rem;
}

.episode-browser-body {
  max-height: min(56vh, 38rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  position: sticky;
  top: 1rem;
  align-self: start;
}

.control-section-heading {
  display: grid;
  gap: 0.28rem;
  padding: 0.15rem 0 0;
}

.control-section-heading h3 {
  margin-top: 0.12rem;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.control-section-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 38ch;
}

.panel-header {
  margin-bottom: 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(102, 255, 143, 0.08);
}

.current-card,
.sticky-player-bar,
.status-box,
.mixer-box,
.night-tools,
.quick-rail {
  padding: 1rem;
  background: var(--panel-strong);
  border: 1px solid rgba(102, 255, 143, 0.12);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(102, 255, 143, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.16);
}

.current-card h3 {
  margin-top: 0.45rem;
  line-height: 1.25;
  font-size: 0.98rem;
}

.current-actions,
.night-tool-actions,
.quick-rail-header,
.episode-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.current-actions {
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.current-actions > * {
  flex: 1;
}

.night-tool-actions > * {
  flex: 1;
}

.sticky-player-bar {
  display: grid;
  gap: 0.7rem;
}

.hero-transport {
  margin-top: 1.1rem;
}

.sticky-player-copy {
  display: grid;
  gap: 0.25rem;
}

.sticky-player-label {
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#sticky-title {
  line-height: 1.3;
  font-size: 0.82rem;
  color: var(--muted);
}

.compact-header {
  margin-bottom: 0.8rem;
}

.compact-header h3 {
  margin-top: 0.35rem;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audio-shell {
  display: grid;
}

.essentials-box {
  gap: 0.9rem;
}

.quick-mix-grid,
.essentials-grid,
.advanced-mix-grid {
  display: grid;
  gap: 0.75rem;
}

.quick-mix-grid {
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
}

.essentials-grid,
.advanced-mix-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-status {
  min-height: auto;
}

.mixer-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.compact-toggle {
  gap: 0.45rem;
}

.compact-toggle span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compact-field {
  gap: 0.45rem;
}

.disclosure {
  padding: 0;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid rgba(102, 255, 143, 0.16);
}

.disclosure > summary {
  list-style: none;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.disclosure-summary h3 {
  margin-top: 0.3rem;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.disclosure-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.disclosure-hint::before {
  content: "+";
  display: inline-block;
  width: 1rem;
  text-align: center;
  color: var(--warning);
}

.disclosure[open] .disclosure-hint::before {
  content: "−";
}

.disclosure-body {
  display: grid;
  gap: 0.9rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(102, 255, 143, 0.12);
}

.disclosure-body.night-tools {
  padding-top: 0.15rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.library-disclosure {
  margin-bottom: 1rem;
}

.library-disclosure .disclosure-body {
  padding-top: 0.95rem;
}

.status-box {
  min-height: 5.4rem;
}

.timer-box {
  min-height: auto;
}

.control-row {
  display: flex;
  gap: 0.75rem;
}

.control-row-buttons > * {
  flex: 1;
}

.primary-button,
.secondary-button,
.preset-button,
.ghost-button,
.mini-toggle,
.episode-card {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.primary-button,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.primary-button {
  color: #061108;
  background: linear-gradient(135deg, var(--accent), #cbff75);
  box-shadow:
    0 12px 28px rgba(31, 255, 104, 0.16),
    inset 0 -4px 12px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.preset-button:hover,
.ghost-button:hover,
.mini-toggle:hover,
.episode-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.mixer-box,
.mixer-strip,
.field,
.night-tools,
.quick-rail {
  display: grid;
  gap: 0.75rem;
}

.mixer-divider {
  height: 1px;
  width: 100%;
  background: rgba(110, 232, 170, 0.16);
  margin: 0.35rem 0 0.15rem;
}

.mixer-advanced {
  margin-top: 0.25rem;
}

.night-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.sleep-timer-field,
.timer-box {
  grid-column: 1 / -1;
}

.timer-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto) minmax(5.5rem, auto);
  gap: 0.55rem;
  align-items: center;
}

.timer-controls select {
  min-width: 0;
}

.mixer-head,
.mixer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mixer-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.preset-button,
.ghost-button,
.mini-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
}

.ghost-button.active {
  background: rgba(217, 255, 125, 0.1);
  border-color: rgba(217, 255, 125, 0.48);
  color: var(--warning);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.preset-button {
  padding: 0.45rem 0.75rem;
}

.ghost-button,
.mini-toggle {
  padding: 0.38rem 0.72rem;
}

.preset-button.active {
  background: rgba(102, 255, 143, 0.12);
  border-color: rgba(217, 255, 125, 0.55);
  box-shadow: 0 0 18px rgba(31, 255, 104, 0.08);
}

.mini-toggle.active {
  background: rgba(255, 127, 159, 0.1);
  border-color: rgba(255, 127, 159, 0.42);
  color: #ffd8e2;
}

.mixer-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 0.75rem;
  align-items: center;
}

select,
input[type="search"],
input[type="text"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  background: rgba(0, 0, 0, 0.78);
  color: var(--accent);
}

select,
input[type="text"],
input[type="number"] {
  box-shadow: inset 0 0 18px rgba(102, 255, 143, 0.03);
}

select {
  appearance: none;
  padding-right: 2.9rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.2rem) calc(50% - 0.15rem),
    calc(100% - 0.85rem) calc(50% - 0.15rem);
  background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
  background-repeat: no-repeat;
  font-weight: 600;
}

select:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 3px rgba(31, 255, 104, 0.16),
    inset 0 0 18px rgba(102, 255, 143, 0.05);
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

select option {
  color: #deffe7;
  background: #07120b;
}

select option:checked {
  color: #061108;
  background: #9cffb2;
}

input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 0.55rem;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(102, 255, 143, 0.28), rgba(217, 255, 125, 0.78)),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(102, 255, 143, 0.18);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.45);
  touch-action: pan-x;
  pointer-events: auto;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(6, 17, 8, 0.8);
  background: linear-gradient(180deg, #edffb8, #78ff9d);
  box-shadow: 0 0 18px rgba(31, 255, 104, 0.38);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(6, 17, 8, 0.8);
  background: linear-gradient(180deg, #edffb8, #78ff9d);
  box-shadow: 0 0 18px rgba(31, 255, 104, 0.38);
  cursor: pointer;
}

.inline-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.inline-toggle input {
  accent-color: var(--accent-strong);
}

.audio-player {
  width: 100%;
  filter: hue-rotate(38deg) saturate(0.85) brightness(0.9);
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.9fr) auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.library-picker {
  min-width: 0;
}

#results-summary {
  align-self: center;
  justify-self: end;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 255, 143, 0.14);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}

.library-quick-rails {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tile-card {
  min-height: 10.5rem;
  grid-column: span 6;
}

.tile-card:nth-child(1) {
  grid-column: span 6;
}

.tile-card:nth-child(2) {
  grid-column: span 6;
}

.tile-summary {
  align-items: start;
}

.tile-summary-main {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.tile-preview {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 28rem;
}

.listener-summary-stack {
  display: grid;
  gap: 0.28rem;
}

.listener-summary-line {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.tile-body {
  min-height: 5rem;
}

.session-progress {
  display: grid;
  gap: 0.65rem;
}

.session-progress-track {
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(102, 255, 143, 0.22);
  height: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
}

.session-progress-fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(102, 255, 143, 0.35), rgba(217, 255, 125, 0.95));
  box-shadow: 0 0 12px rgba(31, 255, 104, 0.32);
}

.session-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.tile-queue-list,
.tile-meta-list {
  display: grid;
  gap: 0.7rem;
}

.listener-stats {
  display: grid;
  gap: 0.75rem;
}

.listener-identity-panel {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(102, 255, 143, 0.16);
  background:
    linear-gradient(180deg, rgba(102, 255, 143, 0.03), transparent),
    rgba(255, 255, 255, 0.025);
}

.profile-panel {
  margin-bottom: 0.15rem;
}

.listener-identity-copy {
  display: grid;
  gap: 0.3rem;
}

.listener-identity-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.listener-identity-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.profile-toggle {
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 255, 143, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.profile-toggle span {
  color: var(--text);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.listener-tile-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  padding: 0.68rem 0.78rem;
  border-radius: 14px;
  border: 1px dashed rgba(102, 255, 143, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.listener-count-block {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.listener-count-label {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.listener-count-value {
  font-size: 2rem;
  line-height: 1;
}

.listener-locations {
  color: var(--muted);
  line-height: 1.45;
}

.listener-name-field {
  margin-top: 0.85rem;
}

.listener-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tile-queue-item {
  width: 100%;
  display: grid;
  gap: 0.3rem;
  text-align: left;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 255, 143, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.tile-queue-item strong {
  line-height: 1.35;
}

.tile-queue-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.tile-meta-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.tile-meta-label {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tile-meta-value {
  color: var(--text);
  line-height: 1.45;
}

.signal-board {
  gap: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--panel-strong);
}

.message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.message-form-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.footer-tile-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.footer-tile {
  grid-column: span 6;
}

.footer-tile[data-size="small"] {
  grid-column: span 4;
}

.footer-tile[data-size="medium"] {
  grid-column: span 6;
}

.footer-tile[data-size="large"] {
  grid-column: 1 / -1;
}

.listener-map-footer-tile {
  min-height: 0;
}

.tile-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tile-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tile-layout-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tile-control-button {
  border: 1px solid rgba(102, 255, 143, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  min-width: 2.2rem;
  height: 2rem;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.tile-drag-handle {
  min-width: 3.6rem;
  padding: 0 0.8rem;
  cursor: grab;
}

.tile-drag-handle:active {
  cursor: grabbing;
}

.tile-control-button:hover,
.tile-control-button:focus-visible {
  border-color: rgba(217, 255, 125, 0.4);
  background: rgba(102, 255, 143, 0.08);
  color: var(--text);
  outline: none;
}

.tile-control-button.is-active {
  border-color: rgba(121, 240, 174, 0.5);
  background: rgba(65, 225, 143, 0.14);
  color: var(--text);
}

.footer-tile.is-drop-target {
  border-color: rgba(217, 255, 125, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(217, 255, 125, 0.14),
    0 0 0 1px rgba(217, 255, 125, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.18);
}

.footer-tile.is-dragging-tile {
  opacity: 0.62;
}

.feature-tile-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-column {
  display: grid;
  gap: 0.8rem;
}

.feature-chip-list {
  display: grid;
  gap: 0.8rem;
}

.patch-note-entry {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(102, 255, 143, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.patch-note-header {
  display: grid;
  gap: 0.25rem;
}

.patch-note-version {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.patch-note-title {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.35;
}

.patch-note-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.listener-map-body {
  display: grid;
  gap: 0.85rem;
}

.signal-wire-body {
  display: grid;
}

.listener-map-screen {
  position: relative;
  min-height: clamp(18rem, 32vw, 28rem);
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(102, 255, 143, 0.14);
  background:
    radial-gradient(circle at 50% 48%, rgba(102, 255, 143, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.28);
  padding: 0.85rem;
  display: grid;
  align-content: stretch;
}

.listener-map-globe-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 58rem;
  aspect-ratio: 12 / 7;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.listener-map-globe-stage.is-dragging {
  cursor: grabbing;
}

.listener-map-grid,
.listener-map-scanline,
.listener-map-points {
  position: absolute;
  inset: 0;
}

.listener-map-grid {
  background-image:
    linear-gradient(rgba(102, 255, 143, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 255, 143, 0.08) 1px, transparent 1px);
  background-size: 12% 16.66%, 12% 16.66%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.65));
}

.signal-wire-feed {
  position: relative;
  min-height: 30rem;
  max-height: 44rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding-right: 0.15rem;
}

.signal-wire-feed::-webkit-scrollbar {
  width: 0.6rem;
}

.signal-wire-feed::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.signal-wire-feed::-webkit-scrollbar-thumb {
  background: rgba(102, 255, 143, 0.2);
  border-radius: 999px;
}

.signal-wire-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 255, 143, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.08)),
    rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.signal-wire-card:hover,
.signal-wire-card:focus-visible {
  border-color: rgba(217, 255, 125, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.1)),
    rgba(8, 20, 12, 0.62);
  box-shadow: 0 0 0 1px rgba(102, 255, 143, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.signal-wire-card-static {
  cursor: default;
}

.signal-wire-card-meta {
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signal-wire-card-title {
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: none;
}

.signal-wire-card-summary {
  color: rgba(223, 255, 229, 0.78);
  font-size: 0.84rem;
  line-height: 1.5;
}

.listener-map-globe-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(102, 255, 143, 0.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 255, 143, 0.05), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.listener-map-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 7;
  display: block;
  overflow: hidden;
}

.listener-map-sphere {
  fill: rgba(9, 18, 12, 0.92);
  stroke: rgba(120, 255, 170, 0.26);
  stroke-width: 1.3;
}

.listener-map-land {
  fill: rgba(110, 201, 114, 0.76);
  stroke: rgba(16, 38, 22, 0.44);
  stroke-width: 0.42;
  stroke-linejoin: round;
}

.listener-map-outline {
  fill: none;
  stroke: rgba(176, 255, 193, 0.2);
  stroke-width: 1;
}

.listener-map-seam {
  stroke: rgba(102, 255, 143, 0.12);
  stroke-width: 1;
}

.listener-map-marker-halo {
  fill: rgba(169, 255, 120, 0.18);
  animation: globeMarkerPulse 2.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.listener-map-marker-ring {
  fill: none;
  stroke: rgba(217, 255, 125, 0.9);
  stroke-width: 1.6;
}

.listener-map-marker-core {
  fill: rgba(208, 255, 164, 0.96);
  stroke: rgba(31, 255, 104, 0.3);
  stroke-width: 1.2;
}

.listener-map-scanline {
  background: linear-gradient(180deg, transparent 0%, rgba(169, 255, 120, 0.12) 45%, transparent 100%);
  transform: translateY(-100%);
  animation: mapSweep 8s linear infinite;
}

.listener-map-points {
  pointer-events: none;
}

.listener-map-marker {
  pointer-events: auto;
}

.listener-map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
}

.map-legend-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 255, 143, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.map-legend-row strong {
  color: var(--text);
}

.map-legend-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes mapPulse {
  0% {
    transform: scale(0.65);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@keyframes mapSweep {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(140%);
  }
}

@keyframes globeMarkerPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.84);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.08);
  }
}

.message-field {
  min-width: 0;
}

.message-list {
  display: grid;
  gap: 0.75rem;
}

.message-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(102, 255, 143, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.message-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.message-head-copy {
  display: grid;
  gap: 0.2rem;
}

.message-head strong {
  color: var(--text);
}

.message-head span,
.message-context {
  color: var(--muted);
  font-size: 0.78rem;
}

.message-body {
  color: var(--text);
  line-height: 1.5;
}

.message-delete-button {
  border: 1px solid rgba(255, 127, 159, 0.34);
  border-radius: 999px;
  background: rgba(255, 127, 159, 0.08);
  color: #ffdce5;
  cursor: pointer;
  padding: 0.28rem 0.72rem;
}

.message-delete-button:hover {
  border-color: rgba(255, 127, 159, 0.54);
  background: rgba(255, 127, 159, 0.14);
}

.search-field input,
.library-picker select {
  min-height: 3.2rem;
}

.quick-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: 2.1rem;
}

.quick-chip,
.quick-chip-empty {
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  font-size: 0.74rem;
}

.quick-chip {
  border: 1px solid rgba(102, 255, 143, 0.2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-chip.favorite {
  border-color: rgba(217, 255, 125, 0.42);
  color: var(--warning);
}

.quick-chip-empty {
  border: 1px dashed rgba(102, 255, 143, 0.18);
  color: var(--muted);
}

.search-field {
  flex: 1;
}

.episode-list {
  display: grid;
  gap: 0.85rem;
  padding-right: 0;
}

.episode-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1rem 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  cursor: pointer;
}

.episode-flags,
.episode-progress {
  color: var(--warning);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.episode-progress {
  color: var(--muted);
}

.episode-card.active {
  border-color: rgba(217, 255, 125, 0.58);
  background:
    linear-gradient(180deg, rgba(102, 255, 143, 0.12), rgba(102, 255, 143, 0.03)),
    rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px rgba(102, 255, 143, 0.08);
}

.episode-title {
  font-size: 1rem;
  line-height: 1.42;
}

.episode-description {
  line-height: 1.45;
}

.empty-state {
  padding: 1.35rem;
  border-radius: 18px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes globalScan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes portraitDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.9;
  }
  45% {
    transform: translate3d(0, -2px, 0);
    opacity: 1;
  }
  75% {
    transform: translate3d(0, 2px, 0);
    opacity: 0.94;
  }
}

@keyframes monitorTicker {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes boardTicker {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 1120px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero-copy-block {
    order: 2;
  }

  .crt-stage {
    order: 1;
  }

  .signal-readout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 0.75rem, 1440px);
    padding-top: 0.75rem;
    /* Reserve space for the fixed mobile transport bar. */
    padding-bottom: 6rem;
  }

  .hero,
  .panel {
    padding: 0.9rem;
  }

  .hero {
    gap: 1rem;
  }

  .hero-copy {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  h1 {
    font-size: clamp(2.2rem, 14vw, 3.4rem);
  }

  h2 {
    font-size: 1.3rem;
  }

  .hero-steps {
    grid-template-columns: 1fr;
  }

  /* Keep the hero from feeling overly tall on phones. */
  .hero-steps {
    display: none;
  }

  /* Reduce redundancy in tiles (details still show full content when opened). */
  .listener-summary-stack .tile-preview {
    display: none;
  }

  /* Phone-simple mode: listening + mix only. */
  .theme-switch,
  .crt-stage,
  .signal-readout,
  .dashboard-grid,
  .library-tab-bar,
  .library-tab-panel[data-library-panel="community"],
  .library-tab-panel[data-library-panel="world"] {
    display: none !important;
  }

  /* Keep the library focused on episode selection. */
  .library-panel .panel-header {
    display: none;
  }

  .search-field,
  #results-summary,
  .library-disclosure {
    display: none !important;
  }

  /* De-emphasize nonessential left-panel sections on phone. */
  .controls-panel .panel-header,
  .night-tools {
    display: none;
  }

  /* Keep opt-in available, but hide the identity fields to stay simple. */
  .listener-identity-panel .listener-identity-grid,
  .listener-identity-panel .listener-identity-note {
    display: none;
  }

  .listener-identity-panel .listener-identity-controls {
    margin-top: 0;
  }

  .preset-row,
  .mixer-head,
  .disclosure-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-mix-grid,
  .essentials-grid,
  .advanced-mix-grid,
  .dashboard-grid,
  .footer-tile-grid,
  .message-form,
  .mixer-input-row,
  .night-tool-grid,
  .signal-readout {
    grid-template-columns: 1fr;
  }

  /* Reset base grid-column spans so <details> tiles stack correctly on phones. */
  .tile-card {
    grid-column: 1 / -1;
  }

  /* nth-child rules in the base stylesheet are more specific, so override them too. */
  .tile-card:nth-child(1),
  .tile-card:nth-child(2) {
    grid-column: 1 / -1;
  }

  .tile-card-primary {
    grid-column: 1 / -1;
  }

  .portrait-card-hud {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .portrait-card-image {
    min-height: 280px;
    height: auto;
  }

  .portrait-card-reticle {
    inset: 1.65rem 1.6rem 3.6rem;
  }

  .portrait-board-ticker {
    left: 1.45rem;
    right: 1.45rem;
    top: 6.55rem;
    opacity: 0.22;
  }

  .portrait-board-message,
  .portrait-board-separator {
    font-size: 0.88rem;
  }

  .portrait-monitor-copy {
    left: 1.4rem;
    right: 1.4rem;
    bottom: 4.2rem;
    padding: 0.58rem 0.72rem 0.62rem;
  }

  .portrait-monitor-title {
    font-size: 0.82rem;
  }

  .portrait-monitor-description {
    font-size: 0.64rem;
  }

  .workspace {
    gap: 1rem;
  }

  .controls-panel {
    gap: 0.85rem;
  }

  .sticky-player-bar {
    position: fixed;
    left: 0.375rem;
    right: 0.375rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 9999;
    backdrop-filter: blur(18px);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.35),
      inset 0 0 0 1px rgba(102, 255, 143, 0.05);
  }

  .control-row {
    flex-direction: row;
  }

  .primary-button,
  .secondary-button {
    min-height: 3.2rem;
  }

  input[type="range"] {
    height: 0.9rem;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 1.55rem;
    height: 1.55rem;
  }

  input[type="range"]::-moz-range-thumb {
    width: 1.55rem;
    height: 1.55rem;
  }

  .mixer-strip {
    gap: 0.45rem;
  }

  .mixer-input-row {
    gap: 0.6rem;
  }

  .preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mixer-strip strong,
  .status-box p,
  .results-summary {
    font-size: 0.94rem;
  }

  .inline-toggle {
    min-height: 3rem;
    padding: 0.15rem 0;
  }

  .audio-player {
    position: static;
    z-index: 8;
    border-radius: 14px;
    background: rgba(4, 12, 7, 0.92);
  }

  .library-toolbar {
    gap: 0.7rem;
  }

  .session-progress-meta,
  .tile-meta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .feature-tile-body,
  .listener-identity-grid {
    grid-template-columns: 1fr;
  }

  .message-form {
    grid-template-columns: 1fr;
  }

  .listener-map-screen {
    min-height: 12rem;
  }

  .signal-wire-feed {
    min-height: 22rem;
    max-height: 30rem;
  }

  .listener-map-globe-stage {
    min-height: 16rem;
  }

  .library-picker {
    min-width: 0;
    width: 100%;
  }

  #results-summary {
    justify-self: start;
    white-space: normal;
  }

  .timer-controls {
    grid-template-columns: 1fr;
  }

  .episode-list {
    max-height: none;
    padding-right: 0;
  }

  .episode-card {
    padding: 0.95rem;
  }
}

/* Desktop simplification: keep the core “pick → play → mix” flow. */
@media (min-width: 721px) {
  .dashboard-grid details[data-tile="listeners"],
  .dashboard-grid details[data-tile="intel"],
  .dashboard-grid details[data-tile="queue"],
  .library-tab-bar,
  .library-tab-panel[data-library-panel="community"],
  .library-tab-panel[data-library-panel="world"] {
    display: none !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .tile-card {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

@media (max-width: 1120px) {
  .footer-tile-grid {
    grid-template-columns: 1fr;
  }

  .footer-tile,
  .footer-tile[data-size="small"],
  .footer-tile[data-size="medium"],
  .footer-tile[data-size="large"] {
    grid-column: auto;
  }

  .tile-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .tile-summary-actions {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 0.5rem, 1440px);
  }

  .hero,
  .panel {
    padding: 0.8rem;
  }

  .hero-steps,
  .preset-row {
    grid-template-columns: 1fr;
  }

  .portrait-card-caption {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.7rem;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .portrait-monitor-copy {
    left: 1rem;
    right: 1rem;
    bottom: 3.35rem;
    gap: 0.3rem;
    padding: 0.56rem 0.68rem;
  }

  .portrait-monitor-label {
    font-size: 0.58rem;
  }

  .portrait-monitor-title {
    font-size: 0.74rem;
  }

  .portrait-monitor-meta,
  .portrait-monitor-description {
    font-size: 0.6rem;
  }

  .portrait-monitor-strip span {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .portrait-card-hud {
    gap: 0.35rem;
  }

  .portrait-card-chip {
    font-size: 0.54rem;
    padding: 0.28rem 0.46rem;
  }

  .portrait-card-reticle {
    inset: 1.5rem 1.2rem 3.3rem;
  }

  .portrait-board-ticker {
    left: 1rem;
    right: 1rem;
    top: 5.9rem;
    opacity: 0.2;
  }

  .portrait-board-message,
  .portrait-board-separator {
    font-size: 0.74rem;
    letter-spacing: 0.16em;
  }
}
.message-form input[type="text"]::placeholder {
  color: rgba(126, 215, 154, 0.62);
}

/* Professional redesign */
:root {
  --bg: #07110e;
  --bg-soft: #0d1713;
  --panel: rgba(8, 18, 14, 0.84);
  --panel-strong: rgba(9, 19, 15, 0.94);
  --panel-glass: rgba(18, 30, 24, 0.76);
  --line: rgba(110, 232, 170, 0.14);
  --line-strong: rgba(110, 232, 170, 0.28);
  --text: #f1fff6;
  --muted: #99bea9;
  --accent: #7df0b5;
  --accent-strong: #4fe09b;
  --accent-dim: #29915f;
  --shadow: 0 26px 56px rgba(0, 0, 0, 0.28);
  --radius: 20px;
}

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(82, 196, 132, 0.14), transparent 24%),
    radial-gradient(circle at left center, rgba(33, 94, 64, 0.12), transparent 26%),
    linear-gradient(180deg, #060d0a 0%, #09120f 46%, #040806 100%);
}

button,
input,
select,
audio,
textarea {
  font-family: inherit;
}

.bg-noise {
  opacity: 0.04;
}

.bg-grid {
  opacity: 0.22;
  background-size: 54px 54px;
}

.screen-scan {
  opacity: 0.2;
  animation-duration: 16s;
}

.shell {
  width: min(1520px, calc(100% - 2.5rem));
  padding: 1.5rem 0 3.5rem;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 24%),
    var(--panel);
  border-color: var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.eyebrow,
.readout-label,
.current-label,
.status-label,
.episode-date,
.listener-count-label {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
.portrait-monitor-title,
.signal-wire-card-title,
.patch-note-title {
  font-family: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(3rem, 5.2vw, 4.85rem);
  line-height: 0.92;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1rem;
}

.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: 1.4rem;
  padding: 1.45rem;
  margin-bottom: 1.25rem;
}

.hero::before {
  background:
    linear-gradient(120deg, transparent 0%, rgba(125, 240, 181, 0.045) 42%, transparent 74%),
    linear-gradient(180deg, rgba(125, 240, 181, 0.02), transparent 62%);
}

.hero-copy {
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-steps {
  grid-template-columns: repeat(3, minmax(0, max-content));
  align-items: start;
  gap: 0.55rem;
}

.hero-step {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.theme-switch {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(110, 232, 170, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.theme-switch-copy {
  display: grid;
  gap: 0.18rem;
}

.theme-switch-copy strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.theme-switch-label {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.theme-switch-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.theme-option-button {
  min-height: 3.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(110, 232, 170, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  display: grid;
  gap: 0.16rem;
  justify-items: start;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.theme-option-button:hover,
.theme-option-button:focus-visible {
  color: var(--text);
  border-color: rgba(217, 255, 125, 0.24);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
  transform: translateY(-1px);
}

.theme-option-button.is-active {
  color: #071e10;
  border-color: rgba(217, 255, 125, 0.26);
  background: linear-gradient(135deg, rgba(121, 240, 174, 0.95), rgba(217, 255, 125, 0.9));
  box-shadow: 0 10px 24px rgba(110, 232, 170, 0.18);
}

.theme-option-kicker {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.9;
}

.theme-option-label {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.1;
}

.theme-option-button.is-active .theme-option-kicker,
.theme-option-button.is-active .theme-option-label {
  color: inherit;
}

.retro-cursor {
  --cursor-x: -100px;
  --cursor-y: -100px;
  --retro-cursor-size: 28px;
  --retro-cursor-fill: linear-gradient(135deg, #fff69b, #ff4ac4 45%, #54f4ff 82%);
  --retro-cursor-shape: polygon(50% 0%, 62% 36%, 100% 36%, 70% 58%, 82% 100%, 50% 74%, 18% 100%, 30% 58%, 0% 36%, 38% 36%);
  --retro-cursor-filter: drop-shadow(0 0 10px rgba(255, 84, 228, 0.7));
  --retro-cursor-anim: retroCursorSpin 1.3s linear infinite;
  --retro-cursor-spark-size: 8px;
  --retro-cursor-spark-right: -2px;
  --retro-cursor-spark-bottom: -1px;
  --retro-cursor-spark-bg: #ffffff;
  --retro-cursor-spark-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    -16px -8px 0 -2px rgba(255, 255, 255, 0.52),
    -12px 10px 0 -3px rgba(255, 255, 255, 0.38);
  --retro-cursor-label-top: -10px;
  --retro-cursor-label-left: 22px;
  --retro-cursor-label-border: #000080;
  --retro-cursor-label-bg: #ffff00;
  --retro-cursor-label-color: #000080;
  --retro-cursor-label-font: "Comic Sans MS", "Trebuchet MS", sans-serif;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: var(--retro-cursor-size);
  height: var(--retro-cursor-size);
  transform: translate3d(var(--cursor-x), var(--cursor-y), 0);
  pointer-events: none;
  display: none;
}

.retro-cursor::before,
.retro-cursor::after {
  content: "";
  position: absolute;
  inset: 0;
}

.retro-cursor::before {
  background: var(--retro-cursor-fill);
  clip-path: var(--retro-cursor-shape);
  filter: var(--retro-cursor-filter);
  animation: var(--retro-cursor-anim);
}

.retro-cursor::after {
  width: var(--retro-cursor-spark-size);
  height: var(--retro-cursor-spark-size);
  right: var(--retro-cursor-spark-right);
  bottom: var(--retro-cursor-spark-bottom);
  left: auto;
  top: auto;
  border-radius: 50%;
  background: var(--retro-cursor-spark-bg);
  box-shadow: var(--retro-cursor-spark-shadow);
  animation: retroCursorSpark 0.9s steps(2, end) infinite;
}

.retro-cursor-label {
  position: absolute;
  top: var(--retro-cursor-label-top);
  left: var(--retro-cursor-label-left);
  padding: 0.12rem 0.3rem;
  border: 1px solid var(--retro-cursor-label-border);
  background: var(--retro-cursor-label-bg);
  color: var(--retro-cursor-label-color);
  font-family: var(--retro-cursor-label-font);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: retroCursorBlink 0.7s steps(2, end) infinite;
}

.portrait-card,
.signal-readout,
.current-card,
.sticky-player-bar,
.listener-identity-panel,
.mixer-box,
.disclosure,
.status-box {
  border-radius: 18px;
}

.portrait-card-image {
  opacity: 0.76;
}

.portrait-monitor-copy {
  right: 2rem;
  left: auto;
  width: min(24rem, calc(100% - 4rem));
  padding: 0.78rem 0.9rem 0.78rem;
}

.portrait-monitor-title {
  font-size: 1.4rem;
  line-height: 1.08;
}

.portrait-monitor-meta,
.portrait-monitor-description {
  font-size: 0.84rem;
  line-height: 1.45;
}

.signal-readout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  padding: 1rem 1.1rem;
}

.voice-meter {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

.workspace {
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.panel {
  padding: 1.15rem;
}

.controls-panel,
.library-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.016), transparent 20%),
    var(--panel-strong);
}

.controls-panel {
  top: 1rem;
}

.panel-header {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.control-section-heading {
  display: grid;
  gap: 0.28rem;
  margin: 1.2rem 0 0.75rem;
}

.control-section-heading h3 {
  font-size: 0.98rem;
  text-transform: uppercase;
}

.control-section-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 26rem;
}

.listener-identity-panel,
.current-card,
.mixer-box,
.disclosure-body,
.signal-board {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 18%),
    rgba(255, 255, 255, 0.02);
}

.sticky-player-bar {
  position: sticky;
  top: 1rem;
  background:
    linear-gradient(180deg, rgba(125, 240, 181, 0.04), transparent 60%),
    rgba(8, 17, 13, 0.92);
}

.primary-button,
.secondary-button,
.ghost-button,
.preset-button,
.mini-toggle,
.tile-queue-item,
.message-delete {
  border-radius: 14px;
}

.primary-button {
  background: linear-gradient(135deg, #78ff9e, #c7ff6d);
  color: #072110;
  box-shadow: 0 10px 28px rgba(110, 232, 170, 0.24);
}

.secondary-button,
.ghost-button,
.preset-button,
.mini-toggle,
.tile-queue-item,
.message-delete {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(110, 232, 170, 0.18);
}

.library-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.88fr) auto;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tile-card {
  min-height: 0;
  grid-column: auto;
}

.tile-card-primary {
  grid-column: 1 / -1;
}

.tile-summary {
  gap: 1rem;
  align-items: start;
}

.tile-preview {
  max-width: none;
  font-size: 0.8rem;
  line-height: 1.45;
}

.tile-body {
  padding-top: 0.05rem;
}

.session-progress-track {
  height: 0.72rem;
}

.session-progress-meta,
.tile-meta-value,
.listener-locations,
.tile-queue-item span,
.patch-note-list,
.message-form-note,
.listener-identity-note {
  color: var(--muted);
}

.listener-count-value {
  font-size: 1.8rem;
}

.library-disclosure .disclosure-body {
  padding-top: 0.95rem;
}

.signal-board {
  gap: 1rem;
}

.message-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.message-field {
  min-width: 0;
}

.message-list {
  display: grid;
  gap: 0.8rem;
}

.front-map-card {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.1rem;
  border-radius: 20px;
}

.insight-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 1rem;
}

.insight-tile,
.listener-map-footer-tile {
  min-height: 0;
}

.feature-tile-body {
  gap: 0.9rem;
}

.signal-wire-feed {
  min-height: 25rem;
  max-height: 31rem;
  padding-right: 0.2rem;
}

.signal-wire-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(110, 232, 170, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent 24%),
    rgba(255, 255, 255, 0.018);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}

.signal-wire-card:hover,
.signal-wire-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(217, 255, 125, 0.28);
  background:
    linear-gradient(180deg, rgba(125, 240, 181, 0.04), transparent 24%),
    rgba(255, 255, 255, 0.026);
  outline: none;
}

.signal-wire-card-meta {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.signal-wire-card-title {
  font-size: 1.05rem;
  line-height: 1.35;
}

.signal-wire-card-summary {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.listener-map-body {
  gap: 1rem;
}

.listener-map-screen {
  min-height: 33rem;
  padding: 1.25rem;
}

.listener-map-globe-stage {
  width: min(100%, 50rem);
  min-height: 29rem;
  justify-content: center;
}

.listener-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.listener-map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.map-legend-row,
.quick-chip-empty {
  min-height: 4rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(110, 232, 170, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.map-legend-row {
  display: grid;
  gap: 0.3rem;
}

.map-legend-row span,
.quick-chip-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.audio-shell {
  margin-top: 1rem;
}

.audio-player {
  width: 100%;
  border-radius: 14px;
  background: rgba(10, 16, 13, 0.95);
}

.library-tabs-shell {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.library-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.55rem;
  border: 1px solid rgba(110, 232, 170, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 24%),
    rgba(255, 255, 255, 0.022);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.library-tab-button {
  min-height: 4rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(110, 232, 170, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  display: grid;
  gap: 0.18rem;
  justify-items: start;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.library-tab-button:hover,
.library-tab-button:focus-visible {
  color: var(--text);
  border-color: rgba(217, 255, 125, 0.18);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

.library-tab-button.is-active {
  color: #071e10;
  border-color: rgba(217, 255, 125, 0.26);
  background: linear-gradient(135deg, rgba(121, 240, 174, 0.95), rgba(217, 255, 125, 0.9));
  box-shadow: 0 10px 24px rgba(110, 232, 170, 0.18);
}

.library-tab-kicker {
  font-family: "Consolas", "Lucida Console", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.86;
}

.library-tab-label {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.1;
}

.library-tab-panel {
  display: none;
}

.library-tab-panel.is-active {
  display: block;
}

.library-module {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid rgba(110, 232, 170, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.016), transparent 18%),
    rgba(255, 255, 255, 0.02);
}

.library-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.library-module-header .tile-preview {
  max-width: 34rem;
}

.library-module .episode-list {
  padding-right: 0.15rem;
}

.signal-board {
  margin-top: 0;
}

.insight-layout {
  margin-top: 0;
}

.listener-map-screen {
  isolation: isolate;
}

.listener-map-screen.is-glitching::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 12%, rgba(255, 255, 255, 0.08) 12% 16%, transparent 16% 42%, rgba(255, 255, 255, 0.06) 42% 45%, transparent 45% 100%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.listener-map-screen.is-glitching .listener-map-svg {
  transform: translate3d(4px, -2px, 0) skewX(-1.5deg) scaleX(1.01);
  filter: brightness(1.08) saturate(1.04);
}

.listener-map-screen.is-glitching .listener-map-grid {
  opacity: 0.55;
}

.listener-map-svg {
  transition: transform 120ms linear, filter 120ms linear;
}

body.theme-geocities {
  --text: #112a8a;
  --muted: #111111;
  --accent: #c00000;
  --accent-strong: #2c7aff;
  --line: rgba(89, 186, 255, 0.34);
  --line-strong: rgba(0, 79, 204, 0.34);
  --shadow: none;
  background:
    linear-gradient(90deg, rgba(113, 214, 255, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(113, 214, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 214, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(113, 214, 255, 0.08) 1px, transparent 1px),
    #ffffff;
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px, auto;
  color: #112a8a;
  cursor: none;
  font-family: "Times New Roman", "Georgia", serif;
}

body.theme-geocities .retro-cursor {
  display: block;
}

body.theme-geocities .bg-noise,
body.theme-geocities .bg-grid,
body.theme-geocities .screen-scan {
  opacity: 0;
}

body.theme-geocities .shell {
  width: min(1180px, calc(100% - 1rem));
}

body.theme-geocities .eyebrow,
body.theme-geocities .current-label,
body.theme-geocities .status-label,
body.theme-geocities .readout-label {
  color: #c00000;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15rem;
  font-family: "Arial", sans-serif;
  font-weight: 700;
}

body.theme-geocities .card,
body.theme-geocities .library-module,
body.theme-geocities .front-map-card {
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.06), transparent 14%),
    rgba(255, 255, 255, 0.96);
  border: 1px solid #90d7ff;
  border-radius: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    inset 0 0 0 1px rgba(144, 215, 255, 0.42);
  backdrop-filter: none;
}

body.theme-geocities .hero::before {
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.08), transparent 34%);
  opacity: 0.7;
}

body.theme-geocities .hero {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-inline: auto;
  gap: 1rem;
}

body.theme-geocities .hero-copy-block,
body.theme-geocities .crt-stage {
  align-items: center;
}

body.theme-geocities .hero-copy-block {
  text-align: center;
}

body.theme-geocities h1 {
  font-family: "Times New Roman", "Georgia", serif;
  color: #112a8a;
  text-shadow: none;
  letter-spacing: 0.02em;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.02;
}

body.theme-geocities h2,
body.theme-geocities h3 {
  font-family: "Times New Roman", "Georgia", serif;
  letter-spacing: 0.01em;
  color: #112a8a;
  text-shadow: none;
}

body.theme-geocities .panel-header,
body.theme-geocities .control-section-heading,
body.theme-geocities .mixer-head,
body.theme-geocities .disclosure-summary,
body.theme-geocities .library-module-header {
  position: relative;
  padding: 0.52rem 0.7rem 0.48rem;
  border: 1px solid #b7e6ff;
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.08), transparent 45%),
    #ffffff;
  box-shadow: inset 0 -1px 0 rgba(113, 214, 255, 0.22);
}

body.theme-geocities .panel-header::before,
body.theme-geocities .control-section-heading::before,
body.theme-geocities .mixer-head::before,
body.theme-geocities .disclosure-summary::before,
body.theme-geocities .library-module-header::before {
  content: "WARNING!!!";
  display: block;
  margin-bottom: 0.35rem;
  color: #c00000;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  font-family: "Arial Black", "Arial", sans-serif;
}

body.theme-geocities .hero-copy,
body.theme-geocities .control-section-note,
body.theme-geocities .listener-identity-note,
body.theme-geocities .tile-preview,
body.theme-geocities .signal-wire-card-summary,
body.theme-geocities .patch-note-list,
body.theme-geocities .listener-locations,
body.theme-geocities .message-form-note,
body.theme-geocities .map-legend-row span,
body.theme-geocities .quick-chip-empty {
  color: #111111;
}

body.theme-geocities .hero-step,
body.theme-geocities .portrait-card-chip,
body.theme-geocities .portrait-monitor-strip span,
body.theme-geocities .signal-wire-card-meta,
body.theme-geocities .theme-switch-label,
body.theme-geocities .library-tab-kicker {
  color: #112a8a;
  background: #ffffff;
  border: 1px solid #90d7ff;
  box-shadow: none;
  text-shadow: none;
}

body.theme-geocities .theme-switch {
  border: 1px solid #90d7ff;
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.08), transparent 20%),
    #ffffff;
}

body.theme-geocities .theme-option-kicker {
  color: #c00000;
}

body.theme-geocities .theme-option-label,
body.theme-geocities .library-tab-label {
  font-family: "Times New Roman", "Georgia", serif;
  text-transform: none;
}

body.theme-geocities .primary-button,
body.theme-geocities .secondary-button,
body.theme-geocities .ghost-button,
body.theme-geocities .preset-button,
body.theme-geocities .mini-toggle,
body.theme-geocities .library-tab-button,
body.theme-geocities .theme-option-button,
body.theme-geocities .tile-queue-item,
body.theme-geocities .message-delete {
  border: 1px solid #90d7ff;
  border-radius: 0;
  background: #ffffff;
  color: #112a8a;
  box-shadow: none;
  text-transform: none;
}

body.theme-geocities .primary-button {
  background: #fff1a8;
  color: #9d0000;
  border-color: #c00000;
  font-weight: 700;
}

body.theme-geocities .library-tab-bar {
  border: 1px solid #b7e6ff;
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.08), transparent 28%),
    #ffffff;
}

body.theme-geocities .library-tab-button.is-active {
  background: #fff1a8;
  color: #9d0000;
  border-color: #c00000;
}

body.theme-geocities .theme-option-button.is-active {
  background: #fff1a8;
  color: #9d0000;
  border-color: #c00000;
}

body.theme-geocities input,
body.theme-geocities select {
  border: 1px solid #90d7ff;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

body.theme-geocities .listener-map-screen,
body.theme-geocities .signal-wire-card,
body.theme-geocities .patch-note-entry,
body.theme-geocities .map-legend-row,
body.theme-geocities .quick-chip-empty,
body.theme-geocities .current-card,
body.theme-geocities .mixer-box,
body.theme-geocities .listener-identity-panel,
body.theme-geocities .sticky-player-bar,
body.theme-geocities .signal-readout,
body.theme-geocities .disclosure-body {
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.06), transparent 14%),
    #ffffff;
  border: 1px solid #b7e6ff;
}

body.theme-geocities .portrait-card,
body.theme-geocities .portrait-monitor-copy,
body.theme-geocities .signal-readout {
  box-shadow: inset 0 0 0 1px rgba(144, 215, 255, 0.32);
}

body.theme-geocities .portrait-monitor-copy {
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.12), transparent 18%),
    rgba(255, 255, 255, 0.94);
  border: 1px solid #90d7ff;
}

body.theme-geocities .portrait-card-caption {
  border: 1px solid #90d7ff;
  background: #ffffff;
  color: #112a8a;
}

body.theme-geocities .signal-wire-card-title,
body.theme-geocities .patch-note-title {
  color: #112a8a;
  text-decoration: none;
}

body.theme-geocities .portrait-card-image {
  filter:
    grayscale(0.18)
    contrast(1.08)
    brightness(1.02)
    saturate(0.78);
  opacity: 0.86;
}

body.theme-geocities .portrait-board-message,
body.theme-geocities .portrait-board-separator {
  color: #c00000;
  text-shadow: none;
}

body.theme-geocities .hero-copy,
body.theme-geocities .current-card h3,
body.theme-geocities .patch-note-body,
body.theme-geocities .signal-wire-card-summary,
body.theme-geocities .listener-map-preview,
body.theme-geocities .monitor-description {
  color: #111111;
}

body.theme-geocities .portrait-card,
body.theme-geocities .signal-readout {
  background:
    linear-gradient(180deg, rgba(113, 214, 255, 0.08), transparent 20%),
    rgba(255, 255, 255, 0.96);
  border-color: #90d7ff;
}

body.theme-geocities .listener-map-screen {
  background:
    linear-gradient(90deg, rgba(113, 214, 255, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(113, 214, 255, 0.14) 1px, transparent 1px),
    #ffffff;
  background-size: 56px 56px, 56px 56px, auto;
}

body.theme-geocities .listener-map-sphere {
  fill: #ffffff;
  stroke: rgba(17, 42, 138, 0.28);
}

body.theme-geocities .listener-map-land {
  fill: rgba(17, 42, 138, 0.18);
  stroke: rgba(17, 42, 138, 0.38);
}

body.theme-geocities .listener-map-outline {
  stroke: rgba(17, 42, 138, 0.48);
}

body.theme-geocities .listener-map-marker-ring {
  stroke: rgba(192, 0, 0, 0.9);
}

body.theme-geocities .listener-map-marker-core {
  fill: rgba(192, 0, 0, 0.92);
  stroke: rgba(17, 42, 138, 0.2);
}

body.theme-geocities .listener-map-marker-halo {
  fill: rgba(255, 0, 0, 0.14);
}

body.theme-geocities .patch-note-entry:nth-child(odd) .patch-note-title,
body.theme-geocities .signal-wire-card:nth-child(odd) .signal-wire-card-title {
  color: #c00000;
}

body.theme-geocities .quick-chip-empty,
body.theme-geocities .map-legend-row {
  color: #111111;
}

body.theme-geocities .message-name-field span,
body.theme-geocities .message-field span,
body.theme-geocities .listener-name-field span {
  color: #c00000;
  font-weight: 700;
}

body.theme-geocities .listener-map-screen.is-glitching::before {
  background:
    linear-gradient(180deg, transparent 0 8%, rgba(255, 255, 255, 0.24) 8% 16%, transparent 16% 46%, rgba(255, 0, 0, 0.12) 46% 52%, transparent 52% 100%);
}

body.theme-geocities .listener-map-screen.is-glitching .listener-map-svg {
  transform: translate3d(4px, -2px, 0) skewX(-2deg) scaleX(1.01);
}

body.theme-hotdog {
  --text: #fff4cf;
  --muted: #ffe88c;
  --accent: #fff04d;
  --accent-strong: #ff3700;
  --line: rgba(255, 230, 90, 0.4);
  --line-strong: rgba(255, 255, 255, 0.52);
  background:
    linear-gradient(180deg, #cfcfcf 0 14px, #7f7f7f 14px 16px, #ff1e00 16px 76px, #ffe600 76px 100%);
  color: #fff7d0;
  cursor: none;
}

body.theme-hotdog .retro-cursor {
  display: block;
}

body.theme-hotdog .bg-noise,
body.theme-hotdog .bg-grid,
body.theme-hotdog .screen-scan {
  opacity: 0;
}

body.theme-hotdog .card,
body.theme-hotdog .library-module,
body.theme-hotdog .front-map-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 12%),
    linear-gradient(180deg, #ff1900 0%, #d01300 100%);
  border: 4px outset #cfcfcf;
  border-radius: 0;
  box-shadow:
    0 0 0 4px #ffe600 inset,
    6px 6px 0 rgba(0, 0, 0, 0.32);
  backdrop-filter: none;
}

body.theme-hotdog h1 {
  font-family: "Arial Black", "Impact", sans-serif;
  color: #fff14d;
  text-shadow: 3px 3px 0 #950000;
}

body.theme-hotdog .hero-step,
body.theme-hotdog .portrait-card-chip,
body.theme-hotdog .portrait-monitor-strip span,
body.theme-hotdog .theme-switch-label,
body.theme-hotdog .library-tab-kicker {
  color: #5a0000;
  background: #ffe14d;
  border: 2px solid #ffffff;
}

body.theme-hotdog .primary-button,
body.theme-hotdog .secondary-button,
body.theme-hotdog .ghost-button,
body.theme-hotdog .preset-button,
body.theme-hotdog .mini-toggle,
body.theme-hotdog .library-tab-button,
body.theme-hotdog .theme-option-button,
body.theme-hotdog .tile-queue-item,
body.theme-hotdog .message-delete {
  border: 4px outset #cfcfcf;
  border-radius: 0;
  background: linear-gradient(180deg, #ffe95a, #ff5e00);
  color: #5a0000;
}

body.theme-hotdog .primary-button {
  background: linear-gradient(180deg, #fff78d, #ff3a00);
}

body.theme-hotdog input,
body.theme-hotdog select {
  border: 4px inset #cfcfcf;
  background: #fff04b;
  color: #7d1200;
}

body.theme-hotdog .library-tab-bar,
body.theme-hotdog .theme-switch {
  background: linear-gradient(180deg, #ff2300, #c40f00);
  border: 4px ridge #cfcfcf;
}

body.theme-hotdog .library-tab-button.is-active,
body.theme-hotdog .theme-option-button.is-active {
  background: linear-gradient(180deg, #fff78d, #ff3a00);
  color: #500000;
}

body.theme-winamp {
  --text: #eef4d7;
  --muted: #c3cfaa;
  --accent: #c7d75f;
  --accent-strong: #89b73a;
  --line: rgba(205, 215, 135, 0.22);
  --line-strong: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, #7f7ba7 0 18px, #2f3151 18px 22px, #1b1b24 22px 100%);
  color: #eaf0d0;
  cursor: none;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}

body.theme-winamp .retro-cursor {
  display: block;
}

body.theme-winamp .bg-noise,
body.theme-winamp .bg-grid,
body.theme-winamp .screen-scan {
  opacity: 0;
}

body.theme-winamp .card,
body.theme-winamp .library-module,
body.theme-winamp .front-map-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 14%),
    linear-gradient(180deg, #69648b 0%, #3f405a 10%, #272735 11%, #17181f 100%);
  border: 2px solid #2b2b34;
  border-top-color: #a5a3bf;
  border-left-color: #8e8aac;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px #0f1014,
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    3px 3px 0 rgba(0, 0, 0, 0.34);
  backdrop-filter: none;
}

body.theme-winamp .panel-header,
body.theme-winamp .control-section-heading,
body.theme-winamp .mixer-head,
body.theme-winamp .disclosure-summary,
body.theme-winamp .library-module-header {
  padding: 0.42rem 0.7rem;
  border: 2px solid #2b2b34;
  border-top-color: #a5a3bf;
  border-left-color: #8e8aac;
  background:
    linear-gradient(90deg, #7d79a2 0%, #474b70 32%, #23273a 72%, #12131b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.theme-winamp .theme-switch-copy strong,
body.theme-winamp .panel-header h2,
body.theme-winamp .control-section-heading h3,
body.theme-winamp .disclosure-summary h3,
body.theme-winamp .library-module-header h3 {
  color: #eef4d7;
  text-shadow: 1px 1px 0 #101215;
}

body.theme-winamp .eyebrow,
body.theme-winamp .current-label,
body.theme-winamp .status-label,
body.theme-winamp .readout-label {
  color: #d6e082;
}

body.theme-winamp h1 {
  font-family: "Tahoma", "Verdana", sans-serif;
  color: #e9f58b;
  text-shadow: 2px 2px 0 #232435;
}

body.theme-winamp h2,
body.theme-winamp h3 {
  font-family: "Tahoma", "Verdana", sans-serif;
  letter-spacing: 0.03em;
}

body.theme-winamp .hero-step,
body.theme-winamp .portrait-card-chip,
body.theme-winamp .portrait-monitor-strip span,
body.theme-winamp .theme-switch-label,
body.theme-winamp .library-tab-kicker,
body.theme-winamp .signal-wire-card-meta {
  color: #0d1203;
  background: linear-gradient(180deg, #d6e082, #8fa642);
  border: 1px solid #eff9bc;
}

body.theme-winamp .primary-button,
body.theme-winamp .secondary-button,
body.theme-winamp .ghost-button,
body.theme-winamp .preset-button,
body.theme-winamp .mini-toggle,
body.theme-winamp .library-tab-button,
body.theme-winamp .tile-queue-item,
body.theme-winamp .message-delete,
body.theme-winamp .theme-option-button {
  border: 2px solid #2b2b34;
  border-top-color: #a5a3bf;
  border-left-color: #8e8aac;
  border-radius: 2px;
  background: linear-gradient(180deg, #69648b, #41435f 10%, #2d2d3f 11%, #383849 100%);
  color: #eef4d7;
}

body.theme-winamp .theme-option-kicker {
  color: #c3cfaa;
}

body.theme-winamp .theme-option-label {
  letter-spacing: 0.02em;
}

body.theme-winamp .primary-button,
body.theme-winamp .theme-option-button.is-active,
body.theme-winamp .library-tab-button.is-active {
  background: linear-gradient(180deg, #d6e082, #8fa642);
  color: #192108;
}

body.theme-winamp input,
body.theme-winamp select {
  border: 2px inset #7d7d93;
  background: #0f1014;
  color: #d8e19c;
}

body.theme-winamp .library-tab-bar,
body.theme-winamp .theme-switch {
  background: linear-gradient(180deg, #69648b, #3c3f5f 12%, #232634 13%, #17181f 100%);
  border: 2px solid #2b2b34;
  border-top-color: #a5a3bf;
  border-left-color: #8e8aac;
}

body.theme-winamp .listener-map-screen,
body.theme-winamp .signal-wire-card,
body.theme-winamp .patch-note-entry,
body.theme-winamp .map-legend-row,
body.theme-winamp .quick-chip-empty,
body.theme-winamp .current-card,
body.theme-winamp .mixer-box,
body.theme-winamp .listener-identity-panel,
body.theme-winamp .sticky-player-bar,
body.theme-winamp .signal-readout,
body.theme-winamp .disclosure-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 10%),
    linear-gradient(180deg, #17181f 0%, #101115 100%);
  border: 2px inset #6f6f88;
}

body.theme-winamp .status-box,
body.theme-winamp .current-card,
body.theme-winamp .mixer-strip,
body.theme-winamp .signal-wire-card,
body.theme-winamp .message-card,
body.theme-winamp .listener-map-screen,
body.theme-winamp .map-legend-row {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(0, 0, 0, 0.48);
}

body.theme-winamp .signal-wire-card-title,
body.theme-winamp .patch-note-heading,
body.theme-winamp .listener-map-heading {
  color: #eef4d7;
}

body.theme-winamp .portrait-card,
body.theme-winamp .signal-readout {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 12%),
    linear-gradient(180deg, #5d5a7d 0%, #232738 12%, #111217 100%);
}

body.theme-winamp .portrait-monitor-copy {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 10%),
    linear-gradient(180deg, #22252d 0%, #111217 100%);
  border: 2px inset #6f6f88;
}

body.theme-winamp .portrait-card-caption {
  background: linear-gradient(180deg, #75708e, #35374f 18%, #17181f 100%);
}

body.theme-winamp .signal-wire-card-summary,
body.theme-winamp .hero-copy,
body.theme-winamp .control-section-note,
body.theme-winamp .listener-identity-note,
body.theme-winamp .tile-preview,
body.theme-winamp .patch-note-list,
body.theme-winamp .listener-locations,
body.theme-winamp .message-form-note,
body.theme-winamp .map-legend-row span,
body.theme-winamp .quick-chip-empty {
  color: #c3cfaa;
}

body.theme-winamp .voice-meter-track,
body.theme-winamp input[type="range"] {
  background:
    linear-gradient(90deg, rgba(214, 224, 130, 0.22), rgba(143, 166, 66, 0.62)),
    #0f1014;
  border-color: rgba(173, 173, 190, 0.42);
}

body.theme-winamp .voice-meter-fill {
  background: linear-gradient(90deg, #d6e082, #8fa642);
}

body.theme-winamp .portrait-card-image {
  filter:
    grayscale(0.18)
    contrast(1.14)
    brightness(0.84)
    sepia(0.14)
    hue-rotate(6deg)
    saturate(0.95);
  opacity: 0.9;
}

body.theme-geocities .retro-cursor::before {
  --retro-cursor-size: 26px;
  --retro-cursor-fill: linear-gradient(180deg, #fff35a 0%, #ff4d4d 100%);
  --retro-cursor-shape: polygon(4% 0%, 76% 38%, 54% 42%, 100% 100%, 82% 100%, 48% 52%, 42% 72%, 0% 4%);
  --retro-cursor-filter: drop-shadow(0 0 6px rgba(255, 61, 61, 0.72));
  --retro-cursor-anim: retroCursorNudge 0.9s steps(2, end) infinite;
  --retro-cursor-spark-size: 5px;
  --retro-cursor-spark-right: -1px;
  --retro-cursor-spark-bottom: 0;
  --retro-cursor-spark-bg: #ffffff;
  --retro-cursor-spark-shadow: 0 0 8px rgba(255, 243, 90, 0.88);
  --retro-cursor-label-top: -8px;
  --retro-cursor-label-left: 18px;
  --retro-cursor-label-border: #7f0000;
  --retro-cursor-label-bg: #fff35a;
  --retro-cursor-label-color: #5a0000;
  --retro-cursor-label-font: "Arial Black", "Arial", sans-serif;
}

body.theme-hotdog .retro-cursor::before {
  --retro-cursor-size: 24px;
  --retro-cursor-fill: linear-gradient(180deg, #fff589 0%, #ffe248 30%, #ff8a1f 74%, #ff2a00 100%);
  --retro-cursor-shape: polygon(4% 0%, 72% 40%, 52% 44%, 100% 100%, 80% 100%, 46% 54%, 42% 72%, 0% 4%);
  --retro-cursor-filter: drop-shadow(0 0 8px rgba(255, 77, 0, 0.72));
  --retro-cursor-anim: retroCursorNudge 0.95s steps(2, end) infinite;
  --retro-cursor-spark-size: 6px;
  --retro-cursor-spark-right: -1px;
  --retro-cursor-spark-bottom: 1px;
  --retro-cursor-spark-bg: #ffe14d;
  --retro-cursor-spark-shadow: 0 0 8px rgba(255, 225, 77, 0.95);
  --retro-cursor-label-top: -7px;
  --retro-cursor-label-left: 19px;
  --retro-cursor-label-border: #7a0000;
  --retro-cursor-label-bg: #ffe14d;
  --retro-cursor-label-color: #7a0000;
  --retro-cursor-label-font: "Tahoma", "MS Sans Serif", sans-serif;
}

body.theme-hotdog .retro-cursor-label {
  font-weight: 700;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.38);
}

body.theme-winamp .retro-cursor::before {
  --retro-cursor-size: 28px;
  --retro-cursor-fill: linear-gradient(180deg, #eef4d7 0%, #c7d75f 44%, #8fa642 100%);
  --retro-cursor-shape: polygon(8% 14%, 84% 14%, 94% 26%, 54% 70%, 54% 88%, 34% 88%, 34% 64%, 8% 64%);
  --retro-cursor-filter: drop-shadow(0 0 8px rgba(199, 215, 95, 0.44));
  --retro-cursor-anim: retroCursorPulse 1.25s ease-in-out infinite;
  --retro-cursor-spark-size: 7px;
  --retro-cursor-spark-right: -1px;
  --retro-cursor-spark-bottom: 0;
  --retro-cursor-spark-bg: #d6e082;
  --retro-cursor-spark-shadow: 0 0 8px rgba(214, 224, 130, 0.85);
  --retro-cursor-label-top: -9px;
  --retro-cursor-label-left: 21px;
  --retro-cursor-label-border: #394200;
  --retro-cursor-label-bg: #d6e082;
  --retro-cursor-label-color: #394200;
  --retro-cursor-label-font: "Tahoma", "Verdana", sans-serif;
}

body.theme-winamp .retro-cursor-label {
  font-weight: 700;
  letter-spacing: 0.12em;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 332px minmax(0, 1fr);
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .shell {
    width: min(100% - 1.2rem, 1520px);
  }

  .hero,
  .workspace,
  .dashboard-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .tile-card-primary {
    grid-column: auto;
  }

  .portrait-monitor-copy {
    left: 1.6rem;
    right: 1.6rem;
    width: auto;
  }

  .listener-map-screen {
    min-height: 27rem;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 0.75rem, 1520px);
  }

  .hero,
  .panel {
    padding: 0.95rem;
  }

  .hero-steps,
  .listener-identity-grid,
  .message-form,
  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .theme-switch {
    padding: 0.75rem;
  }

  .theme-switch-options {
    grid-template-columns: 1fr;
  }

  .library-tab-bar {
    grid-template-columns: 1fr;
  }

  .signal-readout {
    grid-template-columns: 1fr;
  }

  .listener-map-screen {
    min-height: 22rem;
    padding: 0.9rem;
  }

  .listener-map-globe-stage {
    min-height: 18rem;
  }

  .signal-wire-feed {
    min-height: 20rem;
    max-height: 24rem;
  }
}

.now-playing-intel {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.intel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.intel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 255, 143, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intel-chip strong {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.intel-chip span {
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: none;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.intel-disclosure {
  background: rgba(255, 255, 255, 0.02);
}

.intel-body {
  max-height: 16rem;
  overflow: auto;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

.intel-body .tile-meta-value {
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (pointer: coarse) {
  body.theme-geocities,
  body.theme-hotdog,
  body.theme-winamp {
    cursor: auto;
  }

  body.theme-geocities .retro-cursor,
  body.theme-hotdog .retro-cursor,
  body.theme-winamp .retro-cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .screen-scan,
  .bg-grid,
  .bg-noise,
  .portrait-board-scroll,
  .portrait-monitor-scroll,
  .retro-cursor {
    display: none !important;
  }
}

@keyframes retroCursorSpin {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.08);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes retroCursorNudge {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(1px, -1px, 0) scale(1.03);
  }
}

@keyframes retroCursorPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes retroCursorSpark {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes retroCursorBlink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}
