/* Library layout — rails, cards, and top navigation shell. */

html.library-layout {
  --sidebar-width: 0px;
  scrollbar-gutter: stable;
  --lv7-line: var(--border-strong, var(--border));
  --lv7-text: var(--text);
  --lv7-muted: var(--text-muted);
  --lv7-yellow: var(--accent);
  --lv7-green: var(--good, var(--watching));
  --lv7-pink: var(--dropped);
  --lv7-orange: var(--warn, var(--stat-orange));
  --lv7-surface: var(--bg-elev);
  --lv7-surface-2: var(--bg-elev-2);
  --lv7-control-bg: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  --lv7-control-hover: color-mix(in srgb, var(--accent) 12%, var(--bg-elev));
  --lv7-tab-hover: color-mix(in srgb, var(--text) 5%, transparent);
  --lv7-active-tab-bg: var(
    --tab-active-bg,
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 20%, var(--bg-elev)),
      color-mix(in srgb, var(--good) 14%, var(--bg-elev))
    )
  );
  --lv7-border-subtle: var(--border-subtle, color-mix(in srgb, var(--border) 45%, transparent));
  --lv7-rail-card-width: 160px;
}

html.library-layout body {
  color: var(--lv7-text);
}

/* Hidden app chrome — hosts widgets moved into the topbar at runtime. */
html.library-layout #app-chrome {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.library-layout .app-shell {
  margin-left: 0;
}

html.library-layout .tab-btn-aurora .tab-label,
html.library-layout .tab-btn-aurora {
  font-weight: 800;
}

html.library-layout .tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 8px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
}

html.library-layout .tab-btn .tab-icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim, var(--text-muted));
}

html.library-layout .tab-btn.active .tab-icon {
  color: var(--text);
}

html.library-layout .tab-btn.active {
  color: var(--text);
  background: var(--lv7-active-tab-bg);
  box-shadow: inset 3px 0 0 var(--lv7-yellow);
}

html.library-layout .tab-btn:hover:not(.active) {
  color: var(--text);
  background: var(--lv7-tab-hover);
}

html.library-layout .tab-badge {
  flex-shrink: 0;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 7px;
  background: var(--lv7-control-bg);
  border: 1px solid var(--lv7-border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

html.library-layout .sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--lv7-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
}

html.library-layout .sidebar-stats > div:nth-child(odd) {
  border-right: 1px solid var(--lv7-border-subtle);
}

html.library-layout .sidebar-stats span {
  color: var(--text-muted);
}

html.library-layout .sidebar-stats strong {
  font-size: 32px;
  line-height: 1.05;
}

html.library-layout #stat-new.stat-green,
html.library-layout .green {
  color: var(--lv7-green);
}

html.library-layout #stat-watching,
html.library-layout .yellow {
  color: var(--lv7-yellow);
}

html.library-layout #stat-total.stat-pink,
html.library-layout .pink {
  color: var(--lv7-pink);
}

html.library-layout #stat-caught-up.stat-orange,
html.library-layout .orange {
  color: var(--lv7-orange);
}

html.library-layout .tab-btn .tab-label {
  flex: 1;
  min-width: 0;
}

html.library-layout .tab-btn .tab-icon svg {
  width: 18px;
  height: 18px;
}

html.library-layout .tab-badge[hidden] {
  display: none !important;
}

html.library-layout .sidebar-filter-collapsible-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--lv7-line);
  border-radius: 10px;
  background: var(--lv7-control-bg);
  color: var(--text-muted);
  padding: 0 16px;
  font-weight: 800;
}

html.library-layout .content {
  padding-bottom: 42px;
  background: transparent;
  color: var(--text);
}

html.library-layout.show-detail-open .content {
  padding-bottom: 18px;
}

@media (min-width: 900px) {
  html.library-layout.show-detail-open .content {
    padding: 0 0 18px;
  }
}

html.library-layout.show-detail-open .show-detail .md2-layout {
  max-width: none;
}

html.library-layout.show-detail-open .lv7-topbar {
  margin: 0;
  padding: 0 18px;
}

@media (max-width: 1279px) {
  html.library-layout.show-detail-open #library-topbar {
    display: none !important;
  }

  html.library-layout .app-shell > .site-footer {
    margin-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  html.library-layout.show-detail-open .content {
    padding: 0 0 calc(76px + env(safe-area-inset-bottom));
  }

  html.library-layout.show-detail-open .show-detail .md2-layout {
    padding-top: 0;
    padding-inline: 16px;
  }
}

/* Desktop schedule workspace: persistent navigation, focused center, next-up queue. */
@media (min-width: 1280px) {
  html.library-layout {
    --lv7-sidebar-width: 202px;
  }

  html.library-layout #library-topbar {
    display: none !important;
  }

  html.library-layout .app-shell {
    margin-left: var(--lv7-sidebar-width);
  }

  html.library-layout .app-shell > .content {
    padding: 18px 20px 36px;
  }

  html.library-layout .lv7-desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    width: var(--lv7-sidebar-width);
    box-sizing: border-box;
    flex-direction: column;
    padding: 18px 12px 14px;
    border-right: 1px solid var(--lv7-border-subtle);
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 88%, var(--bg)), var(--bg));
    box-shadow: 14px 0 42px rgba(0, 0, 0, 0.14);
  }

  html.library-layout .lv7-desktop-sidebar[hidden] { display: none !important; }

  html.library-layout .lv7-sidebar-brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 0 6px 22px;
    color: var(--lv7-yellow);
    font-size: 16px;
    font-weight: 1000;
    text-decoration: none;
  }

  html.library-layout .lv7-sidebar-brand img {
    width: 76px;
    height: 76px;
    object-fit: contain;
  }

  html.library-layout .lv7-sidebar-brand span span { color: var(--lv7-green); }

  html.library-layout .lv7-sidebar-search { margin: 0 2px 14px; position: relative; }
  html.library-layout .lv7-sidebar-matches {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 70;
    max-height: 380px;
    overflow-y: auto;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--lv7-line);
    border-radius: 14px;
    background: var(--lv7-surface-2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }

  html.library-layout .lv7-sidebar-matches[hidden] { display: none; }

  html.library-layout .lv7-sidebar-match {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--lv7-text);
    text-align: left;
    cursor: pointer;
    font: inherit;
  }

  html.library-layout .lv7-sidebar-match:hover,
  html.library-layout .lv7-sidebar-match:focus-visible {
    background: var(--lv7-control-hover);
    outline: none;
  }

  html.library-layout .lv7-sidebar-match img,
  html.library-layout .lv7-sidebar-match-blank {
    flex: none;
    width: 34px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: #152538;
  }

  html.library-layout .lv7-sidebar-match > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  html.library-layout .lv7-sidebar-match strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 750;
  }

  html.library-layout .lv7-sidebar-match small {
    color: var(--lv7-muted);
    font-size: 0.76rem;
  }

  html.library-layout .lv7-sidebar-matches-empty {
    margin: 8px;
    color: var(--lv7-muted);
    font-size: 0.84rem;
  }
  html.library-layout .lv7-sidebar-search .list-filter-bar { width: 100%; }
  html.library-layout .lv7-sidebar-search .list-filter-bar label { width: 100%; }
  html.library-layout .lv7-sidebar-search .lv7-search-shell {
    width: 100%;
  }

  html.library-layout .lv7-sidebar-search .list-filter-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Narrow sidebar: tighten icon inset so typed text doesn't float mid-field. */
  html.library-layout .lv7-sidebar-search .lv7-search-icon {
    left: 12px;
  }

  html.library-layout .lv7-sidebar-search .list-filter-bar.lv7-search-adapted .list-filter-input {
    padding-left: 36px;
    padding-right: 36px;
  }

  html.library-layout .lv7-desktop-sidebar .lv7-desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: visible;
  }

  html.library-layout .lv7-desktop-sidebar .lv7-nav-link {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    text-align: left;
  }

  html.library-layout .lv7-desktop-sidebar .lv7-nav-link:hover {
    background: var(--lv7-tab-hover);
  }

  html.library-layout .lv7-desktop-sidebar .lv7-nav-link.active {
    color: var(--lv7-yellow);
    background: var(--lv7-active-tab-bg);
    box-shadow: inset 3px 0 0 var(--lv7-yellow);
  }

  html.library-layout .lv7-desktop-sidebar .lv7-nav-link.lv7-nav-link-aurora,
  html.library-layout .lv7-desktop-sidebar .lv7-nav-link.lv7-nav-link-aurora:hover,
  html.library-layout .lv7-desktop-sidebar .lv7-nav-link.lv7-nav-link-aurora.active {
    background: transparent;
    box-shadow: none;
  }

  html.library-layout .lv7-desktop-sidebar .lv7-nav-link.lv7-nav-link-aurora.active::after { display: none; }

  html.library-layout .lv7-sidebar-utilities {
    display: grid;
    gap: 3px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--lv7-border-subtle);
  }

  html.library-layout .lv7-sidebar-account .user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    text-align: left;
  }

  html.library-layout .lv7-sidebar-account .user-menu-btn:hover {
    color: var(--text);
    background: var(--lv7-tab-hover);
  }

  html.library-layout .lv7-sidebar-account .user-menu-icon-stack { display: none; }
  html.library-layout .lv7-sidebar-account-label {
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 9px;
    width: 100%;
  }
  html.library-layout .lv7-sidebar-account-label b {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--lv7-yellow);
    color: #171304;
  }
  html.library-layout .lv7-sidebar-account-label i { font-style: normal; }
  /* The label belongs to the desktop sidebar only; never show it on the topbar button. */
  html.library-layout .lv7-topbar-user .lv7-sidebar-account-label { display: none; }
  html.library-layout .lv7-sidebar-account .user-menu-panel { left: 8px; right: auto; bottom: 48px; top: auto; }

  html.library-layout #panel-library > .schedule-hub-header {
    padding: 2px 4px 15px;
  }

  html.library-layout #panel-library > .schedule-hub-header .topbar-actions {
    display: none !important;
  }

  html.library-layout .schedule-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  html.library-layout .schedule-main { display: grid; gap: 16px; min-width: 0; }
  html.library-layout .schedule-watch-queue {
    position: static;
    max-height: none;
    overflow: auto;
  }
}

html.library-layout .schedule-side {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}
html.library-layout .schedule-queue-list { display: grid; gap: 10px; padding: 0 14px 14px; }
html.library-layout .schedule-queue-item {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg-elev-2) 86%, transparent);
  cursor: pointer;
}
html.library-layout .schedule-queue-item > img { width: 62px; height: 88px; border-radius: 7px; object-fit: cover; grid-row: span 2; }
html.library-layout .schedule-queue-item > div { display: grid; align-content: start; gap: 2px; min-width: 0; }
html.library-layout .schedule-queue-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
html.library-layout .schedule-queue-item span { color: var(--lv7-green); font-size: 11px; font-weight: 850; }
html.library-layout .schedule-queue-item small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .schedule-queue-providers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
/* Provider logos on the Continue Watching, Up Next and Not Started cards: plain rounded logos, no pill outline or
   circle, the same look as the trending rows (.trending-providers). */
html.library-layout .schedule-queue-providers .provider-pill--icon-only,
html.library-layout .schedule-carousel-track .provider-pill--icon-only {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  gap: 0;
  transform: none;
  position: relative;
}
html.library-layout .schedule-queue-providers a.provider-pill--icon-only:hover,
html.library-layout .schedule-queue-providers a.provider-pill--icon-only:focus-visible,
html.library-layout .schedule-carousel-track a.provider-pill--icon-only:hover,
html.library-layout .schedule-carousel-track a.provider-pill--icon-only:focus-visible {
  background: transparent;
  border-color: transparent;
  opacity: 0.82;
}
html.library-layout .schedule-queue-providers .provider-pill--icon-only img,
html.library-layout .schedule-carousel-track .provider-pill--icon-only img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  html.library-layout .schedule-queue-providers .provider-pill--icon-only img,
  html.library-layout .schedule-carousel-track .provider-pill--icon-only img {
    width: 18px;
    height: 18px;
  }
}
html.library-layout .schedule-queue-watched { grid-column: 2; min-height: 30px; padding: 5px 8px; border-color: color-mix(in srgb, var(--lv7-green) 45%, var(--border)); color: var(--lv7-green); font-size: 10px; }

html.library-layout .schedule-mini-event { grid-template-columns: 38px minmax(0, 1fr); align-items: center; }
html.library-layout .schedule-mini-event > img { width: 38px; height: 50px; border-radius: 6px; object-fit: cover; }
html.library-layout .schedule-mini-event-copy { display: grid; min-width: 0; }
html.library-layout .schedule-mini-event time { grid-row: auto; color: var(--lv7-green); }

html.library-layout .schedule-all-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}
html.library-layout .schedule-all-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}
html.library-layout .schedule-all-filters select,
html.library-layout .schedule-all-filters input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
/* Each filter's dropdown fills the rest of its box, flush with the right edge (no leftover gap). */
html.library-layout .schedule-all-filters label { padding-right: 0; }
html.library-layout .schedule-all-filters label .wn-select { flex: 1 1 auto; width: auto; min-width: 8.5rem; margin-left: auto; }
/* The Not Started platform dropdown is the height of its label, not the full dropdown height. */
html.library-layout .schedule-not-started-platform .wn-select-trigger { min-height: 0; height: 32px; padding: 4px 10px; }
html.library-layout .schedule-all-search { flex: 1 1 210px; }
html.library-layout .schedule-all-search input { width: 100%; }
html.library-layout .schedule-table-head,
html.library-layout .schedule-table-row {
  grid-template-columns: minmax(180px, 1.3fr) 92px minmax(125px, .9fr) 118px minmax(130px, 1fr) 95px 26px;
  gap: 10px;
}
html.library-layout .schedule-table-next { display: grid; min-width: 0; }
html.library-layout .schedule-table-next b { color: var(--lv7-green); font-size: 10px; }
html.library-layout .schedule-table-next small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .schedule-table-updated { color: var(--text-muted); font-size: 10px; }
html.library-layout .schedule-row-menu { width: 28px; min-width: 28px; height: 30px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--text-muted); font-size: 20px; }
html.library-layout .schedule-table-empty { padding: 20px; }
html.library-layout .schedule-all-footer {
  display: flex;
  justify-content: center;
  padding: 14px 18px 16px;
  border-top: 1px solid color-mix(in srgb, var(--wn-panel-line) 64%, transparent);
}
html.library-layout .schedule-all-toggle {
  min-width: 150px;
  min-height: 36px;
  color: var(--lv7-yellow);
  font-weight: 900;
}

html.library-layout.show-detail-open .show-detail .md2-tabs {
  top: 0;
}

/* ── Global topbar (concept mockup) ── */
html.library-layout .lv7-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  margin: -18px -18px 18px;
  padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  overflow: visible;
}

html.library-layout .lv7-topbar-start {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}

html.library-layout .lv7-topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
}

html.library-layout .lv7-brand-slot {
  display: none;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
  padding-right: 10px;
}

html.library-layout .lv7-brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

html.library-layout .lv7-brand-wordmark {
  color: var(--lv7-yellow);
  font-weight: 1000;
  font-size: 1.05rem;
  line-height: 1;
  white-space: nowrap;
}

html.library-layout .lv7-brand-tld {
  color: var(--lv7-green);
  font-weight: 800;
}

html.library-layout .lv7-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 1000;
  font-size: 18px;
  min-width: 0;
}

html.library-layout .lv7-desktop-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 1000;
  font-size: 18px;
  min-width: 0;
}

html.library-layout .lv7-mobile-brand .lv7-brand-wordmark,
html.library-layout .lv7-desktop-brand .lv7-brand-wordmark {
  color: var(--lv7-yellow);
}

html.library-layout .lv7-mobile-brand .lv7-brand-tld,
html.library-layout .lv7-desktop-brand .lv7-brand-tld {
  color: var(--lv7-green);
}

html.library-layout .lv7-desktop-nav {
  display: none;
  align-items: center;
  gap: 0;
  min-width: 0;
}

html.library-layout .lv7-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  padding: 18px 16px;
  margin: 0;
  min-height: 58px;
  border-radius: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

html.library-layout .lv7-nav-link:hover,
html.library-layout .lv7-nav-link:focus-visible {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html.library-layout .lv7-nav-link.active {
  color: var(--lv7-yellow);
  background: transparent;
  border-bottom-color: var(--lv7-yellow);
}

html.library-layout .lv7-nav-link.active:hover,
html.library-layout .lv7-nav-link.active:focus-visible {
  color: var(--lv7-yellow);
  background: transparent;
  border-bottom-color: var(--lv7-yellow);
}

html.library-layout .lv7-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: inherit;
  flex-shrink: 0;
}

html.library-layout .lv7-nav-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

html.library-layout .lv7-nav-icon .lv7-channel-mark {
  width: 20px;
  height: 20px;
  overflow: visible;
}

html.library-layout .lv7-channel-mark path,
html.library-layout .lv7-channel-mark rect,
html.library-layout .lv7-channel-mark circle {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  vector-effect: non-scaling-stroke;
}

html.library-layout .lv7-channel-mark .channel-mark-warm { stroke: var(--lv7-yellow); }
html.library-layout .lv7-channel-mark .channel-mark-cool { stroke: var(--lv7-green); }
html.library-layout .lv7-channel-mark .channel-mark-neutral { stroke: color-mix(in srgb, var(--text) 86%, var(--lv7-green)); }
html.library-layout .lv7-channel-mark .channel-mark-fill { fill: color-mix(in srgb, var(--text) 86%, var(--lv7-green)); stroke: none; }

html.library-layout .lv7-nav-link:hover .lv7-channel-mark,
html.library-layout .lv7-nav-link:focus-visible .lv7-channel-mark,
html.library-layout .lv7-nav-link.active .lv7-channel-mark {
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--lv7-green) 28%, transparent));
}

html.library-layout .lv7-nav-icon img.tab-icon-img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

html.library-layout .lv7-nav-link.active .lv7-nav-icon {
  color: var(--lv7-yellow);
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora {
  position: relative;
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora .lv7-nav-icon {
  color: var(--aurora-clr-1);
  animation: aurora-icon-cycle 8s linear infinite;
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora:hover,
html.library-layout .lv7-nav-link.lv7-nav-link-aurora:focus-visible,
html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active,
html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active:hover,
html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active:focus-visible {
  color: inherit;
  background: transparent;
  border-bottom-color: transparent !important;
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-image: linear-gradient(
    110deg,
    var(--aurora-clr-1) 0%,
    var(--aurora-clr-2) 25%,
    var(--aurora-clr-3) 50%,
    var(--aurora-clr-4) 75%,
    var(--aurora-clr-1) 100%
  );
  background-size: 200% auto;
  animation: aurora-text-gradient 6s linear infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active::after {
    animation: none;
    background-position: 0% 50%;
  }
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora.active .lv7-nav-icon {
  color: var(--aurora-clr-1);
  animation: aurora-icon-cycle 8s linear infinite;
}

html.library-layout .lv7-nav-link.lv7-nav-link-aurora .lv7-nav-label.aurora-title {
  --aurora-blur: 0.3rem;
  --aurora-size: 4.5rem;
}

html.library-layout .lv7-search-host {
  width: auto;
  min-width: 0;
  max-width: none;
  flex: 0 0 auto;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
}

html.library-layout .lv7-mobile-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  flex-shrink: 0;
  line-height: 0;
}

html.library-layout .lv7-mobile-search-trigger:hover,
html.library-layout .lv7-mobile-search-trigger[aria-expanded="true"] {
  background: var(--lv7-tab-hover);
  color: var(--text);
  border-color: transparent;
}

html.library-layout .lv7-mobile-search-trigger svg {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
  transform: translateY(1px);
}

html.library-layout .lv7-search-dropdown {
  padding: 8px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--bg) 35%, transparent);
}

html.library-layout .lv7-search-dropdown.is-fixed {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  width: auto;
  /* Match add-show search elevation — above bottom nav (60) + FAB (1200). */
  z-index: 1300;
}

html.library-layout .lv7-search-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
}

html.library-layout .lv7-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

html.library-layout .list-filter-bar.lv7-search-adapted {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

html.library-layout .list-filter-bar.lv7-search-adapted .list-filter-input {
  width: 100%;
  max-width: none;
  height: 44px;
  min-height: 44px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--border-strong, var(--lv7-line));
  background-color: var(--bg-elev-2);
  padding: 0 44px 0 44px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
}

html.library-layout .list-filter-bar.lv7-search-adapted .list-filter-input::placeholder {
  color: var(--text-muted);
}

html.library-layout .list-filter-bar.lv7-search-adapted .list-filter-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 1.125rem;
}

html.library-layout .lv7-notify-host {
  display: none;
  align-items: center;
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify {
  position: static;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab svg {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab:hover {
  transform: none;
  background: var(--lv7-tab-hover);
  box-shadow: none;
  color: var(--text);
}

@keyframes lv7-notification-pulse {
  0%, 100% {
    color: var(--text);
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    color: var(--accent);
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 70%, transparent));
  }
}

@media (min-width: 1280px) {
  html.library-layout .notification-fab-wrap.lv7-topbar-notify.has-unread .notification-fab {
    animation: lv7-notification-pulse 2.4s ease-in-out infinite;
  }
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab-badge {
  top: 8px;
  right: 8px;
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
  line-height: 0;
  background: var(--lv7-yellow);
  color: transparent;
  border: 2px solid var(--bg);
  box-shadow: none;
}

html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab-badge:empty,
html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab-badge[data-count="0"] {
  display: none;
}

html.library-layout .lv7-actions-host {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

html.library-layout .lv7-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

html.library-layout .lv7-topbar-user::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 2px;
  background-color: var(--text-muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

html.library-layout .lv7-actions-host .user-menu-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

html.library-layout .lv7-actions-host .user-menu-btn:hover,
html.library-layout .lv7-actions-host .user-menu-btn[aria-expanded="true"] {
  background: var(--lv7-tab-hover);
  border-color: transparent;
  color: var(--text);
}

html.library-layout .lv7-actions-host .user-menu-icon-stack,
html.library-layout .lv7-actions-host .user-menu-icon {
  width: 32px;
  height: 32px;
}

html.library-layout .lv7-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--lv7-line);
  border-radius: 12px;
  background: var(--lv7-control-bg);
  color: var(--text);
  line-height: 0;
  flex-shrink: 0;
  cursor: pointer;
  touch-action: manipulation;
}

html.library-layout .lv7-menu-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}

html.library-layout .content-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
  margin: 0 0 8px;
  padding: 0;
}

html.library-layout .content-topbar .hero-title {
  width: 100%;
  min-width: 0;
}

html.library-layout .content-topbar .hero-title-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

html.library-layout .content-topbar .hero-title-head h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

html.library-layout .hero-title h1 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0;
  font-weight: 800;
  color: var(--lv7-green);
}

html.library-layout .hero-title h1.panel-title-aurora {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}

html.library-layout .hero-title p.muted,
html.library-layout .hero-title p:not(.muted):not(.small) {
  font-size: 14px;
  color: var(--lv7-muted);
  font-weight: 600;
}

@media (min-width: 1280px) {
  html.library-layout #panel-library .view-layout-toggle {
    display: none !important;
  }
}

html.library-layout .content-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

html.library-layout #panel-library .view-layout-toggle {
  border-color: var(--lv7-line);
  background: var(--lv7-control-bg);
}

html.library-layout #panel-library .view-layout-btn.active {
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev));
  color: var(--lv7-yellow);
}

html.library-layout #panel-library .list-sort-label {
  color: var(--lv7-muted);
  font-weight: 700;
}

html.library-layout #panel-library .list-sort-select {
  border-color: var(--lv7-line);
  background: var(--lv7-control-bg);
  border-radius: 12px;
  min-height: 42px;
}

html.library-layout .lv7-rail-nav {
  display: inline-flex;
  gap: 8px;
}

html.library-layout .lv7-rail-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--lv7-line);
  border-radius: 10px;
  background: var(--lv7-control-bg);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

html.library-layout .lv7-rail-nav button:hover {
  border-color: var(--border-strong, var(--lv7-line));
  color: var(--text);
}

html.library-layout .lv7-rail-nav button svg {
  display: block;
  flex-shrink: 0;
}

html.library-layout .card.media-card .lv7-provider {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

html.library-layout .card.media-card .lv7-provider .provider-pill--icon-only {
  flex-shrink: 0;
}

html.library-layout .card.media-card .lv7-provider .provider-pill--lv7-foot img,
html.library-layout .card.media-card .lv7-provider .provider-pill img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
}

html.library-layout .card-grid.media-row.horizontal-rail {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding-top: 5px;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.library-layout .card-grid.media-row.horizontal-rail::-webkit-scrollbar {
  display: none;
}

html.library-layout .card-grid.media-row.horizontal-rail .media-card {
  flex: 0 0 var(--lv7-rail-card-width);
  scroll-snap-align: start;
}

html.library-layout .card-grid.media-row {
  display: grid;
  gap: 16px;
}

/* Expanded rail rows — full grid (View all). */
html.library-layout .card-grid.media-row.rail-expanded-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, var(--lv7-rail-card-width, 160px)) !important;
  justify-content: start;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
}

html.library-layout .card-grid.media-row.rail-expanded-grid .media-card {
  flex: unset;
  width: var(--lv7-rail-card-width, 160px);
  max-width: var(--lv7-rail-card-width, 160px);
  min-width: 0;
  min-height: 0;
  aspect-ratio: 160 / 252;
  scroll-snap-align: unset;
}

html.library-layout .lv7-rail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

html.library-layout .lv7-rail-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--lv7-line);
  border-radius: 10px;
  background: var(--lv7-control-bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

html.library-layout .lv7-rail-view-toggle:hover {
  border-color: var(--border-strong, var(--lv7-line));
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
}

html.library-layout .lv7-rail-view-toggle:focus-visible {
  outline: 2px solid var(--accent-soft, color-mix(in srgb, var(--accent) 35%, transparent));
  outline-offset: 2px;
}

html.library-layout .lv7-rail-view-toggle-label {
  line-height: 1;
}

html.library-layout .lv7-rail-view-toggle svg {
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}

html.library-layout .lv7-rail-view-toggle[hidden] {
  display: none;
}

html.library-layout .rail.shelf[data-rail-expanded] .lv7-rail-nav {
  display: none;
}

html.library-layout #library-mobile-stats {
  display: none;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap {
  margin: 0;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  height: auto;
  padding: 8px 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  border: 1px solid var(--lv7-line);
  color: var(--lv7-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  pointer-events: auto;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap > summary b {
  color: var(--text);
  font-weight: 700;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap > summary::-webkit-details-marker {
  display: none;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap > summary::after {
  content: '▾';
  color: var(--lv7-muted);
  font-size: 0.75rem;
  margin-left: 2px;
}

html.library-layout #panel-search .toolbar .search-media-filter-wrap .sidebar-filter-collapsible-body {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 190px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--lv7-line);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  border-top: 0;
}

html.library-layout #panel-search .toolbar {
  align-items: center;
  gap: 8px;
  overflow: visible;
  position: relative;
  z-index: 1300;
}

/*
 * Elevate ONLY the add-show search toolbar shelf — not Discover.
 * #discover-section also has class search-shelf; the old
 * `#panel-search .search-shelf` rule gave the whole Discover panel
 * position:relative + z-index:1300, which beat the fixed bottom nav
 * (z-index 900) in the root stacking context. Mid-page the Discover
 * sheet covered the tab bar; it only reappeared past the content end.
 */
html.library-layout #panel-search > .shelf.search-shelf {
  overflow: visible;
  position: relative;
  z-index: 1300;
}

html.library-layout #panel-search .discover-shelf {
  /* Keep Discover in normal paint order below #library-bottom-nav. */
  z-index: auto;
}

html.library-layout #panel-search .search-wrap {
  z-index: 1300;
}

html.library-layout #panel-search .search-results {
  z-index: 1300;
}

/* Twin for portaled typeahead (body child). Stay ≤1500 so open menus (1600) win. */
html.library-layout .search-results.is-fixed {
  z-index: 1500;
}

html.library-layout body.menu-overlay-open #panel-search .search-wrap,
html.library-layout body.menu-overlay-open #panel-search .search-results {
  z-index: 1;
}

html.library-layout #panel-library .lv7-library-controls,
html.library-layout #panel-movie-library .lv7-library-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
}

html.library-layout #panel-library .lv7-filters-toggle,
html.library-layout #panel-movie-library .lv7-filters-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--lv7-line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}

html.library-layout #panel-library .lv7-filters-panel,
html.library-layout #panel-movie-library .lv7-filters-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

html.library-layout #panel-library .lv7-filters-toggle-icon svg,
html.library-layout #panel-movie-library .lv7-filters-toggle-icon svg {
  display: block;
}

html.library-layout #panel-library .lv7-filters-toggle::after,
html.library-layout #panel-movie-library .lv7-filters-toggle::after {
  content: "⌄";
  display: inline-flex;
  align-items: center;
  color: var(--lv7-muted);
  font-size: 11px;
  line-height: 1;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

html.library-layout #panel-library .lv7-library-controls.is-filters-open .lv7-filters-toggle::after,
html.library-layout #panel-movie-library .lv7-library-controls.is-filters-open .lv7-filters-toggle::after {
  transform: rotate(180deg);
}

html.library-layout #panel-library .lv7-library-controls.has-active-filters .lv7-filters-toggle,
html.library-layout #panel-movie-library .lv7-library-controls.has-active-filters .lv7-filters-toggle {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--lv7-line));
  color: var(--text);
}

html.library-layout #panel-library .lv7-library-controls .lv7-filter-chips,
html.library-layout #panel-movie-library .lv7-library-controls .lv7-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

html.library-layout #panel-library .lv7-library-controls #sidebar-status-filter-wrap,
html.library-layout #panel-library .lv7-library-controls #sidebar-platform-filter-wrap,
html.library-layout #panel-movie-library .lv7-library-controls #movie-library-show-filter-wrap,
html.library-layout #panel-movie-library .lv7-library-controls #movie-library-sort-filter-wrap,
html.library-layout #panel-movie-library .lv7-library-controls #sidebar-platform-filter-wrap {
  margin: 0;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}

html.library-layout #panel-library .topbar-actions > .list-sort[hidden],
html.library-layout #panel-movie-library .topbar-actions > .list-sort[hidden] {
  display: none;
}

html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-summary,
html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  height: auto;
  padding: 8px 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  border: 1px solid var(--lv7-line);
  color: var(--lv7-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  pointer-events: auto;
}

html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-summary b,
html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-summary b {
  color: var(--text);
  font-weight: 700;
}

html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-summary::-webkit-details-marker,
html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-summary::-webkit-details-marker {
  display: none;
}

html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-summary::after,
html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-summary::after {
  content: "⌄";
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  color: var(--lv7-muted);
  font-size: 11px;
  line-height: 1;
  margin-left: 3px;
}

html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-body,
html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-body {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 35;
  min-width: 240px;
  max-width: min(320px, 90vw);
  padding: 12px;
  border: 1px solid var(--lv7-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
  box-shadow: var(--shadow);
}

html.library-layout #app-filter-store > #sidebar-status-filter-wrap,
html.library-layout #app-filter-store > #sidebar-platform-filter-wrap {
  display: none !important;
}

html.library-layout #panel-library .lv7-library-controls button,
html.library-layout #panel-library .lv7-library-controls .lv7-clear,
html.library-layout #panel-movie-library .lv7-library-controls button,
html.library-layout #panel-movie-library .lv7-library-controls .lv7-clear {
  white-space: nowrap;
  border: 1px solid var(--lv7-line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--lv7-muted);
  font-weight: 600;
  font-size: 13px;
}

html.library-layout #panel-library .lv7-library-controls button:first-child,
html.library-layout #panel-movie-library .lv7-library-controls button:first-child {
  color: var(--text);
}

html.library-layout #coming-calendar .coming-calendar-shell {
  border-color: var(--lv7-line);
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
}

html.library-layout .library-rails .rail {
  margin: 18px 0 28px;
}

/* Scroll rows — rounded shelf container (matches New Episodes / Coming Soon). */
html.library-layout .library-rails .rail.shelf,
html.library-layout #new-list .rail.shelf,
html.library-layout #coming-list .rail.shelf {
  --lv7-rail-edge-fade: 30%;
  position: relative;
  isolation: isolate;
  padding: 20px 18px 18px;
  border-radius: 20px;
  background: transparent;
  border: none;
  overflow: hidden;
}

html.library-layout .library-rails .rail.shelf::before,
html.library-layout #new-list .rail.shelf::before,
html.library-layout #coming-list .rail.shelf::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shelf-bg, color-mix(in srgb, var(--bg-elev) 88%, transparent));
  border: 1px solid var(--shelf-border, var(--lv7-line));
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 var(--lv7-rail-edge-fade)
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 var(--lv7-rail-edge-fade)
  );
}

html.library-layout .library-rails .rail.shelf > .section-title,
html.library-layout .library-rails .rail.shelf > .card-grid,
html.library-layout .library-rails .rail.shelf > .shelf-foot,
html.library-layout #new-list .rail.shelf > .section-title,
html.library-layout #new-list .rail.shelf > .card-grid,
html.library-layout #new-list .rail.shelf > .shelf-foot,
html.library-layout #coming-list .rail.shelf > .section-title,
html.library-layout #coming-list .rail.shelf > .card-grid,
html.library-layout #coming-list .rail.shelf > .shelf-foot {
  position: relative;
  z-index: 1;
}

html.library-layout .rail.shelf:not([data-rail-expanded]) > .card-grid.media-row.horizontal-rail.horizontal-rail-fade-left {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 var(--lv7-rail-edge-fade, 30%)
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 var(--lv7-rail-edge-fade, 30%)
  );
}

html.library-layout .library-rails .section-title h2,
html.library-layout #new-list .section-title h2,
html.library-layout #coming-list .section-title h2,
html.library-layout #grid-library .section-title h2,
html.library-layout #grid-movie-library .section-title h2,
html.library-layout .rail.shelf .section-title h2,
html.library-layout details.shelf--list-collapsible > .shelf-list-summary.section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--lv7-green);
  display: flex;
  align-items: center;
  gap: 0.35em;
  line-height: 1.15;
  align-self: center;
}

html.library-layout .library-rails .section-title h2 span,
html.library-layout #new-list .section-title h2 span,
html.library-layout #coming-list .section-title h2 span,
html.library-layout #grid-library .section-title h2 span,
html.library-layout #grid-movie-library .section-title h2 span,
html.library-layout .rail.shelf .section-title h2 span {
  color: var(--lv7-muted);
  font-weight: 700;
  font-size: 16px;
}

html.library-layout .library-rails .section-title,
html.library-layout #new-list .section-title,
html.library-layout #coming-list .section-title,
html.library-layout #grid-library .section-title,
html.library-layout #grid-movie-library .section-title,
html.library-layout .rail.shelf .section-title,
html.library-layout details.shelf--list-collapsible > .shelf-list-summary.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.library-layout details.shelf--list-collapsible:not([open]) > .shelf-list-summary.section-title {
  margin-bottom: 0;
}

html.library-layout details.shelf--list-collapsible[open] > .shelf-list-summary.section-title {
  margin-bottom: 12px;
}

html.library-layout .discover-head h2,
html.library-layout .trending-section-head h2,
html.library-layout .my-streaming-providers h2,
html.library-layout .feed-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--lv7-green);
}

html.library-layout .library-rails .card-grid.media-row.horizontal-rail {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.library-layout .library-rails .card-grid.media-row.horizontal-rail::-webkit-scrollbar {
  display: none;
}

html.library-layout .library-rails .card-grid.media-row.horizontal-rail .media-card {
  flex: 0 0 var(--lv7-rail-card-width);
  scroll-snap-align: start;
}

html.library-layout .library-rails .card.media-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  aspect-ratio: 160 / 252;
  border-radius: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

html.library-layout .library-rails .card.media-card .card-poster,
html.library-layout .library-rails .card.media-card > img,
html.library-layout .library-rails .card.media-card .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

html.library-layout .library-rails .card.media-card .media-body {
  margin-top: 0;
  padding: 0 12px 12px;
}

html.library-layout .library-rails .card.media-card h3.title,
html.library-layout .library-rails .card.media-card h3 {
  font-size: 15px;
  margin: 10px 0 4px;
}

html.library-layout .library-rails .card.media-card .lv7-meta {
  font-size: 12px;
  margin-bottom: 8px;
}

html.library-layout .library-rails .card.media-card .lv7-badge,
html.library-layout .library-rails .card.media-card .badge {
  height: 22px;
  font-size: 10px;
}

html.library-layout .library-rails .card.media-card.episode-detail-card .lv7-episode-actions {
  top: 8px;
  right: 8px;
  gap: 4px;
}

html.library-layout .library-rails .card.media-card.episode-detail-card .lv7-episode-actions button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 12px;
}

html.library-layout .library-rails .card.media-card.episode-detail-card .lv7-meta-sub {
  font-size: 11px;
  margin-bottom: 6px;
}

html.library-layout .card-grid.media-row {
  display: grid;
  gap: 16px;
}

html.library-layout .card.media-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Match base .card — clip-margin lets provider tooltips paint outside
   * the card box without being cut off at the top edge. */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 60px;
  min-height: 280px;
  border: 1px solid var(--lv7-line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
  padding: 0;
}

html.library-layout .card.media-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong, var(--lv7-line));
}

html.library-layout .card.media-card .card-poster,
html.library-layout .card.media-card > img,
html.library-layout .card.media-card .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.96);
  z-index: 0;
}


html.library-layout .card.media-card .card-poster {
  position: absolute;
}

html.library-layout .card.media-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 28%;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(4, 8, 14, 0.55) 38%,
    rgba(4, 8, 14, 0.94) 72%,
    rgba(4, 8, 14, 0.98) 100%
  );
  pointer-events: none;
  z-index: 1;
}

html.library-layout .card.media-card .show-status-banner,
html.library-layout .card.media-card .series-status-stamp,
html.library-layout .card.media-card .progress-label {
  display: none !important;
}

html.library-layout .card.media-card .media-body {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding: 0 16px 16px;
}

html.library-layout .card.media-card .lv7-badge,
html.library-layout .card.media-card .badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(13, 81, 45, 0.88);
  color: var(--lv7-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 1000;
}

html.library-layout .card.media-card .lv7-note-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(127, 148, 178, 0.28);
  background: rgba(38, 48, 64, 0.72);
  color: #c0c8d6;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

html.library-layout .card.media-card .lv7-badge.muted,
html.library-layout .card.media-card .badge.muted {
  background: rgba(38, 48, 64, 0.86);
  color: #c0c8d6;
}

html.library-layout .card.media-card.card-series-cancelled {
  border-color: rgba(214, 48, 48, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(214, 48, 48, 0.2);
}

html.library-layout .card.media-card.card-series-ended {
  border-color: rgba(127, 148, 178, 0.42);
}

html.library-layout .card.media-card .lv7-series-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 44px);
  height: 22px;
  padding: 0 8px 0 4px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

html.library-layout .library-rails .card.media-card .lv7-series-chip {
  top: 7px;
  left: 7px;
  height: 20px;
  padding: 0 7px 0 3px;
  font-size: 9px;
  gap: 4px;
}

html.library-layout .card.media-card .lv7-series-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

html.library-layout .library-rails .card.media-card .lv7-series-chip svg {
  width: 12px;
  height: 12px;
}

html.library-layout .card.media-card .lv7-series-chip--cancelled {
  background: linear-gradient(180deg, #d92b2b 0%, #a81212 100%);
}

html.library-layout .card.media-card .lv7-series-chip--ended {
  background: rgba(34, 44, 58, 0.94);
  border: 1px solid rgba(127, 148, 178, 0.32);
}

html.library-layout .card.media-card .lv7-badge.done,
html.library-layout .card.media-card .badge.done {
  background: rgba(197, 144, 21, 0.22);
  color: var(--lv7-yellow);
}

html.library-layout .card.media-card .media-body,
html.library-layout .card.media-card .media-body .title,
html.library-layout .card.media-card h3.title,
html.library-layout .card.media-card h3 {
  color: #f6f8fc;
}

html.library-layout .card.media-card h3.title,
html.library-layout .card.media-card h3 {
  font-size: 22px;
  line-height: 1.08;
  margin: 12px 0 6px;
}

html.library-layout .card.media-card .lv7-meta {
  margin: 0 0 12px;
  color: #c4ccda;
  font-weight: 700;
  display: block;
}

html.library-layout .card.media-card .lv7-episode-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  gap: 6px;
}

html.library-layout .card.media-card .lv7-episode-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--lv7-line);
  background: rgba(8, 12, 20, 0.82);
  color: #d7deeb;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

/* 2026 schedule-first visual system -------------------------------------------------- */
html.library-layout {
  --wn-panel: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  --wn-panel-raised: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg));
  --wn-panel-line: color-mix(in srgb, var(--border-strong, var(--border)) 78%, transparent);
  --wn-panel-radius: 18px;
  --wn-panel-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

html.library-layout .schedule-hub-header {
  margin: 14px 0 18px;
  align-items: center;
}

html.library-layout .schedule-hub-header .hero-title h1 {
  color: var(--text);
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.035em;
}

html.library-layout .schedule-hub-header .hero-title h1 span {
  color: var(--lv7-green);
}

html.library-layout .schedule-hub-header .hero-title p {
  margin: 8px 0 0;
  font-size: 15px;
}

html.library-layout .schedule-hub {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

html.library-layout .schedule-panel {
  min-width: 0;
  border: 1px solid var(--wn-panel-line);
  border-radius: var(--wn-panel-radius);
  background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
  box-shadow: var(--wn-panel-shadow);
}

html.library-layout .schedule-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 12px;
}

html.library-layout .schedule-panel-head h2 {
  margin: 0;
  color: var(--lv7-green);
  font-size: 18px;
  line-height: 1.2;
}

html.library-layout .schedule-panel-head h2 span,
html.library-layout .schedule-panel-head > span {
  color: var(--lv7-muted);
  font-size: 0.9em;
}

html.library-layout .schedule-panel-head p {
  margin: 4px 0 0;
  color: var(--lv7-muted);
  font-size: 12px;
}

html.library-layout .schedule-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

html.library-layout .schedule-not-started-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--lv7-line);
  border-radius: 10px;
  background: var(--lv7-control-bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

html.library-layout .schedule-not-started-platform select {
  width: auto;
  min-width: 4.5rem;
  max-width: 9.5rem;
  min-height: 0;
  margin: 0;
  padding: 0 16px 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 900px) {
  html.library-layout .schedule-not-started .schedule-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

html.library-layout .schedule-panel .ghost {
  min-height: 34px;
  border-color: var(--wn-panel-line);
  background: color-mix(in srgb, var(--bg-elev-2) 88%, transparent);
  font-weight: 800;
}

html.library-layout .schedule-week-panel {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 188px;
  overflow: hidden;
}

html.library-layout .schedule-week-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-right: 1px solid var(--wn-panel-line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--good) 7%, transparent), transparent);
}

html.library-layout .schedule-kicker {
  color: var(--lv7-green);
  font-size: 18px;
  font-weight: 900;
}

html.library-layout .schedule-week-intro p {
  margin: 0;
  color: var(--lv7-muted);
  font-size: 13px;
  line-height: 1.45;
}

html.library-layout .schedule-calendar-label-compact { display: none; }

@media (min-width: 721px) and (max-width: 1279px) {
  html.library-layout .schedule-calendar-label-full { display: none; }
  html.library-layout .schedule-calendar-label-compact { display: inline; }
  html.library-layout .schedule-week-intro .schedule-open-calendar { white-space: nowrap; }

  html.library-layout .schedule-all-filters { flex-wrap: nowrap; }
  html.library-layout .schedule-all-filters label { white-space: nowrap; }
  html.library-layout .schedule-all-search {
    flex: 1 1 130px;
    min-width: 110px;
  }
  html.library-layout .schedule-all-search input { min-width: 0; }
  html.library-layout .schedule-all-filters label:last-child { flex-shrink: 0; }
}

html.library-layout .schedule-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

html.library-layout .schedule-week-days::-webkit-scrollbar,
html.library-layout .schedule-carousel-track::-webkit-scrollbar {
  display: none;
}

html.library-layout .schedule-day {
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  height: 162px;
  min-height: 162px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 32%, transparent);
  overflow: hidden;
}

html.library-layout .schedule-day.is-today {
  border-color: var(--lv7-yellow);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lv7-yellow) 32%, transparent);
}

html.library-layout .schedule-day-label {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg-elev-2) 92%, transparent);
  color: var(--lv7-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html.library-layout .schedule-day.is-today .schedule-day-label {
  background: linear-gradient(135deg, var(--lv7-yellow), color-mix(in srgb, var(--lv7-yellow) 72%, white));
  color: #17130a;
}

html.library-layout .schedule-day-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  padding: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in srgb, var(--lv7-yellow) 55%, transparent) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

html.library-layout .schedule-day-body::-webkit-scrollbar { width: 4px; }
html.library-layout .schedule-day-body::-webkit-scrollbar-track { background: transparent; }
html.library-layout .schedule-day-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--lv7-yellow) 55%, transparent);
}

html.library-layout .schedule-day-episode {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  box-shadow: none;
  cursor: pointer;
}

html.library-layout .schedule-day-episode img {
  width: 34px;
  height: 42px;
  border-radius: 5px;
  object-fit: cover;
}

html.library-layout .schedule-day-episode span,
html.library-layout .schedule-day-episode strong,
html.library-layout .schedule-day-episode small {
  display: block;
  min-width: 0;
}

html.library-layout .schedule-day-episode strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .schedule-day-episode small {
  margin-top: 3px;
  color: var(--lv7-muted);
  font-size: 10px;
}

html.library-layout .schedule-day-empty {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  color: var(--lv7-muted);
  text-align: center;
}

html.library-layout .schedule-day-empty span {
  font-size: 22px;
  opacity: 0.55;
}

html.library-layout .schedule-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

html.library-layout .schedule-carousel {
  overflow: hidden;
}

html.library-layout .schedule-carousel-viewport {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 0 16px 16px;
}

html.library-layout .schedule-carousel-track {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  min-width: 0;
  padding-top: 5px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

html.library-layout .schedule-edge {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 72px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border-strong) 86%, transparent);
  border-radius: 12px;
  background: rgba(5, 10, 18, 0.92);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

html.library-layout .schedule-edge-prev { left: 5px; }
html.library-layout .schedule-edge-next { right: 5px; }
html.library-layout .schedule-carousel-viewport:hover .schedule-edge:not([hidden]),
html.library-layout .schedule-carousel-viewport.near-left .schedule-edge-prev:not([hidden]),
html.library-layout .schedule-carousel-viewport.near-right .schedule-edge-next:not([hidden]),
html.library-layout .schedule-edge:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

html.library-layout .schedule-carousel.is-expanded .schedule-carousel-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  overflow: visible;
}

html.library-layout .schedule-carousel.is-expanded .schedule-edge {
  display: none;
}

html.library-layout .schedule-month-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

html.library-layout .schedule-month-content {
  display: grid;
  grid-template-columns: minmax(205px, 0.9fr) minmax(180px, 1.1fr);
  gap: 14px;
  padding: 0 16px 16px;
}

html.library-layout .schedule-mini-weekdays,
html.library-layout .schedule-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

html.library-layout .schedule-mini-weekdays span {
  color: var(--lv7-muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

html.library-layout .schedule-mini-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

html.library-layout .schedule-mini-day.is-today {
  background: linear-gradient(135deg, var(--lv7-green), color-mix(in srgb, var(--lv7-green) 70%, white));
  color: #06120c;
  font-weight: 900;
}

html.library-layout .schedule-mini-day:hover,
html.library-layout .schedule-mini-day:focus-visible {
  z-index: 1;
  background: var(--lv7-yellow);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--lv7-yellow) 76%, white),
    0 7px 18px color-mix(in srgb, var(--lv7-yellow) 34%, transparent);
  color: #171304;
  font-weight: 900;
  transform: translateY(-1px);
}

html.library-layout .schedule-mini-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--lv7-yellow);
  color: var(--text);
  font-weight: 900;
}

html.library-layout .schedule-mini-day.has-episode::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lv7-green);
}

html.library-layout .schedule-mini-day.is-today::after { background: #06120c; }

/* Keep the episode dot green on hover — the yellow cell highlight already
 * signals interaction; swapping the dot to near-black made it look like it
 * vanished against the hover fill. */
html.library-layout .schedule-mini-day.has-episode:hover::after,
html.library-layout .schedule-mini-day.has-episode:focus-visible::after {
  background: var(--lv7-green);
  box-shadow: 0 0 0 1px color-mix(in srgb, #000 28%, transparent);
}

html.library-layout .schedule-mini-events {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 222px;
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: color-mix(in srgb, var(--lv7-green) 55%, transparent) transparent;
  scrollbar-width: thin;
}

html.library-layout .schedule-mini-event {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 2px 9px;
  padding: 9px 10px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  cursor: pointer;
}

html.library-layout .schedule-mini-event time {
  grid-row: span 2;
  color: var(--lv7-muted);
  font-size: 10px;
  font-weight: 800;
}

html.library-layout .schedule-mini-event strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .schedule-mini-event small { color: var(--lv7-muted); font-size: 10px; }
html.library-layout .schedule-mini-empty {
  grid-column: 1 / -1;
  white-space: nowrap;
}
html.library-layout .schedule-month-panel > .schedule-open-calendar { margin: auto 16px 0; }

html.library-layout .schedule-up-next .schedule-carousel-track > .media-card,
html.library-layout .schedule-not-started .schedule-carousel-track > .media-card {
  flex: 0 0 176px;
  min-height: 276px;
  aspect-ratio: 2 / 3;
  scroll-snap-align: start;
}

html.library-layout .schedule-all-shows {
  overflow: hidden;
}

html.library-layout .schedule-table-head,
html.library-layout .schedule-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 150px minmax(200px, 1fr) 160px 80px;
  align-items: center;
  gap: 18px;
  padding: 11px 18px;
}

html.library-layout .schedule-table-head {
  border-block: 1px solid var(--wn-panel-line);
  color: var(--lv7-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

html.library-layout .schedule-table-row {
  position: relative;
  min-height: 68px;
  border-bottom: 1px solid color-mix(in srgb, var(--wn-panel-line) 64%, transparent);
  cursor: pointer;
}

html.library-layout .schedule-table-row:last-child { border-bottom: 0; }
html.library-layout .schedule-table-row:hover { background: color-mix(in srgb, var(--lv7-green) 5%, transparent); }

html.library-layout .schedule-table-show {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

html.library-layout .schedule-table-show img {
  width: 38px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
}

html.library-layout .schedule-table-show span,
html.library-layout .schedule-table-show strong,
html.library-layout .schedule-table-show small { display: block; min-width: 0; }
html.library-layout .schedule-table-show strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .schedule-table-show small { margin-top: 3px; color: var(--lv7-muted); }

html.library-layout .schedule-table-row .show-status-banner {
  justify-self: start;
  position: static;
  width: auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
}

html.library-layout .schedule-table-progress {
  display: grid;
  gap: 6px;
  color: var(--lv7-muted);
  font-size: 11px;
}

html.library-layout .schedule-table-progress i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--border) 72%, transparent);
}

html.library-layout .schedule-table-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lv7-green);
}

html.library-layout .schedule-table-provider {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  color: var(--lv7-muted);
  font-size: 12px;
}
html.library-layout .schedule-table-provider {
  overflow: visible;
}

/* Compact glass pill so one primary provider fits the narrow Provider column without lifting row height. */
html.library-layout .schedule-table-provider .provider-pill--on-media {
  font-size: 9px;
  padding: 2px 7px;
  gap: 5px;
  line-height: 1.2;
}
html.library-layout .schedule-table-provider .provider-pill--on-media img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
}
html.library-layout .schedule-table-provider .provider-pill--on-media .provider-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.5em;
}
html.library-layout .schedule-table-updated { color: var(--lv7-muted); font-size: 12px; }
html.library-layout .schedule-table-updated { color: var(--lv7-green); font-weight: 900; }
html.library-layout .schedule-table-airing.is-empty { color: var(--lv7-muted); }

/* Carry the same restrained panel hierarchy to the rest of the application. */
html.library-layout #panel-new > .shelf,
html.library-layout #panel-coming > .shelf,
html.library-layout #panel-search > .shelf,
html.library-layout #panel-trending .trending-section,
html.library-layout #panel-movie-library .rail.shelf,
html.library-layout #panel-platforms .platform-section,
html.library-layout .empty-state {
  border: 1px solid var(--wn-panel-line);
  border-radius: var(--wn-panel-radius);
  background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
  box-shadow: var(--wn-panel-shadow);
}

/* Movies library: immersive feature carousel followed by concise editorial shelves. */
html.library-layout #panel-movie-library { position: relative; }

html.library-layout #panel-movie-library > .content-topbar {
  position: absolute;
  z-index: 20;
  top: 16px;
  right: 22px;
  margin: 0;
  pointer-events: none;
}

html.library-layout #panel-movie-library > .content-topbar .hero-title { display: none; }
html.library-layout #panel-movie-library > .content-topbar .topbar-actions { pointer-events: auto; }

html.library-layout .movie-dashboard {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--wn-panel-line);
  border-radius: var(--wn-panel-radius);
  background: #07111d;
  box-shadow: var(--wn-panel-shadow);
}

html.library-layout .movie-dashboard-feature {
  position: relative;
  min-width: 0;
  min-height: clamp(420px, 35vw, 570px);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
}

html.library-layout .movie-dashboard-feature-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

html.library-layout .movie-dashboard-feature-backdrop--poster-fallback {
  inset: -5%;
  width: 110%;
  height: 110%;
  object-position: center 34%;
  filter: blur(24px) saturate(1.2) brightness(0.56);
  transform: scale(1.08);
}

html.library-layout .movie-dashboard-feature-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(26, 104, 76, 0.18), transparent 42%),
    linear-gradient(90deg, rgba(2, 8, 15, 0.8), rgba(2, 8, 15, 0.08) 28%, rgba(2, 8, 15, 0.08) 72%, rgba(2, 8, 15, 0.8)),
    linear-gradient(180deg, rgba(3, 8, 14, 0.2), rgba(3, 8, 14, 0.08) 48%, #07111d 100%);
}

html.library-layout .movie-dashboard-coverflow {
  position: absolute;
  z-index: 2;
  inset: 58px 70px 116px;
  perspective: 1200px;
}

html.library-layout .movie-hero-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(112px, 12vw, 190px);
  aspect-ratio: 2 / 3;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lv7-green) 42%, #ffffff 10%);
  border-radius: 7px;
  background: #05090f;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  transform-origin: center;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

html.library-layout .movie-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
html.library-layout .movie-hero-cover--active { z-index: 7; transform: translate(-50%, -50%) scale(1.32); border-color: color-mix(in srgb, var(--lv7-green) 70%, var(--lv7-yellow)); box-shadow: 0 0 20px color-mix(in srgb, var(--lv7-green) 35%, transparent), 0 24px 44px rgba(0,0,0,.64); }
html.library-layout .movie-hero-cover--left-1 { z-index: 6; transform: translate(-158%, -47%) rotateY(16deg) scale(1.08); }
html.library-layout .movie-hero-cover--left-2 { z-index: 5; transform: translate(-252%, -43%) rotateY(22deg) scale(.92); }
html.library-layout .movie-hero-cover--left-3 { z-index: 4; transform: translate(-332%, -40%) rotateY(28deg) scale(.8); opacity: .78; }
html.library-layout .movie-hero-cover--right-1 { z-index: 6; transform: translate(58%, -47%) rotateY(-16deg) scale(1.08); }
html.library-layout .movie-hero-cover--right-2 { z-index: 5; transform: translate(152%, -43%) rotateY(-22deg) scale(.92); }
html.library-layout .movie-hero-cover--right-3 { z-index: 4; transform: translate(232%, -40%) rotateY(-28deg) scale(.8); opacity: .78; }
html.library-layout .movie-hero-cover:not(.movie-hero-cover--active) { filter: brightness(.82); }
html.library-layout .movie-hero-cover:hover { filter: brightness(1.06); }

html.library-layout .movie-hero-arrow {
  position: absolute;
  z-index: 8;
  top: 47%;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--wn-panel-line) 78%, white 12%);
  border-radius: 50%;
  background: rgba(9, 22, 36, .88);
  color: #dbe7f6;
  font-size: 31px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
  transform: translateY(-50%);
}
html.library-layout .movie-hero-arrow--previous { left: 24px; }
html.library-layout .movie-hero-arrow--next { right: 24px; }

html.library-layout .movie-dashboard-feature-copy {
  position: absolute;
  z-index: 9;
  right: 15%;
  bottom: 18px;
  left: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

html.library-layout .movie-dashboard-feature h2 { margin: 0 0 5px; color: #fff; font-size: clamp(25px, 2.2vw, 38px); line-height: 1; }
html.library-layout .movie-dashboard-feature-meta,
html.library-layout .movie-dashboard-feature-description { margin: 0; color: #d1d9e6; font-size: 12px; line-height: 1.4; }
html.library-layout .movie-dashboard-feature-description { display: -webkit-box; max-width: 680px; margin-top: 6px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

html.library-layout .movie-dashboard-feature-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; pointer-events: auto; }
html.library-layout .movie-dashboard-watch-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 18px; border-radius: 10px; background: var(--lv7-yellow); color: #101725; font-size: 12px; font-weight: 900; }
html.library-layout .movie-dashboard-feature .lv7-provider { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 10px; border: 1px solid var(--wn-panel-line); border-radius: 9px; background: rgba(7,17,29,.82); color: #fff; }

html.library-layout .movie-dashboard-feature:focus-visible,
html.library-layout .movie-dashboard-continue-card:focus-visible,
html.library-layout .movie-dashboard-genre-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

html.library-layout .movie-dashboard-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 220px));
  justify-content: center;
  gap: clamp(6px, 1.6vw, 32px);
  padding: 8px 18px;
  border-top: 1px solid color-mix(in srgb, var(--wn-panel-line) 76%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--wn-panel-line) 76%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--wn-panel) 72%, transparent), color-mix(in srgb, var(--wn-panel-raised) 84%, transparent) 50%, color-mix(in srgb, var(--wn-panel) 72%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lv7-green) 5%, transparent), inset 0 -1px 0 rgba(0, 0, 0, .18);
}

html.library-layout #grid-movie-library .movie-dashboard-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--lv7-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
html.library-layout #grid-movie-library .movie-dashboard-nav-item b { font-weight: 700; }
html.library-layout #grid-movie-library .movie-dashboard-nav-item:hover { background: color-mix(in srgb, var(--lv7-green) 6%, transparent); color: #e7edf7; }
html.library-layout #grid-movie-library .movie-dashboard-nav-item.is-active {
  border-color: var(--lv7-green);
  background: color-mix(in srgb, var(--lv7-green) 11%, #07111d);
  color: var(--lv7-green);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--lv7-green) 8%, transparent), 0 0 11px color-mix(in srgb, var(--lv7-green) 16%, transparent);
}
html.library-layout .movie-dashboard-nav-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: center / contain no-repeat;
}
html.library-layout .movie-dashboard-nav-icon--bookmark-plus { background: var(--lv7-yellow); mask-image: url('/assets/movies-nav/bookmark-plus.svg'); }
html.library-layout .movie-dashboard-nav-icon--clock { mask-image: url('/assets/movies-nav/clock.svg'); }
html.library-layout .movie-dashboard-nav-icon--clock { background: #a9b9d5; }
html.library-layout .movie-dashboard-nav-icon--circle-check { background: #19d7c7; mask-image: url('/assets/movies-nav/circle-check.svg'); }
html.library-layout .movie-dashboard-nav-icon--star { background: linear-gradient(135deg, var(--lv7-yellow), #18d7c6 54%, #8b78ff); mask-image: url('/assets/movies-nav/star.svg'); }
html.library-layout .movie-dashboard-nav-icon--layout-grid { background: #dce5f4; mask-image: url('/assets/movies-nav/layout-grid.svg'); }

html.library-layout .movie-dashboard-library { display: grid; gap: 0; padding: 0 16px; }
html.library-layout .movie-dashboard-library > section { scroll-margin-top: 84px; }
html.library-layout .movie-dashboard-library > .movie-dashboard-shelf { margin: 0; padding: 11px 0 10px; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html.library-layout .movie-dashboard-library > .movie-dashboard-shelf::before { border-width: 1px 0 0 !important; border-radius: 0 !important; background: transparent !important; }

html.library-layout .movie-dashboard-shelf .card-grid.horizontal-rail { align-items: stretch; }
html.library-layout .movie-dashboard-shelf .media-card {
  flex: 0 0 136px;
  width: 136px;
  min-height: 0;
  height: auto;
  aspect-ratio: 160 / 252;
  overflow: hidden;
  border: 1px solid var(--wn-panel-line);
  border-radius: 0;
  background: #0a1420;
}
html.library-layout .movie-dashboard-shelf .media-card::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 22% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 14, .96) 72%);
}
html.library-layout .movie-dashboard-shelf .media-card .media-body {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0;
  padding: 7px 8px 8px;
  background: transparent;
}
html.library-layout .movie-dashboard-shelf .media-card .lv7-badge { position: static; display: inline-flex; margin-bottom: 3px; padding: 3px 6px; font-size: 7px; }
html.library-layout .movie-dashboard-shelf .media-card .title { display: -webkit-box; margin: 0; overflow: hidden; color: #fff; font-size: 10px; line-height: 1.1; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html.library-layout .movie-dashboard-shelf .media-card .lv7-meta { margin-top: 2px; font-size: 8px; }
html.library-layout .movie-dashboard-shelf .media-card .lv7-foot { margin-top: 3px; font-size: 8px; }
html.library-layout .movie-dashboard-shelf .media-card .progress { height: 3px; margin-top: 5px; }
html.library-layout .movie-dashboard-shelf .media-card.finished > img.poster { opacity: .66; }

html.library-layout .movie-dashboard-continue { min-width: 0; padding: 14px 0 12px; }
html.library-layout .movie-dashboard-continue .section-title { margin: 0 0 9px; }
html.library-layout .movie-dashboard-continue .section-title h2,
html.library-layout .movie-dashboard-shelf .section-title h2 { color: var(--lv7-green); font-size: 17px; }
html.library-layout .movie-dashboard-continue .section-title h2 span,
html.library-layout .movie-dashboard-shelf .section-title h2 span { color: var(--lv7-muted); }

html.library-layout .movie-dashboard-continue-track {
  display: grid;
  grid-auto-columns: clamp(270px, 24vw, 310px);
  grid-auto-flow: column;
  grid-template-rows: 120px;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
html.library-layout .movie-dashboard-continue-track::-webkit-scrollbar { display: none; }

html.library-layout .movie-dashboard-continue-card {
  position: relative;
  width: 100%;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid var(--wn-panel-line);
  border-radius: 0;
  background: var(--wn-panel);
  cursor: pointer;
  scroll-snap-align: start;
}
html.library-layout .movie-dashboard-continue-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
html.library-layout .movie-dashboard-continue-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,9,16,.95), rgba(3,9,16,.3) 70%), linear-gradient(0deg, rgba(3,9,16,.9), transparent 60%); }
html.library-layout .movie-dashboard-continue-copy { position: absolute; right: 78px; bottom: 12px; left: 12px; display: grid; gap: 2px; }
html.library-layout .movie-dashboard-continue-copy strong { overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .movie-dashboard-continue-copy small { color: #d0d8e5; font-size: 10px; }
html.library-layout .movie-dashboard-continue-state { width: max-content; margin-top: 4px; color: var(--lv7-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
/* Real progress: the fill is the viewer's saved position in the movie. */
html.library-layout .movie-dashboard-continue-progress { display: block; height: 3px; margin-top: 6px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.22); }
html.library-layout .movie-dashboard-continue-progress i { display: block; height: 100%; background: var(--lv7-green); }
html.library-layout .movie-dashboard-resume { position: absolute; right: 10px; bottom: 10px; padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--lv7-green) 48%, var(--wn-panel-line)); border-radius: 7px; background: rgba(4,15,24,.9); color: #fff; font-size: 10px; font-weight: 900; }

html.library-layout .movie-dashboard-eyebrow { margin: 0 0 6px; color: var(--lv7-green); font-size: 10px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }

html.library-layout .movie-dashboard-genres {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border-top: 1px solid var(--wn-panel-line);
  scroll-margin-top: 84px;
}
html.library-layout .movie-dashboard-genres-head { padding: 0; }
html.library-layout .movie-dashboard-genres-head h2,
html.library-layout .movie-dashboard-genres-empty h2 { margin: 0; color: var(--lv7-green); font-size: 24px; }

html.library-layout .movie-dashboard-rail-viewport { min-width: 0; padding: 0; }
html.library-layout .movie-dashboard-shelf[data-rail-expanded] .schedule-edge { display: none; }
html.library-layout .movie-dashboard-genres-rail { min-width: 0; }
html.library-layout .movie-dashboard-genre-tiles { display: grid; grid-auto-columns: minmax(145px, 1fr); grid-auto-flow: column; gap: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
html.library-layout .movie-dashboard-genre-tiles::-webkit-scrollbar { display: none; }
html.library-layout .movie-dashboard-genre-tile { position: relative; min-height: 104px; padding: 0; overflow: hidden; border: 1px solid var(--wn-panel-line); border-radius: 0; background: none; color: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; }
html.library-layout .movie-dashboard-genre-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
html.library-layout .movie-dashboard-genre-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(2,8,14,.95)); }
html.library-layout .movie-dashboard-genre-tile > span { position: absolute; z-index: 1; right: 10px; bottom: 9px; left: 10px; overflow: hidden; color: #fff; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .movie-dashboard-genre-tile > span b { color: var(--lv7-muted); font-weight: 700; }
html.library-layout .movie-dashboard-genre-tile.is-selected { border-color: var(--lv7-green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lv7-green) 35%, transparent); }
html.library-layout .movie-dashboard-genre-results { grid-column: 1 / -1; min-width: 0; padding-top: 14px; border-top: 1px solid var(--wn-panel-line); }
html.library-layout .movie-dashboard-genre-results .section-title { margin-bottom: 10px; }
html.library-layout .movie-dashboard-genre-results h3 { margin: 0; color: #fff; font-size: 18px; }
html.library-layout .movie-dashboard-genre-results h3 span { color: var(--lv7-muted); }
html.library-layout .movie-dashboard-genre-close { min-height: 34px; padding-inline: 13px; }

html.library-layout .movie-dashboard-genres-empty { grid-template-columns: auto minmax(0, 1fr); }

@media (max-width: 1100px) {
  html.library-layout .movie-dashboard-feature { min-height: 450px; }
  html.library-layout .movie-dashboard-coverflow { inset-inline: 44px; }
  html.library-layout .movie-hero-cover--left-3,
  html.library-layout .movie-hero-cover--right-3 { display: none; }
  html.library-layout .movie-dashboard-genres { grid-template-columns: 145px minmax(0, 1fr); }
}

@media (max-width: 719px) {
  html.library-layout #panel-movie-library > .content-topbar { position: relative; top: auto; right: auto; justify-content: flex-end; min-height: 48px; margin: 0 0 8px; }
  html.library-layout #panel-movie-library > .content-topbar .topbar-actions { width: 100%; }
  html.library-layout .movie-dashboard { border-radius: 14px; }
  html.library-layout .movie-dashboard-feature { min-height: 430px; }
  html.library-layout .movie-dashboard-coverflow { inset: 52px 28px 154px; }
  html.library-layout .movie-hero-cover { width: 128px; }
  html.library-layout .movie-hero-cover--active { transform: translate(-50%, -50%) scale(1.08); }
  html.library-layout .movie-hero-cover--left-1 { transform: translate(-114%, -46%) rotateY(14deg) scale(.84); }
  html.library-layout .movie-hero-cover--right-1 { transform: translate(14%, -46%) rotateY(-14deg) scale(.84); }
  html.library-layout .movie-hero-cover--left-2,
  html.library-layout .movie-hero-cover--left-3,
  html.library-layout .movie-hero-cover--right-2,
  html.library-layout .movie-hero-cover--right-3 { display: none; }
  html.library-layout .movie-hero-arrow { top: 43%; width: 36px; height: 36px; font-size: 26px; }
  html.library-layout .movie-hero-arrow--previous { left: 10px; }
  html.library-layout .movie-hero-arrow--next { right: 10px; }
  html.library-layout .movie-dashboard-feature-copy { right: 18px; bottom: 16px; left: 18px; }
  html.library-layout .movie-dashboard-feature h2 { font-size: 25px; }
  html.library-layout .movie-dashboard-feature-description { -webkit-line-clamp: 2; }
  html.library-layout .movie-dashboard-nav { grid-template-columns: repeat(5, 132px); gap: 6px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; }
  html.library-layout .movie-dashboard-nav::-webkit-scrollbar { display: none; }
  html.library-layout #grid-movie-library .movie-dashboard-nav-item { min-height: 42px; gap: 7px; padding-inline: 10px; font-size: 11px; }
  html.library-layout .movie-dashboard-nav-icon { flex-basis: 19px; width: 19px; height: 19px; }
  html.library-layout .movie-dashboard-library { padding-inline: 10px; }
  html.library-layout .movie-dashboard-continue-track { grid-auto-columns: 82vw; }
  html.library-layout .movie-dashboard-genres { grid-template-columns: 1fr; gap: 10px; padding: 16px 10px; }
  html.library-layout .movie-dashboard-genres-head h2 { font-size: 21px; }
  html.library-layout .movie-dashboard-genre-tiles { grid-auto-columns: 138px; }
  html.library-layout .movie-dashboard-genre-tile { min-height: 92px; }
  html.library-layout .movie-dashboard-genres-empty { align-items: flex-start; }
}

html.library-layout .content-topbar:not(.schedule-hub-header) {
  margin-top: 12px;
  margin-bottom: 18px;
}

html.library-layout .content-topbar:not(.schedule-hub-header) .hero-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

@media (max-width: 1279px) {
  html.library-layout .schedule-dashboard-grid { grid-template-columns: 1fr; }
  html.library-layout .schedule-week-panel { grid-template-columns: 170px minmax(0, 1fr); }
  html.library-layout .schedule-table-head,
  html.library-layout .schedule-table-row { grid-template-columns: minmax(220px, 1.4fr) 120px minmax(170px, 1fr) 130px 60px; }
  html.library-layout .schedule-all-shows { overflow-x: auto; }
  html.library-layout .schedule-table-head,
  html.library-layout .schedule-table-body { min-width: 820px; }
}

@media (max-width: 720px) {
  html.library-layout .schedule-hub-header { align-items: flex-start; }
  html.library-layout .schedule-hub-header .hero-title h1 { font-size: 28px; }
  html.library-layout .schedule-week-panel { grid-template-columns: 1fr; }
  html.library-layout .schedule-week-intro { border-right: 0; border-bottom: 1px solid var(--wn-panel-line); }
  html.library-layout .schedule-week-days { grid-template-columns: repeat(7, 142px); }
  html.library-layout .schedule-month-content { grid-template-columns: 1fr; }
  html.library-layout .schedule-edge { display: none; }
  html.library-layout .schedule-up-next .schedule-carousel-track > .media-card,
  html.library-layout .schedule-not-started .schedule-carousel-track > .media-card { flex-basis: 158px; min-height: 248px; }
}

html.library-layout .card.media-card .lv7-episode-actions button:hover {
  border-color: var(--border-strong, var(--lv7-line));
  color: #fff;
}

html.library-layout .card.media-card .progress,
html.library-layout .card.media-card .card-progress {
  margin: 0 0 10px;
  height: auto;
  background: transparent;
  overflow: visible;
  border-radius: 0;
}

html.library-layout .card.media-card .card-progress .progress-label--below {
  display: none;
}

html.library-layout .card.media-card .card-progress .progress-count {
  font-size: 0.62rem;
  padding: 0 6px;
}

html.library-layout .card.media-card .progress > i,
html.library-layout .card.media-card .progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--progress-fill), var(--progress-fill-caught-up, var(--progress-fill)));
}

html.library-layout .card.media-card .lv7-foot,
html.library-layout .card.media-card small.lv7-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d8e0ec;
  font-size: 13px;
}

html.library-layout .card.media-card .lv7-foot em {
  font-style: normal;
  color: #cdd6e5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .card.media-card .lv7-foot b {
  color: #d8e0ec;
  flex-shrink: 0;
  margin-left: auto;
}

html.library-layout .card.media-card.episode-detail-card .lv7-meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 4px;
}

html.library-layout .card.media-card.episode-detail-card .lv7-meta-sub {
  margin: 0 0 10px;
  color: #98a5b8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

html.library-layout .card.media-card.episode-detail-card .lv7-foot {
  justify-content: flex-start;
}

html.library-layout .card-grid.media-row.compact:not(.rail-expanded-grid) {
  grid-template-columns: 1fr;
}

html.library-layout .card-grid.media-row.fade-row {
  opacity: 0.76;
}

html.library-layout .shelf--list-layout.shelf--fade-row {
  opacity: 0.76;
}

html.library-layout details.shelf--list-collapsible > .shelf-list-summary.section-title::after {
  background-color: var(--lv7-green);
  opacity: 1;
}

@media (max-width: 1279px) {
  html.library-layout details.shelf--list-collapsible > .shelf-list-summary.section-title::after {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background-color: var(--lv7-green);
    opacity: 1;
  }
}

/* Light themes: same full-bleed poster + scrim layout as dark; softer card shadow only */
html.library-layout[data-theme-mode="light"] .card.media-card {
  box-shadow: 0 10px 28px color-mix(in srgb, var(--text) 8%, transparent);
}

/* Keep root free of transform/filter so position:fixed bottom nav
 * uses the viewport as containing block (not a trapped ancestor). */
html.library-layout,
html.library-layout body {
  transform: none;
  filter: none;
  perspective: none;
}

html.library-layout .library-bottom-nav {
  --lv7-bottom-safe-area: min(env(safe-area-inset-bottom, 0px), 12px);
  /* Pin to the visual viewport — must stay a direct body child with no
   * transformed/filtered/overflow-clipped root ancestor (see styles.css
   * mobile overflow-x note). z-index below add-show search (1300). */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  inset: auto 0 0 0;
  z-index: 900;
  height: 72px;
  padding: 6px 10px calc(6px + var(--lv7-bottom-safe-area));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: var(--bg-elev-2);
  border-top: 1px solid var(--lv7-border-subtle);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--bg) 35%, transparent);
  /* Own compositor layer; transform on the fixed element itself is fine. */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

html.library-layout .library-bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  min-width: 0;
  height: 100%;
  padding: 4px 2px;
  border-radius: 16px;
  box-shadow: none;
}

html.library-layout .library-bottom-nav .nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  line-height: 1;
  color: var(--text-dim, var(--text-muted));
}

html.library-layout .library-bottom-nav .nav-icon svg,
html.library-layout .library-bottom-nav .nav-icon img {
  width: 26px;
  height: 26px;
  display: block;
  shape-rendering: geometricPrecision;
}

html.library-layout .library-bottom-nav .nav-icon img {
  object-fit: contain;
}

html.library-layout .library-bottom-nav .nav-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

html.library-layout .library-bottom-nav button.active {
  color: var(--lv7-yellow);
  background: color-mix(in srgb, var(--lv7-yellow) 16%, transparent);
}

html.library-layout .library-bottom-nav button.active .nav-icon {
  color: var(--lv7-yellow);
}

@media (max-width: 1279px) {
  html.library-layout .lv7-notify-host {
    display: block;
  }

  html.library-layout .notification-fab-wrap.lv7-topbar-notify {
    position: fixed;
    right: 14px;
    bottom: calc(86px + min(env(safe-area-inset-bottom, 0px), 12px));
    z-index: 1200;
    display: block;
  }

  html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    color: #171304;
    background: var(--lv7-yellow, #facc15);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(250, 204, 21, 0.28);
  }

  /* Keep the yellow FAB opaque on hover; the shared topbar hover rule would
   * otherwise swap it for the translucent tab-hover color. */
  html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab:hover {
    background: #ffe05a;
    color: #171304;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(250, 204, 21, 0.22);
  }

  html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab svg {
    width: 22px;
    height: 22px;
  }

  html.library-layout .notification-fab-wrap.lv7-topbar-notify .notification-fab-badge {
    top: -4px;
    right: -4px;
    min-width: 22px;
    width: auto;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    border: 2px solid var(--bg, #0a0c10);
  }

  html.library-layout .notification-panel {
    right: 14px;
    bottom: calc(154px + min(env(safe-area-inset-bottom, 0px), 12px));
    max-height: calc(100dvh - 176px - min(env(safe-area-inset-bottom, 0px), 12px));
  }

  html.library-layout {
    --lv7-rail-card-width: 136px;
  }

  html.library-layout .card.media-card .lv7-provider em {
    display: none;
  }

  html.library-layout .card.media-card .lv7-provider {
    gap: 0;
  }

  html.library-layout .card-grid.media-row.horizontal-rail .card.media-card,
  html.library-layout .library-rails .card-grid.media-row.horizontal-rail .card.media-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    grid-template-columns: unset;
    grid-template-rows: unset;
    min-height: 0;
    aspect-ratio: 160 / 252;
    overflow: hidden;
  }

  html.library-layout .card-grid.media-row.horizontal-rail .card.media-card .poster,
  html.library-layout .card-grid.media-row.horizontal-rail .card.media-card .card-poster,
  html.library-layout .library-rails .card.media-card .poster,
  html.library-layout .library-rails .card.media-card .card-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: unset;
    border-radius: 0;
  }

  html.library-layout .card-grid.media-row.horizontal-rail .card.media-card .media-body,
  html.library-layout .library-rails .card.media-card .media-body {
    display: block;
    position: relative;
    z-index: 2;
  }

  html.library-layout .card-grid.media-row.horizontal-rail .card.media-card .title,
  html.library-layout .library-rails .card.media-card .title {
    grid-column: unset;
    grid-row: unset;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.library-layout .notification-fab-wrap.lv7-topbar-notify.has-unread .notification-fab {
    animation: none;
    color: var(--accent);
  }
}

@media (max-width: 719px) {
  html.library-layout .library-rails .card-grid.media-row.horizontal-rail {
    margin: 0 -18px 0 0;
    padding: 5px 2px 12px;
  }

  html.library-layout .library-rails .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
    min-width: 0;
  }

  html.library-layout .card-grid.media-row.featured,
  html.library-layout .card-grid.media-row.horizontal-rail {
    margin: 0 -18px 0 0;
    padding: 5px 2px 12px;
  }

  html.library-layout .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
    min-width: 0;
    aspect-ratio: 160 / 252;
  }

  html.library-layout .card-grid.media-row.compact:not(.rail-expanded-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  html.library-layout .card-grid.media-row.compact:not(.rail-expanded-grid) .media-card {
    min-height: 196px;
  }

  html.library-layout .card-grid.media-row.compact:not(.rail-expanded-grid) .media-card .media-body {
    margin-top: 0;
    padding: 0 12px 13px;
  }

  html.library-layout .card-grid.media-row.compact:not(.rail-expanded-grid) .media-card h3 {
    font-size: 17px;
  }

  html.library-layout .content {
    padding-bottom: 88px;
    padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right));
  }
}

@media (min-width: 720px) {
  html.library-layout .content {
    padding: 24px;
  }

  /* Tablet still shows the fixed bottom nav (<1280px) — keep clearance. */
  @media (max-width: 1279px) {
    html.library-layout .content {
      padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
  }

  html.library-layout.show-detail-open .content {
    padding: 0 0 18px;
  }

  html.library-layout .lv7-topbar {
    margin: -24px -24px 22px;
    padding: 12px 24px;
  }

  html.library-layout.show-detail-open .lv7-topbar {
    margin: 0;
    padding: 12px 24px;
  }
  html.library-layout #panel-new .content-topbar {
    margin: 0 0 10px;
    padding: 0;
  }

  html.library-layout .card-grid.media-row.compact:not(.horizontal-rail):not(.rail-expanded-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  html.library-layout .lv7-topbar {
    margin: -24px -24px 22px;
    padding: 0 24px;
    min-width: 0;
    overflow: visible;
  }

  html.library-layout.show-detail-open .lv7-topbar {
    margin: 0;
    padding: 0 24px;
  }

  html.library-layout .lv7-topbar-start {
    overflow: hidden;
  }

  html.library-layout .lv7-desktop-nav {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html.library-layout .lv7-desktop-nav::-webkit-scrollbar {
    display: none;
  }

  html.library-layout .lv7-brand-slot {
    display: flex;
  }

  html.library-layout .lv7-desktop-brand {
    display: inline-flex;
  }

  html.library-layout .lv7-mobile-brand {
    display: none;
  }

  html.library-layout .lv7-notify-host {
    display: flex;
  }

  html.library-layout .lv7-menu-btn {
    display: none;
  }

  html.library-layout .library-bottom-nav {
    display: none !important;
  }

  html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible > summary,
  html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible > summary,
  html.library-layout #panel-search .toolbar .search-media-filter-wrap > summary {
    pointer-events: auto;
  }

  html.library-layout #panel-library .lv7-library-controls .sidebar-filter-collapsible-body,
  html.library-layout #panel-movie-library .lv7-library-controls .sidebar-filter-collapsible-body {
    display: none;
  }

  html.library-layout #panel-library .lv7-library-controls details[open] .sidebar-filter-collapsible-body,
  html.library-layout #panel-movie-library .lv7-library-controls details[open] .sidebar-filter-collapsible-body {
    display: block;
  }

  html.library-layout #panel-search .toolbar .search-media-filter-wrap .sidebar-filter-collapsible-body {
    display: none;
  }

  html.library-layout #panel-search .toolbar .search-media-filter-wrap[open] .sidebar-filter-collapsible-body {
    display: block;
  }

  html.library-layout .library-rails .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
  }

  html.library-layout .library-rails .card.media-card {
    min-height: 0;
    border-radius: 0;
  }

  html.library-layout .library-rails .card.media-card h3 {
    font-size: 15px;
  }

  html.library-layout .library-rails .section-title h2,
  html.library-layout #new-list .section-title h2,
  html.library-layout #coming-list .section-title h2,
  html.library-layout #grid-library .section-title h2,
  html.library-layout #grid-movie-library .section-title h2,
  html.library-layout .rail.shelf .section-title h2,
  html.library-layout .discover-head h2,
  html.library-layout .trending-section-head h2,
  html.library-layout .my-streaming-providers h2,
  html.library-layout .feed-section-title {
    font-size: 17px;
  }

  html.library-layout .card-grid.media-row.featured,
  html.library-layout .card-grid.media-row.horizontal-rail {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  html.library-layout .card-grid.media-row.featured .media-card,
  html.library-layout .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
    scroll-snap-align: start;
  }

  html.library-layout .library-rails .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
  }

  html.library-layout .card-grid.media-row.compact:not(.horizontal-rail):not(.rail-expanded-grid) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  html.library-layout .card-grid.media-row.rail-expanded-grid {
    grid-template-columns: repeat(auto-fill, var(--lv7-rail-card-width, 160px)) !important;
    justify-content: start;
    gap: 20px;
  }

  html.library-layout .card-grid.media-row.rail-expanded-grid .card.media-card {
    min-height: 0;
    aspect-ratio: 160 / 252;
  }

  html.library-layout .card.media-card {
    border-radius: 12px;
    min-height: 330px;
  }

  html.library-layout .card.media-card h3 {
    font-size: 18px;
  }

  html.library-layout #panel-library .lv7-library-controls,
  html.library-layout #panel-movie-library .lv7-library-controls {
    overflow: visible;
  }

  html.library-layout #panel-library .lv7-library-controls button,
  html.library-layout #panel-movie-library .lv7-library-controls button {
    min-width: 150px;
  }
}

/* Tablet: hero image beside copy — text column must grow to the content edge. */
@media (min-width: 641px) and (max-width: 1279px) {
  html.library-layout .content-topbar .hero-title {
    flex-direction: row;
    align-items: flex-start;
  }

  html.library-layout .hero-title > div {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 1279px) {
  html.library-layout .lv7-topbar {
    padding: 8px 18px;
    min-height: 56px;
  }

  html.library-layout .content-topbar {
    padding-inline: 4px;
  }

  html.library-layout .content-topbar .hero-title {
    align-items: stretch;
    align-self: stretch;
    width: 100%;
  }

  html.library-layout .hero-title img.hero-art {
    align-self: flex-start;
    width: auto;
  }

  html.library-layout .hero-title > div {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
  }

  html.library-layout #panel-movie-library .hero-title p {
    overflow-wrap: anywhere;
  }

  html.library-layout .content-topbar .view-layout-slot {
    flex: 0 0 auto;
    margin-left: auto;
  }

  html.library-layout .lv7-brand-slot {
    display: flex;
  }

  html.library-layout .lv7-mobile-brand {
    display: inline-flex;
  }

  html.library-layout .lv7-desktop-brand {
    display: none;
  }

  html.library-layout .lv7-topbar-start {
    flex: 0 1 auto;
  }

  html.library-layout .lv7-topbar-end {
    gap: 2px;
  }

  html.library-layout .lv7-actions-host {
    gap: 0;
  }

  html.library-layout .lv7-topbar-user::after {
    display: none;
  }

  html.library-layout .lv7-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  html.library-layout .lv7-actions-host .user-menu-btn {
    width: 44px;
    height: 44px;
  }

  html.library-layout .lv7-menu-btn svg {
    width: 28px;
    height: 28px;
  }

  html.library-layout .lv7-menu-btn:hover {
    background: var(--lv7-tab-hover);
    color: var(--text);
    border-color: transparent;
  }

  html.library-layout #mobile-tab-menu {
    display: contents;
  }

  html.library-layout #mobile-tab-menu-btn {
    display: none !important;
  }

  html.library-layout #panel-library .content-topbar .topbar-actions,
  html.library-layout #panel-movie-library .content-topbar .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }

  html.library-layout #panel-library .lv7-library-controls,
  html.library-layout #panel-movie-library .lv7-library-controls {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }

  html.library-layout #panel-library .lv7-filters-toggle,
  html.library-layout #panel-movie-library .lv7-filters-toggle {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    align-self: flex-start;
    justify-content: flex-start;
  }

  html.library-layout #panel-library .lv7-filters-panel,
  html.library-layout #panel-movie-library .lv7-filters-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  html.library-layout #panel-library .lv7-library-controls.is-filters-open .lv7-filters-panel,
  html.library-layout #panel-movie-library .lv7-library-controls.is-filters-open .lv7-filters-panel {
    display: flex;
  }

  html.library-layout #panel-library .lv7-library-controls.is-filters-open,
  html.library-layout #panel-movie-library .lv7-library-controls.is-filters-open {
    flex-direction: column;
    align-items: flex-start;
  }

  html.library-layout #panel-library .lv7-library-controls .lv7-filter-chips,
  html.library-layout #panel-movie-library .lv7-library-controls .lv7-filter-chips {
    width: 100%;
    justify-content: flex-start;
  }

  html.library-layout #panel-library .lv7-library-controls .lv7-clear,
  html.library-layout #panel-movie-library .lv7-library-controls .lv7-clear {
    align-self: flex-start;
  }
}

@media (min-width: 1500px) {
  html.library-layout .card-grid.media-row.featured .media-card,
  html.library-layout .card-grid.media-row.horizontal-rail .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
  }

  html.library-layout .card-grid.media-row.compact:not(.horizontal-rail):not(.rail-expanded-grid) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  html.library-layout .library-rails .card.media-card {
    min-height: 0;
  }
}

/* Final shared-surface pass: these selectors map the design system to each
   page's existing content containers without changing page behavior. */
html.library-layout .trending-filters,
html.library-layout .trending-section,
html.library-layout .feed-search-card,
html.library-layout .feed-profile-card,
html.library-layout .feed-list-wrap,
html.library-layout .history-panel,
html.library-layout .my-streaming-providers,
html.library-layout .platform-card,
html.library-layout .discover-shelf,
html.library-layout .calendar-feed-section {
  border-color: var(--wn-panel-line);
  border-radius: var(--wn-panel-radius);
  background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
  box-shadow: var(--wn-panel-shadow);
}

html.library-layout .trending-filters,
html.library-layout .feed-search-card,
html.library-layout .feed-list-wrap,
html.library-layout .history-panel,
html.library-layout .my-streaming-providers,
html.library-layout .discover-shelf {
  padding: 18px;
}

html.library-layout .trending-filter-picker-summary,
html.library-layout .list-sort-select,
html.library-layout .search-input {
  border-color: var(--wn-panel-line);
  border-radius: 11px;
  background-color: color-mix(in srgb, var(--bg-elev-2) 90%, transparent);
}

html.library-layout .platform-card,
html.library-layout .discover-card {
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

html.library-layout .platform-card:hover,
html.library-layout .discover-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong, var(--wn-panel-line));
}

/* Keep these layout rules last so the older responsive shell cannot override the desktop workspace. */
html.library-layout .schedule-mini-event {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
}
html.library-layout .schedule-mini-event time { grid-row: auto; color: var(--lv7-green); }
html.library-layout .schedule-table-head,
html.library-layout .schedule-table-row {
  grid-template-columns: minmax(180px, 1.3fr) 92px minmax(125px, .9fr) 118px minmax(130px, 1fr) 95px 26px;
  gap: 10px;
}

@media (min-width: 1280px) {
  html.library-layout .app-shell { margin-left: var(--lv7-sidebar-width, 202px); }
  html.library-layout .app-shell > .content { padding: 18px 20px 36px; }
  html.library-layout #panel-library > .schedule-hub-header .topbar-actions { display: none !important; }
}

@media (min-width: 1500px) {
  html.library-layout .schedule-page-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  html.library-layout .schedule-side {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--lv7-green) 55%, transparent) transparent;
    scrollbar-width: thin;
  }
  html.library-layout .schedule-watch-queue {
    position: static;
    max-height: none;
    overflow: visible;
  }

  html.library-layout .schedule-watch-queue.has-overflow .schedule-queue-list,
  html.library-layout .schedule-up-next.has-overflow .schedule-queue-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: color-mix(in srgb, var(--lv7-green) 55%, transparent) transparent;
    scrollbar-width: thin;
  }
}

html.library-layout .schedule-released .schedule-carousel-track { align-items: stretch; }

html.library-layout .schedule-continue .schedule-panel-head p,
html.library-layout .schedule-up-next.schedule-carousel .schedule-panel-head p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

html.library-layout .schedule-continue .schedule-carousel-track,
html.library-layout .schedule-up-next.schedule-carousel .schedule-carousel-track {
  align-items: stretch;
}

html.library-layout .schedule-continue .schedule-queue-item,
html.library-layout .schedule-up-next.schedule-carousel .schedule-queue-item {
  flex: 0 0 min(280px, 42vw);
  scroll-snap-align: start;
}
html.library-layout .schedule-release-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  grid-template-rows: minmax(94px, 1fr) auto;
  flex: 0 0 270px;
  gap: 8px 10px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg-elev-2) 88%, transparent);
  scroll-snap-align: start;
  cursor: pointer;
}
html.library-layout .schedule-release-card > img {
  width: 66px;
  height: 94px;
  border-radius: 7px;
  object-fit: cover;
}
html.library-layout .schedule-release-copy {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
}
html.library-layout .schedule-release-copy strong,
html.library-layout .schedule-release-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.library-layout .schedule-release-copy strong { color: var(--text); font-size: 12px; }
html.library-layout .schedule-release-copy > span { color: #dce4f1; font-size: 11px; font-weight: 800; }
html.library-layout .schedule-release-copy small { color: var(--text-muted); font-size: 10px; }
html.library-layout .schedule-release-copy time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--lv7-green);
  font-size: 10px;
  font-weight: 850;
}
html.library-layout .schedule-release-copy time i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
html.library-layout .schedule-release-copy .lv7-provider { margin-top: 4px; }
html.library-layout .schedule-release-copy .provider-pill img { width: 20px; height: 20px; }
html.library-layout .schedule-release-copy .lv7-provider em { font-size: 9px; }
html.library-layout .schedule-release-copy .provider-pill--on-media {
  margin-top: 4px;
  justify-self: start;
  font-size: 9px;
  padding: 2px 7px;
  gap: 5px;
}
html.library-layout .schedule-release-copy .provider-pill--on-media img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
}
html.library-layout .schedule-release-copy .provider-pill--on-media .provider-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9.5em;
}
html.library-layout .schedule-release-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
}
html.library-layout .schedule-release-actions button {
  min-height: 32px;
  padding: 5px 8px;
  border-color: var(--wn-panel-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}
html.library-layout .schedule-release-watched:hover { border-color: var(--lv7-green); color: var(--lv7-green); }
html.library-layout .schedule-release-dismiss:hover { border-color: var(--dropped); color: var(--dropped); }
html.library-layout .schedule-released.is-expanded .schedule-carousel-track {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
html.library-layout .schedule-released.is-expanded .schedule-release-card { min-width: 0; }

@media (min-width: 720px) {
  html.library-layout .schedule-released {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  html.library-layout .schedule-released .schedule-carousel-viewport {
    display: flex;
    flex: 1;
    min-height: 0;
    padding-bottom: 16px;
  }

  html.library-layout .schedule-released:not(.is-expanded) .schedule-carousel-track {
    display: grid;
    flex: 1;
    grid-auto-columns: 270px;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  html.library-layout .schedule-released:not(.is-expanded) .schedule-release-card {
    width: auto;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
  }

  html.library-layout .schedule-released.is-expanded .schedule-carousel-viewport {
    display: block;
  }

  html.library-layout .schedule-released.is-expanded .schedule-carousel-track {
    grid-auto-flow: row;
    grid-template-rows: none;
  }

  html.library-layout .schedule-release-card {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: minmax(82px, 1fr) auto;
    gap: 6px 8px;
    padding: 7px;
  }

  html.library-layout .schedule-release-card > img {
    width: 58px;
    height: 82px;
  }

  html.library-layout .schedule-release-actions button {
    min-height: 28px;
    padding-block: 4px;
  }

  html.library-layout .schedule-month-content {
    align-content: start;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max-content 124px;
  }

  html.library-layout .schedule-mini-calendar {
    width: min(100%, 560px);
    justify-self: center;
  }

  html.library-layout .schedule-mini-day {
    aspect-ratio: auto;
    min-height: 36px;
  }

  html.library-layout .schedule-mini-events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 124px;
    max-height: 124px;
  }

  html.library-layout .schedule-mini-event {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    min-height: 56px;
    padding: 5px 5px 7px;
  }

  html.library-layout .schedule-mini-event > img {
    width: 34px;
    height: 42px;
    border-radius: 5px;
  }
}

html.library-layout .schedule-month-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lv7-muted);
  font-size: 13px;
  white-space: nowrap;
}

html.library-layout .schedule-month-open {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
}

/* Coming Soon command center — follows the Shows dashboard visual system. */
html.library-layout #panel-coming > .content-topbar .topbar-actions,
html.library-layout #panel-coming > .content-topbar .view-layout-slot {
  display: none !important;
}

html.library-layout #coming-list.library-rails {
  display: block;
}

html.library-layout .coming-command-center {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

html.library-layout .coming-command-week {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 230px;
  overflow: hidden;
}

html.library-layout .coming-command-week-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 11px;
  padding: 20px;
  border-right: 1px solid var(--wn-panel-line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--lv7-green) 7%, transparent), transparent);
}

html.library-layout .coming-command-week-intro h2,
html.library-layout .coming-premieres h2,
html.library-layout .coming-command-empty h2 {
  margin: 0;
  color: var(--lv7-green);
  font-size: 18px;
}

html.library-layout .coming-command-week-intro p,
html.library-layout .coming-premieres-head p,
html.library-layout .coming-command-empty p {
  margin: 0;
  color: var(--lv7-muted);
  font-size: 12px;
  line-height: 1.45;
}

html.library-layout .coming-command-calendar {
  min-height: 36px;
  white-space: nowrap;
}

html.library-layout .coming-command-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

html.library-layout .coming-command-week-days::-webkit-scrollbar { display: none; }

html.library-layout .coming-command-day {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  min-height: 204px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  overflow: hidden;
  scroll-snap-align: start;
}

html.library-layout .coming-command-day.is-today {
  border-color: var(--lv7-yellow);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lv7-yellow) 30%, transparent);
}

html.library-layout .coming-command-day-label {
  display: grid;
  place-items: center;
  padding-inline: 5px;
  background: color-mix(in srgb, var(--bg-elev-2) 92%, transparent);
  color: var(--lv7-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

html.library-layout .coming-command-day.is-today .coming-command-day-label {
  background: var(--lv7-yellow);
  color: #17130a;
}

html.library-layout .coming-command-day-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 8px;
  overflow: visible;
}

html.library-layout .coming-command-day-scroll-shell {
  --coming-command-day-row-height: 58px;
  display: grid;
  grid-template-rows: 28px auto 28px;
  gap: 4px;
  min-height: 0;
  padding: 5px 8px 8px;
}

html.library-layout .coming-command-day-scroll-shell .coming-command-day-list {
  position: relative;
  height: var(--coming-command-day-viewport-height, calc((var(--coming-command-day-row-height) * 3) + 12px));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.library-layout .coming-command-day-scroll-shell .coming-command-day-list::-webkit-scrollbar {
  display: none;
}

html.library-layout .coming-command-day-scroll-shell .coming-command-day-list::after {
  content: '';
  flex: 0 0 var(--coming-command-day-tail-space, calc(var(--coming-command-day-row-height) + 6px));
}

html.library-layout .coming-command-day-episode {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 5px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elev-2) 84%, transparent);
  cursor: pointer;
}

html.library-layout .coming-command-day-episode:hover {
  background: color-mix(in srgb, var(--lv7-green) 9%, var(--bg-elev-2));
}

html.library-layout .coming-command-day-scroll-shell .coming-command-day-page-start {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

html.library-layout .coming-command-day-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 28px;
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lv7-green);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

html.library-layout .coming-command-day-scroll:hover,
html.library-layout .coming-command-day-scroll:focus-visible {
  background: color-mix(in srgb, var(--lv7-green) 15%, var(--bg-elev-2));
  color: color-mix(in srgb, var(--lv7-green) 82%, white);
}

html.library-layout .coming-command-day-scroll svg {
  flex: 0 0 auto;
}

html.library-layout .coming-command-day-scroll.is-unavailable {
  visibility: hidden;
  pointer-events: none;
}

html.library-layout .coming-command-day-episode > img {
  width: 38px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
}

html.library-layout .coming-command-day-episode > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

html.library-layout .coming-command-day-episode strong,
html.library-layout .coming-command-day-episode small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .coming-command-day-episode strong { font-size: 10px; }
html.library-layout .coming-command-day-episode small { color: var(--lv7-muted); font-size: 9px; }
html.library-layout .coming-command-day-episode .episode-provider-pills,
html.library-layout .coming-premiere-row .episode-provider-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

html.library-layout .coming-command-day-episode .episode-provider-pills { margin-top: 1px; }
html.library-layout .coming-command-day-episode .provider-pill { font-size: 8px; }

/* Week cards can have up to four providers in a very narrow text column.
 * Let their logo-only pills shrink as a group instead of allowing the final
 * provider (most visibly Prime Video) to be clipped by the day column. */
html.library-layout .coming-command-day-episode .episode-provider-pills {
  width: 100%;
  max-width: 100%;
}

html.library-layout .coming-command-day-episode .episode-provider-pill.provider-pill--icon-only {
  flex: 0 1 22px;
  min-width: 0;
  max-width: 22px;
}

html.library-layout .coming-command-day-episode .episode-provider-pill.provider-pill--icon-only img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

html.library-layout .coming-command-day-empty {
  display: grid;
  place-items: center;
  align-content: center;
  height: 100%;
  color: var(--lv7-muted);
  text-align: center;
}

html.library-layout .coming-command-day-empty span { font-size: 20px; opacity: 0.55; }

html.library-layout .coming-command-primary {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  align-items: start;
  gap: 16px;
}

html.library-layout #coming-list .rail.shelf.coming-command-shelf {
  margin: 0;
  border: 1px solid var(--wn-panel-line);
  border-radius: var(--wn-panel-radius);
  background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
  box-shadow: var(--wn-panel-shadow);
}

html.library-layout #coming-list .rail.shelf.coming-command-shelf::before { display: none; }

html.library-layout #coming-list .coming-command-shelf > .section-title,
html.library-layout #coming-list .coming-command-shelf > .card-grid {
  position: relative;
  z-index: auto;
}

html.library-layout #coming-list .coming-command-next-month:not([data-rail-expanded]) > .card-grid {
  display: grid;
  grid-auto-columns: 150px;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

html.library-layout #coming-list .coming-command-next-month.is-single-row:not([data-rail-expanded]) > .card-grid {
  grid-template-rows: minmax(0, 1fr);
}

html.library-layout #coming-list .coming-command-next-month:not([data-rail-expanded]) .media-card {
  width: 150px;
  min-height: 210px;
  scroll-snap-align: start;
}

html.library-layout .coming-command-shelf-heading {
  display: grid;
  gap: 4px;
}

html.library-layout #coming-list .coming-command-shelf-heading p {
  margin: 0;
  color: var(--lv7-muted);
  font-size: 11px;
  font-weight: 600;
}

html.library-layout .coming-premieres {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  /* Clip accidental bleed; list is not a horizontal carousel. */
  overflow-x: clip;
}

html.library-layout .coming-premieres-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

html.library-layout .coming-premiere-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

html.library-layout .coming-premiere-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 8px;
  color: var(--lv7-muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

html.library-layout .coming-premiere-filters select {
  max-width: 105px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
}

html.library-layout .coming-premiere-list {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 0;
  max-height: 446px;
  /* overflow-y:auto alone computes overflow-x to auto and creates empty sideways scroll. */
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--wn-panel-line);
  border-radius: 10px;
  scrollbar-color: color-mix(in srgb, var(--lv7-green) 55%, transparent) transparent;
  scrollbar-width: thin;
}

html.library-layout .coming-premiere-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 48px minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 66px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--wn-panel-line);
  cursor: pointer;
}

html.library-layout .coming-premiere-row:last-child { border-bottom: 0; }
html.library-layout .coming-premiere-row:hover { background: color-mix(in srgb, var(--lv7-green) 7%, transparent); }

html.library-layout .coming-premiere-row time,
html.library-layout .coming-premiere-copy {
  display: grid;
  min-width: 0;
}

html.library-layout .coming-premiere-row time { text-align: center; }
html.library-layout .coming-premiere-row time span { color: var(--lv7-muted); font-size: 9px; font-weight: 900; }
html.library-layout .coming-premiere-row time b { color: var(--text); font-size: 18px; line-height: 1; }
html.library-layout .coming-premiere-row > img { width: 48px; height: 52px; border-radius: 6px; object-fit: cover; }
html.library-layout .coming-premiere-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
html.library-layout .coming-premiere-copy small { color: var(--lv7-muted); font-size: 10px; }
html.library-layout .coming-premiere-row .episode-provider-pills {
  justify-self: end;
  max-width: 100%;
  overflow: visible;
}
html.library-layout .coming-premiere-empty { padding: 18px; }

html.library-layout .coming-command-empty {
  min-height: 200px;
  padding: 20px;
}

html.library-layout .coming-command-secondary {
  display: grid;
  gap: 16px;
}

html.library-layout .coming-show-browser {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
}

html.library-layout .coming-show-browser-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

html.library-layout .coming-show-browser-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

html.library-layout .coming-show-browser-heading h2 {
  margin: 0;
  color: var(--lv7-green);
  font-size: 18px;
}

html.library-layout .coming-show-browser-heading p {
  margin: 0;
  color: var(--lv7-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

html.library-layout .coming-show-browser-heading > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--wn-panel-line);
  border-radius: 999px;
  color: var(--lv7-muted);
  font-size: 10px;
  font-weight: 900;
}

html.library-layout .coming-show-browser-empty {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 96px;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--wn-panel-line) 86%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 28%, transparent);
}

html.library-layout .coming-show-browser-empty > img {
  width: 34px;
  height: 34px;
  filter: invert(67%) sepia(78%) saturate(489%) hue-rotate(94deg) brightness(96%);
}

html.library-layout .coming-show-browser-empty > div { display: grid; gap: 3px; }
html.library-layout .coming-show-browser-empty strong { color: var(--text); font-size: 13px; }
html.library-layout .coming-show-browser-empty p { margin: 0; color: var(--lv7-muted); font-size: 11px; }

html.library-layout .coming-show-browser-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

html.library-layout .coming-show-directory,
html.library-layout .coming-show-detail {
  min-width: 0;
  border: 1px solid var(--wn-panel-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 36%, transparent);
  overflow: hidden;
}

html.library-layout .coming-show-directory {
  display: grid;
  align-content: start;
}

html.library-layout .coming-show-directory-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid var(--wn-panel-line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

html.library-layout .coming-show-directory-item:last-child { border-bottom: 0; }

html.library-layout .coming-show-directory-item:hover,
html.library-layout .coming-show-directory-item:focus-visible {
  background: color-mix(in srgb, var(--lv7-green) 8%, transparent);
}

html.library-layout .coming-show-directory-item:focus-visible {
  outline: 2px solid var(--lv7-green);
  outline-offset: -3px;
}

html.library-layout .coming-show-directory-item.is-selected {
  background: color-mix(in srgb, var(--lv7-green) 13%, var(--bg-elev-2));
  box-shadow: inset 3px 0 0 var(--lv7-green);
}

html.library-layout .coming-show-directory-item > img:first-child {
  width: 56px;
  height: 60px;
  border-radius: 7px;
  object-fit: cover;
}

html.library-layout .coming-show-directory-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

html.library-layout .coming-show-directory-copy strong,
html.library-layout .coming-show-directory-copy small,
html.library-layout .coming-show-directory-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .coming-show-directory-copy strong { font-size: 12px; }
html.library-layout .coming-show-directory-copy small { color: var(--lv7-muted); font-size: 10px; }

html.library-layout .coming-show-directory-meta {
  display: flex;
  gap: 7px;
  min-width: 0;
  color: var(--lv7-muted);
  font-size: 9px;
  font-weight: 700;
}

html.library-layout .coming-show-directory-meta span + span::before {
  content: '•';
  margin-right: 7px;
  color: color-mix(in srgb, var(--lv7-muted) 62%, transparent);
}

html.library-layout .coming-show-directory-item .episode-provider-pills {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

html.library-layout .coming-show-directory-item .episode-provider-pill.provider-pill--icon-only {
  width: 24px;
  height: 24px;
}

html.library-layout .coming-show-directory-arrow,
html.library-layout .coming-show-detail-arrow {
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
  filter: invert(74%) sepia(9%) saturate(493%) hue-rotate(184deg) brightness(88%);
}

html.library-layout .coming-show-directory-item.is-selected .coming-show-directory-arrow {
  filter: invert(67%) sepia(78%) saturate(489%) hue-rotate(94deg) brightness(96%);
}

html.library-layout .coming-show-detail {
  display: grid;
  grid-template-rows: 118px minmax(0, 1fr);
}

html.library-layout .coming-show-detail-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  cursor: pointer;
}

html.library-layout .coming-show-detail-art,
html.library-layout .coming-show-detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html.library-layout .coming-show-detail-art {
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(0.9) brightness(0.72);
}

html.library-layout .coming-show-detail-overlay {
  background: linear-gradient(90deg, rgba(7, 15, 27, 0.98) 0%, rgba(7, 15, 27, 0.82) 42%, rgba(7, 15, 27, 0.3) 100%);
}

html.library-layout .coming-show-detail-title,
html.library-layout .coming-show-detail-header > .episode-provider-pills {
  position: relative;
  z-index: 1;
}

html.library-layout .coming-show-detail-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

html.library-layout .coming-show-detail-title h3 {
  margin: 0;
  color: #f7f9ff;
  font-size: clamp(21px, 2.1vw, 30px);
  line-height: 1.02;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

html.library-layout .coming-show-detail-title p {
  margin: 0;
  color: color-mix(in srgb, #f7f9ff 78%, transparent);
  font-size: 10px;
  font-weight: 800;
}

html.library-layout .coming-show-detail-title p span {
  margin-inline: 3px;
  color: var(--lv7-green);
}

html.library-layout .coming-show-detail-header > .episode-provider-pills {
  display: inline-flex;
  gap: 5px;
  flex: 0 0 auto;
}

html.library-layout .coming-show-detail-list {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 11px;
}

html.library-layout .coming-show-detail-list h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 11px;
}

html.library-layout .coming-show-detail-episode {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 5px 7px;
  border-top: 1px solid var(--wn-panel-line);
  cursor: pointer;
  transition: background 150ms ease;
}

html.library-layout .coming-show-detail-episode.has-still {
  grid-template-columns: 66px 42px minmax(0, 1fr) auto 14px;
}

html.library-layout .coming-show-detail-episode:hover {
  background: color-mix(in srgb, var(--lv7-green) 7%, transparent);
}

html.library-layout .coming-show-detail-number {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

html.library-layout .coming-show-detail-episode > img:not(.coming-show-detail-arrow) {
  width: 42px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
}

html.library-layout .coming-show-detail-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

html.library-layout .coming-show-detail-copy strong,
html.library-layout .coming-show-detail-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.library-layout .coming-show-detail-copy strong { font-size: 11px; }
html.library-layout .coming-show-detail-copy small { color: var(--lv7-muted); font-size: 9px; }

html.library-layout .coming-show-detail-status {
  color: var(--lv7-green);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

html.library-layout .coming-show-detail-status.is-pending { color: var(--lv7-muted); }

@media (min-width: 720px) and (max-width: 1279px) {
  html.library-layout .coming-command-week { grid-template-columns: 160px minmax(0, 1fr); }
  html.library-layout .coming-command-week-intro { padding: 16px; }
  html.library-layout .coming-command-week-days { grid-template-columns: repeat(7, 142px); }

  html.library-layout .coming-command-primary {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  }

  html.library-layout .coming-premieres { padding: 14px; }
  html.library-layout .coming-premieres-head { display: grid; }
  html.library-layout .coming-premiere-filters { justify-content: stretch; }
  html.library-layout .coming-premiere-filters label { flex: 1; }
  html.library-layout .coming-premiere-filters select { width: 100%; max-width: none; }
  html.library-layout .coming-premiere-row { grid-template-columns: 38px 42px minmax(0, 1fr); }
  html.library-layout .coming-premiere-row > img { width: 42px; height: 48px; }
  html.library-layout .coming-premiere-row .episode-provider-pills { display: none; }
  html.library-layout .coming-show-browser-layout { grid-template-columns: minmax(230px, 0.4fr) minmax(0, 1fr); }
  html.library-layout .coming-show-directory-item { grid-template-columns: 48px minmax(0, 1fr) 12px; }
  html.library-layout .coming-show-directory-item > img:first-child { width: 48px; height: 54px; }
  html.library-layout .coming-show-directory-item > .episode-provider-pills { display: none; }
  html.library-layout .coming-show-detail-episode { grid-template-columns: 58px minmax(0, 1fr) auto 12px; }
  html.library-layout .coming-show-detail-episode > img:not(.coming-show-detail-arrow) { display: none; }
}

@media (min-width: 720px) and (max-width: 899px) {
  html.library-layout .coming-command-primary { grid-template-columns: minmax(0, 1fr); }
  html.library-layout .coming-premiere-list { max-height: 360px; }
}

@media (max-width: 719px) {
  html.library-layout #panel-coming > .content-topbar {
    margin-bottom: 10px;
  }

  html.library-layout #panel-coming > .content-topbar .hero-art {
    width: 54px;
    height: 54px;
  }

  html.library-layout .coming-command-center { gap: 12px; margin-top: 10px; }

  html.library-layout .coming-command-week {
    display: block;
    min-height: 0;
  }

  html.library-layout .coming-command-week-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--wn-panel-line);
  }

  html.library-layout .coming-command-week-intro h2 { font-size: 17px; }
  html.library-layout .coming-command-week-intro p { grid-column: 1; font-size: 11px; }
  html.library-layout .coming-command-calendar { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 34px; padding: 6px 9px; }
  html.library-layout .coming-command-week-days { grid-template-columns: repeat(7, minmax(250px, 82vw)); padding: 10px; }
  html.library-layout .coming-command-day { min-height: 206px; }
  html.library-layout .coming-command-day-episode { grid-template-columns: 46px minmax(0, 1fr); }
  html.library-layout .coming-command-day-episode > img { width: 46px; height: 56px; }
  html.library-layout .coming-command-day-scroll-shell { --coming-command-day-row-height: 66px; }

  html.library-layout .coming-command-primary { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  html.library-layout #coming-list .coming-command-shelf {
    padding: 14px 12px 12px;
    border-radius: 16px;
  }

  html.library-layout #coming-list .coming-command-next-month:not([data-rail-expanded]) > .card-grid {
    display: flex;
    gap: 12px;
  }

  html.library-layout #coming-list .coming-command-next-month:not([data-rail-expanded]) .media-card,
  html.library-layout #coming-list .coming-command-shelf:not([data-rail-expanded]) .media-card {
    flex: 0 0 var(--lv7-rail-card-width);
    width: var(--lv7-rail-card-width);
    min-height: 0;
    aspect-ratio: 160 / 252;
  }

  html.library-layout .coming-premieres { padding: 14px; }
  html.library-layout .coming-premieres-head { display: grid; }
  html.library-layout .coming-premieres h2 { font-size: 17px; }
  html.library-layout .coming-premiere-filters { display: grid; grid-template-columns: 1fr 1fr; }
  html.library-layout .coming-premiere-filters label { min-width: 0; }
  html.library-layout .coming-premiere-filters select { min-width: 0; max-width: 100%; }
  html.library-layout .coming-premiere-list { max-height: 330px; }
  html.library-layout .coming-premiere-row { grid-template-columns: 38px 42px minmax(0, 1fr); padding-inline: 7px; }
  html.library-layout .coming-premiere-row > img { width: 42px; height: 48px; }
  html.library-layout .coming-premiere-row .episode-provider-pills { display: none; }
  html.library-layout .coming-command-secondary { gap: 12px; }

  html.library-layout .coming-show-browser { padding: 14px 12px 12px; }
  html.library-layout .coming-show-browser-heading { margin-bottom: 10px; }
  html.library-layout .coming-show-browser-heading h2 { font-size: 17px; }
  html.library-layout .coming-show-browser-heading > span { display: none; }
  html.library-layout .coming-show-browser-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  html.library-layout .coming-show-directory {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  html.library-layout .coming-show-directory::-webkit-scrollbar { display: none; }
  html.library-layout .coming-show-directory-item {
    grid-template-columns: 44px minmax(0, 1fr);
    flex: 0 0 min(72vw, 248px);
    min-height: 64px;
    border: 1px solid var(--wn-panel-line);
    border-radius: 9px;
    scroll-snap-align: start;
  }
  html.library-layout .coming-show-directory-item:last-child { border-bottom: 1px solid var(--wn-panel-line); }
  html.library-layout .coming-show-directory-item.is-selected { border-color: var(--lv7-green); box-shadow: inset 3px 0 0 var(--lv7-green); }
  html.library-layout .coming-show-directory-item > img:first-child { width: 44px; height: 48px; }
  html.library-layout .coming-show-directory-item > .episode-provider-pills,
  html.library-layout .coming-show-directory-arrow { display: none; }
  html.library-layout .coming-show-directory-meta span + span { display: none; }
  html.library-layout .coming-show-detail { grid-template-rows: 104px minmax(0, 1fr); }
  html.library-layout .coming-show-detail-header { padding: 14px; }
  html.library-layout .coming-show-detail-title h3 { font-size: 22px; }
  html.library-layout .coming-show-detail-title p { display: flex; flex-wrap: wrap; gap: 2px; }
  html.library-layout .coming-show-detail-list { padding: 8px; }
  html.library-layout .coming-show-detail-episode { grid-template-columns: 54px minmax(0, 1fr) auto 12px; gap: 7px; }
  html.library-layout .coming-show-detail-episode > img:not(.coming-show-detail-arrow) { display: none; }
  html.library-layout .coming-show-detail-status { font-size: 9px; }
}

@media (max-width: 719px) {
  html.library-layout .schedule-release-card { flex-basis: min(82vw, 300px); }
}

/* Responsive Shows dashboard: the tablet keeps the schedule workspace while
   phones use an action-first, swipeable next-episode feed. */
html.library-layout .schedule-queue-watched,
html.library-layout .schedule-release-watched {
  border-color: color-mix(in srgb, var(--lv7-yellow) 72%, var(--border)) !important;
  background: var(--lv7-yellow) !important;
  color: #17130a !important;
  font-weight: 900;
}

html.library-layout .schedule-queue-watched:hover,
html.library-layout .schedule-release-watched:hover {
  border-color: color-mix(in srgb, var(--lv7-yellow) 72%, white);
  background: color-mix(in srgb, var(--lv7-yellow) 86%, white) !important;
  color: #17130a !important;
}

html.library-layout #panel-library > .schedule-hub-header .topbar-actions,
html.library-layout #panel-library > .schedule-hub-header .view-layout-slot {
  display: none !important;
}

html.library-layout .schedule-hub,
html.library-layout .schedule-page-grid,
html.library-layout .schedule-main {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html.library-layout .schedule-page-grid,
html.library-layout .schedule-main {
  display: grid;
  gap: 16px;
}

@media (min-width: 1500px) {
  html.library-layout .schedule-page-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (min-width: 720px) and (max-width: 1279px) {
  html.library-layout .schedule-dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.85fr);
  }

  html.library-layout .schedule-month-content {
    grid-template-columns: 1fr;
  }

  html.library-layout .schedule-watch-queue .schedule-panel-head {
    padding-bottom: 10px;
  }

  html.library-layout .schedule-watch-queue > .schedule-open-calendar {
    display: none;
  }
}

@media (max-width: 719px) {
  html.library-layout #panel-library > .schedule-hub-header {
    display: none;
  }

  html.library-layout .schedule-phone-feed {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
    overflow: hidden;
  }

  html.library-layout .schedule-phone-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
  }

  html.library-layout .schedule-phone-section-head h2 {
    margin: 0;
    color: var(--lv7-green);
    font-size: 19px;
    line-height: 1.15;
  }

  html.library-layout .schedule-phone-section-head p {
    margin: 3px 0 0;
    color: var(--lv7-muted);
    font-size: 11px;
  }

  html.library-layout .schedule-phone-section-head > span {
    color: var(--lv7-muted);
    font-size: 12px;
    font-weight: 800;
  }

  html.library-layout .schedule-phone-up-next-viewport {
    overflow: hidden;
    border: 1px solid var(--wn-panel-line);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
    box-shadow: var(--wn-panel-shadow);
  }

  html.library-layout .schedule-phone-up-next-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  html.library-layout .schedule-phone-up-next-track::-webkit-scrollbar {
    display: none;
  }

  html.library-layout .schedule-phone-up-next-card {
    display: grid;
    grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
    flex: 0 0 100%;
    min-width: 100%;
    min-height: 214px;
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  html.library-layout .schedule-phone-up-next-poster {
    position: relative;
    min-width: 0;
  }

  html.library-layout .schedule-phone-up-next-poster > img,
  html.library-layout .schedule-phone-up-next-card > img {
    width: 100%;
    height: 194px;
    border-radius: 10px;
    object-fit: cover;
  }

  html.library-layout .schedule-phone-up-next-poster .lv7-series-chip {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 16px);
    height: 20px;
    padding: 0 7px 0 3px;
    border-radius: 6px;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  }

  html.library-layout .schedule-phone-up-next-poster .lv7-series-chip svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }

  html.library-layout .schedule-phone-up-next-poster .lv7-series-chip--cancelled {
    background: linear-gradient(180deg, #d92b2b 0%, #a81212 100%);
  }

  html.library-layout .schedule-phone-up-next-poster .lv7-series-chip--ended {
    background: rgba(34, 44, 58, 0.94);
    border: 1px solid rgba(127, 148, 178, 0.32);
  }

  html.library-layout .schedule-phone-up-next-copy .lv7-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.16);
    color: var(--lv7-green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html.library-layout .schedule-phone-up-next-copy .lv7-badge.muted {
    background: rgba(38, 48, 64, 0.86);
    color: var(--text-muted);
  }

  html.library-layout .schedule-phone-up-next-copy .lv7-badge.done {
    background: rgba(197, 144, 21, 0.22);
    color: var(--lv7-yellow);
  }

  html.library-layout .schedule-phone-up-next-copy {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
    padding: 8px 2px 8px 14px;
  }

  html.library-layout .schedule-phone-up-next-copy > strong {
    overflow: hidden;
    color: var(--text);
    font-size: 18px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.library-layout .schedule-phone-up-next-copy > span {
    color: var(--lv7-green);
    font-size: 12px;
    font-weight: 900;
  }

  html.library-layout .schedule-phone-up-next-copy > small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html.library-layout .schedule-phone-up-next-copy > em {
    color: var(--lv7-muted);
    font-size: 10px;
    font-style: normal;
  }

  html.library-layout .schedule-phone-up-next-copy .schedule-queue-watched {
    grid-column: auto;
    width: 100%;
    min-height: 40px;
    margin-top: 8px;
    border-radius: 9px;
    font-size: 12px;
  }

  html.library-layout .schedule-phone-up-next-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    padding-top: 8px;
  }

  /* After !66, inactive rgba(255,255,255,0.55) still blended into charcoal
     (Kristopher: "may be a little better, but still hard to see."). Push
     contrast hard: near-white inactive fill, larger dots, soft light rim —
     keep solid yellow active pill. Phone-only (@media max-width: 719px). */
  html.library-layout .schedule-phone-up-next-dots button {
    width: 13px;
    min-width: 13px;
    height: 13px;
    min-height: 13px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.4),
      0 0 6px rgba(255, 255, 255, 0.25);
    opacity: 1;
    transition: width 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  }

  html.library-layout[data-theme-mode="light"] .schedule-phone-up-next-dots button:not(.is-active) {
    background: rgba(20, 28, 40, 0.7);
    box-shadow: 0 0 0 1px rgba(20, 28, 40, 0.3);
  }

  html.library-layout .schedule-phone-up-next-dots button.is-active {
    width: 24px;
    background: var(--lv7-yellow);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--lv7-yellow) 55%, #000),
      0 0 10px color-mix(in srgb, var(--lv7-yellow) 40%, transparent);
    opacity: 1;
  }

  html.library-layout .schedule-phone-empty {
    padding: 18px;
    color: var(--lv7-muted);
    text-align: center;
  }

  html.library-layout .schedule-phone-coming-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  html.library-layout .schedule-phone-coming-card {
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 64px;
    padding: 7px;
    border: 1px solid var(--wn-panel-line);
    border-radius: 10px;
    background: linear-gradient(145deg, var(--wn-panel-raised), var(--wn-panel));
    box-shadow: none;
  }

  html.library-layout .schedule-phone-coming-card time {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    place-items: center;
    align-content: center;
    min-height: 48px;
    padding-top: 4px;
    overflow: hidden;
    border: 1px solid var(--wn-panel-line);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bg-elev-2) 88%, transparent);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--lv7-yellow) 8%, transparent);
    line-height: 1;
  }

  html.library-layout .schedule-phone-coming-card time::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--lv7-yellow);
    content: '';
  }

  html.library-layout .schedule-phone-coming-card time b {
    color: var(--lv7-green);
    font-size: 8px;
  }

  html.library-layout .schedule-phone-coming-card time strong {
    color: var(--text);
    font-size: 17px;
  }

  html.library-layout .schedule-phone-coming-card > span,
  html.library-layout .schedule-phone-coming-card > span > strong,
  html.library-layout .schedule-phone-coming-card > span > small {
    display: block;
    min-width: 0;
  }

  html.library-layout .schedule-phone-coming-card > span > strong {
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.library-layout .schedule-phone-coming-card > span > small {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 4px;
    color: var(--lv7-muted);
    font-size: 9px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html.library-layout .schedule-phone-feed > .schedule-carousel,
  html.library-layout .schedule-phone-feed > .rail,
  html.library-layout .schedule-phone-feed > .shelf {
    margin: 0;
  }
}

/* All Shows table: sortable column headers. */
html.library-layout .schedule-table-head .schedule-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}
html.library-layout .schedule-table-head .schedule-table-sort i {
  font-size: 0.7em;
  font-style: normal;
  opacity: 0;
  transition: opacity 0.15s ease;
}
html.library-layout .schedule-table-head .schedule-table-sort:hover i,
html.library-layout .schedule-table-head .schedule-table-sort:focus-visible i { opacity: 0.45; }
html.library-layout .schedule-table-head .schedule-table-sort.is-active { color: var(--text); }
html.library-layout .schedule-table-head .schedule-table-sort.is-active i { opacity: 1; }
html.library-layout .schedule-table-head .schedule-table-sort:focus-visible {
  outline: 2px solid var(--accent-soft, color-mix(in srgb, var(--accent) 35%, transparent));
  outline-offset: 3px;
  border-radius: 4px;
}

/* Season Premieres and Not Started filter dropdowns sit flush right inside their boxes, with a trigger that fits the row.
   Kept at the end of the file so these win over the base .coming-premiere-filters and .schedule-not-started-platform rules. */
html.library-layout .coming-premiere-filters label { padding-right: 0; }
html.library-layout .coming-premiere-filters label .wn-select { flex: 1 1 auto; width: auto; min-width: 8.5rem; margin-left: auto; }
html.library-layout .coming-premiere-filters label .wn-select-trigger { min-height: 0; height: 30px; padding: 4px 10px; }
html.library-layout .schedule-not-started-platform { padding-right: 0; }
html.library-layout .schedule-not-started-platform .wn-select { flex: 1 1 auto; width: auto; min-width: 8.5rem; margin-left: auto; }

@media (max-width: 719px) {
  html.library-layout .schedule-all-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  html.library-layout .schedule-all-filters label,
  html.library-layout .schedule-all-search {
    width: 100%;
    min-width: 0;
  }

  html.library-layout .schedule-all-filters label .wn-select {
    width: 100%;
    min-width: 0;
  }

  html.library-layout .schedule-not-started .schedule-panel-head,
  html.library-layout .schedule-not-started .schedule-panel-actions {
    flex-wrap: wrap;
  }

  html.library-layout .schedule-not-started .schedule-panel-actions {
    width: 100%;
    margin-left: 0;
  }

  html.library-layout .schedule-not-started-platform {
    width: 100%;
    min-width: 0;
  }

  html.library-layout .schedule-not-started-platform .wn-select {
    width: 100%;
    min-width: 0;
  }

  html.library-layout .coming-premiere-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  html.library-layout .coming-premiere-filters label {
    width: 100%;
  }

  html.library-layout .coming-premiere-filters label .wn-select {
    width: 100%;
    min-width: 0;
  }

  html.library-layout .coming-premiere-filters label .wn-select-trigger {
    width: 100%;
  }
}

/* Continue Watching: where the viewer stopped on the next episode, shown above the provider logos. */
html.library-layout .schedule-queue-item .continue-episode-progress { display: block; width: 100%; height: 3px; margin: 6px 0 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.2); }
html.library-layout .schedule-queue-item .continue-episode-progress i { display: block; height: 100%; background: var(--lv7-green); }
html.library-layout .schedule-queue-item .continue-episode-percent { display: block; color: var(--lv7-green); font-size: 10px; font-weight: 800; }

/* Actively watching: the seven days scroll sideways with the carousel buttons when they do not fit. */
html.library-layout .schedule-week-viewport { min-width: 0; padding: 0; }
html.library-layout .schedule-week-viewport .schedule-week-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(126px, 1fr);
  grid-template-columns: none;
  gap: 8px;
  padding: 12px;
  scroll-snap-type: none;
}
