/* Review corrections: artwork follows layout, while page waves remain independent. */
.is-home{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 484' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1024V190C920 112 806 70 694 82C571 95 558 181 438 188C317 195 297 96 190 82C120 73 55 82 0 96Z' fill='%23dceefa'/%3E%3C/svg%3E")!important;
  background-size:100% 484px!important;
}
.site-header::before{display:none}
.catalog-card>div:first-child{border-radius:0;clip-path:none;overflow:visible}
.book-detail .detail-art{background:transparent;clip-path:none}
.detail-section .quote-row .avatar{display:none}
.book-action .primary+p{margin-top:24px}
.homepage-v3 .feature-rec:before{display:none!important}
.page-intro.recommendations-head{max-width:none;width:100%;display:flex;gap:32px;justify-content:space-between;align-items:flex-end}
.page-intro.recommendations-head::after{display:none}
.recommendations-head>div{min-width:0}
.recommendations-head>.primary{flex:0 0 auto;margin-left:auto;white-space:nowrap}
.recommend-card{grid-template-columns:minmax(200px,.85fr) minmax(240px,1.4fr) minmax(300px,1fr);gap:32px}
.recommend-person{grid-template-columns:58px 1fr;gap:18px}
.recommend-person>span{font-size:12px;line-height:1.5}
.recommend-person strong{display:block;font-size:22px;line-height:1.25;letter-spacing:0;margin-top:8px}
.recommend-person>span>br{display:none}
.recommend-card blockquote{margin:0;font-size:30px}
.recommend-book{display:grid;grid-template-columns:120px minmax(0,1fr);gap:22px;align-items:center;padding-left:24px;background:none}
.cover-recommend{width:120px;height:180px;container-type:inline-size;border-radius:0;clip-path:none}
.recommend-book h2{font-size:24px;line-height:1.1}
.recommend-book p{font-size:14px;margin:12px 0 20px}
.recommend-book a{display:inline-block;font-size:14px}
@media(max-width:1100px){
 .recommend-card{grid-template-columns:minmax(170px,.8fr) minmax(200px,1fr) minmax(250px,1fr);gap:22px}
 .recommend-person{grid-template-columns:42px 1fr;gap:12px}
 .recommend-person>b{font-size:48px}
 .recommend-person strong{font-size:20px}
 .recommend-book{grid-template-columns:100px minmax(0,1fr);gap:16px;padding-left:16px}
 .cover-recommend{width:100px;height:150px}
 .recommend-book h2{font-size:21px}
 .recommend-card blockquote{font-size:26px}
}
@media(max-width:760px){
 .page-intro.recommendations-head{flex-wrap:wrap;gap:20px}
 .recommendations-head>.primary{margin-top:0}
 .recommend-card{grid-template-columns:1fr;gap:24px}
 .recommend-person{grid-template-columns:48px 1fr}
 .recommend-person strong{font-size:24px}
 .recommend-book{grid-template-columns:120px minmax(0,1fr);padding:22px 0 0}
 .cover-recommend{width:120px;height:180px}
}

.homepage-v3 .home-hero{
  height:auto;
  min-height:420px;
  align-items:end;
}
.homepage-v3 .hero-copy{align-self:start;padding-bottom:24px}
.homepage-v3 .hero-books{
  position:relative;
  grid-column:2;
  left:auto;right:auto;top:auto;
  width:calc(100% + 48px);
  height:auto;
  max-width:none;
  margin:0 -48px 24px 0;
  align-self:end;
}
.homepage-v3 .hero-photo{display:block;width:100%;height:auto;overflow:visible}
.homepage-v3 .story-card{
  left:65%;right:11%;top:34%;bottom:17%;
  padding:4% 2% 2% 2%;
  background:transparent;
  box-shadow:none;
}
.homepage-v3 .hero-photo img{
  position:static;
  display:block;
  width:100%;height:auto;max-width:100%;
  object-fit:contain;
  mix-blend-mode:normal;
  mask-image:none;
}
.homepage-v3 .feature-rec:before{
  border-radius:0;
  clip-path:none;
  background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 314' preserveAspectRatio='none'%3E%3Cpath d='M830 0C724 20 715 78 628 87C540 96 438 61 404 131C369 203 452 267 277 314H732C858 300 958 268 1024 210V0Z' fill='%23d5ebf9'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.homepage-v3 .quote-banner h2{font-size:38px;line-height:1.05;max-width:55%}
.homepage-v3 .quote-banner .shell{padding-top:28px}
.homepage-v3 .mini-books>a{display:block;border-bottom:0;padding:0;margin:0;min-width:0}
.homepage-v3 .mini-books .reference-fragment{width:100%}
@media(min-width:761px){
  .homepage-v3 .shelf-preview{grid-template-columns:180px minmax(0,1fr);gap:30px}
  .homepage-v3 .shelf-preview>div:first-child>a{display:inline-flex;align-items:center;white-space:nowrap}
  .homepage-v3 .mini-books{padding-left:12px}
}
@media(min-width:1200px){
  .homepage-v3 .home-hero{min-height:500px}
  .homepage-v3 .quote-banner h2{font-size:44px}
  .homepage-v3 .quote-banner .shell{padding-top:35px}
}
@media(min-width:1500px){.homepage-v3 .home-hero{min-height:535px}}
@media(min-width:761px) and (max-width:900px){
  .homepage-v3 .hero-books{width:calc(100% + 24px);margin-right:-24px}
  .homepage-v3 .quote-banner h2{font-size:33px}
}
@media(max-width:760px){
  .homepage-v3 .home-hero{min-height:0;align-items:stretch}
  .homepage-v3 .hero-copy{padding-bottom:0}
  .homepage-v3 .hero-books{width:calc(100% + 40px);margin:0 -20px 20px;align-self:auto}
  .homepage-v3 .story-card{font-size:clamp(10px,2.8vw,18px);padding:3% 1% 1% 1%}
  .homepage-v3 .feature-rec:before{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600' preserveAspectRatio='none'%3E%3Cpath d='M400 130C332 174 267 164 234 246C199 330 108 292 133 406C151 497 110 567 20 600H400Z' fill='%23d5ebf9'/%3E%3C/svg%3E");
  }
  .homepage-v3 .quote-banner h2{font-size:clamp(27px,7.4vw,38px);max-width:100%}
  .homepage-v3 .quote-banner .shell{padding-top:26px}
}

/* Final refinements from review comments. */
.account-grid aside .side-item{
  padding:18px 20px;
}
.detail-section .impression{
  padding:22px 20px;
}
.narrow > h1 + .lead{
  margin-top:24px;
}
.admin-main .metrics>div{
  padding:18px 16px 20px;
}
.admin-main .notification{
  padding:18px 16px 20px;
}
.admin-main .number-list p{
  padding:14px 16px 18px;
}
.admin-main .rank{
  padding:15px 16px 18px;
}
.admin-main .shelf-admin>div{
  padding:18px 16px 20px;
}
.admin-main .table-wrap th,
.admin-main .table-wrap td{
  padding:14px 16px 18px;
}
.admin-main .admin-card,
.admin-main .pending-book{
  padding:20px 18px 24px;
}
.prose + .how > h2{
  white-space:nowrap;
}
.prose + .how > h2 br{
  display:none;
}
.avatar{
  background-image:none;
  overflow:hidden;
}
.avatar img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border-radius:50%;
}
.profile .avatar img{
  position:relative;
  z-index:1;
}
@media(max-width:560px){
  .prose + .how > h2{
    white-space:normal;
  }
}
.homepage-v3 .feature-rec:before{
  display:none!important;
}

/* The Home recommendation is a compact preview; full text remains on the book page. */
.homepage-v3 .feature-rec .rec-copy,
.homepage-v3 .feature-rec .feature-art,
.homepage-v3 .feature-rec .project-note{min-width:0}
.homepage-v3 .feature-rec .recommend-by b,
.homepage-v3 .feature-rec .rec-copy blockquote{overflow-wrap:anywhere}
.homepage-v3 .feature-rec-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px}
.homepage-v3 .feature-rec-actions a{display:inline-flex;align-items:center;gap:12px;border-bottom:1px solid;padding-bottom:6px;font-size:14px}
.homepage-v3 .feature-rec-actions a span{font-size:22px;line-height:16px}
@media(max-width:760px){
  .is-home .homepage-v3 .feature-rec.shell{width:calc(100% - 40px)}
  .homepage-v3 .feature-rec{grid-template-columns:repeat(2,minmax(0,1fr))}
  .homepage-v3 .feature-rec .rec-copy blockquote{font-size:24px;line-height:1.24;margin:20px 0}
  .homepage-v3 .feature-rec-actions{align-items:flex-start;flex-direction:column;gap:14px}
  .homepage-v3 .feature-rec-actions a{font-size:15px}
  .homepage-v3 .feature-rec .feature-art>a{min-width:0}
  .homepage-v3 .feature-rec .cover-feature{width:100%;height:auto}
  .homepage-v3 .feature-rec .project-note strong,
  .homepage-v3 .feature-rec .project-note p,
  .homepage-v3 .feature-rec .project-note span{overflow-wrap:anywhere}
}

/* Task 4: local mobile fit corrections for shared navigation and named screens. */
@media(max-width:760px){
  body{overflow-x:visible}
  .site-header.shell,
  .is-home .site-header.shell{width:calc(100% - 32px)}
  .site-header{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    column-gap:14px;
    row-gap:14px;
  }
  .site-header>.brand{min-width:0}
  .site-header .header-tools{min-width:0;max-width:100%;justify-self:end;flex-wrap:wrap;justify-content:flex-end}
  .site-header nav{
    grid-column:1/-1;
    order:initial;
    width:100%;
    min-width:0;
    margin:0;
    display:flex;
    flex-wrap:wrap;
    gap:6px 20px;
    overflow:visible;
  }
  .site-header nav a,
  .site-header .admin-entry{white-space:normal;overflow-wrap:anywhere}

  .library-page,
  .library-page .page-intro,
  .library-page .catalog-search,
  .library-page .catalog-grid,
  .library-page .catalog-card{min-width:0;max-width:100%}
  .library-page .page-intro h1{font-size:clamp(2.75rem,14vw,3.2rem);overflow-wrap:anywhere}
  .library-page .page-intro p,
  .library-page .catalog-card h3,
  .library-page .catalog-card p,
  .library-page .catalog-card small,
  .library-page .book-status{overflow-wrap:anywhere}
  .library-page .catalog-search{width:100%;padding-inline:16px}
  .library-page .catalog-search input{min-width:0;width:100%}
  .library-page .catalog-search button{flex:0 0 auto}
  .library-page .library-filters{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    overflow:visible;
    padding-bottom:0;
  }
  .library-page .library-filters button{
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
    text-align:left;
  }
  .library-page .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-page .catalog-card>div:first-child{
    width:100%;
    height:auto;
    min-height:0;
    aspect-ratio:2/3;
    padding:8px;
  }
  .library-page .cover-catalog{width:100%;height:100%;max-width:none}

  .recommendation-form-page,
  .recommendation-form-page .form-card,
  .recommendation-form-page .form-card label{min-width:0;max-width:100%}
  .recommendation-form-page h1{font-size:clamp(2.55rem,13vw,3.2rem);overflow-wrap:anywhere}
  .recommendation-form-page .lead,
  .recommendation-form-page label,
  .recommendation-form-page label span{overflow-wrap:anywhere}
  .recommendation-form-page input,
  .recommendation-form-page select,
  .recommendation-form-page textarea,
  .recommendation-form-page .primary{width:100%;max-width:100%;min-width:0}
  .recommendation-form-page .checkbox{display:grid!important;grid-template-columns:20px minmax(0,1fr)}
  .recommendation-form-page .checkbox input{width:20px;height:20px;margin:0}
  .recommendation-form-page .primary{white-space:normal;text-align:center}

  .auth-page,
  .auth-story,
  .auth-panel,
  .auth-panel form,
  .auth-panel label,
  .confirm-card,
  .confirm-card form{min-width:0;max-width:100%}
  .auth-story,
  .auth-panel{width:100%;padding-inline:20px}
  .auth-story h1,
  .auth-panel h2,
  .confirm-card h1{overflow-wrap:anywhere}
  .auth-panel h2{font-size:clamp(2.35rem,12vw,3rem)}
  .auth-tabs{flex-wrap:wrap;gap:10px 24px;margin-bottom:32px}
  .auth-panel input,
  .auth-panel select,
  .auth-panel textarea,
  .confirm-card input,
  .confirm-card select,
  .confirm-card textarea{width:100%;max-width:100%;min-width:0}
  .auth-panel .remember-me{
    display:grid;
    grid-template-columns:20px minmax(0,1fr);
    align-items:center;
    gap:10px;
  }
  .auth-panel .remember-me input{width:20px;height:20px;margin:0}
  .auth-panel .remember-me span,
  .auth-panel .privacy-consent span,
  .confirm-card p{min-width:0;overflow-wrap:anywhere}
  .auth-panel .primary,
  .confirm-card .primary{max-width:100%;white-space:normal;text-align:center}
  .registration-avatar-selected{min-width:0}
  .registration-avatar-selected .secondary{max-width:100%;white-space:normal}

  .account-grid>section,
  .active-loan,
  .active-loan>div{min-width:0;max-width:100%}
  .active-loan{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:22px;
    padding:22px;
  }
  .active-loan .cover-account{
    width:min(160px,100%);
    height:auto;
    aspect-ratio:2/3;
    justify-self:start;
    flex:none;
  }
  .active-loan .uploaded-book-cover img{object-fit:contain}
  .active-loan h3,
  .active-loan p,
  .active-loan small,
  .active-loan strong,
  .active-loan a,
  .active-loan button{max-width:100%;overflow-wrap:anywhere}
  .active-loan a{width:fit-content}
  .active-loan button{white-space:normal;text-align:center}

  .site-footer .shell,
  .is-home .site-footer .shell{width:calc(100% - 32px)}
  .site-footer .footer-grid,
  .is-home .site-footer .footer-grid{min-width:0;gap:24px 18px}
  .site-footer .footer-grid>*,
  .site-footer .footer-bottom>*{min-width:0;overflow-wrap:anywhere}
  .site-footer .footer-bottom{flex-wrap:wrap;align-items:flex-start}
}

@media(max-width:430px){
  .site-header{
    grid-template-columns:minmax(0,1fr);
    align-items:start;
  }
  .site-header .header-tools{justify-self:stretch;justify-content:space-between}
  .site-header nav{grid-column:1;gap:4px 16px}
  .site-header .profile span:last-child{display:inline}
  .site-header .brand{font-size:1.55rem}
  .site-header .brand svg{width:36px;height:36px}

  .site-footer .footer-grid,
  .is-home .site-footer .footer-grid{grid-template-columns:minmax(0,1fr)}
  .is-home .site-footer .footer-grid>div:first-child,
  .is-home .site-footer .footer-grid>p:last-child{grid-column:1}
  .site-footer .footer-bottom,
  .is-home .site-footer .footer-bottom{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}

  .recommendation-form-page .kicker,
  .library-page .kicker{letter-spacing:.18em}
  .active-loan{padding:18px}
}

@media(max-width:800px) and (min-width:761px){
  .site-header{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    gap:12px;
  }
  .site-header .header-tools{min-width:0;max-width:100%;justify-self:stretch;justify-content:space-between;flex-wrap:wrap}
  .site-header nav{grid-column:1;width:100%;min-width:0;margin:0;display:flex;flex-wrap:wrap;overflow:visible}
  .site-header .profile{min-width:0;max-width:100%;white-space:normal}
  .site-header .profile span:last-child{display:inline;min-width:0;white-space:normal;overflow-wrap:anywhere}
  .library-page .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .library-page .catalog-card{min-width:0;max-width:100%}
  .library-page .catalog-card>div:first-child{width:100%;height:auto;min-height:0;aspect-ratio:2/3;padding:10px}
  .library-page .cover-catalog{width:100%;height:100%;max-width:none}
}

@media(max-width:340px){
  .library-page .catalog-grid{grid-template-columns:minmax(0,1fr)}
  .library-page .catalog-card>div:first-child{width:min(100%,220px)}
}

/* Published impressions use the author's current avatar from the shared avatar source. */
.book-impressions .published-impression{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:start;
  gap:14px;
}
.book-impressions .impression-author-avatar{
  display:inline-grid;
  width:44px;
  height:44px;
  place-items:center;
  background-color:#eef0eb;
}
.book-impressions .impression-author-avatar img{width:100%;height:100%;object-fit:contain}
.book-impressions .impression-author-avatar img[hidden]{display:none}
.book-impressions .impression-author-avatar.is-fallback{
  background:
    radial-gradient(circle at 50% 34%,#8a9699 0 15%,transparent 16%),
    radial-gradient(ellipse at 50% 83%,#8a9699 0 29%,transparent 30%),
    #eef0eb;
}
.book-impressions .impression-copy{min-width:0}
.book-impressions .impression-copy strong,
.book-impressions .impression-copy p{display:block;max-width:100%;overflow-wrap:anywhere}
@media(max-width:430px){
  .book-impressions .published-impression{grid-template-columns:40px minmax(0,1fr);gap:12px;padding-inline:0}
  .book-impressions .impression-author-avatar{width:40px;height:40px}
}
