/* v1.16.3 — popular-first books and full single-cover thumbnails.
   Intentional scope: ranked books and catalog tabs only. No hero or category deck changes. */
body.syh-v1163-home #syh-app.syh-home-v1163 .syh-library-section .syh-library-filters {
  display:grid!important;
  grid-template-columns:minmax(0,1.7fr) repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:780px!important;
  gap:clamp(6px,.9vw,12px)!important;
  margin-block:clamp(12px,1.3vw,18px)!important;
  overflow:visible!important;
}
body.syh-v1163-home #syh-app.syh-home-v1163 .syh-library-section .syh-library-filters > button {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  height:auto!important;
  min-height:44px!important;
  padding:10px 12px!important;
  text-align:center!important;
  white-space:normal!important;
  line-height:1.3!important;
  overflow-wrap:break-word!important;
  border-radius:12px!important;
  box-sizing:border-box!important;
}
/* Legacy mobile CSS makes ranked cards a 68px/1fr row. Reset the card layout,
   otherwise a full-height cover is squeezed into a 68px strip. */
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card:not([hidden]) {
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  grid-template-columns:none!important;
  gap:0!important;
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  overflow:hidden!important;
}
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-library-copy {
  width:100%!important;
  flex:1 0 auto!important;
  min-width:0!important;
  min-height:0!important;
  padding:14px 16px 16px!important;
  box-sizing:border-box!important;
}
/* The actual book cover, not a stretched landscape crop or a blurred duplicate. */
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover {
  position:relative!important;
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:clamp(276px,25vw,342px)!important;
  min-height:0!important;
  padding:8px!important;
  margin:0!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#f8fcff 0%,#eef5fa 100%)!important;
  border:0!important;
}
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover::before,
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover::after {
  content:none!important;
  display:none!important;
}
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover > img.syh-book-cover-ghost {
  display:none!important;
}
body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover > img.syh-book-cover-primary {
  position:relative!important;
  inset:auto!important;
  display:block!important;
  flex:0 1 auto!important;
  width:auto!important;
  height:100%!important;
  max-width:calc(100% - 4px)!important;
  max-height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  object-fit:contain!important;
  object-position:center center!important;
  border:0!important;
  border-radius:3px!important;
  background:transparent!important;
  box-shadow:0 12px 24px rgba(20,56,82,.14)!important;
  filter:none!important;
}
@media (hover:hover) and (pointer:fine) {
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card:hover .syh-book-cover > img.syh-book-cover-primary,
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-book-cover:focus-visible > img.syh-book-cover-primary {
    transform:scale(1.035)!important;
    transition:transform .22s ease!important;
  }
}
@media (max-width:1024px) {
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover {
    height:clamp(270px,37vw,350px)!important;
    padding:6px!important;
  }
}
@media (max-width:720px) {
  body.syh-v1163-home #syh-app.syh-home-v1163 .syh-library-section .syh-library-filters {
    grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,.88fr))!important;
    gap:6px!important;
    max-width:100%!important;
    padding:0!important;
  }
  body.syh-v1163-home #syh-app.syh-home-v1163 .syh-library-section .syh-library-filters > button {
    min-height:48px!important;
    padding:8px 5px!important;
    font-size:clamp(11px,3.5vw,14px)!important;
  }
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover {
    height:clamp(294px,94vw,404px)!important;
    padding:6px 4px!important;
  }
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-library-card .syh-book-cover > img.syh-book-cover-primary {
    max-width:calc(100% - 8px)!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.syh-v1163-home #syh-app.syh-home-v1163.syh-app .syh-library-section .syh-book-cover > img.syh-book-cover-primary {
    transition:none!important;
  }
}
