/* Cover marks: Lighter glass material, based on UltraApp (Figma 3361:39161). Existing sizes stay intact.
   28/14: compact; 36/16: detail/reading; 40/20: Books tab only. */
.ds-status-mark, .medium-card .status, .status, .ds-card-mark,
.reading-status, .favorite-mark, .series-book-status, .ser-overview-status, .reader-file,
.ds-book-detail .bd-cover-actions .ds-status-mark,
button.ds-status-mark[aria-pressed="true"],
.favorite-toggle.ds-status-mark[aria-pressed="true"],
.ds-book-detail .bd-cover-actions .favorite-toggle[aria-pressed="true"] {
  right: auto;
  left: 4px;
  border: 0;
  background: var(--status-glass-highlight), var(--color-status-surface);
  color: var(--color-status-icon);
  -webkit-backdrop-filter: blur(var(--status-glass-blur)) saturate(var(--status-glass-saturation));
  backdrop-filter: blur(var(--status-glass-blur)) saturate(var(--status-glass-saturation));
  box-shadow: var(--status-glass-shadow);
}
/* Light catches the glass edge from the upper left, without changing badge geometry.
   CSS backdrop blur and this rim approximate Figma's GLASS refraction effect. */
:is(.ds-status-mark, .medium-card .status, .status, .ds-card-mark,
.reading-status, .favorite-mark, .series-book-status, .ser-overview-status, .reader-file)::before,
.ds-book-detail .bd-cover-actions .favorite-toggle[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--status-glass-rim);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.series-book-status, .ser-overview-status { left: 6px; }
.reading-status { left: 10px; }
.ds-book-detail .bd-cover-actions { left: 10px; right: auto; }
.ds-book-detail .bd-cover-actions .ds-status-mark { left: auto; }
/* Explicit variants for reference and reusable components. */
.ds-status-mark--sm { width: var(--status-size-sm); min-width: var(--status-size-sm); height: var(--status-size-sm); min-height: var(--status-size-sm); }
.ds-status-mark--sm > svg { width: var(--status-icon-sm); height: var(--status-icon-sm); }
.ds-status-mark--lg { width: var(--status-size-md); min-width: var(--status-size-md); height: var(--status-size-md); min-height: var(--status-size-md); }
.ds-status-mark--lg > svg, .ds-status-mark--lg > img { width: var(--status-icon-md); height: var(--status-icon-md); }
.ds-status-mark--books, #library-view .medium-card .status {
  top: 8px; left: 8px;
  width: var(--status-size-books); min-width: var(--status-size-books);
  height: var(--status-size-books); min-height: var(--status-size-books);
}
.ds-status-mark--books > svg, #library-view .medium-card .status .icon { width: var(--status-icon-books); height: var(--status-icon-books); }
.ds-new-badge { left: auto; right: 8px; }
.ds-new-badge--inline { right: auto; }
.ser-overview-number { left: auto; right: 6px; }
/* Optional labels share the right corner without covering each other. */
.has-new-badge .ser-overview-number { top: 41px; }
.home-calendar-estimated, .hist-estimated-mark { left: auto; right: 0; border-radius: 0 4px 0 4px; }

/* External SVG images cannot inherit currentColor from their cover mark. */
:is(.ds-status-mark, .status, .ds-card-mark, .reading-status, .favorite-mark, .series-book-status, .ser-overview-status) > img,
.ds-book-detail .bd-cover-actions .ds-status-mark > img,
.ds-book-detail .bd-cover-actions .favorite-toggle[aria-pressed="true"] > img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
  opacity: 1;
}

/* Phosphor glyphs are fill/currentColor; keep glass status icons white. */
:is(.ds-status-mark, .status, .ds-card-mark, .reading-status, .favorite-mark, .series-book-status, .ser-overview-status) > svg,
:is(.ds-status-mark, .status, .ds-card-mark, .reading-status, .favorite-mark, .series-book-status, .ser-overview-status) .icon,
:is(.ds-status-mark, .status, .ds-card-mark, .reading-status, .favorite-mark, .series-book-status, .ser-overview-status) .rm-icon,
.ds-book-detail .bd-cover-actions .ds-status-mark > svg,
.ds-book-detail .bd-cover-actions .favorite-toggle[aria-pressed="true"] > svg {
  color: var(--color-status-icon, #fff);
  fill: currentColor;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
}
