@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/InterVariable.woff2') format('woff2 supports variations'),
       url('/static/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Fallback für Browser ohne Variable-Font-Support */
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #2dd4bf;
  --primary-ink: #042f2e;
  --primary-soft: #1a3a38;
  --danger: #f87171;
  --danger-soft: #450a0a;
  --border: rgba(255,255,255,0.10);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --glass-bg: #1e293b;
  --glass-border: none;
  --bottom-nav-height: 68px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
}

@property --mesh-hue-1 {
  syntax: '<number>';
  inherits: false;
  initial-value: 220;
}
@property --mesh-hue-2 {
  syntax: '<number>';
  inherits: false;
  initial-value: 250;
}
@property --mesh-hue-3 {
  syntax: '<number>';
  inherits: false;
  initial-value: 200;
}

.gradient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, hsla(var(--mesh-hue-1), 70%, 12%, 0.6), transparent),
    radial-gradient(ellipse 70% 50% at 80% 30%, hsla(var(--mesh-hue-2), 60%, 10%, 0.5), transparent),
    radial-gradient(ellipse 90% 70% at 50% 80%, hsla(var(--mesh-hue-3), 50%, 8%, 0.4), transparent),
    #0f172a;
  animation: meshShift 20s ease-in-out alternate;
}

@keyframes meshShift {
  0% {
    --mesh-hue-1: 220;
    --mesh-hue-2: 250;
    --mesh-hue-3: 200;
  }
  33% {
    --mesh-hue-1: 240;
    --mesh-hue-2: 210;
    --mesh-hue-3: 260;
  }
  66% {
    --mesh-hue-1: 200;
    --mesh-hue-2: 270;
    --mesh-hue-3: 230;
  }
  100% {
    --mesh-hue-1: 230;
    --mesh-hue-2: 220;
    --mesh-hue-3: 250;
  }
}

@supports not (background: paint(something)) {
  .gradient-bg {
    background:
      radial-gradient(ellipse 80% 60% at 20% 40%, hsla(220, 70%, 12%, 0.6), transparent),
      radial-gradient(ellipse 70% 50% at 80% 30%, hsla(250, 60%, 10%, 0.5), transparent),
      radial-gradient(ellipse 90% 70% at 50% 80%, hsla(200, 50%, 8%, 0.4), transparent),
      #0f172a;
    animation: none;
  }
}

.shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}


.fab-menu-toggle {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
  z-index: 100;
}
.fab-menu-toggle:hover {
  color: var(--text);
  background: #334155;
}
.fab-menu-toggle.open {
  color: var(--primary);
  background: rgba(45, 212, 191, 0.15);
}

/* Untermenue der 4 Aktions-Buttons: standardmaessig weg (per [hidden]-Attribut),
   erst nach Klick auf .fab-menu-toggle eingeblendet - vorher waren sie permanent
   sichtbar und haben unten rechts dauerhaft Platz belegt. */
.fab-item[hidden] {
  display: none !important;
}

.links-toggle-btn {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px + 36px + 8px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
  z-index: 100;
}
.links-toggle-btn:hover {
  color: var(--text);
  background: #334155;
}
.links-toggle-btn.open {
  color: var(--primary);
  background: rgba(45, 212, 191, 0.15);
}

.links-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  max-height: 80vh;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  overflow-y: auto;
}
.links-sheet.open {
  transform: translateY(0);
}

.links-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.links-sheet__title {
  font-size: 1.05rem;
  font-weight: 600;
}
.links-sheet__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.links-sheet .edit-toggle-btn {
  position: static;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
}
.links-sheet .edit-toggle-btn:hover {
  color: var(--text);
  background: #334155;
  transform: rotate(45deg);
}
.links-sheet .edit-toggle-btn.active {
  color: var(--primary-ink);
  background: var(--primary);
}

.links-sheet .glass-grid {
  width: 100%;
}

.padel-toggle-btn {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px + (36px + 8px) * 2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
  z-index: 100;
}
.padel-toggle-btn:hover {
  color: var(--text);
  background: #334155;
}
.padel-toggle-btn.open {
  color: var(--primary);
  background: rgba(45, 212, 191, 0.15);
}

.nzb-toggle-btn {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px + (36px + 8px) * 3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
  z-index: 100;
}
.nzb-toggle-btn:hover {
  color: var(--text);
  background: #334155;
}
.nzb-toggle-btn.open {
  color: var(--primary);
  background: rgba(45, 212, 191, 0.15);
}
.nzb-toggle-btn svg {
  width: 20px;
  height: 20px;
}
.nzb-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  max-height: 85vh;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  overflow: hidden;
}
.nzb-sheet.open {
  transform: translateY(0);
}
.nzb-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
  gap: 8px;
}
.nzb-sheet__title {
  font-size: 1.05rem;
  font-weight: 600;
}
.nzb-sheet-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: auto;
}
.nzb-sheet__body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.nzb-folder-list {
  display: grid;
  gap: 6px;
}
.nzb-folder-row {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}
.nzb-folder-row.is-expanded {
  border-color: rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.04);
}
.nzb-folder-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  min-width: 0;
}
.nzb-folder-name {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 2px 4px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.nzb-folder-name:hover {
  background: rgba(255,255,255,0.06);
}
.nzb-move-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.nzb-move-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  transform: scale(1.1);
}
.nzb-move-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.nzb-folder-files {
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
  padding: 4px 8px 8px;
}
.nzb-file-list {
  display: grid;
  gap: 2px;
}
.nzb-file-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 4px 2px;
}
.nzb-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.75);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nzb-file-row--dir {
  color: #93c5fd;
  font-weight: 600;
}
.nzb-file-row--empty {
  color: var(--muted);
  font-style: italic;
  justify-content: center;
  padding: 8px;
}
.nzb-file-size {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nzb-delete-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: rgba(248, 113, 113, 0.7);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.nzb-delete-btn:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.15);
}
.nzb-delete-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.nzb-file-loading {
  font-size: 0.76rem;
  color: var(--muted);
  padding: 8px 4px;
}
.nzb-loading {
  font-size: 0.84rem;
  color: var(--muted);
  padding: 16px 8px;
  text-align: center;
}
.nzb-empty {
  font-size: 0.84rem;
  color: var(--muted);
  padding: 16px 8px;
  text-align: center;
}

.nzb-file-row--nfo {
  padding: 0;
}
.nzb-file-nfo-btn {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: #93c5fd;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  text-align: left;
  padding: 2px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.nzb-file-nfo-btn:hover {
  background: rgba(147, 197, 253, 0.12);
}
.nzb-file-nfo-btn.is-open {
  color: #5eead4;
}
.nzb-summary {
  margin: 8px 6px 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.nzb-summary-counts {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}
.nzb-summary-nfo {
  margin-top: 4px;
  font-size: 0.78rem;
}
.nzb-summary-nfo--ok {
  color: rgba(120,220,120,0.8);
}
.nzb-summary-nfo--warn {
  color: rgba(255,200,80,0.9);
}
.nzb-summary-outlier {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  background: rgba(255,200,80,0.12);
  border-radius: 3px;
  padding: 0 4px;
}

.nzb-nfo-content {
  margin: 0 6px 6px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255,255,255,0.78);
  max-height: 400px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.06);
}

.padel-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85vh;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  overflow-y: auto;
}
.padel-sheet .glass-panel {
  overflow: visible;
}
.padel-sheet.open {
  transform: translateY(0);
}

.padel-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
  gap: 8px;
}
.padel-sheet__title {
  font-size: 1.05rem;
  font-weight: 600;
}
.padel-slot-mini-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: auto;
}

.page-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 36px;
  height: 48px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 150ms ease;
  overflow: hidden;
}
.page-arrow:hover {
  color: var(--text);
  background: #334155;
}
.page-arrow--left { left: 0.4rem; }
.page-arrow--right { right: 0.4rem; }

.pages-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.pages-track {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.pages-track.no-transition {
  transition: none;
}

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

.page {
  display: none;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 1.25rem 1.25rem;
  box-sizing: border-box;
  min-width: 0;
}

.page.active-page {
  display: block;
}

.page.active-page .glass-card,
.page.active-page .glass-panel,
.page.active-page .padel-slot-item,
.page.active-page .media-card {
  animation: contentFadeIn 350ms ease both;
}

.page.active-page .glass-card:nth-child(1),
.page.active-page .glass-panel:nth-child(1),
.page.active-page .padel-slot-item:nth-child(1) { animation-delay: 0ms; }
.page.active-page .glass-card:nth-child(2),
.page.active-page .glass-panel:nth-child(2),
.page.active-page .padel-slot-item:nth-child(2) { animation-delay: 40ms; }
.page.active-page .glass-card:nth-child(3),
.page.active-page .glass-panel:nth-child(3),
.page.active-page .padel-slot-item:nth-child(3) { animation-delay: 80ms; }
.page.active-page .glass-card:nth-child(4),
.page.active-page .glass-panel:nth-child(4),
.page.active-page .padel-slot-item:nth-child(4) { animation-delay: 120ms; }
.page.active-page .glass-card:nth-child(5),
.page.active-page .glass-panel:nth-child(5),
.page.active-page .padel-slot-item:nth-child(5) { animation-delay: 160ms; }
.page.active-page .glass-card:nth-child(6),
.page.active-page .glass-panel:nth-child(6),
.page.active-page .padel-slot-item:nth-child(6) { animation-delay: 200ms; }
.page.active-page .glass-card:nth-child(n+7),
.page.active-page .glass-panel:nth-child(n+7),
.page.active-page .padel-slot-item:nth-child(n+7),
.page.active-page .media-card:nth-child(n+7) { animation-delay: 240ms; }

.page-content {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.page-title {
  display: flex;
  align-items: baseline;
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 4px;
  padding: 0 4px;
  user-select: none;
}

#pageMain > .page-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

#pageMain > .page-content > .page-title,
#pageMain > .page-content > #jellyfinActivity:not([hidden]) {
  grid-column: 1 / -1;
}

#pageMain > .page-content > #jellyfinHistory {
  grid-column: 1;
}

#pageMain > .page-content > #jellyfinMostWatched {
  grid-column: 2;
}

#pageMain > .page-content > .page-title ~ #jellyfinHistory:only-child {
  grid-column: 1 / -1;
}

.page-content > :not(.page-title) {
  border-top: 2px solid var(--primary);
}
.glass-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 66%;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.glass-card {
  flex: 1 1 162px;
  max-width: 220px;
  background: var(--glass-bg);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 200ms ease, box-shadow 200ms ease;
  overflow: hidden;
  position: relative;
  opacity: 0;
}

.glass-card.entering {
  animation: cardEnter 400ms ease forwards;
}

.glass-card:hover {
  background: #334155;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.glass-card:hover .icon-shell {
  transform: translateY(-2px);
}

.card-main {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 9px;
}

.icon-shell {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: none;
  background: rgba(255,255,255,0.03);
  transition: transform 200ms ease;
}

@keyframes rippleExpand {
  to { transform: scale(4); opacity: 0; }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.25);
  transform: scale(0);
  animation: rippleExpand 600ms ease-out forwards;
  pointer-events: none;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
}

.icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 170ms ease;
}
.icon.loaded { opacity: 1; }

.name {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-actions {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 5px 5px;
}
.editing .edit-actions { display: grid; }

.empty {
  flex-basis: 100%;
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  background: var(--glass-bg);
}

.glass-panel {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.glass-panel h2 { margin: 0; font-size: 1.05rem; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.detail-toggle {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}
.detail-toggle::-webkit-details-marker { display: none; }
.detail-toggle::before {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 150ms ease;
}
.detail-toggle:hover { color: var(--text); }
details[open] > .detail-toggle::before { transform: rotate(90deg); }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.45rem;
  line-height: 1;
  border: 0;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 50;
  overflow: hidden;
}

.bottom-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 1rem 1rem;
  height: var(--bottom-nav-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 10;
  position: relative;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 180ms;
  padding: 0 1rem;
  position: relative;
  overflow: hidden;
}

.bottom-nav__item.active {
  color: var(--primary);
}

.bottom-nav__item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav__label {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  font-family: var(--font-main);
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  border-radius: 1px;
  background: var(--primary);
  transition: left 380ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  min-width: 20px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  letter-spacing: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50%       { opacity: 0.75; box-shadow: 0 0 0 4px transparent; }
}

.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 120ms ease, border-color 120ms ease, transform 200ms ease;
  overflow: hidden;
  flex-shrink: 0;
}
.icon-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.btn { border: 0; border-radius: var(--radius-sm); background: var(--primary); color: var(--primary-ink); padding: 8px 10px; font-weight: 800; cursor: pointer; transition: transform 120ms ease, filter 120ms ease; font-family: var(--font-main); font-size: 0.85rem; position: relative; overflow: hidden; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: rgba(22, 49, 39, 0.8); color: var(--text); border: var(--glass-border); }
.btn-mini { padding: 4px 2px; font-size: 0.62rem; }
.btn-danger { background: var(--danger-soft); color: #ffd2da; }

label { display: grid; gap: 6px; font-weight: 640; }
input { width: 100%; border: var(--glass-border); border-radius: 9px; padding: 9px; font: inherit; background: rgba(0,0,0,0.3); color: var(--text); backdrop-filter: blur(4px); }
.muted { color: var(--muted); }
.error { min-height: 20px; margin: 0; color: var(--danger); font-size: 0.88rem; }

.editor-dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 95vw); background: transparent; }
.editor-dialog::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.editor { display: grid; gap: 10px; background: rgba(10,16,30,0.92); border: var(--glass-border); border-radius: 14px; padding: 16px; backdrop-filter: blur(20px); }
.editor h2 { margin: 0 0 4px; }
.url-row, .upload-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px,1fr)); gap: 6px; }
.suggestion { border: var(--glass-border); border-radius: 6px; background: rgba(255,255,255,0.06); height: 62px; cursor: pointer; display: grid; place-items: center; }
.suggestion img { width: 38px; height: 38px; object-fit: contain; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast-container {
  position: fixed;
  bottom: calc(28px + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-4px) scale(0.97); }
}

.toast {
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  white-space: nowrap;
  animation: toastIn 220ms ease, toastOut 280ms ease 2.5s forwards;
}
.toast.success {
  border-color: rgba(45, 212, 191, 0.35);
  color: #5eead4;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.15);
}
.toast.error {
  border-color: rgba(255, 95, 122, 0.35);
  color: #ffb3bf;
  box-shadow: 0 0 16px rgba(255, 95, 122, 0.15);
}

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

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}
.btn.loading::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
.padel-my-bookings-list { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 4px; }
.padel-my-booking-item { }
.padel-my-booking-link {
  display: block;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.08);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: background 150ms ease;
}
.padel-my-booking-link:hover { background: rgba(45, 212, 191, 0.16); }

.padel-slots-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.padel-slot-item { border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); background: rgba(255,255,255,0.04); padding: 8px; display: grid; gap: 4px; font-size: 0.82rem; }

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

.padel-slot-item.slot-enter {
  animation: slotEnter 300ms ease both;
}
.padel-slot-item.is-outside { opacity: 0.82; }
.padel-preferences-form { display: grid; gap: 12px; }
.padel-weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.padel-weekday-option {
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  text-transform: capitalize;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.padel-weekday-option:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.34);
}
.padel-weekday-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.padel-weekday-option:has(input:checked) {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(74, 222, 128, 0.1);
  color: #bbf7d0;
}
.padel-time-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.padel-time-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  padding: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}
.padel-time-grid input { width: 100%; min-width: 0; }
.padel-schedule-editor {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.035);
  padding: 10px;
}
.padel-schedule-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
}
.padel-schedule-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}
.padel-schedule-controls input,
.padel-schedule-controls select {
  width: 100%;
  min-width: 0;
}
.padel-scan-timeline {
  display: grid;
  grid-template-columns: repeat(48, minmax(8px, 1fr));
  gap: 2px;
  min-height: 44px;
  align-items: stretch;
}
.padel-scan-tick {
  position: relative;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  padding: 0;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.padel-scan-tick:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.36);
}
.padel-scan-tick.is-window {
  border-color: rgba(45, 212, 191, 0.24);
  background: rgba(45, 212, 191, 0.12);
}
.padel-scan-tick.is-scan {
  border-color: rgba(74, 222, 128, 0.52);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.3), rgba(34, 197, 94, 0.16));
}
.padel-scan-hour {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  overflow: hidden;
  color: rgba(226,232,240,0.72);
  font-size: 0.54rem;
  line-height: 1;
  text-align: center;
}
.padel-scan-summary {
  margin: 0;
  min-height: 1.2em;
}
.padel-match-pill { justify-self: start; border-radius: 999px; border: 1px solid var(--border); padding: 2px 7px; font-size: 0.72rem; }
.padel-match-pill.match { border-color: rgba(45, 212, 191, 0.4); background: rgba(45, 212, 191, 0.12); color: #5eead4; }
.padel-match-pill.outside { border-color: rgba(147,165,190,0.3); background: rgba(147,165,190,0.06); color: #a8b9d1; }
.padel-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.padel-ignore-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.padel-ignore-item { border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); background: rgba(255,255,255,0.04); padding: 7px 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.padel-ignore-date { font-size: 0.84rem; }
.padel-scan-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.padel-output { margin: 0; min-height: 60px; max-height: 200px; overflow: auto; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); background: rgba(0,0,0,0.3); padding: 8px; font-size: 0.74rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }

.padel-card {
  gap: 10px;
}

.padel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.padel-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.padel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.padel-dot.has-match {
  background: #2dd4bf;
  color: rgba(45, 212, 191, 0.5);
  animation: pulse 1.6s ease-in-out infinite;
}
.padel-dot.no-match { background: #ffcc8a; }
.padel-dot.idle     { background: #7a8fa8; }

.padel-status-label {
  font-size: 0.88rem;
  color: var(--text);
}

.padel-section-details {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
}

.padel-section-summary {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  padding: 2px 0;
}
.padel-section-summary::-webkit-details-marker { display: none; }
.padel-section-summary::before {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 150ms ease;
}
details[open] .padel-section-summary::before { transform: rotate(90deg); }
.padel-section-summary:hover { color: var(--text); }

.padel-section-badge {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
  font-style: normal;
}

.padel-section-body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.padel-scan-btns {
  display: flex;
  gap: 8px;
}

.padel-calendar-section {
  display: grid;
  gap: 10px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(94, 234, 212, 0.13);
  padding: 14px;
}

.padel-preferences-section {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(94, 234, 212, 0.13);
  padding: 14px;
}

.padel-scan-section {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(94, 234, 212, 0.13);
  padding: 14px;
}

.padel-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.padel-log-panel {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  overflow: hidden;
}

.padel-log-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.8rem;
  font-weight: 800;
}

.padel-log-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.padel-log-list {
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
}

.padel-log-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  padding: 7px 8px;
}

.padel-log-time {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.padel-log-message {
  min-width: 0;
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.35;
  word-break: break-word;
}

.padel-log-row.is-date {
  border-color: rgba(94, 234, 212, 0.2);
}

.padel-log-row.is-info {
  border-color: rgba(94, 234, 212, 0.18);
  background: rgba(94, 234, 212, 0.06);
}

.padel-log-row.is-success {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.08);
}

.padel-log-row.is-empty {
  border-color: rgba(148, 163, 184, 0.16);
  opacity: 0.88;
}

.padel-log-row.is-error {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(248, 113, 113, 0.08);
}

.padel-log-row.is-muted {
  opacity: 0.76;
}

.padel-log-empty {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.padel-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.padel-calendar-head h3 {
  margin: 0 0 3px;
  font-size: 0.98rem;
}

.padel-calendar-head p {
  margin: 0;
  font-size: 0.78rem;
}

.padel-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.padel-calendar-month {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.045);
  padding: 10px;
}

.padel-calendar-month h4 {
  margin: 0 0 8px;
  font-size: 0.84rem;
  text-transform: capitalize;
}

.padel-calendar-weekdays,
.padel-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.padel-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.padel-calendar-day,
.padel-calendar-spacer {
  aspect-ratio: 1;
  min-width: 0;
}

.padel-calendar-day {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease, opacity 120ms ease;
}

.padel-calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.36);
}

.padel-calendar-day.is-search-day {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
}

.padel-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.72);
}

.padel-calendar-day.is-ignored {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(248, 113, 113, 0.17);
  color: #fca5a5;
}

.padel-calendar-day.is-search-day.is-ignored {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.17);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.42);
  color: #fecaca;
}

.padel-calendar-day.is-loading {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.padel-ignore-details {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
}
.unidentified-panel {
  border: 1px solid rgba(251, 191, 36, 0.25);
  gap: 10px;
}
.unidentified-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.unidentified-panel__head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.unidentified-panel__count {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(251, 191, 36, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.unidentified-panel__list {
  display: grid;
  gap: 6px;
}
.unidentified-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.84rem;
}
.unidentified-row__name {
  font-weight: 600;
  color: #e2e8f0;
}
.unidentified-row__link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.unidentified-row__link:hover {
  text-decoration: underline;
  color: var(--primary);
}
.unidentified-row__dismiss {
  background: none;
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.unidentified-row__dismiss:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
}
.unidentified-row__orig {
  color: var(--muted);
  font-size: 0.8rem;
}

.media-hero {
  gap: 16px;
}

.media-hero__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 6px;
}

.media-hero__head .media-summary {
  flex: 0 1 auto;
  min-width: 0;
}

.media-search-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.media-search-mode__label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.media-mode-switch {
  display: inline-flex;
  gap: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
}

.media-mode-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  min-width: 72px;
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.media-mode-btn:hover {
  color: var(--text);
}

.media-mode-btn.is-active {
  background: transparent;
  color: var(--primary);
  border-bottom-color: var(--primary);
  box-shadow: none;
}

.media-mode-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.media-mode-btn.is-loading::after {
  content: '...';
}

.media-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
}

.media-hero h2,
.media-section__head h3,
.media-genre-block h3 {
  margin: 0;
}

.media-summary {
  min-width: 180px;
  text-align: right;
}

.media-summary__counts {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.media-search-form {
  display: grid;
  grid-template-columns: minmax(56px, 72px) minmax(80px, 100px) minmax(80px, 100px) minmax(220px, auto);
  gap: 10px;
  align-items: center;
}

.media-search-input {
  width: 100%;
  min-width: 0;
}

.media-hero__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
}

.media-hero__info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  min-width: 0;
}

.media-hero__info .media-summary__counts,
.media-hero__info .media-hits {
  display: inline;
}

.media-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.media-action-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  min-height: 48px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.media-action-btn:hover {
  background: rgba(255,255,255,0.08);
}

.media-action-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.media-action-btn--primary.is-active {
  border-color: var(--primary);
  color: var(--primary);
}

.media-action-btn--primary.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.media-action-btn--settings {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  width: 48px;
  height: 48px;
}

.media-action-btn--settings svg {
  width: 20px;
  height: 20px;
}

.media-settings {
  width: min(520px, 95vw);
}

.media-settings > label,
.media-settings__years label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.media-settings input {
  width: 100%;
}

.media-settings__years {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.media-settings__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.media-settings__genres .media-genre-list {
  max-height: 220px;
  overflow-y: auto;
}

.media-settings__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.media-genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.media-genre-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.media-genre-chip:hover {
  transform: translateY(-1px);
}

.media-genre-chip.is-include {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.14);
  color: #86efac;
}

.media-genre-chip.is-exclude {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

.media-genre-details {
  border: none;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.35);
  padding: 12px 14px;
}

.media-genre-details summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.media-genre-details summary::-webkit-details-marker {
  display: none;
}

.media-status-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.media-status-line:empty {
  display: none;
}

.media-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: -8px;
}

.media-hits {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.media-hits--warn {
  color: #f2b134;
}

.media-abort-btn {
  flex: none;
  border: 1px solid rgba(242,75,75,0.5);
  background: rgba(242,75,75,0.12);
  color: #ff8a8a;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.media-abort-btn:hover {
  background: rgba(242,75,75,0.22);
}

.media-abort-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.media-section,
.media-archive-details {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.media-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.media-section__badge {
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 4px 8px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  min-height: 152px;
}

.media-card--archived {
  opacity: 0.8;
}

.media-card__poster {
  aspect-ratio: 120 / 170;
  max-height: 170px;
  background: rgba(0,0,0,0.26);
}

.media-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-poster-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  padding: 10px;
  text-align: center;
}

.media-card__body {
  display: grid;
  gap: 10px;
  padding: 14px 14px 14px 0;
}

.media-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.media-card__body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.media-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.media-card__season {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.media-status-pill {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.1);
}

.media-type-pill {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.1);
}

.media-type-pill--movie {
  background: rgba(45, 212, 191, 0.12);
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.35);
}

.media-type-pill--tv {
  background: rgba(129, 140, 248, 0.12);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

.media-status-pill--new { background: rgba(45, 212, 191, 0.12); color: #5eead4; border-color: rgba(45, 212, 191, 0.35); }
.media-status-pill--available { background: rgba(74, 222, 128, 0.12); color: #86efac; border-color: rgba(74, 222, 128, 0.35); }
.media-status-pill--hidden { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.media-status-pill--rejected { background: rgba(148, 163, 184, 0.1); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.2); }

.media-card__icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: none;
  border: 0;
  cursor: pointer;
}

.media-card__icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media-card__icon-btn img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.media-card__actions-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.media-card__action-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: inherit;
  font: inherit;
  transition: transform 120ms ease, filter 120ms ease;
}

.media-card__action-btn:hover {
  filter: brightness(1.3);
  transform: scale(1.15);
}

.media-card__action-btn:active {
  transform: scale(0.95);
}

.media-card__action-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media-card__action-btn--available {
  color: #86efac;
}

.media-card__action-btn--hide {
  color: #fca5a5;
}

.media-grid--archive {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-archive-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.media-archive-row:hover {
  background: rgba(255,255,255,0.04);
}

.media-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.media-status-dot--available { background: #86efac; }
.media-status-dot--hidden { background: #fca5a5; }
.media-status-dot--rejected { background: #94a3b8; }

.media-archive-row__name {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-archive-row__year {
  font-size: 0.72rem;
  color: var(--muted);
  flex: 0 0 auto;
}

.media-archive-row .media-type-pill {
  font-size: 0.6rem;
  padding: 2px 6px;
  flex: 0 0 auto;
}

.media-archive-details {
  display: grid;
  gap: 12px;
}

.media-archive-details summary {
  cursor: pointer;
  font-weight: 700;
}

/* Empty Folders Panel */
.empty-folders-panel {
  gap: 10px;
}
.empty-folders-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.empty-folders-panel__head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}
.empty-folders-panel__count {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 999px;
}
.empty-folders-panel__scan-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 120ms ease, border-color 120ms ease;
}
.empty-folders-panel__scan-btn svg {
  width: 14px;
  height: 14px;
}
.empty-folders-panel__scan-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.empty-folders-panel__scan-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.empty-folders-panel__scan-btn.scanning svg {
  animation: efSpin 1s linear infinite;
}
@keyframes efSpin {
  to { transform: rotate(360deg); }
}
.empty-folders-panel__scan-status {
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unidentified-row__hydra-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 2px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  opacity: 0.65;
  transition: opacity 0.12s ease;
  flex-shrink: 0;
}
.unidentified-row__hydra-btn:hover {
  opacity: 1;
}
.unidentified-row__hydra-btn img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.integrity-error-msg {
  font-size: 0.75rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.empty-folders-panel__recheck-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.empty-folders-panel__recheck-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.usenet-sub-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.usenet-sub-card__label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.30);
  margin: 0;
}

.usenet-card {
  gap: 12px;
}

.usenet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.usenet-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--active {
  background: #2dd4bf;
  color: rgba(45, 212, 191, 0.5);
  animation: pulse 1.6s ease-in-out infinite;
}
.status-dot--idle    { background: #7a8fa8; }
.status-dot--stuck   { background: #ff5f7a; }
.status-dot--warning { background: #ffcc8a; }

.usenet-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.usenet-dot.running {
  background: #2dd4bf;
  color: rgba(45, 212, 191, 0.5);
  animation: pulse 1.6s ease-in-out infinite;
}
.usenet-dot.idle   { background: #7a8fa8; }
.usenet-dot.stuck  { background: #ff5f7a; }

.usenet-status-label {
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.usenet-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.usenet-release-title {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usenet-substatus {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  min-width: 0;
}

#usenetPhaseText,
#usenetUploadSummary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#usenetPhaseText {
  flex-shrink: 0;
}

#usenetUploadSummary {
  flex: 1;
}

.usenet-substatus-divider {
  color: rgba(255,255,255,0.28);
}

.usenet-refresh-btn {
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
  position: relative;
}

.usenet-queue-list {
  list-style: none;
  padding: 6px 0 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.usenet-queue-item {
  font-size: .75rem;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usenet-folder {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  min-width: 0;
}
.usenet-folder-arrow {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.usenet-folder-name {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.usenet-log-details {
  border-radius: 6px;
  overflow: hidden;
}
.usenet-log-summary {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 2px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.usenet-log-summary::-webkit-details-marker { display: none; }
.usenet-log-summary::before {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 150ms ease;
}
details[open] .usenet-log-summary::before { transform: rotate(90deg); }
.usenet-log-summary:hover { color: var(--text); }
.usenet-log-summary.is-warning {
  color: #ff8aa0;
  font-weight: 700;
}
.usenet-log-output { margin-top: 6px; background: rgba(0,0,0,0.5); border-radius: 8px; font-family: ui-monospace, 'Cascadia Code', 'SF Mono', monospace; }

.usenet-log-output { min-width: 0; }

.usenet-progress-track {
  width: 100%; height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px; overflow: hidden;
  margin-bottom: 8px;
}
@keyframes progressPulse { 0%,100%{opacity:1} 50%{opacity:.7} }
@keyframes progressSlide { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
.usenet-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf 0%, #22c55e 100%);
  border-radius: 999px;
  transition: width 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative;
  overflow: hidden;
}
.usenet-progress-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.usenet-progress-bar--indeterminate {
  background: linear-gradient(90deg, transparent 0%, #2dd4bf 40%, #0d9488 60%, transparent 100%);
  background-size: 200% 100%;
  animation: progressSlide 1.6s linear infinite;
  transition: none;
}
.usenet-progress-bar--indeterminate::after { display: none; }

.log-ts { color: var(--muted); font-weight: 400; font-size: 0.9em; opacity: 0.8; }
.log-phase { color: #99f6e4; font-weight: 700; }
.log-ok { color: var(--primary); font-weight: 700; }
.log-error { color: var(--danger); font-weight: 700; }
.log-header {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  margin: 8px 0;
  border-left: 3px solid var(--primary);
  color: var(--text);
  font-weight: 600;
  border-radius: 0 4px 4px 0;
}

.usenet-phase-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 2px 0;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  min-width: 0;
  white-space: nowrap;
}

.phase-badge.done {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.3);
  color: #5eead4;
}

.phase-badge.active {
  background: rgba(153, 246, 228, 0.15);
  border-color: rgba(153, 246, 228, 0.4);
  color: #99f6e4;
  box-shadow: 0 0 12px rgba(153, 246, 228, 0.2);
  animation: pulse 2s infinite ease-in-out;
}

.phase-badge.pending {
  color: rgba(255,255,255,0.36);
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.07);
}

.phase-badge.stuck {
  color: #ff8aa0;
  background: rgba(255, 95, 122, 0.12);
  border-color: rgba(255, 95, 122, 0.36);
}

.phase-icon { font-size: 0.8rem; }
.phase-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.usenet-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.usenet-metric-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.usenet-metric-pill span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 500;
}
.usenet-queue-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.usenet-queue-heading {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.usenet-queue-remainder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.usenet-queue-item {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.58);
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.035);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.usenet-queue-more {
  color: var(--muted);
  font-size: 0.72rem;
  padding: 2px 7px;
}
.usenet-progress-label {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
#usenetProgressPct { font-size: .8rem; font-weight: 700; color: var(--primary); }
.usenet-progress-articles { font-size: .75rem; color: var(--muted); }
.usenet-progress-detail { font-size: .75rem; color: var(--muted); }
@keyframes completionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.3); }
  50% { box-shadow: 0 0 16px 4px rgba(45, 212, 191, 0.15); }
}

.usenet-finished-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  background: rgba(45, 212, 191, 0.07);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--radius-sm, 6px);
  animation: completionPulse 2s ease-in-out 3;
}
.usenet-finished-folder {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.usenet-finished-icon { color: #2dd4bf; font-size: .85rem; flex-shrink: 0; }
.usenet-finished-summary { font-size: .82rem; color: var(--muted); }

.usenet-progress-label-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.usenet-upload-part {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  font-variant-numeric: tabular-nums;
}
.usenet-progress-divider {
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
}

.phase-connector {
  width: 12px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.phase-connector.filled {
  background: rgba(45, 212, 191, 0.3);
}
.phase-connector.filled::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(45, 212, 191, 0.5);
  animation: connectorFill 400ms ease forwards;
}

@keyframes connectorFill {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}
.jellyfin-activity {
  background: var(--glass-bg);
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 24px;
}

.jellyfin-activity__heading {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.jellyfin-refresh-btn {
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
}

.jellyfin-refresh-fixed {
  position: fixed;
  right: 16px;
  bottom: calc(68px + 16px + (36px + 8px) * 4);
  z-index: 100;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: var(--primary-soft);
  border-color: transparent;
}

.jellyfin-refresh-fixed:hover {
  background: #334155;
}

.jellyfin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.jellyfin-cover-wrap {
  flex-shrink: 0;
  text-decoration: none;
  display: block;
}

.jellyfin-cover {
  width: 33px;
  height: 47px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.04);
  transition: opacity 0.15s, transform 0.15s;
}

.jellyfin-cover-wrap:hover .jellyfin-cover {
  opacity: 0.85;
  transform: scale(1.05);
}

.jellyfin-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--primary);
}

.jellyfin-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.jellyfin-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.jellyfin-text strong {
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.jellyfin-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jellyfin-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.jellyfin-state-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
}

.jellyfin-state-icon.paused {
  color: var(--muted);
}

.jellyfin-progress-bar--paused {
  opacity: 0.5;
}

.jellyfin-time {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.jellyfin-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 2s ease;
}

.jellyfin-history {
  display: block;
  padding: 0;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
}

.jellyfin-history[open] {
  padding-bottom: 10px;
}

.jellyfin-history__toggle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.jellyfin-history__toggle::-webkit-details-marker {
  display: none;
}

.jellyfin-history__toggle::before {
  content: '▶';
  font-size: 0.55rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.jellyfin-history[open] > .jellyfin-history__toggle::before {
  transform: rotate(90deg);
}

.jellyfin-history__body {
  padding: 0 18px;
}

.jellyfin-history-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.jellyfin-history-row:last-child {
  border-bottom: none;
}

.jellyfin-history-user {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}

.jellyfin-history-user:hover {
  opacity: 0.75;
}

.jellyfin-history-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.jellyfin-history-meta {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.jellyfin-history-time {
  color: var(--muted);
  font-size: 0.65rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.jellyfin-history__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.jellyfin-history__tab {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jellyfin-history__tab:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}

.jellyfin-history__tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}

.jellyfin-history__filter-chip-row {
  padding: 6px 18px;
}

.jellyfin-history__filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px 4px 12px;
  border-radius: 12px;
}

.jellyfin-history__filter-chip-x {
  background: none;
  border: none;
  color: var(--primary-ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.jellyfin-history__filter-chip-x:hover {
  opacity: 1;
}

.jellyfin-stats {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
}

.jellyfin-stats[open] {
  padding-bottom: 10px;
}

.jellyfin-stats__tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 6px;
  flex-wrap: wrap;
}

.jellyfin-stats__tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.jellyfin-stats__tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.jellyfin-stats__list {
  list-style: none;
  margin: 0;
  padding: 4px 14px;
}

.jellyfin-stats__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}

.jellyfin-stats__item:last-child {
  border-bottom: none;
}

.jellyfin-stats__rank {
  color: var(--muted);
  font-size: 0.72rem;
  min-width: 16px;
  text-align: right;
}

.jellyfin-stats__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jellyfin-stats__count {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.jellyfin-stats__empty {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.jellyfin-stats__link {
  color: inherit;
  text-decoration: none;
}

.jellyfin-stats__link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.jellyfin-stats__day-filter {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.jellyfin-stats__day-filter:hover {
  color: var(--primary);
  text-decoration: underline;
}

.jellyfin-history__pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
}

.jellyfin-history__pages {
  display: flex;
  gap: 6px;
}

.jellyfin-history__page {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  font-size: 0.7rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jellyfin-history__page:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}

.jellyfin-history__page.active {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}

.jellyfin-history__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
  color: var(--muted);
  user-select: none;
}
/* Search-Tab: Indexer-Suche (omg/tm) -> SABnzbd */
.search-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input {
  flex: 1;
  min-width: 0;
}

.search-cat-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.search-cat {
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.7;
}

.search-cat.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.search-sort-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-sort-label {
  font-size: 0.8rem;
  opacity: 0.6;
}

.search-sort {
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  opacity: 0.7;
}

.search-sort.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.search-filter-input {
  width: 100%;
  box-sizing: border-box;
}

.search-filter-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.search-filter-chip {
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.75;
}

.search-filter-chip:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.search-filter-chip.active {
  opacity: 1;
  background: rgba(96, 165, 250, 0.25);
  border-color: rgba(96, 165, 250, 0.6);
}

.search-filter-chip--exclude {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.search-filter-chip--exclude.active {
  background: rgba(248, 113, 113, 0.25);
  border-color: rgba(248, 113, 113, 0.6);
}

.search-filter-chip--exclude:hover {
  background: rgba(248, 113, 113, 0.15);
}

.search-filter-chip--disabled,
.search-filter-chip:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.search-filter-chip--toggle {
  margin-right: 0.35rem;
  padding-right: calc(0.6rem + 8px);
  border-right: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
}

.search-status {
  font-size: 0.85rem;
  opacity: 0.75;
  min-height: 1.1em;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
}

.search-result__check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-result-cb {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.search-bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.search-bulk-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.search-bulk-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  background: transparent;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  box-shadow: none;
}

.search-bulk-send:hover {
  background: rgba(255, 255, 255, 0.12);
}

.search-bulk-clear {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
}

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

.search-result__title {
  font-size: 0.9rem;
  word-break: break-all;
  margin-bottom: 0.25rem;
}

.search-tok {
  font-weight: 700;
  border-radius: 3px;
  padding: 0 0.15rem;
}

.search-tok--hdr {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
}

.search-tok--dv {
  color: #f472b6;
  background: rgba(244, 114, 182, 0.16);
}

.search-tok--1080p {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.08);
}

.search-tok--2160p {
  color: #86efac;
  background: rgba(134, 239, 172, 0.08);
}

.search-result__meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  opacity: 0.7;
}

.search-badge {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  opacity: 1;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.search-badge--omg {
  background: rgba(96, 165, 250, 0.22);
  color: #93c5fd;
}

.search-badge--tm {
  background: rgba(167, 139, 250, 0.22);
  color: #c4b5fd;
}

.search-grabbed {
  background: rgba(74, 222, 128, 0.18);
  color: #86efac;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.72rem;
  cursor: pointer;
}

/* Automatisch von der AltMount-Reparatur gegrabbt statt manuell im Search-Tab. */
.search-grabbed--auto {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}

/* Downloadstatus-Ergaenzung am grabbed-Badge (queued/downloading/completed/failed). */
.search-grabbed--failed {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

.search-grabbed--completed {
  background: rgba(74, 222, 128, 0.25);
}

.search-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.search-select-all input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.search-result__actions {
  display: flex;
  flex-direction: row;
  gap: 0.4rem;
  flex-shrink: 0;
}

.search-send-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  background: transparent;
  background-color: transparent;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  color: inherit;
  box-shadow: none;
}

.search-send-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.search-send-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.search-empty {
  padding: 1rem 0;
  font-size: 0.9rem;
}
/* Releases-Seite: tagesaktuelle Uploads, 2 Spalten (Movies | TV) mit Covern. */

.releases-bar {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.releases-bar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.releases-status {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.releases-hint {
  margin: 0;
  font-size: 0.74rem;
}

.releases-refresh-btn.spinning {
  animation: spin 0.9s linear infinite;
  pointer-events: none;
}

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

.releases-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.releases-col__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
}

.releases-col__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.releases-col__count {
  font-size: 0.8rem;
  color: var(--muted);
}

.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.release-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.release-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.release-card--grabbed {
  opacity: 0.62;
}

.release-card__poster {
  aspect-ratio: 2 / 3;
  background: rgba(0, 0, 0, 0.28);
}

.release-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release-card__poster--empty,
.release-poster-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 10px;
  text-align: center;
}

.release-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  flex: 1;
}

.release-card__title {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 600;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.release-card__meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.release-card__genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Qualitaets-Badges (Aufloesung + HDR/DV), hervorgehoben pro Release. */
.release-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  vertical-align: middle;
  margin-left: 6px;
}

.release-badge {
  font-size: 0.6rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.release-badge--uhd {
  background: rgba(255, 196, 0, 0.16);
  border-color: rgba(255, 196, 0, 0.5);
  color: #ffce4d;
}

.release-badge--fhd {
  background: rgba(74, 158, 255, 0.16);
  border-color: rgba(74, 158, 255, 0.5);
  color: #79b8ff;
}

.release-badge--hdr {
  background: rgba(255, 122, 24, 0.16);
  border-color: rgba(255, 122, 24, 0.5);
  color: #ff9d4d;
}

.release-badge--hdrplus {
  background: rgba(255, 215, 64, 0.18);
  border-color: rgba(255, 215, 64, 0.6);
  color: #ffd76b;
  text-shadow: 0 0 6px rgba(255, 215, 64, 0.35);
}

.release-badge--dv {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.55);
  color: #c79bff;
}

.release-genre {
  font-size: 0.64rem;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.release-card__rls {
  font-size: 0.64rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.5);
  word-break: break-all;
  display: block;
}

.release-badge--source {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--muted);
  text-transform: uppercase;
}

.release-card__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.release-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 600;
}

.release-act:hover {
  background: rgba(255, 255, 255, 0.12);
}

.release-act-icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* Icon-Buttons kompakt halten, Search darf den verfuegbaren Platz fuellen. */
.release-act--send,
.release-act--avail,
.release-act--hide {
  flex: 0 0 auto;
  padding: 4px 7px;
}

.release-act--search {
  flex: 0 0 auto;
  padding: 4px 7px;
}

.release-act-svg {
  width: 15px;
  height: 15px;
  display: block;
}

.release-act--hide {
  color: var(--muted);
}

.release-grabbed {
  font-size: 0.72rem;
  color: #5bd98a;
  cursor: pointer;
}

.release-empty {
  font-size: 0.82rem;
  padding: 12px 4px;
}

/* Serien-Karte: eine Karte pro Serie, Staffeln darin gelistet. Spannt die
   ganze TV-Spalte und liegt horizontal (Poster links, Staffeln rechts). */
.release-card--series {
  grid-column: 1 / -1;
  flex-direction: row;
}

.release-card--series .release-card__poster {
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 2 / 3;
  align-self: stretch;
}

.release-card--series .release-card__body {
  min-width: 0;
}

/* Titelzeile der Serien-Karte: Titel links, "ganze Serie ausblenden" rechts. */
.release-card__titlebar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.release-card__titlebar .release-card__title {
  flex: 1;
}

.release-act--hide-series {
  flex: 0 0 auto;
  padding: 2px 7px;
  color: var(--muted);
  line-height: 1.2;
}

.release-act--hide-series:hover {
  color: #ff6b6b;
}

.release-card__count {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.release-card__seasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.release-season {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.release-season:first-child {
  border-top: none;
  padding-top: 0;
}

.release-season--grabbed {
  opacity: 0.62;
}

.release-season__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-season__meta {
  font-size: 0.72rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}

/* Release-Name komplett ausgeschrieben, unter den Buttons. */
.release-season__rls {
  font-size: 0.64rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.5);
  word-break: break-all;
}

.release-season .release-card__actions {
  margin-top: 0;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .releases-columns {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .releases-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  /* Mobil: Titel + Release-Name komplett zeigen, kein Zeilen-Clamp. */
  .release-card__title,
  .release-card__rls,
  .release-season__rls {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

.release-imdb-popover {
  z-index: 500;
  width: 300px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--panel-bg, #1c1c22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 4px;
}

.release-imdb-popover__input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
  padding: 6px 8px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: inherit;
}

.release-imdb-popover__results {
  max-height: 300px;
  overflow-y: auto;
}

.release-imdb-popover__status {
  padding: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.release-imdb-popover__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.release-imdb-popover__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.release-imdb-popover__item img,
.release-imdb-popover__noposter {
  width: 32px;
  height: 46px;
  object-fit: cover;
  border-radius: 3px;
  flex: none;
  background: rgba(255, 255, 255, 0.06);
}

.release-imdb-popover__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  min-width: 0;
}

.release-imdb-popover__meta strong {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-imdb-popover__meta span {
  color: var(--muted);
}
@media (max-width: 760px) {
  #pageMain > .page-content { grid-template-columns: 1fr; }
  #pageMain > .page-content > #jellyfinHistory,
  #pageMain > .page-content > #jellyfinMostWatched { grid-column: 1; }
  .padel-weekday-picker, .padel-time-grid, .padel-schedule-controls, .padel-scan-actions { grid-template-columns: 1fr; }
  .padel-form { grid-template-columns: 1fr; }
  .padel-preferences-section { padding: 12px; }
  .padel-weekday-picker { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .padel-scan-timeline { grid-template-columns: repeat(24, minmax(8px, 1fr)); }
  .padel-scan-hour { font-size: 0.48rem; }
  .padel-scan-section { padding: 12px; }
  .padel-log-grid { grid-template-columns: 1fr; }
  .padel-log-row { grid-template-columns: 1fr; gap: 3px; }
  .padel-calendar-section { padding: 12px; }
  .padel-calendar-head { flex-direction: column; align-items: stretch; }
  .padel-calendar-grid { grid-template-columns: 1fr; }
  .padel-calendar-day { border-radius: 7px; font-size: 0.8rem; }
  .page { max-width: 100vw; }
  .media-search-form { grid-template-columns: 1fr; }
  .media-hero__head { flex-direction: column; }
  .media-summary { min-width: 0; text-align: left; }
  .media-card { grid-template-columns: 1fr; }
  .media-card__poster { height: 142px; max-height: none; }
  .media-card__body { padding: 10px; }

  .glass-grid { width: 100%; }
  .jellyfin-activity,
  .jellyfin-history { overflow: visible; }
  .jellyfin-history-row {
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
  }
  .jellyfin-history-meta { grid-column: 1 / -1; }
  .jellyfin-history-time { grid-column: 1 / -1; font-size: 0.6rem; }

  .glass-panel { overflow: visible; }
  .usenet-card { padding: 14px; max-width: 100%; box-sizing: border-box; }
  .usenet-release-title { width: 100%; min-width: 0; word-break: break-all; overflow-wrap: break-word; white-space: normal; overflow: visible; }
  .usenet-status-label { width: 100%; min-width: 0; word-break: break-all; overflow-wrap: break-word; white-space: normal; overflow: visible; }
  .usenet-finished-folder { word-break: break-all; overflow-wrap: break-word; white-space: normal; overflow: visible; text-overflow: clip; }
  .usenet-log-details { overflow: visible; }
  .padel-output { overflow: visible; max-height: none; white-space: pre-wrap; word-break: break-word; }
  .padel-output > div { word-break: break-all; overflow-wrap: break-word; white-space: pre-wrap; }
  .phase-connector { display: none; }
  .phase-badge { font-size: .65rem; padding: 2px 6px; flex: 0 0 auto; }

  .glass-card {
    min-height: 44px;
    border-radius: var(--radius-sm);
  }
  .card-main {
    flex-direction: row;
    padding: 8px 10px;
    gap: 10px;
  }
  .icon-shell {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .icon {
    width: 22px;
    height: 22px;
  }
  .name {
    font-size: 0.85rem;
    text-align: left;
  }
  .glass-grid {
    width: 100%;
    gap: 4px;
  }

  .jellyfin-cover {
    width: 33px;
    height: 47px;
  }
  .jellyfin-row {
    align-items: flex-start;
    overflow: visible;
  }
  .jellyfin-text {
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
    word-break: break-word;
  }
}
