/* Letter index: a single row with horizontal scroll on mobile */
.letters {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}
.letters .btn { flex: 0 0 auto; min-width: 2.25rem; }

/* Covers with a book aspect ratio (2:3) */
.cover {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
}
.cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
}
.cover-large { font-size: 4rem; }

/* Reading status badge over the cover, top right */
.cover-wrap { position: relative; }
.cover-badge {
  position: absolute;
  top: .4rem;
  right: .4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
  font-size: .85rem;
}

/* Series page */
.synopsis,
.notes { white-space: pre-line; max-width: 60rem; }
.shelf .volume.missing .cover { opacity: .4; filter: grayscale(.6); }
.shelf .volume.unpublished .cover { opacity: .25; }
.shelf .cover-placeholder { font-size: 1.4rem; }
.volume-toggle {
  position: absolute;
  top: .3rem;
  right: .3rem;
}
.volume-toggle button { cursor: pointer; }

/* List view */
.min-w-0 { min-width: 0; }
.cover-thumb {
  width: 2.75rem;
  font-size: 1.1rem;
}

/* Cards: accent border on hover */
.series-card { color: inherit; transition: transform .1s; border-top: 3px solid transparent; }
.series-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), .5);
  border-top-color: var(--accent);
  box-shadow: 0 .35rem 1rem rgba(var(--accent-rgb), .15);
}
.series-card .title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.details dt { font-weight: 500; color: var(--bs-secondary-color); }

/* Series page: reading progress badge and "only owned" switch */
.volume-read {
  position: absolute;
  top: .3rem;
  left: .3rem;
}
.volume-read button { cursor: pointer; }
/* ✓ / + and read marks on volume covers: same square size, icon centred */
.volume-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; padding: 0; font-size: .85rem; border-radius: .4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.volume-mark-off { background: rgba(0, 0, 0, .55); color: #fff; }
.shelf.only-owned .col.missing { display: none; }

/* Filters panel: long option lists scroll instead of growing the page */
.filter-options { max-height: 12rem; overflow-y: auto; }

/* Volume covers open in a full-screen viewer */
.zoom-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .92);
  color: #fff;
}
.viewer[hidden],
.viewer-empty[hidden] { display: none; }
body.viewer-open { overflow: hidden; }
.viewer-figure { margin: 0; max-width: 90vw; text-align: center; }
.viewer-figure img,
.viewer-empty {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: .5rem;
}
.viewer-empty {
  width: min(60vw, 20rem);
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: #333;
  font-size: 4rem;
  font-weight: 600;
}
.viewer-caption { margin-top: .75rem; }
.viewer-close,
.viewer-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.viewer-close { top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; font-size: 1.4rem; }
.viewer-nav { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; font-size: 2.2rem; }
.viewer-prev { left: .75rem; }
.viewer-next { right: .75rem; }
.viewer-close:hover,
.viewer-nav:hover { background: rgba(255, 255, 255, .3); }

/* Box sets: the box is outlined, the books inside get a subtle left mark */
.shelf .volume.pack .cover { outline: 2px dashed var(--bs-secondary-color); outline-offset: 2px; }
.shelf .volume.in-pack .small { border-left: 2px solid var(--bs-secondary-color); padding-left: .35rem; }

/* Controls placed over a card whose title is a stretched link stay clickable */
.above-link { position: relative; z-index: 2; }

.shelf .volume.reissue .cover { opacity: .55; }

/* Theme button: moon in light mode (go dark), sun in dark mode (go light) */
.theme-toggle { line-height: 1; }
[data-bs-theme="light"] .theme-toggle .icon-sun,
[data-bs-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Complete series: every volume published in Spain is owned */
.badge-complete {
  color: var(--bs-success-text-emphasis);
  background-color: var(--bs-success-bg-subtle);
  border: 1px solid var(--bs-success-border-subtle);
}
[data-bs-theme="dark"] .badge-complete {
  color: #d1e7dd;
  background-color: rgba(25, 135, 84, 0.45);
  border-color: #198754;
}

/* Refresh dialog (native <dialog>) */
.refresh-dialog,
.busy-box { max-width: 22rem; width: calc(100% - 2rem); background: var(--bs-body-bg); color: var(--bs-body-color); }
.refresh-dialog::backdrop { background: rgba(0, 0, 0, .5); }
#confirm-dialog p { white-space: pre-line; }
.viewer.single .viewer-nav { display: none; }

/* Admin tools of the viewer: grouped below the cover; beside it on wide screens */
.viewer { overflow-y: auto; align-items: safe center; padding: 1rem 0; }
.viewer-tools { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.viewer-tools [hidden],
#viewer-owned[hidden] { display: none !important; }
.viewer-tools-group { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.viewer-tools-group + .viewer-tools-group { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: .5rem; }
.viewer-tools-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; width: 100%; }
.viewer-kind { flex-direction: column; align-items: stretch; text-align: left; max-width: 18rem; margin: 0 auto; }
.viewer-kind .form-check { margin: 0; }
.viewer-field { display: flex; align-items: center; gap: .5rem; font-size: .875rem; padding-left: 1.5rem; }
.viewer-field span { white-space: nowrap; opacity: .85; }
.viewer-field .form-control { flex: 1; min-width: 0; }
@media (min-width: 900px) {
  .viewer-figure.with-tools {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: calc(100vw - 9rem);
    text-align: left;
  }
  .viewer-figure.with-tools img,
  .viewer-figure.with-tools .viewer-empty {
    max-width: calc(100vw - 9rem - 19rem);
    max-height: 90vh;
    flex: 0 0 auto;
  }
  .viewer-figure.with-tools .viewer-empty { margin: 0; }
  .viewer-figure.with-tools .viewer-caption { width: 17rem; flex-shrink: 0; margin-top: 0; }
  .viewer-figure.with-tools .viewer-caption > .d-flex { justify-content: flex-start !important; }
  .viewer-figure.with-tools .viewer-tools-group { flex-direction: column; align-items: stretch; }
  .viewer-figure.with-tools .viewer-tools-group > form > .btn,
  .viewer-figure.with-tools .viewer-tools-group > .btn { width: 100%; }
  .viewer-figure.with-tools .viewer-kind { max-width: none; margin: 0; }
  .viewer-figure.with-tools #viewer-is-series { align-self: flex-start !important; }
}

/* ---------------------------------------------------------------------------------------
   Colour: one accent (change --accent to try another) plus a colour per kind of book.
   --------------------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
  --accent: #3b5bdb;
  --accent-rgb: 59, 91, 219;
  --accent-hover: #2f4ac0;
  --accent-subtle: #e7ecfd;
  --accent-text: #2b3f9e;
}
[data-bs-theme="dark"] {
  --accent: #748ffc;
  --accent-rgb: 116, 143, 252;
  --accent-hover: #91a7ff;
  --accent-subtle: rgba(116, 143, 252, .18);
  --accent-text: #bac8ff;
}
/* Films and TV collection: teal accent, so it is clear which collection you are in. */
[data-section="videos"][data-bs-theme="light"] {
  --accent: #0c8599;
  --accent-rgb: 12, 133, 153;
  --accent-hover: #0b7285;
  --accent-subtle: #e3fafc;
  --accent-text: #0b7285;
}
[data-section="videos"][data-bs-theme="dark"] {
  --accent: #3bc9db;
  --accent-rgb: 59, 201, 219;
  --accent-hover: #66d9e8;
  --accent-subtle: rgba(59, 201, 219, .18);
  --accent-text: #99e9f2;
}
:root, [data-bs-theme] {
  --bs-primary: var(--accent);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: var(--accent-rgb);
  --bs-link-hover-color: var(--accent-hover);
  --bs-link-hover-color-rgb: var(--accent-rgb);
}
.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
  --bs-btn-focus-shadow-rgb: var(--accent-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-focus-shadow-rgb: var(--accent-rgb);
}
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--accent-rgb), .6);
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .2);
}

/* Header: accent line and coloured brand */
body > nav.navbar { border-bottom: 3px solid var(--accent) !important; }
.navbar-brand { color: var(--accent) !important; letter-spacing: .01em; }

/* Section titles on the series page */
main h2.h5 { border-left: 4px solid var(--accent); padding-left: .5rem; }
main h3.h6.text-secondary { color: var(--accent-text) !important; }

/* "Tengo …" badge */
.badge-owned {
  color: var(--accent-text);
  background-color: var(--accent-subtle);
  border: 1px solid rgba(var(--accent-rgb), .35);
}


/* Kind of book: small coloured label */
.kind {
  --kind: #6c757d;
  display: inline-block;
  padding: 0 .4em;
  border-radius: .3rem;
  font-size: .8em;
  font-weight: 600;
  color: var(--kind);
  background: color-mix(in srgb, var(--kind) 14%, transparent);
}
.kind[data-kind="Manga"] { --kind: #e8590c; }
.kind[data-kind="Manhwa"],
.kind[data-kind="Manhua"] { --kind: #f08c00; }
.kind[data-kind^="Cómic"] { --kind: #1c7ed6; }
.kind[data-kind="Anime Cómic"] { --kind: #1098ad; }
.kind[data-kind="Novela"] { --kind: #2f9e44; }
.kind[data-kind="Artbook"] { --kind: #66a80f; }
.kind[data-kind="Guía/Fanbook"] { --kind: #0ca678; }
.kind[data-kind="Panfleto Cine"] { --kind: #5c7cfa; }
.kind[data-kind$="Anime"] { --kind: #e8590c; }
.kind[data-kind$="imagen real"] { --kind: #1c7ed6; }
.kind[data-kind$="animación"] { --kind: #1098ad; }
[data-bs-theme="dark"] .kind { filter: brightness(1.35); }

/* Covers without image: tinted instead of grey */
.cover-placeholder { background: var(--accent-subtle); color: rgba(var(--accent-rgb), .75); }

/* Secondary buttons (letters, Filtros, Privado, Editar, Actualizar…): soft blue
   instead of grey */
.btn-outline-secondary {
  --bs-btn-color: var(--accent-text);
  --bs-btn-border-color: rgba(var(--accent-rgb), .35);
  --bs-btn-hover-color: var(--accent-text);
  --bs-btn-hover-bg: var(--accent-subtle);
  --bs-btn-hover-border-color: rgba(var(--accent-rgb), .6);
  --bs-btn-active-color: var(--accent-text);
  --bs-btn-active-bg: var(--accent-subtle);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-disabled-color: var(--bs-secondary-color);
  --bs-btn-disabled-border-color: var(--bs-border-color);
  --bs-btn-focus-shadow-rgb: var(--accent-rgb);
}

/* Navbar links between collections: small pills that stay on the same row on mobile */
.section-nav .btn { --bs-btn-padding-x: .5rem; --bs-btn-font-size: .8rem; white-space: nowrap; }

/* Foldable admin box */
.admin-box > summary { cursor: pointer; user-select: none; }
.admin-box[open] > summary { margin-bottom: .5rem; }
.admin-box .source-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.admin-box .source-label { width: 100%; }
.admin-box .source-form { display: flex; flex: 1 1 100%; gap: .5rem; }
.admin-box .source-form .form-control { min-width: 0; }
@media (min-width: 768px) {
  .admin-box .source-label { width: 7rem; }
  .admin-box .source-form { flex: 1 1 20rem; }
}

/* Busy dialog while a form is processed (see base.html). */
.busy-box::backdrop { background: rgba(0, 0, 0, .45); cursor: progress; }

.ref-input { width: 100%; min-width: 16rem; }
@media (min-width: 576px) { .ref-input { width: 22rem; } }

/* A heading inside the shelf (e.g. "Reediciones") takes a whole row: row-cols-* would
   otherwise give it the width of a volume. */
.shelf > .shelf-break { flex: 0 0 100%; width: 100%; }

/* Reading / watch status: coloured badge opening a menu (see status_menu in _macros.html) */
.status-menu { position: relative; display: inline-block; }
.status-menu > summary { list-style: none; cursor: pointer; font-size: .8rem; padding: .4em .7em; }
.status-menu > summary::-webkit-details-marker { display: none; }
.status-menu-list {
  position: absolute; z-index: 30; top: calc(100% + .25rem); left: 0; min-width: 11rem;
  display: flex; flex-direction: column; padding: .25rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .25);
}
.text-end .status-menu-list { left: auto; right: 0; }
.status-option {
  display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 0;
  border-radius: .35rem; background: none; color: var(--bs-body-color); font-size: .875rem; text-align: left;
  white-space: nowrap;
}
.status-option:hover, .status-option:focus-visible { background: var(--bs-tertiary-bg); }
.status-dot { width: .6rem; height: .6rem; border-radius: 50%; flex-shrink: 0; }
/* The open menu must stay above the next cards and rows */
.series-card:has(.status-menu[open]), .series-row:has(.status-menu[open]) { z-index: 5; }
.admin-box .admin-heading { color: var(--accent-text); letter-spacing: .03em; }
.admin-box summary.admin-heading { cursor: pointer; }
/* Action buttons of a record (Editar, Actualizar…): tinted so they stand out. */
.btn-action {
  --bs-btn-color: var(--accent-text);
  --bs-btn-bg: var(--accent-subtle);
  --bs-btn-border-color: rgba(var(--accent-rgb), .5);
  --bs-btn-hover-color: var(--accent-text);
  --bs-btn-hover-bg: rgba(var(--accent-rgb), .3);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-color: var(--accent-text);
  --bs-btn-active-bg: rgba(var(--accent-rgb), .35);
  --bs-btn-active-border-color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Links to other sites: neutral grey pills, so they do not look like the actions. */
.ext-link {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-bg: var(--bs-tertiary-bg);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-tertiary-bg);
  --bs-btn-border-color: color-mix(in srgb, var(--site) 55%, transparent);
  --bs-btn-hover-border-color: var(--site);
  --bs-btn-active-border-color: var(--site);
  --site: var(--bs-secondary-color);
  border-radius: 50rem;
}
/* A dot with each site's own colour, so they are told apart at a glance. */
.ext-link::before {
  content: "";
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .4rem;
  border-radius: 50%;
  background: var(--site);
}
.ext-link[data-site="Listado Manga"] { --site: #f08c00; }
.ext-link[data-site="Whakoom"] { --site: #ff5a5f; }
.ext-link[data-site="AniList"] { --site: #02a9ff; }
.ext-link[data-site="MyAnimeList"] { --site: #4f74c8; }
.ext-link[data-site="FilmAffinity"] { --site: #7b8fb0; }
.ext-link[data-site="IMDb"] { --site: #f5c518; }
.ext-link[data-site="TMDB"] { --site: #90cea1; }
.ext-link[data-site="Wikidata"] { --site: #339966; }
.ext-links:not(:has(.ext-link)) { display: none !important; }
.admin-box { border-color: rgba(var(--accent-rgb), .5) !important; }
.admin-box > summary { color: var(--accent-text); }

/* "Elegir imagen" dialog: a grid of thumbnails. */
.image-picker-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.image-picker-item img { width: 6.5rem; height: 9.5rem; object-fit: cover; }
.image-picker-grid button:hover img, .image-picker-grid button:focus-visible img { outline: 3px solid var(--bs-primary); }
.image-picker-item.is-current img { outline: 3px solid var(--bs-success); }
.image-picker-grid { max-height: 65vh; overflow-y: auto; padding: 3px; }

/* Box that only receives a paste (covers copied from Whakoom) */
.paste-box { border-style: dashed !important; cursor: text; caret-color: transparent; }
.paste-box:focus { outline: 2px solid var(--bs-primary); outline-offset: 1px; }

/* Statistics page */
.stat-bars td { border: 0; vertical-align: middle; }
.stat-bar { height: .6rem; min-width: 2px; border-radius: .3rem; background: var(--bs-primary); opacity: .7; }
.stat-list > summary { cursor: pointer; }

/* Purchases page: compact lines, made for phones */
.purchases { max-width: 48rem; }
/* Wide screens: the sections in two columns (dated ones on the left, the rest on the right). */
@media (min-width: 1200px) {
  .purchases { max-width: 96rem; }
  .purchase-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: start; }
}
.purchase-search { flex: 1 1 8rem; max-width: 20rem; }
.purchase-hand-filter { white-space: nowrap; }
.purchase-hand {
  color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle);
  border: 1px solid var(--bs-warning-border-subtle);
}
.purchase-hand-filter { color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); }
.purchase-hand-filter[aria-pressed="true"] { background: var(--bs-warning-bg-subtle); font-weight: 600; }
.purchase-head { position: sticky; top: var(--bar-h, 0); z-index: 1000; background: var(--bs-body-bg); padding-top: .5rem; }
.purchase-nav { padding: .5rem 0; border-bottom: 1px solid var(--bs-border-color); }
.purchases section, .purchases #deseos { scroll-margin-top: calc(var(--bar-h, 0px) + var(--head-h, 0px) + .5rem); }
.purchase-day { width: 1.8rem; flex-shrink: 0; }
/* Months: the day, in the month's colour, only on the first line of each day; lines of the
   same day are joined (their separator is covered). Filled once the day has come. */
.purchase-day-chip {
  display: inline-block; min-width: 1.6rem; padding: .1rem .3rem; border-radius: .4rem;
  font-weight: 600; font-size: .85rem;
  background: color-mix(in srgb, var(--sec) 15%, transparent);
  color: color-mix(in srgb, var(--sec) 75%, var(--bs-body-color));
}
.purchase-day-chip.arrived { background: var(--sec); color: #fff; }
.purchases .list-group-item.same-day { box-shadow: 0 -1px 0 var(--bs-list-group-bg); }
.purchases .list-group-item.same-day.in-cart,
.purchases .list-group-item.in-cart + .same-day { box-shadow: none; }
.purchase .purchase-edit, .purchase-stop { width: 2rem; padding-inline: 0; flex-shrink: 0; }
/* Phones: the section links in one row that scrolls sideways, so the fixed header stays
   short; lines a little tighter. */
@media (max-width: 575.98px) {
  .purchase-nav { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  .purchase-nav a { white-space: nowrap; }
  .purchase.list-group-item { gap: .35rem !important; }
  .purchase-thumb { width: 2rem; height: 2.8rem; }
  .purchase .purchase-edit, .purchase-stop, .purchase-stop-slot { width: 1.75rem; }
}
.purchase-stop-slot { width: 2rem; flex-shrink: 0; }
.purchase-thumb.cover-placeholder { font-size: 1.1rem; }
/* «Dejar de seguir»: quiet like ✎, red only when pointed at. */
.purchase-stop {
  --bs-btn-hover-bg: var(--bs-danger); --bs-btn-hover-border-color: var(--bs-danger);
  --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--bs-danger);
}
.purchase-thumb { width: 2.4rem; height: 3.4rem; object-fit: cover; flex-shrink: 0; }
/* Up to two lines of title; longer ones are cut (the full title shows on hover). */
.purchase-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
}
.min-w-0 { min-width: 0; }

/* Purchases basket: a ticked line is struck through, so what is left to pick up stands out. */
.purchase.in-cart { background: var(--bs-success-bg-subtle); }
.purchase.in-cart .purchase-title { text-decoration: line-through; }

/* Resolution under an image; the best one when several are compared. */
.img-size { display: block; font-size: .8rem; color: var(--bs-secondary-color); }
.img-size-best { color: var(--bs-success-text-emphasis); font-weight: 600; }

/* Purchases: a section folds with a click on its title (except while searching). */
.purchase-fold { cursor: pointer; user-select: none; }
.purchase-fold::before { content: "▾"; display: inline-block; width: 1rem; color: var(--bs-secondary-color); transition: transform .15s; }
.purchases:not(.filtering) section.folded .purchase-fold::before { transform: rotate(-90deg); }
.purchases:not(.filtering) section.folded > :not(h2, .purchase-section-head) { display: none; }
.purchase-lm { --bs-btn-padding-y: 0; --bs-btn-padding-x: .4rem; --bs-btn-font-size: .75rem; }
.purchase-status { --bs-btn-font-size: .75rem; max-width: 7.5rem; white-space: normal; line-height: 1.15; }

/* Purchases: each section has its own colour (title bar, count and list edge), so the change
   from one to the next is clear; months alternate two blues.
   The links at the top take the colour of the section they jump to. */
.purchases section, .purchase-nav a { --sec: var(--accent); }
.purchases :is(#a-la-venta, [href="#a-la-venta"]) { --sec: var(--bs-success); }
.purchases .month-a { --sec: var(--bs-primary); }
.purchases .month-b { --sec: var(--bs-cyan); }
.purchases :is(#sin-fecha, [href="#sin-fecha"]) { --sec: var(--bs-orange); }
.purchases :is(#comprado, [href="#comprado"]) { --sec: var(--bs-teal); }
.purchases :is(#quiero, [href="#deseos"]) { --sec: var(--bs-pink); }
.purchases #dudo { --sec: var(--bs-purple); }
.purchases :is(#terminadas, [href="#terminadas"]) { --sec: var(--bs-gray-600); }
.purchase-nav a {
  padding: .1rem .6rem;
  border: 1px solid color-mix(in srgb, var(--sec) 55%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--sec) 12%, transparent);
  color: color-mix(in srgb, var(--sec) 75%, var(--bs-body-color));
  text-decoration: none;
}
.purchase-nav a:hover { background: color-mix(in srgb, var(--sec) 28%, transparent); }
/* Title text in the section's colour, mixed with the text colour so it reads in both themes. */
.purchases section h2.h5 {
  border-left-color: var(--sec);
  color: color-mix(in srgb, var(--sec) 75%, var(--bs-body-color));
}
.purchases section h2 .badge { background: var(--sec) !important; }
.purchases section .list-group { border-left: 4px solid var(--sec); }
