/* Storefront only; reader keeps its existing full-screen layout. */
body:has(.ebook-store) { background: #fafaf6 !important; }
body.public-catalog-route:has(.ebook-store) > .shell { max-width: none; width: 100%; margin: 0; padding: 0; background: #fafaf6 !important; }
.ebook-store { --ui-bg: #fafaf6; background: #fafaf6; --ui-primary: #087c73; --ui-primary-hover: #065e57; --ui-on-primary: #fff; --ui-text: #203631; --ui-text-muted: #61716a; --ui-border: #e0e6de; --ui-surface: #fff; --ui-field: #fff; color: #203631; }
.ebook-market-page.ebook-store { width: 100%; max-width: 1100px; padding: 0 32px 108px; }
.ebook-store *, .ebook-store *::before, .ebook-store *::after { box-sizing: border-box; }
.ebook-store h1, .ebook-store h2, .ebook-store h3 { text-transform: none; letter-spacing: -.035em; }
.ebook-store a { text-decoration: none; }
.ebook-store a:focus-visible, .ebook-store button:focus-visible { outline: 3px solid #bc9144; outline-offset: 4px; }
.ebook-store .ebook-store-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e2e7df; margin-bottom: 26px; }
.ebook-store-brand { display: inline-flex; align-items: center; gap: 12px; color: #183e37; font-size: 23px; letter-spacing: -.8px; font-weight: 700; }
.ebook-store-brand b { font-weight: 400; }
.ebook-store-brand svg { width: 35px; height: 35px; stroke: #087c73; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ebook-library-link { font-size: 13px; font-weight: 700; color: #215a4e; padding: 12px 16px; border: 1px solid #dce4dc; border-radius: 24px; background: #fff; white-space: nowrap; }
.ebook-library-link span { margin-left: 8px; color: #92743e; }
.ebook-store .ebook-search { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #dce4dc; border-radius: 14px; padding: 7px 8px 7px 18px; margin: 0; box-shadow: 0 3px 12px #20363103; }
.ebook-search svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #6f8278; stroke-width: 1.8; }
.ebook-store .ebook-search input { width: 100%; min-width: 0; min-height: 42px; border: none !important; background: transparent !important; box-shadow: none; padding: 6px 0; color: #203631; font: inherit; font-size: 14px; }
.ebook-search button { min-height: 42px; border: 0; border-radius: 9px; padding: 0 20px; background: #087c73; color: white; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ebook-topics { display: flex; gap: 9px; flex-wrap: wrap; margin: 16px 0 30px; }
.ebook-topics a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border-radius: 24px; border: 1px solid #e1e6df; color: #556a60; background: #fff; font-size: 12px; font-weight: 600; }
.ebook-topics a[aria-current] { background: #e1eee7; border-color: #ceded3; color: #235340; }
.ebook-shelf-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 20px; }
.ebook-store .ebook-eyebrow { margin: 0 0 8px; font-size: 10px; letter-spacing: 2px; font-weight: 700; color: #857247; line-height: 1.5; }
.ebook-shelf-heading h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(28px, 3.5vw, 38px); font-weight: 400; line-height: 1.2; margin: 0; color: #203631; }
.ebook-shelf-heading > span { color: #758177; font-size: 12px; white-space: nowrap; padding-bottom: 4px; }
.ebook-results-note { font-size: 13px; color: #62746b; }
.ebook-results-note a { margin-left: 12px; text-decoration: underline; color: #087c73; }
.ebook-store .ebook-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.ebook-store .ebook-card { align-items: stretch; display: flex; flex-direction: column; padding: 0; gap: 0; border: 1px solid #e1e6df; border-radius: 18px; overflow: hidden; box-shadow: none; background: #fff; }
.ebook-cover-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: radial-gradient(ellipse at 50% 35%, #f2f2e5, #e8eddf); padding: 32px 24px 20px; min-width: 0; }
.ebook-store .ebook-cover { width: 150px; max-width: 100%; display: block; aspect-ratio: 148/210; border-radius: 3px 9px 9px 3px; border: 0; box-shadow: 8px 12px 16px #253f3426, 1px 2px 3px #253f3426; transform: rotate(-3deg); transition: transform .2s ease; }
.ebook-store .ebook-cover-stage:hover .ebook-cover { transform: rotate(0); }
.ebook-cover-caption { font-size: 8px; font-weight: 600; letter-spacing: 2px; color: #6c775a; text-align: center; }
.ebook-store .ebook-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ebook-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; color: #727a51; }
.ebook-owned-badge { background: #e8f3eb; color: #286347; border-radius: 12px; padding: 4px 8px; }
.ebook-store .ebook-card h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 25px; line-height: 1.15; margin: 0; }
.ebook-store .ebook-card h2 a { color: #203631; }
.ebook-store .ebook-card p { display: block; margin: 0; color: #64726a; font-size: 13px; line-height: 1.7; overflow: visible; }
.ebook-store .ebook-format { color: #738177; font-size: 11px; line-height: 1.8; }
.ebook-store-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 2px; }
.ebook-store .ebook-store-price strong { font-size: 21px; font-weight: 700; color: #096e62; margin: 0; }
.ebook-store del { font-size: 12px; color: #79837c; }
.ebook-store .ebook-card-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 8px; align-items: stretch; }
.ebook-store .ebook-primary-button, .ebook-store .ebook-secondary-button { min-height: 46px; border-radius: 10px; font-size: 13px; font-weight: 700; gap: 16px; padding: 10px 18px; }
.ebook-store .ebook-primary-button:hover { background: #065e57; color: #fff; }
.ebook-store .ebook-text-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; color: #48665a; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.ebook-store .ebook-grid-single { grid-template-columns: 1fr; }
.ebook-store .ebook-grid-single .ebook-card { display: grid; grid-template-columns: .9fr 1.1fr; }
.ebook-grid-single .ebook-cover-stage { padding: 42px 24px 26px; gap: 30px; }
.ebook-store .ebook-grid-single .ebook-cover { width: 205px; }
.ebook-store .ebook-grid-single .ebook-card-body { padding: 36px 40px; gap: 16px; justify-content: center; }
.ebook-store .ebook-grid-single .ebook-card h2 { font-size: clamp(28px, 3.5vw, 39px); }
.ebook-store .ebook-grid-single .ebook-card-actions { max-width: 290px; margin-top: 0; }
.ebook-empty { grid-column: 1/-1; padding: 44px 24px; text-align: center; border: 1px dashed #cdd9cc; border-radius: 18px; background: #f2f5ee; }
.ebook-empty-icon { font-size: 40px; color: #7e9276; }
.ebook-empty h2 { font-family: Georgia, serif; font-weight: 400; font-size: 26px; }
.ebook-empty p { max-width: 440px; margin: 16px auto 24px; font-size: 14px; line-height: 1.7; }
.ebook-store .ebook-empty a { width: auto; }
.ebook-store-footer { border-top: 1px solid #e0e6de; margin-top: 42px; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: #7a847b; font-size: 11px; }
.ebook-store-footer > span { font-family: Georgia, serif; font-size: 19px; color: #446353; }
.ebook-store-footer p { margin: 0; }
.ebook-store-footer a { margin-left: auto; color: #557364; min-height: 36px; display: inline-flex; align-items: center; gap: 12px; }
.ebook-bottom-nav { grid-template-columns: repeat(3,minmax(0,1fr)) !important; background: #fffffff5 !important; border-top: 1px solid #e0e6de !important; backdrop-filter: blur(12px); }
.ebook-bottom-nav a.active { color: #087c73 !important; }
.ebook-back-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 18px; color: #66776c; font-size: 12px; }
.ebook-store .ebook-detail-hero { padding: 0; gap: 48px; background: transparent; border: 0; box-shadow: none; grid-template-columns: minmax(200px,.8fr) minmax(0,1.2fr); align-items: center; }
.ebook-store .ebook-detail-cover { padding: 32px 44px; aspect-ratio: auto; border: 0; border-radius: 18px; box-shadow: none; background: #e9eddf; }
.ebook-store .ebook-detail-cover img { aspect-ratio: 148/210; border-radius: 3px 7px 7px 3px; box-shadow: 7px 10px 20px #20363126; object-fit: contain; height: auto; }
.ebook-store .ebook-detail-copy h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(30px,4vw,47px); line-height: 1.12; }
.ebook-store .ebook-detail-copy > p { font-size: 14px; line-height: 1.8; }
.ebook-store .ebook-detail-copy .ebook-eyebrow { font-size: 10px; }
.ebook-store .ebook-detail-copy .ebook-format { font-size: 11px; }
.ebook-store .ebook-detail-copy .ebook-card-actions { max-width: 340px; }
.ebook-store .ebook-protection-note { font-size: 11px; line-height: 1.8; }
.ebook-store .ebook-section-grid { margin-top: 36px; }
.ebook-store .ebook-section-grid article, .ebook-store .ebook-preview-section, .ebook-store .ebook-chapters, .ebook-store .ebook-owned-panel { padding: 26px; border-radius: 16px; border-color: #e0e6de; }
.ebook-store .ebook-section-grid h2, .ebook-store .ebook-preview-section h2, .ebook-store .ebook-chapters h2, .ebook-store .ebook-owned-panel h2 { font-family: Georgia, serif; font-size: 25px; font-weight: 400; margin-bottom: 18px; }
.ebook-store .ebook-section-grid li, .ebook-store .ebook-chapters li { font-size: 13px; line-height: 1.8; padding: 5px 0 5px 4px; }
.ebook-store .ebook-tag-list span { font-size: 11px; font-weight: 500; background: #f0f4ed; color: #3f5c4c; border: 1px solid #dce5d7; padding: 9px 12px; }
.ebook-store .ebook-preview-section { scroll-margin-top: 24px; }
.ebook-store .ebook-section-head { align-items: center; flex-wrap: wrap; }
.ebook-store .ebook-section-head h2 { margin: 0; }
.ebook-store .ebook-section-head span { font-size: 11px; font-weight: 500; }
.ebook-preview-help { font-size: 12px; line-height: 1.6; color: #65766b; }
.ebook-store .ebook-preview-strip { gap: 16px; overflow: visible; }
.ebook-store .ebook-preview-strip figure { aspect-ratio: auto; border: 0; background: transparent; border-radius: 0; overflow: visible; }
.ebook-preview-strip a { display: block; aspect-ratio: 148/210; border: 1px solid #e0e6de; border-radius: 5px; overflow: hidden; }
.ebook-preview-strip figcaption { font-size: 10px; color: #607568; padding: 9px 0; }
.ebook-store .ebook-chapters ol { columns: 2; column-gap: 40px; }
.ebook-store .ebook-chapters li { break-inside: avoid; }
@media(max-width:760px) {
 .ebook-market-page.ebook-store { padding: 0 20px 98px; }
 .ebook-store .ebook-store-header { min-height: 78px; margin-bottom: 20px; }
 .ebook-store-brand { font-size: 20px; gap: 9px; }
 .ebook-store-brand svg { width: 30px; height: 30px; }
 .ebook-library-link { font-size: 11px; padding: 10px 12px; }
 .ebook-store .ebook-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
 .ebook-store .ebook-grid-single { grid-template-columns: 1fr; }
 .ebook-store .ebook-grid-single .ebook-card { display: flex; }
 .ebook-grid-single .ebook-cover-stage { padding: 30px 24px 20px; gap: 24px; }
 .ebook-store .ebook-grid-single .ebook-cover { width: 160px; }
 .ebook-store .ebook-grid-single .ebook-card-body { padding: 24px; gap: 12px; }
 .ebook-store .ebook-grid-single .ebook-card h2 { font-size: 29px; }
 .ebook-store .ebook-grid-single .ebook-card-actions { max-width: none; }
 .ebook-store .ebook-card-body { padding: 14px; gap: 10px; }
 .ebook-cover-stage { padding: 24px 16px 16px; gap: 18px; }
 .ebook-store .ebook-cover { width: 114px; }
 .ebook-cover-caption { font-size: 7px; letter-spacing: 1px; }
 .ebook-store .ebook-card h2 { font-size: 23px; }
 .ebook-store .ebook-card p { font-size: 12px; }
 .ebook-store .ebook-store-price strong { font-size: 19px; }
 .ebook-store .ebook-detail-hero { grid-template-columns: 1fr; gap: 26px; }
 .ebook-store .ebook-detail-cover { display: flex; justify-content: center; padding: 30px; }
 .ebook-store .ebook-detail-cover img { width: 170px; }
 .ebook-store .ebook-detail-copy .ebook-card-actions { max-width: none; }
 .ebook-store .ebook-section-grid { grid-template-columns: 1fr; gap: 16px; }
 .ebook-store .ebook-section-grid article, .ebook-store .ebook-preview-section, .ebook-store .ebook-chapters, .ebook-store .ebook-owned-panel { padding: 22px; }
 .ebook-store .ebook-chapters ol { columns: 1; }
 .ebook-store .ebook-preview-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .ebook-store-footer { margin-top: 30px; }
 .ebook-store-footer a { margin-left: 0; }
}
@media(max-width:370px) {
 .ebook-market-page.ebook-store { padding-left: 14px; padding-right: 14px; }
 .ebook-store-brand { font-size: 18px; }
 .ebook-search button { padding: 0 12px; }
 .ebook-store .ebook-search { gap: 8px; padding-left: 12px; }
 .ebook-store .ebook-search input { font-size: 12px; }
 .ebook-store .ebook-grid:not(.ebook-grid-single) .ebook-card-description { display: none; }
}
@media(prefers-reduced-motion:reduce) { .ebook-store .ebook-cover { transition: none; } }

/* Reading-first detail: compact cover and direct text preview. */
.ebook-store .ebook-chapters summary { cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px; font-family:Georgia,serif; font-size:25px; padding:6px 0; }
.ebook-store .ebook-chapters summary span { font:12px system-ui; color:#61716a; }
.ebook-store .ebook-chapters summary::after { content:'+'; color:#087c73; }
.ebook-store .ebook-chapters[open] summary::after { content:'−'; }
.ebook-store .ebook-chapters summary:focus-visible { outline:3px solid #087c73; outline-offset:4px; }
.ebook-store .ebook-preview-section .ebook-primary-button { display:inline-flex; margin:12px 0 4px; }
@media(max-width:760px) {
 .ebook-store .ebook-detail-hero { display:grid; grid-template-columns:100px minmax(0,1fr); gap:12px 18px; }
 .ebook-store .ebook-detail-cover { grid-column:1; grid-row:1 / span 2; padding:14px 8px; border-radius:10px; align-self:start; }
 .ebook-store .ebook-detail-cover img { width:84px; }
 .ebook-store .ebook-detail-copy { display:contents; }
 .ebook-store .ebook-detail-copy > * { grid-column:1 / -1; margin:0; }
 .ebook-store .ebook-detail-copy > .ebook-eyebrow { grid-column:2; grid-row:1; align-self:end; margin:0; font-size:9px; letter-spacing:1px; }
 .ebook-store .ebook-detail-copy > h1 { grid-column:2; grid-row:2; font-size:27px; align-self:start; margin:0; }
 .ebook-store .ebook-detail-copy > p:not(.ebook-eyebrow) { font-size:14px; line-height:1.7; }
 .ebook-store .ebook-detail-copy > .ebook-format { font-size:11px!important; }
 .ebook-store .ebook-detail-copy .ebook-card-actions { margin:0; padding:0; }
 .ebook-store .ebook-back-link { margin-bottom:14px; }
}
