/* Book page only: the gallery with the cover as an object, the buy box, the tabs, the look inside, reviews. */
.book-top { padding: 14px 0 clamp(32px, 5vw, 64px); background: linear-gradient(var(--paper-deep), var(--paper) 90%); }
.book-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.book-info { position: sticky; top: calc(var(--appbar-h) + var(--safe-top) + 16px); }
@media (max-width: 860px) { .book-info { position: static; } }
.products-centred { justify-content: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 360px)); }
.book-tabs + .section .part-rule, .section .part-rule { margin-bottom: clamp(22px, 3.5vw, 36px); }
.gallery { position: sticky; top: calc(var(--appbar-h) + var(--safe-top) + 16px); display: grid; gap: 14px; min-width: 0; }
.gallery-main { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-main::-webkit-scrollbar { display: none; }
.gallery-main > * { scroll-snap-align: center; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; height: min(560px, 44vw); padding: clamp(16px, 3vw, 40px); min-width: 0; min-height: 0; overflow: hidden; position: relative; perspective: 1400px; }
.gallery-main .cover { height: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; transform: rotateY(-10deg) rotateX(1.5deg); transform-origin: center; }
.gallery-main .cover img { height: 100%; max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.gallery-main .cover-typeset { height: 100%; width: auto; }
.gallery-main .g-photo { padding: 0; overflow: hidden; border: 1px solid var(--border); }
.gallery-main .g-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .g-page img { height: 100%; width: auto; max-width: 100%; object-fit: contain; background: #fff; border-radius: 2px; box-shadow: var(--shadow-cover); }
.gallery-main .g-cap { position: absolute; left: 12px; bottom: 12px; padding: 3px 10px; background: #0e1626; color: #f6f1e7; font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; font-size: .95rem; font-weight: 600; }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; justify-content: center; }
.gallery-thumbs button { flex: none; width: 64px; height: 64px; padding: 4px; border: 1px solid var(--border); background: var(--paper-light); cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.gallery-thumbs img { max-height: 100%; width: auto; border-radius: 2px; }
.gallery-thumbs .t-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs .cover { height: 100%; display: flex; justify-content: center; }
.gallery-thumbs .cover img { height: 100%; width: auto; box-shadow: none; }
.gallery-thumbs .cover::after, .gallery-thumbs .cover::before { display: none; }
.book-info h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.3rem); margin-bottom: 8px; }
.book-tagline { font-family: var(--font-display); font-style: italic; color: var(--gold-text); font-size: 1.25rem; margin: 0 0 6px; }
.book-sub { font-size: 1.1rem; color: var(--text-soft); margin: 0 0 10px; }
.byline { color: var(--muted); margin: 0 0 12px; font-size: .95rem; }
.byline a { color: var(--text); font-weight: 500; }
.book-meta-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 18px; font-size: .9rem; color: var(--muted); }
.buybox { display: grid; gap: 16px; padding: clamp(18px, 3vw, 26px); background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--gold); }
.buybox-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.buybox-price .price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; }
.promise-box { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.soon-box { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border); border-left: 2px solid var(--gold); }
.soon-box form { display: flex; gap: 8px; flex-wrap: wrap; }
.soon-box .input { flex: 1 1 200px; min-height: 44px; }
[data-waitlist-form] .wl-consent { flex-basis: 100%; }
.book-tabs { position: sticky; top: calc(var(--appbar-h) + var(--safe-top)); z-index: 40; background: var(--paper); border-bottom: 1px solid var(--border); }
.book-tabs nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.book-tabs nav::-webkit-scrollbar { display: none; }
.book-tabs a { flex: none; padding: 14px 14px 12px; text-decoration: none; color: var(--muted); font-family: var(--font-display); font-variant-caps: small-caps; font-feature-settings: "smcp"; letter-spacing: .08em; font-weight: 600; font-size: 1.05rem; border-bottom: 2px solid transparent; }
.book-tabs a:hover { color: var(--text); }
.book-tabs a[aria-current="true"] { color: var(--gold-text); border-bottom-color: var(--gold); }
.overview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.pullquote { margin: 0; padding: 24px 0 24px 24px; border-left: 2px solid var(--gold); font-family: var(--font-display); font-size: 1.4rem; line-height: 1.45; font-style: italic; }
.sticky-buy { position: fixed; z-index: 65; left: 0; right: 0; bottom: 0; padding: 10px var(--gutter) calc(10px + var(--safe-bottom)); background: var(--head-bg); color: var(--head-fg); border-top: 1px solid var(--gold); display: flex; align-items: center; gap: 12px; transform: translateY(110%); transition: transform var(--t-mid) var(--ease-out); }
.sticky-buy.show { transform: none; }
.sticky-buy .cover { width: 34px; flex: none; }
.sticky-buy .sb-info { flex: 1; min-width: 0; line-height: 1.2; }
.sticky-buy .sb-info strong { display: block; font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .price { font-size: 1.05rem; color: var(--gold); }
.sticky-buy .price-other { color: var(--head-muted); }
.sticky-buy form { flex: none; }
.sticky-buy .btn-book { background: var(--gold); color: #0e1626; border-color: var(--gold); }
@media (max-width: 899px) { .sticky-buy { bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: 10px; } }
@media (min-width: 900px) { .sticky-buy { left: auto; right: 24px; bottom: 24px; width: 440px; border: 1px solid var(--gold); box-shadow: var(--shadow-lg); } }
@media (max-width: 860px) { .book-hero { grid-template-columns: minmax(0, 1fr); } .gallery { position: static; } .gallery-main > * { height: min(74vw, 420px); } .overview { grid-template-columns: minmax(0, 1fr); } }
/* The look inside: tools, the outline by part, sample pages */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.tool { padding: 16px 0 0; border-top: 1px solid var(--gold); min-width: 0; }
.tool strong { display: block; font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 4px; }
.tool span { font-size: .9rem; color: var(--muted); }
.outline { display: grid; gap: 0; border-top: 1px solid var(--border); }
.outline details { border-bottom: 1px solid var(--border); }
.outline summary { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px 0; cursor: pointer; }
.outline summary::-webkit-details-marker { display: none; }
.outline summary:hover h3 { color: var(--gold-text); }
.part-no { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-text); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1; text-align: center; }
.part-no small { display: block; font-family: var(--font-body); font-size: .6rem; letter-spacing: .1em; font-weight: 500; }
.outline summary h3 { margin: 0 0 2px; font-size: 1.3rem; }
.outline summary p { margin: 0; font-size: .9rem; color: var(--muted); }
.outline .chev { transition: transform var(--t-mid) var(--ease-out); color: var(--muted); }
.outline details[open] .chev { transform: rotate(180deg); }
.chapters { list-style: none; margin: 0; padding: 0 0 12px 66px; }
.chapters li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.chapters .ch-no { font-size: .78rem; letter-spacing: .12em; color: var(--gold-text); font-variant-numeric: tabular-nums; padding-top: .2em; }
.chapters strong { display: block; font-weight: 500; }
.chapters span { font-size: .9rem; color: var(--muted); }
.chapters .ch-page { font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .chapters { padding-left: 0; } .outline summary { grid-template-columns: 44px minmax(0, 1fr) auto; } .part-no { width: 44px; height: 44px; font-size: 1.3rem; } }
.samples { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 18px; overflow-x: auto; padding: 4px var(--gutter) 20px; margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x mandatory; scrollbar-width: none; }
.samples::-webkit-scrollbar { display: none; }
.sample-thumb { scroll-snap-align: start; cursor: zoom-in; text-decoration: none; color: inherit; }
.sample-thumb img { border-radius: 2px; border: 1px solid var(--border); box-shadow: var(--shadow-soft); background: #fff; transition: transform var(--t-mid) var(--ease-out); }
.sample-thumb:hover img { outline: 2px solid var(--gold); outline-offset: 2px; }
.sample-thumb span { display: block; font-size: .82rem; color: var(--muted); margin-top: 8px; }
/* Reviews */
.review-summary { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.rs-score { display: grid; gap: 6px; }
.rs-score .big { font-family: var(--font-display); font-size: 3.4rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.histo { display: grid; gap: 6px; }
.histo div { display: grid; grid-template-columns: 52px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: .84rem; color: var(--muted); }
.histo .bar { height: 6px; background: var(--paper-deep); overflow: hidden; }
.histo .bar span { display: block; height: 100%; background: var(--gold); }
.reviews { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--border); }
.review { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 6px; }
.review h4 { margin: 0 0 6px; font-size: 1.2rem; }
.review p { color: var(--text-soft); margin: 0 0 8px; }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 500; color: var(--success); }
.author-reply { margin-top: 10px; padding: 12px 16px; border-left: 2px solid var(--gold); background: var(--paper-deep); font-size: .94rem; }
.post-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.post-actions .btn { min-height: 34px; padding: 5px 12px; font-size: .84rem; }
.post-pending { opacity: .75; border-style: dashed; }
.helpful[aria-pressed="true"] { border-color: var(--success); color: var(--success); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { width: 38px; height: 38px; cursor: pointer; background: var(--border); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.7L12 17.6l-6 3.3 1.3-6.7-5-4.7 6.8-.8z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.7L12 17.6l-6 3.3 1.3-6.7-5-4.7 6.8-.8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { background: var(--gold); }
.star-input input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 700px) { .review-summary { grid-template-columns: minmax(0, 1fr); } }
