/* The article theme also styles controls inside posts. Scope the shelf's
   component styles to its shortcode and keep the existing shelf renderer. */
body.wn-librarian-journey-guide #page #content #post-5670577 #bookshelf-demo.wn-shelf {
  --shelf-ink: #243b53;
  --shelf-muted: #5d5261;
  --shelf-brand: #92278f;
  --shelf-line: #dfd5df;
  --shelf-gutter: clamp(1rem, 3vw, 2rem);
  --shelf-tint: linear-gradient(100deg, #f8f4f5, #f5eff5);
  container-type: inline-size;
  box-sizing: border-box;
  padding: 0 !important;
  border: 1px solid var(--shelf-line) !important;
  border-radius: 15px !important;
  background: linear-gradient(105deg, #fff 0%, #fdfbf8 55%, #f6eff6 100%) !important;
  box-shadow: 0 2px 3px rgb(57 38 59 / 3%), 0 10px 24px -17px rgb(68 39 65 / 26%) !important;
  color: var(--shelf-ink);
  font-family: "Times New Roman", Times, serif;

  & .wn-shelf-main { padding: clamp(1rem, 2.6vw, 1.65rem) var(--shelf-gutter) 1rem; }
  & .wn-shelf-head, & .bookshelf-reader .section-title {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem .85rem;
    margin: 0 0 .8rem !important;
  }
  & .wn-shelf-head h3 {
    display: flex;
    align-items: center;
    gap: .65rem !important;
    min-height: 32px;
    margin: 0 !important;
    padding: 0 !important;
    font: normal clamp(1.4rem, 3vw, 1.7rem)/1.15 "Times New Roman", Times, serif !important;
    letter-spacing: -.018em;
    color: var(--shelf-ink) !important;
  }
  & .wn-shelf-mark {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #f0e3ef;
  }
  & .wn-shelf-mark img { display: block; width: 24px; height: 24px; }
  & #bookshelf-count {
    min-width: 1.7em;
    padding: .13em .38em !important;
    color: #663063 !important;
    background: #eee3ed !important;
    font: normal .83rem/1.35 "Times New Roman", Times, serif !important;
    text-align: center;
  }
  &:has(#bookshelf-empty:not([hidden])) .wn-shelf-more { display: none !important; }

  & .bookshelf-search {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(8.8rem,.49fr) auto;
    align-items: end;
    gap: .65rem;
    margin: 0 !important;
    padding: 0 !important;
  }
  & .bookshelf-search .field {
    display: grid;
    gap: .26rem;
    min-width: 0;
    margin: 0 !important;
    color: var(--shelf-ink) !important;
    font: normal .97rem/1.3 "Times New Roman", Times, serif !important;
  }
  & :is(#bookshelf-query,#bookshelf-field) {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    margin: 0 !important;
    padding: .55rem .8rem !important;
    color: var(--shelf-ink) !important;
    background-color: #f6f0f5 !important;
    border: 1px solid #a999ac !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 2px rgb(64 43 67 / 5%) !important;
    font: normal 1.06rem/1.35 "Times New Roman", Times, serif !important;
  }
  & #bookshelf-query { background: linear-gradient(100deg, #f2edf3, #f8f5f8) !important; }
  & #bookshelf-query::placeholder { opacity: 1; color: #685b6b !important; }
  & #bookshelf-field { appearance: auto; background-image: none !important; }
  & .button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    width: auto !important;
    margin: 0 !important;
    padding: .56rem .9rem !important;
    border: 1px solid #82247f !important;
    border-radius: 7px !important;
    background: var(--shelf-brand) !important;
    box-shadow: 0 1px 2px rgb(68 24 65 / 12%) !important;
    color: #fff !important;
    font: normal 1.06rem/1.25 "Times New Roman", Times, serif !important;
    text-decoration: none !important;
  }
  & .button.primary:hover { background: #772077 !important; }
  & .bookshelf-search .wn-icon-button { width: 46px !important; height: 46px; padding: .6rem !important; }
  & .button.quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: auto !important;
    margin: 0 !important;
    padding: .25rem .15rem !important;
    color: #71316e !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    font: normal .98rem/1.3 "Times New Roman", Times, serif !important;
    text-decoration: underline !important;
    text-decoration-color: #b99db7 !important;
    text-underline-offset: .21em;
  }
  & .button.quiet:hover { color: #581854 !important; text-decoration-color: currentColor !important; }
  & .wn-shelf-band:not([hidden]) {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: .3rem 1.15rem;
    padding: .72rem var(--shelf-gutter) !important;
    margin: 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--shelf-line) !important;
    border-radius: 0 0 14px 14px;
    background: var(--shelf-tint) !important;
  }
  & .wn-shelf-band .wn-shelf-add span { font: normal 1.22rem/1 "Times New Roman", Times, serif; }
  & .wn-shelf-results { padding-inline: var(--shelf-gutter); }
  & :is(#bookshelf:empty,#bookshelf-search-status:empty,[hidden]) { display: none !important; }
  & #bookshelf-search-status {
    margin: 0 0 .7rem !important;
    padding: 0 !important;
    color: var(--shelf-muted) !important;
    font: normal .95rem/1.42 "Times New Roman", Times, serif !important;
  }
  & #bookshelf { gap: .9rem; padding: .15rem .3rem 1rem 0; }
  & .shelf-item { padding-bottom: .5rem; border-bottom-width: 3px; border-color: #d7c9d4 !important; }
  & .shelf-book {
    min-height: 11.5rem;
    border-radius: 2px 7px 7px 2px;
    background: linear-gradient(108deg,#6a2c66,#83397c) !important;
    border-color: #693262 !important;
  }
  & .shelf-book.book-colour-1 { background: linear-gradient(108deg,#355c5a,#486d65) !important; border-color: #355c5a !important; }
  & .shelf-book.book-colour-2 { background: linear-gradient(108deg,#5d4950,#755e59) !important; border-color: #634f4e !important; }
  & .shelf-book.book-colour-3 { background: linear-gradient(108deg,#58405a,#775772) !important; border-color: #58405a !important; }
  & .shelf-book:hover { filter: brightness(1.09); }
  & .book-cover { box-sizing: border-box; min-height: 11.5rem; gap: .4rem; padding: 1rem .8rem .8rem 1.1rem; }
  & .book-title { line-height: 1.2; }
  & .book-match-text, & .book-match-label { margin: .45rem 0 0 !important; font-size: .95rem !important; line-height: 1.4 !important; }
  & .book-match-label { color: #71316e !important; }

  & #bookshelf-reader {
    box-sizing: border-box;
    min-width: 0;
    margin: .2rem 0 1rem !important;
    padding: clamp(.85rem,2vw,1.3rem) !important;
    border: 1px solid var(--shelf-line) !important;
    border-radius: 10px;
    background: #fffdfe !important;
    color: var(--shelf-ink) !important;
    overflow-wrap: anywhere;
    scroll-margin-top: 6rem;
  }
  & .bookshelf-reader .section-title h3 {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0 !important;
    font: normal clamp(1.24rem,2.5vw,1.5rem)/1.25 "Times New Roman", Times, serif !important;
  }
  & .bookshelf-reader .row { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem; margin: .55rem 0 .8rem !important; }
  & .bookshelf-reader .source-credit { margin: .35rem 0 !important; color: var(--shelf-muted) !important; font-size: .95rem !important; }
  & .bookshelf-reader .source-text { max-width: 70ch; }
  & .bookshelf-reader .source-text p { margin: .65rem 0 !important; line-height: 1.6 !important; }
  & :is(a,button,input,select):focus-visible { outline: 2px solid #772077 !important; outline-offset: 3px !important; }
}
@container (max-width: 33rem) {
  body.wn-librarian-journey-guide #page #content #post-5670577 #bookshelf-demo.wn-shelf .bookshelf-search {
    grid-template-columns: minmax(0,1fr) auto;
    gap: .55rem;
  }
  body.wn-librarian-journey-guide #page #content #post-5670577 #bookshelf-demo.wn-shelf .wn-shelf-query { grid-column: 1 / -1; }
}
@container (max-width: 22rem) {
  body.wn-librarian-journey-guide #page #content #post-5670577 #bookshelf-demo.wn-shelf .wn-shelf-head { gap: .1rem .5rem; }
  body.wn-librarian-journey-guide #page #content #post-5670577 #bookshelf-demo.wn-shelf .wn-shelf-band { gap: .15rem .8rem; }
}
@media (forced-colors: active) {
  #bookshelf-demo.wn-shelf :is(.button.primary,.shelf-book) { border: 1px solid ButtonText !important; }
}
