:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-dark: #000000;
  --bg-card: #111111;
  --bg-card-hover: #18181b;
  --bg-glass: rgba(0, 0, 0, 0.85);
  --primary: #d8cdbe;
  --primary-hover: #c9bea9;
  --primary-glow: rgba(216, 205, 190, 0.15);
  --primary-fg: #141414;
  --accent-orange: #f97316;
  --accent-orange-hover: #ea580c;
  --accent: #f97316;
  --danger: #ef4444;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-light: rgba(255, 255, 255, 0.07);
  --border-focus: #d8cdbe;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.6);
  --backdrop-blur: blur(16px);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-dark: #f4f4f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --primary: #2e2a25;
    --primary-hover: #1c1916;
    --primary-glow: rgba(46, 42, 37, 0.12);
    --primary-fg: #f5f2eb;
    --accent-orange: #ea580c;
    --accent-orange-hover: #c2410c;
    --accent: #ea580c;
    --danger: #dc2626;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --text-muted: #71717a;
    --border-light: rgba(0, 0, 0, 0.07);
    --border-focus: #635c53;
    --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.08);
  }
}

[data-theme="light"] {
  --bg-dark: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --primary: #2e2a25;
  --primary-hover: #1c1916;
  --primary-glow: rgba(46, 42, 37, 0.12);
  --primary-fg: #f5f2eb;
  --accent-orange: #ea580c;
  --accent-orange-hover: #c2410c;
  --accent: #ea580c;
  --danger: #dc2626;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --border-light: rgba(0, 0, 0, 0.07);
  --border-focus: #635c53;
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg-dark: #000000;
  --bg-card: #111111;
  --bg-card-hover: #18181b;
  --bg-glass: rgba(0, 0, 0, 0.85);
  --primary: #d8cdbe;
  --primary-hover: #c9bea9;
  --primary-glow: rgba(216, 205, 190, 0.15);
  --primary-fg: #141414;
  --accent-orange: #f97316;
  --accent-orange-hover: #ea580c;
  --accent: #f97316;
  --danger: #ef4444;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-light: rgba(255, 255, 255, 0.07);
  --border-focus: #d8cdbe;
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-family);
  font-weight: 300;
  letter-spacing: -0.01em;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  padding-bottom: 2rem;
  transition: padding-bottom 0.3s ease;
}

body.has-active-episode .app-container {
  padding-bottom: 130px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-area h1 {
  font-size: 1.35rem;
  font-weight: 450;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.offline-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.offline-badge.hidden {
  display: none !important;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.42rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.user-status-pill:hover,
.user-status-pill:focus-within,
.user-status-pill.is-expanded {
  padding: 0.42rem 0.85rem;
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-pill-details {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin-left 0.2s ease;
  margin-left: 0;
}

.user-status-pill:hover .user-pill-details,
.user-status-pill:focus-within .user-pill-details,
.user-status-pill.is-expanded .user-pill-details {
  max-width: 320px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transition: background 0.3s, box-shadow 0.3s;
}

.status-indicator.online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.btn-pill-action {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.btn-pill-action:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  width: 100%;
}

.chip-filter {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.chip-filter:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.chip-filter.active {
  background: var(--text-primary);
  color: var(--bg-dark);
  border-color: var(--text-primary);
  font-weight: 500;
}

.continue-shelf {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 2rem;
}

[data-theme="light"] .continue-shelf,
:root:not([data-theme="dark"]) .continue-shelf {
  background: transparent;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0.85rem;
  padding: 0;
}

.shelf-header-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.35rem 0.2rem 0.85rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.shelf-title {
  font-size: 0.82rem;
  font-weight: 450;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-shelf-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

[data-theme="light"] .btn-shelf-toggle,
:root:not([data-theme="dark"]) .btn-shelf-toggle {
  background: rgba(0, 0, 0, 0.05);
}

.btn-shelf-toggle:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-shelf-toggle .chevron-icon {
  transition: transform 0.25s ease;
}

.continue-shelf.is-expanded .btn-shelf-toggle .chevron-icon {
  transform: rotate(180deg);
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 880px) {
  .shelf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 1680px) {
  .shelf-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2000px) {
  .shelf-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2400px) {
  .shelf-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.ep-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.35rem 0;
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease, background 0.15s ease;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.ep-progress-track:hover {
  height: 10px;
  background: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] .ep-progress-track,
:root:not([data-theme="dark"]) .ep-progress-track {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ep-progress-track:hover,
:root:not([data-theme="dark"]) .ep-progress-track:hover {
  background: rgba(0, 0, 0, 0.16);
}

.ep-progress-fill {
  height: 100%;
  background: var(--accent-orange);
  border-radius: 9999px;
  transition: width 0.1s ease;
  pointer-events: none;
}

.ep-resume-time {
  color: var(--accent-orange);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
}

.ep-resume-time:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.nav-tabs {
  display: flex;
  gap: 0.2rem;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="light"] .nav-tab.active {
  background: rgba(0, 0, 0, 0.08);
}

.tab-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  line-height: 1;
}

.nav-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

[data-theme="light"] .nav-tab.active .tab-badge {
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

.header-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
}

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

.btn-header-add {
  white-space: nowrap;
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 0.45rem 1rem;
}

/* Settings gear icon in header */
.btn-header-settings {
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
.btn-header-settings:hover,
.btn-header-settings.is-active {
  opacity: 1;
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  width: 100%;
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--border-focus);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
}

select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg, #141414);
  box-shadow: none;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-fg, #141414);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-confirm-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 400;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-action:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

[data-theme="light"] .btn-confirm-action,
:root:not([data-theme="dark"]) .btn-confirm-action {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-confirm-action:hover,
:root:not([data-theme="dark"]) .btn-confirm-action:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

/* Main Content & Tab Panels */
.main-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 2rem 1.5rem;
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* Status Banner */
.status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 880px) {
  .episode-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 1680px) {
  .episode-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2000px) {
  .episode-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2400px) {
  .episode-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.episode-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  backdrop-filter: var(--backdrop-blur);
  transition: all 0.25s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 150px;
  position: relative;
  gap: 0.65rem;
  min-width: 0;
  overflow: hidden;
}

.episode-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.episode-card.playing {
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 1px var(--accent-orange), 0 4px 20px rgba(249, 115, 22, 0.28);
}

.episode-card.is-played {
  opacity: 0.6;
}

.episode-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

.episode-artwork {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: #18181b;
}

.episode-header-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.episode-podcast-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
  cursor: pointer;
}

.episode-podcast-name:hover {
  text-decoration: underline;
}

.episode-title {
  font-size: 0.925rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episode-desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search match highlight in episode cards & feed lists */
mark.search-highlight {
  background: rgba(249, 115, 22, 0.22);
  color: var(--accent-orange, #ea580c);
  font-weight: 600;
  border-radius: 4px;
  padding: 0.05em 0.25em;
  margin: 0 -0.05em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background 0.15s ease, color 0.15s ease;
}

[data-theme="dark"] mark.search-highlight {
  background: rgba(249, 115, 22, 0.3);
  color: #fdba74;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark.search-highlight {
    background: rgba(249, 115, 22, 0.3);
    color: #fdba74;
  }
}

[data-theme="light"] mark.search-highlight {
  background: rgba(234, 88, 12, 0.16);
  color: #c2410c;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) mark.search-highlight {
    background: rgba(234, 88, 12, 0.16);
    color: #c2410c;
  }
}

.episode-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.episode-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.episode-meta .date-line {
  color: var(--text-muted);
  font-size: 0.73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.episode-meta .time-line {
  color: var(--text-secondary);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.episode-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

@media (hover: hover) and (min-width: 769px) {
  .episode-card-actions .btn-download-ep,
  .episode-card-actions .btn-queue-ep,
  .episode-card-actions .btn-mark-played {
    opacity: 0;
    max-width: 0;
    width: 0;
    padding: 0;
    margin: 0;
    border: none;
    pointer-events: none;
    overflow: hidden;
    transform: scale(0.85);
    transition: opacity 0.18s ease,
                max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.18s ease;
  }

  .episode-card:hover .episode-card-actions .btn-download-ep,
  .episode-card:hover .episode-card-actions .btn-queue-ep,
  .episode-card:hover .episode-card-actions .btn-mark-played,
  .episode-card:focus-within .episode-card-actions .btn-download-ep,
  .episode-card:focus-within .episode-card-actions .btn-queue-ep,
  .episode-card:focus-within .episode-card-actions .btn-mark-played {
    opacity: 1;
    max-width: 32px;
    width: 32px;
    pointer-events: auto;
    border: 1px solid var(--border-light);
    transform: scale(1);
  }
}

.btn-play-ep {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-play-ep svg {
  width: 14px;
  height: 14px;
}

.btn-play-ep:hover {
  background: var(--border-light);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.episode-card.playing .btn-play-ep {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
}

.btn-mark-played {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-mark-played svg {
  width: 14px;
  height: 14px;
}

.btn-mark-played:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-mark-played.is-completed {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-queue-ep {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-queue-ep svg {
  width: 14px;
  height: 14px;
}

.btn-queue-ep:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-queue-ep.is-queued {
  background: rgba(224, 90, 43, 0.15);
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.btn-download-ep {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-download-ep svg {
  width: 14px;
  height: 14px;
}

.btn-download-ep:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-download-ep.is-downloaded {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}

.btn-download-ep.is-downloading {
  color: var(--accent);
  border-color: var(--accent);
  pointer-events: none;
}

.btn-download-ep.is-downloading svg {
  animation: spin 1s linear infinite;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  max-width: 620px;
  width: 100%;
  margin: 3rem auto;
  box-sizing: border-box;
}

.empty-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--primary);
}

.empty-state h3 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  font-size: 0.925rem;
  font-weight: 300;
  line-height: 1.5;
}

.empty-quick-add {
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  width: 100%;
}

.empty-category-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.75rem 0 0.5rem 0;
}

.quick-add-form {
  width: 100%;
}

.quick-add-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.4rem 0.35rem 0.75rem;
  gap: 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}

[data-theme="light"] .quick-add-input-wrap,
:root:not([data-theme="dark"]) .quick-add-input-wrap {
  background: rgba(0, 0, 0, 0.03);
}

.quick-add-input-wrap:focus-within {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .quick-add-input-wrap:focus-within,
:root:not([data-theme="dark"]) .quick-add-input-wrap:focus-within {
  background: rgba(0, 0, 0, 0.05);
}

.quick-add-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.quick-add-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-primary);
  min-width: 0;
}

.quick-add-input-wrap input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.btn-quick-submit {
  padding: 0.4rem 0.9rem;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-results-container {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(440px, 60vh);
  overflow-y: auto;
  padding-right: 2px;
}

.dir-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.dir-region-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.25rem;
  flex-shrink: 0;
}

.region-chip {
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.region-chip:hover {
  color: var(--text-primary);
}

.region-chip.active {
  background: var(--text-primary);
  color: var(--bg-dark);
}

.empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.empty-footer-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.45;
  border-top: 1px solid var(--border-light);
  padding-top: 1.25rem;
}

.starter-suggestions-section {
  width: 100%;
  margin: 1.25rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.starter-suggestions-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.starter-suggestions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.starter-suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.starter-suggestion-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.starter-chip-name {
  font-weight: 400;
}

.starter-chip-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

[data-theme="light"] .starter-chip-badge {
  background: rgba(0, 0, 0, 0.06);
}

.starter-chip-add {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.starter-chip-add.subscribed {
  color: var(--text-muted);
  font-weight: 500;
}

.starter-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 0.25rem 0 0.5rem;
  width: 100%;
}

.starter-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.starter-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.starter-filter-pill.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
  font-weight: 600;
}

[data-theme="light"] .starter-filter-pill {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .starter-filter-pill:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .starter-filter-pill.active {
  background: var(--primary);
  color: var(--primary-fg);
}

.feeds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 880px) {
  .feeds-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 1680px) {
  .feeds-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2000px) {
  .feeds-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 2400px) {
  .feeds-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.feed-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.feed-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
}

.feed-art {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.feed-info {
  flex: 1;
  min-width: 0;
  padding-right: 1.85rem;
}

.feed-info h4 {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.feed-info p {
  font-size: 0.775rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.btn-feed-unsubscribe {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  opacity: 0.45;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-card:hover .btn-feed-unsubscribe {
  opacity: 0.85;
}

.btn-feed-unsubscribe:hover {
  opacity: 1 !important;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.feed-card-desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.1rem 0 0.25rem 0;
}

.feed-recent-widget {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
}

[data-theme="light"] .feed-recent-widget,
:root:not([data-theme="dark"]) .feed-recent-widget {
  background: rgba(0, 0, 0, 0.02);
}

.feed-recent-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.feed-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.recent-ep-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 5px;
  background: transparent;
  transition: background 0.15s ease;
  min-width: 0;
}

.recent-ep-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .recent-ep-row:hover,
:root:not([data-theme="dark"]) .recent-ep-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

.recent-ep-row.active {
  background: var(--primary-glow);
}

.recent-ep-row.is-played .recent-ep-title {
  color: var(--text-muted);
}

.recent-ep-row.is-played .btn-recent-play {
  opacity: 0.6;
}

.recent-ep-row.is-in-progress .recent-ep-duration {
  color: var(--accent-orange);
  font-weight: 500;
}

.btn-recent-play {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

[data-theme="light"] .btn-recent-play,
:root:not([data-theme="dark"]) .btn-recent-play {
  background: rgba(0, 0, 0, 0.07);
}

.btn-recent-play:hover {
  transform: scale(1.1);
  background: var(--text-primary);
  color: var(--bg-dark);
}

.btn-recent-play.is-playing {
  background: var(--accent-orange);
  color: #ffffff;
}

.recent-ep-title {
  flex: 1;
  min-width: 0;
  font-size: 0.775rem;
  font-weight: 300;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-ep-row.active .recent-ep-title {
  font-weight: 450;
  color: var(--primary);
}

.recent-ep-duration {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 300;
}

.dir-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dir-search-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .dir-search-card:hover,
:root:not([data-theme="dark"]) .dir-search-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.dir-search-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dir-search-info {
  flex: 1;
  min-width: 0;
}

.dir-search-title {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  line-height: 1.3;
}

.dir-search-artist {
  font-size: 0.775rem;
  font-weight: 300;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.dir-search-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.dir-tag-genre {
  font-size: 0.7rem;
  font-weight: 400;
  padding: 0.12rem 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--primary);
  letter-spacing: 0.01em;
}

[data-theme="light"] .dir-tag-genre,
:root:not([data-theme="dark"]) .dir-tag-genre {
  background: rgba(0, 0, 0, 0.05);
}

.dir-tag-meta {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
}

.theme-switch-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-theme {
  text-transform: capitalize;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
}

.btn-theme.active {
  background: var(--text-primary);
  color: var(--bg-dark);
  border-color: var(--text-primary);
  font-weight: 600;
}

.feed-detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin: 0 auto 2rem auto;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.feed-detail-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.feed-detail-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-feed-mute {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn-feed-mute svg {
  flex-shrink: 0;
}

.btn-feed-mute.is-muted {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.btn-feed-mute.is-muted:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
}

.btn-back-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-back-nav:hover {
  background: var(--bg-hover, var(--border-light));
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateX(-2px);
}

.feed-detail-main {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

@media (max-width: 650px) {
  .feed-detail-header {
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
  }
  .feed-detail-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

.feed-detail-art {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.feed-detail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feed-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.feed-detail-author {
  font-size: 0.88rem;
  color: var(--accent-orange);
  font-weight: 500;
}

.feed-detail-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 620px;
}

.feed-detail-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.feed-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--primary);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.feed-link-badge:hover {
  text-decoration: underline;
}

.feed-link-badge.feed-muted-badge {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.feed-link-badge.feed-muted-badge:hover {
  text-decoration: none;
}

[data-theme="light"] .feed-link-badge {
  background: rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .feed-link-badge {
    background: rgba(0, 0, 0, 0.04);
  }
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.settings-card h3 {
  font-size: 1.1rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.settings-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.downloads-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.downloads-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.downloads-header-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.downloads-header-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.offline-storage-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.offline-storage-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-remove-download {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-remove-download:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.bottom-action-dock {
  position: fixed;
  bottom: 5px;
  right: 1rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.has-active-episode .bottom-action-dock {
  bottom: 95px;
}

body.has-active-episode.has-mini-player .bottom-action-dock {
  bottom: 60px;
}

.bottom-action-dock.dock-hidden {
  display: none !important;
}

.dock-filters {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: var(--border-light);
  margin: 0 0.25rem;
}

.bottom-action-dock .chip-filter {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.bottom-action-dock .chip-filter:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.bottom-action-dock .chip-filter.active {
  background: var(--primary);
  color: var(--primary-fg, #141414);
  border-color: transparent;
  font-weight: 600;
}

.bottom-action-dock select {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-radius: 6px;
  border: 1px solid transparent;
  outline: none;
  cursor: pointer;
}

.btn-dock-refresh {
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dock-refresh:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 0.85rem 2rem;
  display: grid;
  grid-template-columns: 280px 1fr 180px;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.player-bar.active-episode {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

body.has-active-episode.has-mini-player .player-bar {
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
}

/* Compact Mini Player */
.player-mini {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

body.has-active-episode.has-mini-player .player-mini {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mini-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.mini-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.2s linear;
}

.mini-track-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  user-select: none;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.mini-track-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mini-artwork {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #1f2937;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mini-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.mini-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.mini-podcast {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.mini-play-btn,
.mini-toggle-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-play-btn:hover,
.mini-toggle-btn:hover,
#btn-collapse-player:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

#player-artwork {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1f2937;
  flex-shrink: 0;
}

.track-text {
  min-width: 0;
}

.track-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-podcast {
  font-size: 0.775rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: var(--radius-full);
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--text-primary);
}

.btn-subtext {
  position: absolute;
  font-size: 0.6rem;
  font-weight: 700;
}

.btn-play-pause {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--bg-dark);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-play-pause:hover {
  transform: scale(1.06);
}

.time-scrubber {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: 580px;
}

.time-scrubber:not(.has-waveform) {
  gap: 0;
}

.time-scrubber-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.time-scrubber.has-waveform .time-scrubber-row {
  justify-content: space-between;
  padding: 0 0.15rem;
}

.time-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 36px;
}

#seek-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: linear-gradient(to right, var(--accent-orange) var(--seek-pct, 0%), rgba(255, 255, 255, 0.15) var(--seek-pct, 0%));
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: height 0.15s ease;
}

#seek-bar:hover {
  height: 8px;
}

[data-theme="light"] #seek-bar,
:root:not([data-theme="dark"]) #seek-bar {
  background: linear-gradient(to right, var(--accent-orange) var(--seek-pct, 0%), rgba(0, 0, 0, 0.12) var(--seek-pct, 0%));
}

#seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-orange);
  cursor: pointer;
}

.player-right-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

#queue-badge {
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #141414;
  background: var(--accent);
  top: -4px;
  right: -4px;
}

#sleep-badge {
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-fg, #141414);
  background: var(--primary);
  top: -4px;
  right: -4px;
  width: auto;
}

/* Modals */
@keyframes modalOverlayFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: modalOverlayFade 0.18s ease-out;
}

[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.38);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .modal-overlay {
    background: rgba(15, 23, 42, 0.38);
  }
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* Dedicated Auth / Sync Modal Styling */
/* Dedicated Auth / Sync Modal Styling */
.auth-modal-card {
  max-width: 430px;
  padding: 1.75rem 2rem;
  border-radius: 20px;
  background: #252321;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: left;
}

[data-theme="light"] .auth-modal-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .auth-modal-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  }
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}

.auth-icon-badge {
  display: none !important;
}

.auth-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-btn-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

[data-theme="light"] .auth-btn-close:hover {
  background: rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .auth-btn-close:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

.auth-modal-intro {
  margin-bottom: 1.25rem;
}

.auth-modal-title {
  font-size: 1.35rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.auth-modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.auth-feature-pills {
  display: none;
}

.auth-pill {
  display: none;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.auth-input-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

[data-theme="light"] .auth-input-wrapper input {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .auth-input-wrapper input {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.12);
  }
}

.auth-input-wrapper input:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

[data-theme="light"] .auth-input-wrapper input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(46, 42, 37, 0.1);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .auth-input-wrapper input:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(46, 42, 37, 0.1);
  }
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--text-primary);
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
}

.btn-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 46px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-auth-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  text-align: center;
  width: 100%;
}

.btn-auth-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-auth-cancel {
  background: #f4f4f5;
  border-color: rgba(0, 0, 0, 0.08);
  color: #18181b;
}

[data-theme="light"] .btn-auth-cancel:hover {
  background: #e4e4e7;
}

.auth-privacy-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.modal-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.category-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 450;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.category-chip:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.1));
  color: var(--text-primary);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--text-primary);
  color: var(--bg-dark);
  border-color: var(--text-primary);
  font-weight: 600;
}

.subgenre-chips-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.75rem 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-light);
  animation: fadeIn 0.2s ease-out;
}

[data-theme="light"] .subgenre-chips-container,
:root:not([data-theme="dark"]) .subgenre-chips-container {
  background: rgba(0, 0, 0, 0.02);
}

.subgenre-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent-orange, #ea580c);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}

.subgenre-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 400;
  padding: 0.18rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.subgenre-chip:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-orange, #ea580c);
  color: var(--accent-orange, #ea580c);
  transform: translateY(-1px);
}

.subgenre-chip.active {
  background: var(--accent-orange, #ea580c);
  color: #ffffff;
  border-color: var(--accent-orange, #ea580c);
  font-weight: 500;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 450;
  letter-spacing: -0.01em;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body input[type="url"] {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
}

.help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.timer-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timer-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.timer-btn.active {
  background: var(--primary);
  color: var(--primary-fg, #141414);
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 16px var(--primary-glow);
}

.timer-btn.active:hover {
  background: var(--primary-hover);
  color: var(--primary-fg, #141414);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
}

.timer-btn.timer-cancel {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.04);
}

.timer-btn.timer-cancel:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
  transform: translateY(-1px);
}

.timer-btn.timer-cancel.is-inactive {
  opacity: 0.45;
  cursor: default;
  border-color: var(--border-light);
  color: var(--text-muted);
  background: transparent;
  transform: none;
}

.fade-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .timer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .timer-btn {
    font-size: 0.82rem;
    padding: 0.65rem 0.4rem;
  }
}

.hidden {
  display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo actions"
      "search search"
      "nav nav";
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .logo-area {
    grid-area: logo;
    min-width: 0;
  }

  .header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    max-width: 100%;
  }

  .user-status-pill {
    max-width: none;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
  }

  .user-status-pill.is-expanded {
    max-width: 220px;
    padding: 0.35rem 0.65rem;
  }

  #user-email-label {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }

  .header-search {
    grid-area: search;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .header-search .search-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav-tabs {
    grid-area: nav;
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.2rem;
    gap: 0.2rem;
  }

  .nav-tab {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .btn-header-add {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .app-container {
    padding-bottom: 70px;
  }

  body.has-active-episode .app-container {
    padding-bottom: 170px;
  }

  .main-content {
    padding: 0 0.5rem 1rem 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .episode-list,
  .shelf-grid,
  .feeds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
  }

  .episode-card {
    padding: 0.6rem 0.65rem;
    gap: 0.45rem;
  }

  .episode-card-top {
    gap: 0.45rem;
  }

  .episode-artwork {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
  }

  .episode-podcast-name {
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
  }

  .episode-title {
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .episode-desc {
    font-size: 0.7rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .episode-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .episode-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.65rem;
    gap: 0.2rem;
  }

  .episode-meta .date-line {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .episode-meta .time-line {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .episode-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    width: 100%;
  }

  .btn-play-ep,
  .btn-mark-played,
  .btn-queue-ep,
  .btn-download-ep {
    width: 26px;
    height: 26px;
  }

  .btn-play-ep svg,
  .btn-mark-played svg,
  .btn-queue-ep svg,
  .btn-download-ep svg {
    width: 11px;
    height: 11px;
  }

  .feed-card {
    padding: 0.65rem;
    gap: 0.45rem;
  }

  .feed-art {
    width: 36px;
    height: 36px;
  }

  .feed-info h4 {
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .feed-info p {
    font-size: 0.68rem;
  }

  .continue-shelf {
    padding: 0;
    margin-bottom: 1.5rem;
  }

  .bottom-action-dock {
    bottom: 5px;
    right: 0.5rem;
    left: 0.5rem;
    border-radius: var(--radius-sm);
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.35rem 0.5rem;
    gap: 0.35rem;
    max-width: calc(100vw - 1rem);
    box-sizing: border-box;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .bottom-action-dock::-webkit-scrollbar {
    display: none;
  }

  .dock-filters {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  body.has-active-episode .bottom-action-dock {
    bottom: 115px;
  }

  body.has-active-episode.has-mini-player .bottom-action-dock {
    bottom: 56px;
  }

  .bottom-action-dock .chip-filter {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .bottom-action-dock select {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    flex-shrink: 0;
  }

  .btn-dock-refresh {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    flex-shrink: 0;
  }

  .player-mini {
    height: 50px;
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .mini-artwork {
    width: 34px;
    height: 34px;
  }

  .mini-title {
    font-size: 0.8rem;
  }

  .mini-podcast {
    font-size: 0.7rem;
  }

  .player-bar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: translateY(105%);
    opacity: 0;
    pointer-events: none;
  }

  .player-bar.active-episode {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .player-track-info {
    grid-column: 1 / 2;
  }

  .player-right-options {
    grid-column: 2 / 3;
  }

  .player-center-controls {
    grid-column: 1 / 3;
    width: 100%;
  }

  .time-scrubber {
    max-width: 100%;
  }

  /* Mobile empty state & search directory overflow fixes */
  .empty-state {
    padding: 1.5rem 0.85rem;
    margin: 1rem auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .empty-quick-add {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .quick-add-input-wrap {
    padding: 0.25rem 0.35rem 0.25rem 0.5rem;
    gap: 0.35rem;
    box-sizing: border-box;
    width: 100%;
  }

  .quick-add-input-wrap input {
    font-size: 0.82rem;
    min-width: 0;
  }

  .btn-quick-submit {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .dir-search-card {
    padding: 0.5rem 0.6rem;
    gap: 0.5rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .dir-search-art {
    width: 38px;
    height: 38px;
    border-radius: 6px;
  }

  .dir-search-title {
    font-size: 0.82rem;
  }

  .dir-search-artist {
    font-size: 0.72rem;
  }

  .starter-suggestions-section {
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .starter-suggestions-grid {
    gap: 0.35rem;
  }

  .starter-suggestion-chip {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .modal-card {
    padding: 1.25rem 1rem;
    width: 95%;
    max-width: 95%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .auth-modal-card {
    padding: 1.5rem 1.25rem;
    width: 92%;
    max-width: 400px;
    border-radius: 18px;
  }
}

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.btn-play-pause .icon-spinner {
  color: var(--bg-dark);
}

.skeleton-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  align-items: center;
}

.skeleton-art {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  flex-shrink: 0;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: var(--border-light);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.timeline-sentinel {
  height: 20px;
  width: 100%;
  margin: 0.5rem 0;
}

.queue-modal-card {
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.queue-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.queue-count-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.queue-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-right: 0.25rem;
}

.queue-now-playing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.queue-now-playing-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-orange);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.queue-now-playing-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.queue-item-artwork {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card-hover);
}

.queue-item-info {
  flex: 1;
  min-width: 0;
}

.queue-item-title {
  font-size: 0.88rem;
  font-weight: 450;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.queue-item-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.queue-now-playing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  padding-right: 0.5rem;
}

.queue-now-playing-indicator span {
  width: 3px;
  background: var(--accent-orange);
  border-radius: 1px;
  animation: soundBar 1s ease-in-out infinite alternate;
}

.queue-now-playing-indicator span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.queue-now-playing-indicator span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.queue-now-playing-indicator span:nth-child(3) { height: 40%; animation-delay: 0.2s; }

@keyframes soundBar {
  0% { height: 25%; }
  100% { height: 100%; }
}

.queue-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-bottom: 0.25rem;
}

.queue-subhead {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-text-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s ease;
}

.btn-text-subtle:hover {
  color: var(--text-primary);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.queue-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  user-select: none;
}

.queue-item-row:hover {
  background: var(--bg-card-hover);
}

.queue-item-row.is-dragging {
  opacity: 0.45;
  border: 1px dashed var(--accent);
}

.queue-item-row.drag-over-above {
  border-top: 2px solid var(--accent);
}

.queue-item-row.drag-over-below {
  border-bottom: 2px solid var(--accent);
}

.queue-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: grab;
  padding: 0.15rem;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.queue-drag-handle:hover {
  color: var(--text-primary);
}

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

.queue-item-index {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.queue-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-queue-item-play,
.btn-queue-item-remove {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-queue-item-play:hover {
  background: var(--text-primary);
  color: var(--bg-dark);
  border-color: var(--text-primary);
}

.btn-queue-item-remove:hover {
  background: rgba(224, 90, 43, 0.15);
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.queue-empty-box {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
}

.queue-empty-box p {
  font-size: 0.92rem;
  font-weight: 450;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.queue-empty-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

#btn-player-mark-played:hover {
  color: var(--accent-orange);
}

#btn-player-notes:hover {
  color: var(--accent-orange);
}

.player-track-info {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  transition: background 0.15s ease;
}

.player-track-info:hover {
  background: var(--bg-card-hover);
}

.player-track-info:hover .track-title {
  color: var(--accent-orange);
}

.show-notes-modal-card {
  max-width: 620px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.show-notes-header-wrap {
  flex: 1;
  min-width: 0;
  padding-right: 0.75rem;
}

.show-notes-podcast-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.35rem;
}

.show-notes-episode-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.show-notes-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.show-notes-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-right: 0.35rem;
}

.show-notes-content {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  word-break: break-word;
}

.show-notes-content p {
  margin-bottom: 0.9rem;
}

.show-notes-content a {
  color: rgba(249, 115, 22, 0.88);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(249, 115, 22, 0.3);
  transition: color 0.15s, text-decoration-color 0.15s;
  word-break: break-all;
}

.show-notes-content a:hover {
  color: var(--accent-orange-hover);
  text-decoration-color: var(--accent-orange);
}

.show-notes-content ul,
.show-notes-content ol {
  margin: 0.6rem 0 1rem 1.25rem;
  padding: 0;
}

.show-notes-content li {
  margin-bottom: 0.35rem;
}

.show-notes-content blockquote {
  border-left: 3px solid var(--border-light);
  padding-left: 0.85rem;
  margin: 0.75rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Timecode chips — subtle orange accent */
.note-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.48rem;
  border-radius: 5px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.24);
  color: var(--accent-orange);
  font-size: 0.82rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  cursor: pointer;
  vertical-align: baseline;
  transition: all 0.15s ease;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.note-timestamp:hover {
  background: rgba(249, 115, 22, 0.18);
  color: var(--accent-orange-hover);
  border-color: rgba(249, 115, 22, 0.5);
  transform: translateY(-0.5px);
}

.show-notes-duration {
  color: rgba(249, 115, 22, 0.9);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.episode-desc-link {
  color: var(--accent-orange);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-block;
  margin-top: 0.25rem;
  transition: opacity 0.15s;
}

.episode-desc-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────
   FULL-EPISODE WAVEFORM & SPEECH/MUSIC TIMELINE CHART
   ───────────────────────────────────────────────────────────────────────── */

.waveform-timeline-wrap {
  display: none;
  position: relative;
  width: 100%;
  height: 42px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-light);
  overflow: hidden;
  align-items: center;
  touch-action: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.time-scrubber.has-waveform .waveform-timeline-wrap {
  display: flex;
}

.time-scrubber.has-waveform #seek-bar {
  display: none !important;
}

[data-theme="light"] .waveform-timeline-wrap {
  background: rgba(0, 0, 0, 0.05);
}

.waveform-timeline-wrap:hover {
  border-color: var(--text-muted);
}

.episode-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  pointer-events: none;
  background: rgba(249, 115, 22, 0.16);
  border-right: 2px solid var(--accent-orange);
  box-shadow: 2px 0 10px rgba(249, 115, 22, 0.6);
  transition: width 0.1s linear;
}

.waveform-playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  transition: left 0.1s linear;
  z-index: 2;
}

.waveform-hover-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}

.waveform-timeline-wrap:hover .waveform-hover-cursor {
  opacity: 1;
}

.waveform-tooltip {
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 20;
  color: var(--text-primary);
}

.time-scrubber-bottom,
.time-scrubber-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.time-scrubber.has-waveform .time-scrubber-row,
.time-scrubber.has-waveform .time-scrubber-bottom {
  justify-content: space-between;
  padding: 0 0.15rem;
}

.timeline-legend {
  display: none;
  align-items: center;
  gap: 0.4rem;
}

.time-scrubber.has-waveform.has-classifier .timeline-legend {
  display: flex;
}

.legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.speech-dot {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.6);
}

.music-dot {
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}

.legend-jump-icon {
  font-size: 0.62rem;
  opacity: 0.7;
}

.probe-status-pill {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: 0.25rem;
}

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

/* ─────────────────────────────────────────────────────────────────────────
   EXPERIMENTAL SETTINGS CARD
   ───────────────────────────────────────────────────────────────────────── */

.experimental-card {
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.experimental-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.experimental-card-header h3 {
  margin: 0;
}

.experimental-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.35);
  line-height: 1.4;
}

.experimental-row {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-light);
}

.experimental-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.experimental-toggle-label div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.experimental-toggle-label strong {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.experimental-toggle-label span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Toggle switch pill */
.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border-light);
  transition: background 0.2s ease;
  cursor: pointer;
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent-orange);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Status text below toggles */
.experimental-status {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-height: 1rem;
  transition: opacity 0.3s;
}

.experimental-status.ok {
  color: #4ade80;
}

.experimental-status.warn {
  color: var(--accent-orange);
}

/* ─────────────────────────────────────────────────────────────────────────
   TRANSCRIPT TAB & VIEWER
   ───────────────────────────────────────────────────────────────────────── */

.modal-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.modal-tab-btn:hover {
  color: var(--text-primary);
}

.modal-tab-btn.active {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
  font-weight: 600;
}

.transcript-source-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.show-transcript-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transcript-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.transcript-search-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
}

.transcript-search-input:focus {
  border-color: var(--accent-orange);
}

.btn-transcript-upload {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-transcript-upload:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.transcript-cues-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 52vh;
  padding-right: 0.5rem;
}

.transcript-cue {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.5;
}

.transcript-cue:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
}

.transcript-cue.is-active {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.35);
}

.transcript-cue-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  height: fit-content;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.transcript-cue-time:hover {
  background: var(--accent-orange);
  color: #fff;
}

.transcript-cue-text {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.transcript-cue-text mark {
  background: rgba(249, 115, 22, 0.3);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

.transcript-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
}

.transcript-empty-state h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 1.05rem;
}

.transcript-empty-state p {
  font-size: 0.85rem;
  max-width: 420px;
  margin: 0 auto 1.25rem auto;
  line-height: 1.5;
}

.transcript-segment-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.segment-jump-pill {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.segment-jump-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.segment-jump-pill.is-music {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
}

.segment-jump-pill.is-speech {
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
}
