:root {
  --rose-spa-primary: #ff8848;
  --rose-spa-primary-hover: #f57735;
  --rose-spa-primary-strong: #d95f23;
  --rose-spa-primary-soft: #fff0e7;
  --rose-spa-primary-veil: rgba(255, 136, 72, 0.12);
  --rose-spa-mint: #12c7a3;
  --rose-spa-mint-strong: #0b967c;
  --rose-spa-mint-soft: #e7fff7;
  --rose-spa-blush: #ff5f94;
  --rose-spa-blush-soft: #ffe8f0;
  --rose-spa-coral: #ff7465;
  --rose-spa-amber: #ff9e48;
  --rose-spa-amber-soft: #fff4e7;
  --rose-spa-mist: #fff8f3;
  --rose-spa-paper: #fffaf6;
  --rose-spa-surface: #ffffff;
  --rose-spa-ink: #2b3033;
  --rose-spa-text: #606b70;
  --rose-spa-muted: #7d898e;
  --rose-spa-border: #ffdac9;
  --rose-spa-border-strong: #ffbd98;
  --rose-spa-ring: rgba(255, 136, 72, 0.24);
  --semi-color-bg-0: #fff7f1;
  --semi-color-bg-1: var(--rose-spa-surface);
  --semi-color-bg-2: #fff0e7;
  --semi-color-bg-3: #ffe0cf;
  --semi-color-border: var(--rose-spa-border);
  --semi-color-border-strong: var(--rose-spa-border-strong);
  --semi-color-text-0: var(--rose-spa-ink);
  --semi-color-text-1: var(--rose-spa-text);
  --semi-color-text-2: var(--rose-spa-muted);
  --semi-color-primary: var(--rose-spa-primary);
  --semi-color-primary-hover: var(--rose-spa-primary-hover);
  --semi-color-danger: #d64545;
  --semi-color-success: var(--rose-spa-mint-strong);
  --semi-shadow-card: 0 16px 34px rgba(113, 70, 42, 0.08);
  --semi-shadow-soft: 0 8px 22px rgba(113, 70, 42, 0.08);
  --semi-radius: 16px;
  --semi-radius-sm: 12px;
  --rose-page-action-height: 36px;
  --rose-page-action-tab-height: 30px;
  --rose-page-action-gap: 8px;
  --rose-page-action-button-radius: 12px;
  --rose-page-action-button-padding-x: 14px;
  --rose-page-action-tab-padding-x: 14px;
  --rose-workspace-title-color: var(--rose-spa-primary-strong);
  --sidebar-width: 248px;
  --sidebar-collapsed-width: 84px;
  --dock-brand-size: 64px;
  --dock-brand-size-collapsed: 48px;
  --dock-shell-bg: linear-gradient(180deg, rgba(255, 250, 246, 0.99) 0%, rgba(255, 240, 231, 0.96) 100%);
  --dock-shell-border: rgba(255, 218, 201, 0.94);
  --dock-shell-border-strong: rgba(255, 189, 152, 0.96);
  --dock-shell-shadow: 0 18px 42px rgba(113, 70, 42, 0.1), 0 8px 20px rgba(255, 95, 148, 0.06);
  --dock-text-primary: var(--semi-color-text-0);
  --dock-text-secondary: var(--semi-color-text-1);
  --dock-text-muted: var(--semi-color-text-2);
  --dock-divider: rgba(255, 206, 184, 0.78);
  --dock-rose: var(--rose-spa-primary);
  --dock-rose-strong: var(--rose-spa-blush);
  --dock-gold: #ffc15c;
  --dock-active-shadow: 0 14px 28px rgba(255, 136, 72, 0.16);
  --mobile-dock-max-width: 430px;
  --mobile-dock-bg: linear-gradient(180deg, rgba(255, 250, 246, 0.84) 0%, rgba(255, 240, 231, 0.68) 100%);
  --mobile-dock-bg-strong: linear-gradient(180deg, rgba(255, 250, 246, 0.98) 0%, rgba(255, 240, 231, 0.96) 100%);
  --mobile-dock-border: rgba(255, 206, 184, 0.76);
  --mobile-dock-highlight: rgba(255, 255, 255, 0.76);
  --mobile-dock-shadow: 0 18px 38px rgba(113, 70, 42, 0.16), 0 5px 14px rgba(113, 70, 42, 0.1);
  --mobile-dock-accent: var(--semi-color-primary);
  --mobile-dock-text: #7d898e;
  --mobile-dock-text-strong: #4e565a;
  --mobile-dock-muted: rgba(96, 107, 112, 0.76);
  --mobile-dock-modal-clearance: calc(env(safe-area-inset-bottom, 0px) + 96px);
  --emby-stage-bg:
    linear-gradient(135deg, rgba(255, 244, 231, 0.92) 0%, rgba(255, 250, 246, 0.98) 54%, rgba(255, 232, 240, 0.78) 100%);
  --emby-stage-border: #ffdac9;
  --emby-stage-shadow: var(--semi-shadow-card);
  --emby-stage-text-primary: var(--semi-color-text-0);
  --emby-stage-text-secondary: var(--semi-color-text-1);
  --emby-stage-text-muted: var(--semi-color-text-2);
  --emby-stage-chip-bg: #fff0e7;
  --emby-stage-chip-border: #ffcfb7;
}

.panel.emby-browser-shell,
.emby-browser-shell {
  gap: 20px;
  padding: 24px;
  color: var(--emby-stage-text-primary);
  border: 1px solid var(--emby-stage-border);
  background: var(--emby-stage-bg);
  box-shadow: var(--emby-stage-shadow);
}

.panel.emby-browser-shell .panel-copy,
.panel.emby-browser-shell .empty-state,
.panel.emby-browser-shell .empty-state p,
.emby-browser-shell .panel-copy,
.emby-browser-shell .empty-state,
.emby-browser-shell .empty-state p {
  color: var(--emby-stage-text-secondary);
}

.panel.emby-browser-shell .empty-state,
.emby-browser-shell .empty-state {
  border-color: #d6e5ff;
  background: #f7fbff;
}

.panel.emby-browser-shell .button-ghost,
.emby-browser-shell .button-ghost {
  color: var(--semi-color-text-1);
  border-color: #d6e5ff;
  background: #f7fbff;
}

.panel.emby-browser-shell .button-ghost:hover,
.emby-browser-shell .button-ghost:hover {
  color: var(--semi-color-primary);
  border-color: #bfd8ff;
  background: #edf5ff;
}

.emby-browser-head,
.emby-browser-head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 18px;
  flex-wrap: wrap;
}

.emby-browser-head h3 {
  margin: 6px 0 0;
  color: var(--emby-stage-text-primary);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: none;
}

.emby-browser-shell.is-home .emby-browser-head h3,
.emby-browser-shell.is-library .emby-browser-head h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.15;
}

.emby-browser-head .soft-pills .status-pill {
  min-height: 40px;
  padding: 0 12px;
}

.emby-browser-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--emby-stage-chip-border);
  background: var(--emby-stage-chip-bg);
  color: var(--emby-stage-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emby-browser-back {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid #d6e5ff;
  background: #f7fbff;
  color: var(--semi-color-primary);
  box-shadow: 0 8px 20px rgba(0, 100, 250, 0.08);
}

.emby-browser-back:hover {
  border-color: #bfd8ff;
  background: #edf5ff;
}

.emby-browser-back svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emby-library-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.emby-library-card-shell {
  min-width: 0;
}

.emby-library-card,
.emby-library-media-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}

.emby-library-card:hover,
.emby-library-media-trigger:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.emby-library-card:focus-visible,
.emby-library-media-trigger:focus-visible {
  outline: 2px solid rgba(102, 165, 255, 0.72);
  outline-offset: 4px;
  border-radius: 24px;
}

.emby-library-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(56, 61, 75, 0.94) 0%, rgba(29, 31, 35, 0.98) 100%);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.emby-library-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 163, 74, 0);
  transition: background 0.4s ease;
  pointer-events: none;
  z-index: 5;
}

.emby-library-card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.04);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.emby-library-card-poster {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 10;
  width: 84px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.emby-library-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.emby-library-card:hover .emby-library-card-media {
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.28), 0 0 24px rgba(22, 163, 74, 0.14);
}

.emby-library-card:hover .emby-library-card-media::after {
  background: rgba(22, 163, 74, 0.08);
}

.emby-library-card:hover .emby-library-card-cover {
  transform: scale(1.08);
}

.emby-library-card:hover .emby-library-card-poster {
  transform: rotate(-4deg) translateY(-2px) scale(1.04);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.4);
}

.emby-library-card:hover .emby-library-card-poster img {
  transform: scale(1.1);
}

.emby-library-card-montage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.emby-library-card-frame {
  position: relative;
  overflow: hidden;
}

.emby-library-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.96) contrast(1.04);
}

.emby-library-card-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.12) 0%, rgba(8, 10, 15, 0.28) 42%, rgba(8, 10, 15, 0.82) 100%);
}

.emby-library-card-inline {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  z-index: 2;
}

.emby-library-card-inline span {
  color: rgba(244, 247, 253, 0.92);
  font-size: 12px;
  font-weight: 600;
}

.emby-library-card-inline-tag {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(95, 203, 120, 0.18);
  border: 1px solid rgba(95, 203, 120, 0.28);
}

.emby-library-card-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(236, 241, 250, 0.7);
  font-size: 0;
}

.emby-library-card-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 12px;
  text-align: center;
}

.emby-library-card-copy strong {
  color: var(--semi-color-text-0);
  font-size: 18px;
  font-weight: 700;
}

.emby-library-card-copy span {
  color: var(--semi-color-text-1);
  font-size: 14px;
}

.emby-poster-summary-row {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.emby-library-media-grid {
  display: grid;
  justify-content: flex-start;
  gap: var(--emby-library-media-gap, 18px);
  grid-template-columns: repeat(auto-fill, minmax(var(--emby-library-media-card-width, 188px), var(--emby-library-media-card-width, 188px)));
}

.emby-library-media-card {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.emby-library-media-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(57, 63, 80, 0.92) 0%, rgba(26, 29, 35, 0.98) 100%);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.emby-library-media-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 163, 74, 0);
  transition: background 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.emby-library-media-card:hover .emby-library-media-poster {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), 0 0 20px rgba(22, 163, 74, 0.12);
}

.emby-library-media-card:hover .emby-library-media-poster::after {
  background: rgba(22, 163, 74, 0.08);
}

.emby-library-media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.emby-library-media-card:hover .emby-library-media-poster img {
  transform: scale(1.12);
}

.emby-library-media-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(236, 241, 250, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.emby-library-media-corner {
  position: absolute;
  top: 10px;
  right: 10px;
}

.emby-library-media-corner-badge,
.emby-library-media-corner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.emby-library-media-corner-badge.is-good {
  background: #64c862;
}

.emby-library-media-corner-badge.is-warn {
  background: #ff8d3a;
}

.emby-library-media-corner-pill {
  min-height: 28px;
  padding: 0 10px;
  background: rgba(20, 23, 29, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.emby-library-media-flag {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 18px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(13, 18, 24, 0.72);
  color: #fff7ef;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.emby-library-media-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
}

.emby-library-media-progress.is-good {
  background: #53be5b;
}

.emby-library-media-progress.is-warn {
  background: #ff8d3a;
}

.emby-library-media-progress.is-muted {
  background: rgba(255, 255, 255, 0.36);
}

.emby-library-media-progress.is-hidden {
  opacity: 0;
}

.emby-library-media-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0 6px;
  text-align: center;
}

.emby-library-media-copy strong {
  color: var(--semi-color-text-0);
  font-size: 17px;
  line-height: 1.35;
  text-shadow: none;
}

.emby-library-media-rating,
.emby-library-media-meta {
  color: var(--semi-color-text-1);
  font-size: 15px;
}

.emby-library-media-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.emby-library-media-rating-star {
  color: #ff5757;
  font-size: 18px;
  line-height: 1;
}

.emby-cover-maker-stage {
  --emby-cover-rose-border: rgba(255, 208, 220, 0.16);
  --emby-cover-rose-text: rgba(255, 241, 244, 0.94);
  --emby-cover-rose-muted: rgba(255, 224, 231, 0.68);
  gap: 22px;
}

.emby-cover-maker-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.emby-cover-maker-reroll-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.emby-cover-maker-reroll-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emby-cover-maker-library-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.emby-cover-maker-library-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 94px;
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(224, 233, 245, 0.88);
  background:
    radial-gradient(circle at 0 0, rgba(255, 145, 171, 0.16) 0%, rgba(255, 145, 171, 0) 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 249, 255, 0.98) 100%);
  box-shadow: 0 16px 34px rgba(18, 31, 54, 0.1);
  text-align: left;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.emby-cover-maker-library-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 159, 183, 0.3);
  box-shadow: 0 22px 42px rgba(18, 31, 54, 0.14);
}

.emby-cover-maker-library-tab.is-active {
  border-color: rgba(255, 121, 159, 0.46);
  box-shadow: 0 24px 46px rgba(18, 31, 54, 0.14), 0 0 0 1px rgba(255, 136, 169, 0.08);
}

.emby-cover-maker-library-thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(61, 21, 34, 0.98) 0%, rgba(16, 10, 16, 0.98) 100%);
  box-shadow: 0 16px 28px rgba(18, 12, 18, 0.28);
  color: rgba(255, 221, 228, 0.82);
  font-size: 15px;
  font-weight: 700;
}

.emby-cover-maker-library-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emby-cover-maker-library-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.emby-cover-maker-library-copy strong {
  display: block;
  color: #162238;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emby-cover-maker-library-copy span {
  display: block;
  color: #5a6880;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emby-cover-maker-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--emby-cover-rose-border);
  background:
    radial-gradient(circle at 0 0, rgba(255, 148, 175, 0.16) 0%, rgba(255, 148, 175, 0) 52%),
    linear-gradient(135deg, rgba(32, 18, 28, 0.98) 0%, rgba(13, 9, 15, 0.98) 100%);
  box-shadow: 0 18px 36px rgba(17, 10, 18, 0.24);
}

.emby-cover-maker-summary strong {
  display: block;
  color: var(--emby-cover-rose-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.emby-cover-maker-summary span,
.emby-cover-maker-summary p {
  color: var(--emby-cover-rose-muted);
  font-size: 14px;
  line-height: 1.65;
}

.emby-cover-maker-summary p {
  max-width: 540px;
  margin: 0;
}

.emby-cover-maker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.emby-cover-maker-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 206, 218, 0.18);
  background:
    radial-gradient(circle at 18% 0, rgba(255, 140, 168, 0.16) 0%, rgba(255, 140, 168, 0) 48%),
    linear-gradient(180deg, rgba(29, 18, 26, 0.98) 0%, rgba(10, 8, 12, 0.99) 100%);
  box-shadow: 0 22px 46px rgba(17, 10, 18, 0.26);
}

.emby-cover-maker-preview-shell {
  padding: 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.emby-cover-maker-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: linear-gradient(135deg, #1a0d14 0%, #0b070c 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
}

.emby-cover-maker-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.emby-cover-maker-card-copy {
  display: grid;
  gap: 5px;
}

.emby-cover-maker-card-copy strong {
  color: var(--emby-cover-rose-text);
  font-size: 17px;
  font-weight: 700;
}

.emby-cover-maker-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.emby-cover-maker-card-copy span {
  color: var(--emby-cover-rose-muted);
  font-size: 13px;
}

.emby-skipped-list,
.emby-scan-log-list {
  display: grid;
  gap: 12px;
}

.emby-skipped-item,
.emby-scan-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dbe7f7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.emby-skipped-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.emby-skipped-copy strong,
.emby-scan-log-text {
  color: var(--semi-color-text-0);
}

.emby-skipped-copy span,
.emby-scan-log-time {
  color: var(--semi-color-text-1);
  font-size: 13px;
}

.emby-scan-log-item {
  justify-content: flex-start;
  align-items: flex-start;
}

.emby-scan-log-time {
  min-width: 142px;
}

.emby-scan-log-text {
  flex: 1;
  min-width: min(100%, 240px);
  line-height: 1.55;
}

.emby-missing-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.emby-missing-summary-grid .summary-card {
  padding: 12px 14px;
}

.emby-missing-summary-grid .summary-label {
  font-size: 12px;
}

.emby-missing-summary-grid .summary-value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 400;
}

.emby-missing-feature-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--semi-color-text-0);
  line-height: 1.7;
}

.emby-missing-season-pills {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
}

.emby-missing-groups {
  display: grid;
  gap: 10px;
}

.emby-missing-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #dde8f8;
  background: #f9fbff;
}

.emby-missing-group strong {
  color: var(--semi-color-text-0);
  font-size: 14px;
}

.emby-missing-group span {
  color: var(--semi-color-text-1);
  font-size: 14px;
}

.emby-missing-episode-grid {
  display: grid;
  gap: 14px;
}

.emby-missing-episode-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid #dce7f7;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

.emby-missing-episode-media {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-self: start;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, rgba(0, 100, 250, 0.08) 0%, rgba(232, 243, 255, 0.9) 100%);
  display: grid;
  place-items: center;
  color: var(--semi-color-text-1);
  font-size: 13px;
}

.emby-missing-episode-media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emby-missing-episode-body {
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 12px;
  align-content: center;
}

.emby-missing-episode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.emby-missing-episode-head strong {
  color: var(--semi-color-text-0);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.emby-missing-episode-head span {
  color: var(--semi-color-text-1);
  font-size: 14px;
}

.emby-missing-episode-body p {
  margin: 0;
  color: var(--semi-color-text-1);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.emby-missing-episode-actions,
.emby-missing-detail-foot {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
}

.emby-missing-detail-foot {
  justify-content: flex-end;
  width: 100%;
}

@media (max-width: 900px) {
  .emby-browser-shell {
    padding: 18px;
  }

  .emby-library-overview-grid {
    grid-template-columns: 1fr;
  }

  .emby-library-card-poster {
    width: 72px;
    left: 14px;
    bottom: 12px;
  }

  .emby-library-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 148px));
    gap: 16px;
  }

  .emby-cover-maker-library-row,
  .emby-cover-maker-grid {
    grid-template-columns: 1fr;
  }

  .emby-cover-maker-summary {
    align-items: flex-start;
  }

  .emby-cover-maker-card-actions {
    width: 100%;
  }

  .emby-cover-maker-card-actions > button {
    flex: 1 1 0;
    width: auto;
  }

  .emby-skipped-item,
  .emby-scan-log-item,
  .emby-missing-group {
    align-items: flex-start;
  }

  .emby-scan-log-time {
    min-width: 0;
  }

  .emby-missing-episode-card {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(circle at top left, rgba(0, 100, 250, 0.05), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #f3f5f8 100%);
  color: var(--semi-color-text-0);
  font: 400 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100dvh;
  height: 100dvh;
  padding: 24px;
  overflow: hidden;
}

body.auth-screen {
  background:
    linear-gradient(180deg, rgba(18, 8, 13, 0.80), rgba(18, 8, 13, 0.80)),
    var(--auth-screen-background, url("./background.png")) center / cover no-repeat;
  color: #fff4f5;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: var(--modal-scroll-y, 0px);
}

body.loading-mask-open {
  overflow: hidden;
}

a {
  color: var(--semi-color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 42% 34%, rgba(48, 233, 255, 0.08), transparent 26%),
    radial-gradient(circle at 62% 28%, rgba(255, 79, 225, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(19, 24, 40, 0.94) 0%, rgba(17, 22, 38, 0.98) 100%);
  backdrop-filter: blur(16px) saturate(1.06);
  transition: opacity 220ms ease, visibility 220ms step-end;
}


.loading-overlay::before,
.loading-overlay::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.72;
}

.loading-overlay::before {
  width: 28vw;
  height: 28vw;
  min-width: 180px;
  min-height: 180px;
  max-width: 360px;
  max-height: 360px;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(45, 228, 255, 0.18) 0%, rgba(45, 228, 255, 0.04) 48%, transparent 76%);
  animation: tech-overlay-drift-center 5.4s ease-in-out infinite;
}

.loading-overlay::after {
  width: 22vw;
  height: 22vw;
  min-width: 140px;
  min-height: 140px;
  max-width: 280px;
  max-height: 280px;
  right: 22%;
  bottom: 22%;
  background: radial-gradient(circle, rgba(255, 79, 225, 0.22) 0%, rgba(255, 79, 225, 0.06) 42%, transparent 76%);
  animation: tech-overlay-drift-corner 6.2s ease-in-out infinite;
}

.loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 240ms ease, visibility 0s step-start;
}

.tech-loader {
  position: relative;
  width: clamp(170px, 22vw, 210px);
  display: grid;
  place-items: center;
  gap: 26px;
  isolation: isolate;
  overflow: visible;
}

.tech-loader::before,
.tech-loader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.tech-loader::before {
  inset: 10px 10px auto;
  height: 160px;
  background: radial-gradient(circle, rgba(74, 230, 255, 0.12) 0%, rgba(255, 81, 227, 0.1) 52%, transparent 78%);
  filter: blur(18px);
  animation: tech-loader-breathe 3s ease-in-out infinite;
}

.tech-loader::after {
  display: none;
}

.tech-loader-flower {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  animation: tech-loader-rotate 5.8s linear infinite;
}

.tech-loader-flower::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 231, 255, 0.18) 0%, rgba(255, 81, 227, 0.16) 42%, transparent 72%);
  filter: blur(14px);
  animation: tech-loader-pulse 2.2s ease-in-out infinite;
}

.tech-loader-petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 72px;
  margin-left: -20px;
  margin-top: -36px;
  border: 2px solid var(--petal-color);
  border-radius: 72% 24% 72% 24% / 72% 28% 72% 28%;
  background: rgba(255, 255, 255, 0.02);
  transform: rotate(var(--petal-angle)) translateY(-38px);
  transform-origin: center center;
  box-shadow:
    0 0 10px var(--petal-glow),
    0 0 22px var(--petal-glow-strong);
  animation: tech-loader-petal-glow 1.8s ease-in-out infinite;
  animation-delay: var(--petal-delay);
}

.tech-loader-petal-1 {
  --petal-angle: 0deg;
  --petal-color: rgba(84, 230, 255, 0.96);
  --petal-glow: rgba(84, 230, 255, 0.32);
  --petal-glow-strong: rgba(84, 230, 255, 0.22);
  --petal-delay: 0s;
}

.tech-loader-petal-2 {
  --petal-angle: 60deg;
  --petal-color: rgba(115, 193, 255, 0.92);
  --petal-glow: rgba(115, 193, 255, 0.28);
  --petal-glow-strong: rgba(115, 193, 255, 0.18);
  --petal-delay: 0.12s;
}

.tech-loader-petal-3 {
  --petal-angle: 120deg;
  --petal-color: rgba(174, 125, 255, 0.96);
  --petal-glow: rgba(174, 125, 255, 0.3);
  --petal-glow-strong: rgba(174, 125, 255, 0.2);
  --petal-delay: 0.24s;
}

.tech-loader-petal-4 {
  --petal-angle: 180deg;
  --petal-color: rgba(238, 87, 255, 0.96);
  --petal-glow: rgba(238, 87, 255, 0.32);
  --petal-glow-strong: rgba(238, 87, 255, 0.2);
  --petal-delay: 0.36s;
}

.tech-loader-petal-5 {
  --petal-angle: 240deg;
  --petal-color: rgba(255, 88, 212, 0.96);
  --petal-glow: rgba(255, 88, 212, 0.32);
  --petal-glow-strong: rgba(255, 88, 212, 0.2);
  --petal-delay: 0.48s;
}

.tech-loader-petal-6 {
  --petal-angle: 300deg;
  --petal-color: rgba(77, 228, 255, 0.94);
  --petal-glow: rgba(77, 228, 255, 0.28);
  --petal-glow-strong: rgba(77, 228, 255, 0.18);
  --petal-delay: 0.6s;
}

.tech-loader-progress {
  position: relative;
  width: 138px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 18px rgba(9, 12, 22, 0.34);
}

.tech-loader-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(54, 233, 255, 0.96) 0 28%, rgba(243, 79, 225, 0.94) 32% 100%);
  background-size: 130% 100%;
  animation: tech-loader-progress-flow 1.8s linear infinite;
}
