/* Published editions on the bookshelf */
#books .shelf-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  gap: 0;
  border: 1px solid #dae0e5;
  border-radius: 16px;
  background: #fff;
  color: #203455;
}
.book-visual.shelf-cover {
  display: block;
  padding: 0;
  background: transparent;
  text-decoration: none;
}
.book-visual .bookcover.shelf-jacket {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-items: center;
  padding: 8px 7px 8px 12px;
  box-sizing: border-box;
}
.shelf-cover img {
  display: block;
  height: 100%;
  width: 100%;
  min-height: 0;
  object-fit: contain;
}
.shelf-cover [hidden] { display: none; }
.shelf-placeholder { text-align: center; color: #23485a; font-weight: 750; }
.shelf-copy { padding: 14px 3px 12px; min-width: 0; }
.shelf-meta { margin: 0 0 5px; font-size: .78rem; line-height: 1.35; font-weight: 650; color: #4e6464; }
#books .shelf-copy h3 { margin: 0; min-height: 0; font-size: 1.16rem; line-height: 1.28; }
.shelf-translation { display: block; font-size: .85em; }
.shelf-description { margin: 6px 0 0; font-size: .94rem; line-height: 1.45; color: #536071; overflow-wrap: anywhere; }
.shelf-footer { margin-top: auto; }
.shelf-footer .shelf-practice-note { margin:6px 0 0; font-size:.8rem; text-align:center; color:#51566a; }
.shelf-offers { border-top: 1px solid #e1e6e8; padding: 9px 3px; }
.shelf-price { display: grid; align-content: start; gap: 1px; line-height: 1.25; }
.shelf-price > span { color: #54616a; font-size: .8rem; }
.shelf-price strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.shelf-delivery summary { display: grid; grid-template-columns: auto 1fr; gap: 12px; list-style: none; cursor: pointer; }
.shelf-delivery summary::-webkit-details-marker { display:none; }
.shelf-delivery summary .shelf-price + .shelf-price { padding-left: 12px; border-left: 1px solid #dae0e0; }
.shelf-delivery summary .shelf-price + .shelf-price > span { text-decoration: underline; text-underline-offset: 3px; }
.shelf-chevron { display: inline-block; width: .4rem; height: .4rem; vertical-align: .17em; margin-left: .15rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.shelf-delivery[open] .shelf-chevron { transform: rotate(225deg); vertical-align: 0; }
.shelf-terms { padding: 12px; background: #f3f6f4; border-radius: 6px; margin-top: 8px; font-size: .9rem; line-height: 1.5; }
.shelf-terms dl { margin: 6px 0 0; }
.shelf-terms dt { font-weight: 700; }
.shelf-terms dd { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 5px; }
.shelf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
a.shelf-read { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; padding: 7px 10px; border-radius: 8px; background: #22385c; color: #fff; font: inherit; font-size: .95rem; font-weight: 700; text-align: center; text-decoration: none; }
a.shelf-read:hover { background: #314e79; }
.shelf-card :is(a,summary):focus-visible { outline: 3px solid #167783; outline-offset: 3px; }
@media (max-width: 600px) {
  body:not(.tv-mode) #books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.tv-mode) #books .shelf-card { grid-column: 1/-1; display:grid; grid-template-columns: clamp(82px, 25vw, 116px) minmax(0,1fr); gap: 10px 14px; padding:12px; align-items:start; }
  body:not(.tv-mode) .shelf-cover { height:auto; aspect-ratio: 3/4; grid-row:1/3; }
  body:not(.tv-mode) .shelf-jacket { padding:3px 3px 3px 6px; }
  body:not(.tv-mode) .shelf-copy { padding: 1px 0 0; }
  body:not(.tv-mode) .shelf-footer { grid-column:2; width:100%; margin:0; }
  body:not(.tv-mode) .shelf-offers { padding:7px 0; }
  body:not(.tv-mode) .shelf-delivery summary { gap:7px; }
  body:not(.tv-mode) .shelf-delivery summary .shelf-price + .shelf-price { padding-left:7px; }
}
body.tv-mode #books .shelf-copy h3 { font-size:clamp(1.5rem,2vw,2.5rem); }
body.tv-mode .shelf-card :is(.shelf-meta,.shelf-description,.shelf-price > span,.shelf-read,.shelf-price strong) { font-size:clamp(1.1rem,1.4vw,1.8rem); }
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-paused) .shelf-cover:focus-visible .shelf-jacket { transform:rotateY(-9deg) rotateZ(-2deg); }
}
body.motion-paused main .shelf-card:hover, body.motion-paused main .shelf-card .shelf-jacket { transform:none; }
@media (prefers-reduced-motion: reduce) {
  main .shelf-card:hover, main .shelf-card:hover .shelf-jacket { transform:none; }
}
