/* The header and shelf share their outer edges and action columns. */
body[data-view=home] {
  --shelf-width: 1080px;
  --shelf-gutter: 30px;
  --shelf-action-columns: 48px 68px;
  --shelf-action-gap: 12px;
}
body[data-view=home] .topbar {
  padding-inline: max(var(--shelf-gutter), calc((100% - var(--shelf-width)) / 2 + var(--shelf-gutter)));
}
.library-home {
  max-width: var(--shelf-width);
  padding-inline: var(--shelf-gutter);
  overflow: clip;
}
body[data-view=home] .top-nav,
.library-home .shelf-actions {
  display: grid;
  grid-template-columns: var(--shelf-action-columns);
  align-items: center;
  gap: var(--shelf-action-gap);
}
body[data-view=home] .top-nav {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}
.library-home .shelf-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px}
.library-home .shelf-heading h2,
body[data-view=home] .top-nav .home-link,
.library-home #library-count {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}
body[data-view=home] .top-nav .home-link,
.library-home #library-count {
  font-size: 12px;
  font-weight: 500;
}
body[data-view=home] .top-nav #account-open,
.library-home .shelf-actions #commerce-open {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 5px 8px;
  font: 500 12px/1.4 var(--interface-font, var(--sans));
}
/* Compensate for the two typefaces' visible edges and centers. */
body[data-view=home] .brand [data-brand-name] {
  position: relative;
  inset-inline-start: -1px;
}
body[data-view=home] .top-nav #account-open,
.library-home .shelf-actions #commerce-open { padding-block: 5px; }
@media (min-width:801px) {
  .library-home .library-heading .brand-tag {
    position: relative;
    inset-inline-start: -1px;
  }
}
@media (max-width:800px) {
  body[data-view=home] { --shelf-gutter: 23px; }
}
#library-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch;gap:25px}
.library-home .library-book{--library-cover:112px;--library-title-lines:2;display:grid;grid-template-columns:var(--library-cover) minmax(0,1fr);grid-template-rows:auto;align-content:start;align-items:start;gap:0 22px;height:100%;min-height:0;padding:24px;border-radius:18px}
.library-home .library-book-art{display:block;grid-column:1;grid-row:1;align-self:start;position:relative;z-index:1;width:var(--library-cover);height:calc(var(--library-cover) * 4 / 3);aspect-ratio:3/4;padding-inline:clamp(4px,.7vw,8px);border:0;border-radius:0;background:transparent;box-shadow:none}
.library-home .library-book-cover{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;object-position:center top;box-shadow:none}
.library-home .library-book-copy{grid-column:2;grid-row:1;display:grid;grid-template-rows:repeat(5,auto);align-content:start;row-gap:6px;padding:0;min-width:0}
.library-home .library-book-copy>*{margin:0;min-width:0;align-self:start;overflow-wrap:anywhere}
.library-home .library-book-title{min-height:calc(1.2em * var(--library-title-lines));font-size:29px;line-height:1.2;font-weight:500;letter-spacing:-.5px;white-space:normal}
.library-home .library-book-subtitle{min-height:1.5em;font-size:13px;line-height:1.5}
.library-home .library-author{min-height:1.6em;font-size:13px;line-height:1.6}
.library-home .library-lock{min-height:1.6em;font-size:12px;line-height:1.6}
.library-home .library-location{min-height:1.6em;font-size:13px;line-height:1.6}
.library-home .library-meta{min-height:1.6em;font-size:11px;line-height:1.6}

@media(min-width:860px) and (max-width:999px){
  .library-home .library-book{--library-title-lines:3}
  .library-home .library-book-title{font-size:27px}
}
@media(max-width:859px){
  #library-list{grid-template-columns:minmax(0,1fr)}
  .library-home .library-book{--library-cover:87px;gap:0 20px;padding:23px 21px}
  .library-home .library-book-title{font-size:27px}
  .library-home .library-author{font-size:12px}
  .library-home .library-meta{font-size:10px}
}
@media(max-width:620px){
  .library-home .library-book-title{font-size:22px}
}
@media(max-width:370px){
  .library-home .shelf-heading{gap:10px}
  .library-home .library-book{--library-cover:72px;--library-title-lines:3;column-gap:14px;padding:21px 16px}
  .library-home .library-book-title{font-size:21px}
  .library-home .library-book-subtitle{font-size:12px}
}
