/* Common Shelf: warm paper, deep teal, and a book-spine ochre accent. */
:root {
  --shelf-teal: #173e40;
  --shelf-teal-hover: #24575a;
  --shelf-paper: #f7f5ef;
  --shelf-ochre: #e2b65b;
  --bs-body-bg: var(--shelf-paper);
  --bs-body-color: #202d34;
  --bs-secondary-color: #60717a;
  --bs-link-color: #235d60;
  --bs-link-color-rgb: 35, 93, 96;
  --bs-link-hover-color: #173e40;
  --bs-link-hover-color-rgb: 23, 62, 64;
}
body { background: var(--shelf-paper); }
/* Native dialog keeps the scanner above navigation and traps keyboard focus. */
body.isbn-scanning { position: fixed; width: 100%; overflow: hidden; }
.isbn-scanner {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  border: 0;
  background: #101819;
  color: #fff;
  overflow: hidden;
}
.isbn-scanner::backdrop { background: #101819; }
.isbn-scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.isbn-scanner-header {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 1rem max(1rem, env(safe-area-inset-left, 0px));
  background: linear-gradient(#101819, #101819cc, transparent);
}
.isbn-scanner-header h2 { margin: 0; font-size: 1.1rem; }
.isbn-scanner-cancel {
  flex: none;
  padding: .6rem .75rem;
  min-height: 44px;
  border: 1px solid #fff;
  border-radius: .4rem;
  background: #101819;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.isbn-scanner-cancel:focus-visible { outline: 3px solid var(--shelf-ochre); outline-offset: 3px; }
.isbn-scanner-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(85vw, 560px, 110dvh);
  aspect-ratio: 2.6;
  border: 2px solid #fff;
  border-radius: .35rem;
  box-shadow: 0 0 0 1px #10181980;
  pointer-events: none;
}
.isbn-scanner-instructions {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  text-align: center;
  background: #101819e6;
}
.isbn-scanner-instructions p { margin: .25rem 0; }
#isbn-camera-status { color: #e2b65b; }
.common-shelf-nav { background: var(--shelf-teal); padding-block: .9rem; }
.common-shelf-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-right: 1.25rem;
  color: var(--shelf-paper);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.common-shelf-logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.common-shelf-welcome-logo { object-fit: contain; }
.common-shelf-links { padding-block: .25rem; }
.common-shelf-nav .btn-outline-light {
  --bs-btn-color: #f7f5ef;
  --bs-btn-border-color: #bacdcb;
  --bs-btn-hover-color: #173e40;
  --bs-btn-hover-bg: #f7f5ef;
  --bs-btn-hover-border-color: #f7f5ef;
  --bs-btn-active-color: #173e40;
  --bs-btn-active-bg: #f7f5ef;
  --bs-btn-active-border-color: #f7f5ef;
}
.common-shelf-nav [aria-current="page"].btn-outline-light {
  background: #326164;
  border-color: #d5e1dd;
  color: #fff;
}
.common-shelf-nav [aria-current="page"] { font-weight: 600; }
.btn-dark {
  --bs-btn-bg: #173e40;
  --bs-btn-border-color: #173e40;
  --bs-btn-hover-bg: #24575a;
  --bs-btn-hover-border-color: #24575a;
  --bs-btn-active-bg: #123234;
  --bs-btn-active-border-color: #123234;
  --bs-btn-disabled-bg: #173e40;
  --bs-btn-disabled-border-color: #173e40;
  --bs-btn-focus-shadow-rgb: 55, 112, 115;
}
.btn-warning {
  --bs-btn-color: #202d34;
  --bs-btn-bg: #e2b65b;
  --bs-btn-border-color: #e2b65b;
  --bs-btn-hover-color: #202d34;
  --bs-btn-hover-bg: #edc777;
  --bs-btn-hover-border-color: #edc777;
  --bs-btn-active-color: #202d34;
  --bs-btn-active-bg: #d7a647;
  --bs-btn-active-border-color: #d7a647;
  --bs-btn-disabled-bg: #e2b65b;
  --bs-btn-disabled-border-color: #e2b65b;
  --bs-btn-focus-shadow-rgb: 180, 139, 51;
}
.btn-outline-dark, .btn-outline-secondary {
  --bs-btn-color: #29494b;
  --bs-btn-border-color: #526a6c;
  --bs-btn-hover-bg: #173e40;
  --bs-btn-hover-border-color: #173e40;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #173e40;
  --bs-btn-active-border-color: #173e40;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 55, 112, 115;
}
.card { --bs-card-bg: #fff; --bs-card-border-color: #d9dedd; }
.form-control, .form-select { background-color: #fff; border-color: #7f9092; }

.common-shelf-login input:not([type="hidden"]) {
  display: block;
  width: 100%;
  padding: .375rem .75rem;
  font: inherit;
  color: var(--bs-body-color);
  background-color: #fff;
  border: 1px solid #7f9092;
  border-radius: var(--bs-border-radius);
}
.form-control:focus, .form-select:focus, .common-shelf-login input:focus {
  background-color: #fff;
  border-color: #326164;
  box-shadow: 0 0 0 .2rem rgb(35 93 96 / 18%);
}
.form-check-input { background-color: #fff; border-color: #7f9092; }
.form-check-input:checked { background-color: #235d60; border-color: #235d60; }
.form-check-input:focus { border-color: #326164; box-shadow: 0 0 0 .2rem rgb(35 93 96 / 18%); }
:focus-visible { outline: 2px solid #235d60; outline-offset: 3px; }
.common-shelf-nav :focus-visible { outline-color: #edc777; }
.availability-label { color: #235d60; }
.book-card { transition: transform .1s ease; }
.book-card:hover { transform: translateY(-2px); }
@media (max-width: 575.98px) {
  .common-shelf-brand { font-size: 1.5rem; gap: .65rem; }
  .common-shelf-logo { width: 40px; height: 40px; }
  .common-shelf-links .btn { min-height: 40px; display: inline-flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .book-card { transition: none; }
  .book-card:hover { transform: none; }
}
@media print {
  .common-shelf-nav { display: none; }
  body { background: #fff; }
}

.common-shelf-login .errorlist { color: #842029; padding-left: 1.25rem; }


/* Three destinations share one set of routes at every screen width. */
.shelf-header { display: flex; align-items: center; gap: 1rem; }
.shelf-header .common-shelf-brand { margin-right: auto; font-size: 1.4rem; white-space: nowrap; }
.shelf-desktop-nav { display: flex; gap: .25rem; }
.shelf-desktop-nav a { color: #f7f5ef; text-decoration: none; padding: .65rem .75rem; border-radius: .5rem; white-space: nowrap; }
.shelf-desktop-nav .shelf-icon { display: none; }
.shelf-desktop-nav a:hover, .shelf-desktop-nav a[aria-current] { background: #326164; }
.shelf-desktop-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--shelf-ochre); font-weight: 600; }
.shelf-account-controls { display: flex; gap: .5rem; align-items: center; flex: none; }
.shelf-inbox-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: #fff; border-radius: .5rem; }
.shelf-inbox-link:hover, .shelf-inbox-link[aria-current] { background: #326164; color: #fff; }
.shelf-unread-badge { position: absolute; top: -1px; right: -2px; background: var(--shelf-ochre); color: var(--shelf-teal); font-size: .7rem; font-weight: 700; padding: .08rem .35rem; border-radius: 1rem; }
.shelf-account-menu { position: relative; }
.shelf-account-menu summary { list-style: none; display: flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .65rem; border: 1px solid #6e9291; border-radius: .5rem; color: #fff; cursor: pointer; }
.shelf-account-menu summary::-webkit-details-marker { display: none; }
.shelf-account-name { max-width: 10ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-account-panel { position: absolute; right: 0; top: calc(100% + .6rem); width: min(290px, calc(100vw - 24px)); background: #fff; border: 1px solid #d9dedd; border-radius: .65rem; box-shadow: 0 8px 28px #173e4029; z-index: 1050; padding: .5rem; color: var(--bs-body-color); }
.shelf-account-identity { padding: .65rem; border-bottom: 1px solid #d9dedd; margin-bottom: .4rem; overflow-wrap: anywhere; }
.shelf-account-panel a, .shelf-account-panel button { display: block; padding: .65rem; color: #29494b; text-decoration: none; border-radius: .35rem; }
.shelf-account-panel a:hover, .shelf-account-panel button:hover { background: var(--shelf-paper); }
.shelf-account-panel form { margin-top: .4rem; border-top: 1px solid #d9dedd; padding-top: .4rem; }
.shelf-account-panel button { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; }
.shelf-mobile-nav { display: none; }
.shelf-skip-link { position: fixed; top: -100px; left: 1rem; z-index: 2000; background: #fff; color: var(--shelf-teal); padding: .75rem; }
.shelf-skip-link:focus { top: 1rem; }
.shelf-section-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.shelf-section-nav a { text-decoration: none; border: 1px solid #b3c1bf; background: #fff; padding: .5rem .85rem; border-radius: 2rem; color: #29494b; }
.shelf-section-nav a[aria-current] { background: var(--shelf-teal); color: #fff; border-color: var(--shelf-teal); }
.shelf-welcome { padding-block: 1rem; }
.shelf-search { max-width: 820px; }
.shelf-summary-link { text-decoration: none; color: inherit; }
.shelf-summary-link:hover { border-color: #326164; }
.shelf-stat { font-size: 2.25rem; font-weight: 600; color: var(--shelf-teal); }
.shelf-format-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #60717a; font-weight: 600; }
.shelf-resource-row { overflow-wrap: anywhere; }
.shelf-resource-row .resource-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.shelf-result-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.shelf-inbox-body { min-width: 0; overflow-wrap: anywhere; }
.shelf-inbox-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#main-content { overflow-wrap: anywhere; }
@media (max-width: 799.98px) {
  .shelf-header { gap: .5rem; }
  .shelf-header .common-shelf-brand { font-size: 1.15rem; gap: .45rem; }
  .shelf-header .common-shelf-logo { width: 34px; height: 34px; }
  .shelf-desktop-nav { display: none; }
  .shelf-account-controls { gap: .25rem; }
  .shelf-account-menu summary { padding-inline: .5rem; }
  .shelf-account-name { max-width: 8ch; }
  .shelf-signed-in { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .shelf-mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border-top: 1px solid #b3c1bf; box-shadow: 0 -3px 18px #173e400d; padding: .45rem max(.5rem, env(safe-area-inset-right, 0px)) calc(.45rem + env(safe-area-inset-bottom, 0px)) max(.5rem, env(safe-area-inset-left, 0px)); }
  .shelf-mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 58px; text-decoration: none; font-size: .75rem; font-weight: 500; color: #526a6c; border-radius: .5rem; }
  .shelf-mobile-nav a[aria-current] { color: var(--shelf-teal); background: #e9efeb; box-shadow: inset 0 3px 0 var(--shelf-ochre); font-weight: 700; }
  .shelf-mobile-nav a:hover { background: #e9efeb; }
  .shelf-resource-row .resource-actions { margin-top: .5rem; }
  #main-content .d-flex > form.d-flex { flex-wrap: wrap; }
  #main-content input[type="datetime-local"] { max-width: 100%; min-width: 0; }
}
@media (max-width: 359.98px) {
  .shelf-header .common-shelf-brand { font-size: 1rem; }
  .shelf-header .common-shelf-logo { width: 28px; height: 28px; }
  .shelf-account-name { max-width: 5ch; }
}
@media print {
  .common-shelf-nav, .shelf-mobile-nav, .shelf-skip-link { display: none; }
  .shelf-signed-in { padding-bottom: 0; }
}
.shelf-search input { flex: 1; min-width: 0; }
.shelf-search button { flex-shrink: 0; white-space: nowrap; }
#main-content .btn { overflow-wrap: normal; }
@media (min-width: 800px) and (max-width: 991.98px) {
  .shelf-header { gap: .5rem; }
  .shelf-header .common-shelf-brand { font-size: 1.15rem; gap: .45rem; }
  .shelf-header .common-shelf-logo { width: 34px; height: 34px; }
  .shelf-desktop-nav a { font-size: .9rem; padding-inline: .5rem; }
  .shelf-account-name { max-width: 8ch; }
}

.shelf-unread-pill {
  display: inline-block;
  background: var(--shelf-ochre);
  color: #202d34;
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 700;
}
.shelf-inbox-active { border-left: 3px solid var(--shelf-ochre); }

/* Shared Browse and My Resources presentation. */
.shelf-resource-results { display: grid; gap: 1rem; }
.shelf-resource-results--list { grid-template-columns: minmax(0, 1fr); }
.shelf-resource-item { min-width: 0; }
.shelf-resource-summary { display: flex; gap: 1rem; align-items: flex-start; }
.shelf-resource-heading { min-width: 0; overflow-wrap: anywhere; }
.shelf-cover-link { display: flex; flex: 0 0 78px; justify-content: center; text-decoration: none; border-radius: .35rem; }
.shelf-cover-link:focus-visible { outline: 3px solid var(--shelf-ochre); outline-offset: 4px; }
.shelf-resource-cover { display: block; max-width: 78px; max-height: 116px; object-fit: contain; border-radius: .25rem; }
.shelf-cover-placeholder { width: 78px; min-height: 105px; display: flex; align-items: center; justify-content: center; border: 1px solid #d8d4c8; border-radius: .25rem; background: #f5f1e6; color: #526a6c; font-size: .8rem; }
.shelf-resource-empty { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .shelf-resource-results--list .book-card > .card-body { display: grid !important; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 2rem; }
  .shelf-resource-results--list .book-card .shelf-resource-summary { grid-row: 1 / 3; }
  .shelf-resource-results--list .book-card .shelf-resource-details { margin-top: 0 !important; }
  .shelf-resource-results--list .book-card .shelf-result-actions { align-self: end; }
}
@media (max-width: 575.98px) {
  .shelf-resource-results--list .shelf-cover-link { flex-basis: 56px; }
  .shelf-resource-results--list .shelf-resource-cover { max-width: 56px; max-height: 84px; }
  .shelf-resource-results--list .shelf-cover-placeholder { width: 56px; min-height: 78px; }
}

/* Compact search, expandable filters, and sorting beside the results count. */
.shelf-listing-search { flex: 1 1 15rem; width: auto; min-width: 0; }
.shelf-advanced-filters > summary, .shelf-sort-menu > summary { list-style: none; }
.shelf-advanced-filters > summary::-webkit-details-marker,
.shelf-sort-menu > summary::-webkit-details-marker { display: none; }
.shelf-advanced-filters > summary::after { content: ' ▾'; }
.shelf-advanced-filters[open] > summary::after { content: ' ▴'; }
.shelf-sort-menu { position: relative; max-width: 100%; }
.shelf-sort-menu > summary { white-space: normal; }
.shelf-sort-menu > summary::after { content: ' ▾'; }
.shelf-sort-options { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 10; width: max-content; max-width: min(22rem, calc(100vw - 2rem)); padding: .35rem; border: 1px solid #d7d5cc; border-radius: .6rem; background: var(--shelf-paper); }
.shelf-sort-option { display: block; width: 100%; padding: .45rem .65rem; border: 0; border-radius: .3rem; background: transparent; text-align: left; color: inherit; }
.shelf-sort-option:hover, .shelf-sort-option:focus-visible { background: #eee6d4; }
.shelf-sort-option--selected { font-weight: 700; background: #eee6d4; }

.shelf-digital-detail-cover { width: 120px; max-height: 180px; object-fit: contain; border-radius: .3rem; flex-shrink: 0; }
.shelf-digital-editor-cover { width: 100px; max-height: 150px; object-fit: contain; border-radius: .3rem; }
.shelf-digital-version-cover { width: 40px; max-height: 60px; object-fit: contain; border-radius: .2rem; }
@media (max-width: 575.98px) { .shelf-digital-detail-cover { width: 78px; max-height: 117px; } }

.shelf-digital-heading { min-width: 0; flex: 1; }
.shelf-digital-text { min-width: 0; overflow-wrap: anywhere; }

/* Account navigation and responsive community/household overview */
.shelf-account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.shelf-account-content { min-width: 0; }
.shelf-account-sidebar { background: #fff; border: 1px solid #d9dedd; border-radius: .75rem; padding: 1rem .65rem; box-shadow: 0 2px 8px #173e4008; }
.shelf-account-sidebar-heading { color: var(--bs-secondary-color); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .75rem; padding-inline: .75rem; }
.shelf-account-sidebar nav { display: flex; flex-direction: column; gap: .35rem; }
.shelf-account-sidebar a, .shelf-account-selector a { display: flex; align-items: center; gap: .75rem; min-height: 48px; border-radius: .5rem; padding: .75rem; text-decoration: none; color: #29494b; line-height: 1.4; }
.shelf-account-sidebar .shelf-icon, .shelf-account-selector .shelf-icon { flex: none; }
.shelf-account-sidebar a:hover, .shelf-account-selector a:hover { background: #f0f3f1; }
.shelf-account-sidebar a[aria-current="page"], .shelf-account-selector a[aria-current="page"] { background: #e9efeb; color: var(--shelf-teal); font-weight: 650; box-shadow: inset 3px 0 0 var(--shelf-ochre); }
.shelf-account-selector { display: none; }
.shelf-account-page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.shelf-account-page-header > div { flex: 1 1 18rem; min-width: 0; }
.shelf-account-invite { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; margin-left: auto; }
.shelf-account-invite .shelf-icon { flex: none; }
@media (max-width: 767.98px) {
  .shelf-account-layout { display: block; }
  .shelf-account-sidebar { display: none; }
  .shelf-account-selector { display: block; background: #fff; border: 1px solid #d9dedd; border-radius: .65rem; padding: .35rem; margin-bottom: 1.5rem; }
  .shelf-account-selector summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .65rem; min-height: 44px; cursor: pointer; list-style: none; color: var(--shelf-teal); font-weight: 600; }
  .shelf-account-selector summary::-webkit-details-marker { display: none; }
  .shelf-account-selector[open] summary { border-bottom: 1px solid #d9dedd; margin-bottom: .35rem; }
  .shelf-account-invite { margin-left: 0; }
}


/* Transaction links highlight their destination on either side of a loan. */
[id]:target { outline: 3px solid var(--shelf-gold, #eed270); outline-offset: 3px; }


/* Public navigation remains visible on small screens without a menu script. */
.shelf-public-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.shelf-public-nav a { color: var(--shelf-paper); font-size: .9rem; text-decoration: none; padding-block: .5rem; }
.shelf-public-nav a:hover, .shelf-public-nav a[aria-current] { text-decoration: underline; }
.shelf-public-nav .shelf-public-signin { border: 1px solid #ffffff70; border-radius: .4rem; padding: .5rem .85rem; }
@media (max-width: 767px) {
  body:not(.shelf-signed-in) .shelf-header { flex-wrap: wrap; }
  .shelf-public-nav { width: 100%; justify-content: space-between; gap: .5rem; }
  .shelf-public-nav a { font-size: .85rem; }
}

.shelf-community-welcome {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border: 1px solid var(--shelf-border, #d8d4c7);
  border-radius: 1rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--shelf-paper, #fffdf6);
  color: inherit;
}
.shelf-community-welcome::backdrop { background: rgb(0 0 0 / 45%); }
.shelf-community-welcome li { margin-bottom: .75rem; }

.shelf-lending-action-form { width: 100%; max-width: 28rem; }
.shelf-loan-options { min-width: 0; }
.shelf-loan-options summary { color: var(--shelf-ink, #173e40); cursor: pointer; font-size: .9rem; }
.shelf-loan-options input, .shelf-loan-options select { width: 100%; min-width: 0; max-width: 100%; }

/* Section discovery complements the primary resource list. */
.shelf-section-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,16rem),1fr)); gap:.75rem; }
.shelf-section-card { display:flex; gap:.75rem; padding:1rem; color:var(--shelf-teal); border:1px solid var(--shelf-line, #ddd); border-radius:.75rem; text-decoration:none; min-width:0; background:var(--shelf-paper); }
.shelf-section-card:hover, .shelf-section-card:focus-visible, .shelf-section-card--selected { border-color:var(--shelf-ochre); background:#fff8e6; }
.shelf-section-card:focus-visible { outline:2px solid var(--shelf-ochre); outline-offset:2px; }
.shelf-section-copy { display:flex; flex-direction:column; gap:.25rem; overflow-wrap:anywhere; min-width:0; }
.shelf-section-icon { flex-shrink:0; color:#936d23; }
.shelf-section-browser > summary { cursor:pointer; }
.shelf-listing-controls .form-select { min-width:0; width:min(100%,20rem); }

.shelf-tag-pill { display:inline-flex; align-items:center; gap:.25rem; max-width:100%; padding:.2rem .65rem; border:1px solid #d5dcd9; border-radius:999px; background:#edf2ee; color:var(--shelf-teal); font-size:.8rem; font-weight:600; line-height:1.5; text-decoration:none; overflow-wrap:anywhere; }
a.shelf-tag-pill:hover, button.shelf-tag-pill:hover { background:#dfe9e3; color:var(--shelf-teal); }
.shelf-tag-editor { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; cursor:text; }
.shelf-tag-editor:focus-within { border-color:#70999a; box-shadow:0 0 0 .2rem #173e401a; }
.shelf-tag-pills { display:contents; }
.shelf-tag-entry { flex:1 1 9rem; min-width:0; width:9rem; padding:.25rem 0; border:0; outline:0; background:transparent; color:inherit; }
.shelf-tag-remove { flex-shrink:0; border:0; border-radius:50%; padding:0; width:1.75rem; height:1.75rem; background:transparent; color:inherit; font-size:1.2rem; line-height:1; }
.shelf-tag-remove:hover, .shelf-tag-remove:focus-visible { background:#cadbd0; }
.shelf-tag-pill:focus-visible, .shelf-tag-remove:focus-visible { outline:2px solid var(--shelf-teal); outline-offset:2px; }

.shelf-tag-filter { cursor:pointer; }
.shelf-tag-filter:has(:checked) { background:#d7e6dd; border-color:var(--shelf-teal); }
