/* Stable cover / two-line title / one-line author across every card. */
.grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.slot{display:flex;flex-direction:column;align-items:stretch;min-width:0}
.slot .filled{height:166px;flex:none}
.slot .title,.result .title,.featured-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;line-height:1.4;height:2.8em;min-height:2.8em;margin-bottom:0}
.slot .author,.result .author,.featured-author{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.65;height:1.65em;min-height:1.65em}
.slot .order{margin-top:auto;padding-top:5px;min-height:29px;align-items:center}
.slot .remove{display:grid;place-items:center;width:26px;height:26px;padding:0;line-height:1;appearance:none;right:0;top:0}
.slot .remove svg{display:block;width:12px;height:12px;pointer-events:none;flex:none}
.slot .cover-upload{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.result-card{height:100%}.result-card .result{display:flex;flex-direction:column;align-items:stretch}
.result .author{margin-top:3px}.result .title{flex:none}.result>img{flex:none}
.featured-section{padding:26px 38px 34px;background:#f2ecd9;border-top:1px solid #d8ceb4}
.featured-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.featured-eyebrow{font:600 10px/1.5 Arial,sans-serif;letter-spacing:.17em;color:#81755c;display:block;margin-bottom:5px}
.featured-label{font:600 10px/1.5 Arial,sans-serif;letter-spacing:.12em;border:1px solid #c4b591;padding:5px 8px;white-space:nowrap}
.featured-intro,.featured-note{font-size:12px;color:#78705e;margin:9px 0}
.featured-status{font-size:12px;line-height:1.7;min-height:2em;padding:8px 10px;border-left:3px solid #bda156;background:#e9dfc6;margin:14px 0 20px}
.featured-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
.featured-card{min-width:0;display:flex;flex-direction:column;align-items:stretch}
.featured-cover{height:170px;display:flex;align-items:center;justify-content:center;margin:0 0 7px}
.featured-cover img{max-width:100%;width:auto;height:100%;object-fit:contain;filter:drop-shadow(1px 3px 3px #17272422)}
.featured-cover .cover-empty{height:100%;width:100%}
.featured-title{font-size:12px;text-align:center;margin-top:7px;font-weight:600}
.featured-author{font-size:11px;text-align:center;color:#78705e;margin:4px 0 11px}
.featured-add{width:100%;font-size:11px;line-height:1.5;padding:9px 4px;border:1px solid #20394e;background:#20394e;color:#fffdf5;border-radius:2px;margin-top:auto;min-height:36px}
.featured-add:hover:not(:disabled){background:#355970}
.featured-add:disabled{opacity:1;background:#e5ddc9;color:#7c7461;border-color:#c9bea3;cursor:default}
.featured-add.is-added{background:#e1e8da;color:#40533f;border-color:#a8b69d}
.featured-note{font-size:10px;margin-top:18px}
/* A fixed hit area, an opaque page block, and one synchronized animation cycle. */
.hero-flip-layer{position:absolute;inset:0;z-index:2;pointer-events:none}
.hero-flip-book{position:absolute;display:block;perspective:650px;pointer-events:auto;isolation:isolate}
.hero-flip-cover,.hero-page-bed,.hero-page{position:absolute;inset:0;display:block;opacity:0;transform-origin:3% 50%;pointer-events:none;border-radius:2px}
.hero-flip-cover{width:100%;height:100%;z-index:5;backface-visibility:hidden;transform:rotateY(0deg)}
.hero-page-bed{background:linear-gradient(90deg,var(--book-spine,#20394e) 0 4%,#d9cfb8 4% 6%,#fdf9ed 7% 94%,#e1d7c1 98%);box-shadow:inset -1px 0 0 #afa184,inset 0 -3px 0 #d2c7ae;z-index:1}
.hero-page{inset:2% 3% 4% 6%;background:linear-gradient(90deg,#ded5c2,#fffdf4 12%,#faf5e9 92%,#e3dac8);border-right:1px solid #c6bca6;box-shadow:1px 2px 3px #17272418;z-index:4;backface-visibility:hidden;transform:rotateY(0deg)}
.hero-flip-book:nth-child(2),.hero-flip-book:nth-child(9){--book-spine:#d49a21}
.hero-flip-book:nth-child(3),.hero-flip-book:nth-child(5),.hero-flip-book:nth-child(7){--book-spine:#ded4bd}
.hero-flip-book:nth-child(4){--book-spine:#b95431}
.hero-flip-book.is-flipping{z-index:10}
.hero-flip-book.is-flipping .hero-page-bed{animation:book-bed-fixed 1.8s linear both}
.hero-flip-book.is-flipping .hero-flip-cover{animation:book-cover-fixed 1.8s ease-in-out both}
.hero-flip-book.is-flipping .hero-page{animation:book-page-fixed 1.8s ease-in-out both}
.hero-flip-book.is-flipping .page-one{--page-start:0deg;--page-end:-156deg;z-index:4}
.hero-flip-book.is-flipping .page-two{animation-name:book-page-second;z-index:3}
.hero-flip-book.is-flipping .page-three{animation-name:book-page-third;z-index:2}
@keyframes book-bed-fixed{0%,100%{opacity:0}1%,99%{opacity:1}}
@keyframes book-cover-fixed{0%,100%{opacity:1;transform:rotateY(0deg)}24%,74%{opacity:1;transform:rotateY(-100deg)}}
@keyframes book-page-fixed{0%,23%{opacity:0;transform:rotateY(0deg)}25%{opacity:1;transform:rotateY(-3deg)}48%{opacity:1;transform:rotateY(-156deg)}49%,100%{opacity:0;transform:rotateY(-156deg)}}
@keyframes book-page-second{0%,34%{opacity:0;transform:rotateY(0deg)}36%{opacity:1;transform:rotateY(-3deg)}59%{opacity:1;transform:rotateY(-156deg)}60%,100%{opacity:0;transform:rotateY(-156deg)}}
@keyframes book-page-third{0%,45%{opacity:0;transform:rotateY(0deg)}47%{opacity:1;transform:rotateY(-3deg)}70%{opacity:1;transform:rotateY(-156deg)}71%,100%{opacity:0;transform:rotateY(-156deg)}}
@media(max-width:800px){.slot .filled{height:134px}.featured-section{padding:24px 22px}.featured-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 15px}.featured-cover{height:155px}}
@media(max-width:650px){.hero-approved-books{grid-row:1}.hero.hero-approved .hero-copy{grid-row:1}.hero-flip-layer{position:relative;inset:auto;grid-column:2;grid-row:1;width:100%;aspect-ratio:430/535;align-self:center}.hero-flip-book{left:var(--mobile-left)!important;top:var(--mobile-top)!important;width:var(--mobile-width)!important;height:var(--mobile-height)!important}.featured-label{display:none}}
@media(max-width:380px){.featured-section{padding:22px 18px}.featured-grid{gap:20px 10px}.featured-cover{height:128px}.featured-add{font-size:10px}}
@media(prefers-reduced-motion:reduce),(hover:none){.hero-flip-layer{display:none}.hero-flip-book *{animation:none!important}}

/* Keep touch form controls large enough before focus to avoid input auto-zoom. */
@media(max-width:800px),(pointer:coarse){
 .search,.search-provider select,input[type="text"],input[type="search"],input:not([type]),textarea{font-size:16px;line-height:1.5}
}

/* Rakuten-only product discovery. */
.rakuten-buy{display:block;padding:9px 8px;background:#a52d24;color:#fff;text-align:center;text-decoration:none;border:1px solid #8f2720;border-radius:2px;font-size:12px;line-height:1.5}
.rakuten-buy:hover{background:#8d251f}.rakuten-buy:focus-visible{outline:3px solid #20394e;outline-offset:3px}
.featured-buy{margin-top:7px;font-size:10px;background:transparent;color:#97352d;border-color:#bd9f80}
.featured-buy:hover{background:#eadbc5}.popular-message{grid-column:1/-1;font-size:12px;color:#78705e;line-height:1.8;padding:16px 0}
.popular-recommend-cover{width:72px;height:106px;flex:none;display:flex;align-items:center;justify-content:center}
.popular-recommend-cover img{max-width:100%;max-height:100%;object-fit:contain}.popular-recommend-cover .cover-empty{height:106px;width:72px}
.recommend-links .rakuten-buy{width:100%}

.popular-credit{font-size:10px;text-align:right;margin-top:12px}.popular-credit a{color:#78705e}
