.books-page {
  --catalog-paper: var(--pixieed-bg, #f7f8f6);
  --catalog-white: var(--pixieed-surface, #ffffff);
  --catalog-ink: var(--pixieed-ink, #1b2025);
  --catalog-muted: var(--pixieed-muted, #5f6871);
  --catalog-line: var(--pixieed-line, rgba(27, 32, 37, .11));
  --catalog-green: var(--pixieed-dark, #17232d);
  --catalog-coral: var(--pixieed-accent, #e75445);
  margin: 0;
  min-width: 320px;
  color: var(--catalog-ink);
  background: var(--catalog-paper);
}
.books-page *, .books-page *::before, .books-page *::after { box-sizing: border-box; }
/* Match the mounted header before its module arrives; the blank flex item reserves the menu slot. */
@media (min-width: 601px) {
  body.books-page .catalog-header:not(.px-site-header) { min-height: 65px; }
  body.books-page .catalog-header:not(.px-site-header) .catalog-header__inner { width: 100%; min-height: 64px; margin: 0; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); justify-content: flex-start; gap: 8px; }
  body.books-page .catalog-header:not(.px-site-header) .catalog-brand { display: flex; flex: none; gap: 9px; min-height: 44px; padding: 0; font: 750 1rem/1 system-ui, -apple-system, sans-serif; letter-spacing: 0; }
  body.books-page .catalog-header:not(.px-site-header) .catalog-header__inner::after { content: ''; flex: 0 0 88px; height: 44px; margin-left: auto; }
  .books-catalog-js body.books-page #catalog-filters[hidden] { display: grid !important; visibility: hidden; pointer-events: none; }
}
.books-page [hidden] { display: none !important; }
.books-page :is(a, button, input, select):focus-visible { outline: 3px solid #17232d; outline-offset: 3px; }
.catalog-wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.catalog-header { border-bottom: 1px solid var(--catalog-line); background: var(--catalog-white); }
.catalog-header__inner { width: min(1160px, calc(100% - 40px)); min-height: 58px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--catalog-ink); font-weight: 800; text-decoration: none; }
.catalog-brand span { display: grid; width: 27px; height: 27px; place-items: center; color: white; background: var(--catalog-green); font-family: ui-monospace, monospace; }
.catalog-header__inner > p, .catalog-eyebrow { margin: 0; color: var(--catalog-green); font: 750 .68rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.catalog-intro { padding: clamp(28px, 5vw, 58px) 0 30px; background: var(--catalog-paper); border-bottom: 1px solid var(--catalog-line); }
.catalog-intro__inner { max-width: 1160px; }
.catalog-page h1, .books-page h1 { margin: 10px 0 8px; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.12; letter-spacing: -.055em; }
.catalog-lead { margin: 0; color: var(--catalog-muted); font-size: clamp(1rem, 1.7vw, 1.15rem); }
.catalog-disclosure { margin: 22px 0 0; padding-left: 12px; border-left: 3px solid var(--catalog-coral); font-size: .93rem; font-weight: 700; }
.catalog-section { padding-block: 35px 55px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.catalog-heading h2, .catalog-extra h2 { margin: 4px 0 0; font-size: clamp(1.35rem, 2.7vw, 1.9rem); letter-spacing: -.035em; }
.catalog-count { margin: 0; color: var(--catalog-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.catalog-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 16px; border: 1px solid var(--catalog-line); background: var(--catalog-white); }
.catalog-search-label { font-size: .8rem; font-weight: 700; }
.catalog-filters input[type="search"] { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #aeb9b1; border-radius: 3px; background: white; color: var(--catalog-ink); font: inherit; }
.catalog-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 14px 24px; }
.catalog-filter-row fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.catalog-filter-row legend, .catalog-filter-row > label { display: block; margin-bottom: 6px; color: var(--catalog-muted); font-size: .76rem; font-weight: 700; }
.catalog-filter-row > label select { display: block; min-height: 44px; min-width: 135px; margin-top: 4px; padding: 6px 28px 6px 9px; border: 1px solid #aeb9b1; border-radius: 3px; color: var(--catalog-ink); background-color: #fff; font: inherit; }
.catalog-chips { display: flex; max-width: 100%; overflow-x: auto; gap: 6px; padding: 3px; scrollbar-width: thin; }
.catalog-chips button, .catalog-empty button { min-height: 44px; flex: 0 0 auto; padding: 6px 12px; border: 1px solid #b8c2ba; border-radius: 2px; color: var(--catalog-ink); background: white; font: inherit; font-size: .83rem; cursor: pointer; }
.catalog-chips button[aria-pressed="true"] { border-color: var(--catalog-green); color: white; background: var(--catalog-green); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.shop-ad { grid-column: 1 / -1; min-width: 0; padding: 18px 0; border-block: 1px solid var(--catalog-line); text-align: center; }
.shop-ad[hidden] { display: none !important; }
.shop-ad__label { margin: 0 0 8px; color: var(--catalog-muted); font-size: .72rem; line-height: 1.4; }
.shop-ad__slot { width: min(100%, 728px); min-height: 90px; margin-inline: auto; }
.shop-ad__unit { display: block; width: 100%; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--catalog-line); background: var(--catalog-white); box-shadow: 0 3px 12px rgb(38 51 50 / 4%); }
.product-card[hidden] { display: none !important; }
.product-card__image { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--catalog-line); background: #efe9dc; }
.product-card__image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-card__placeholder { position: relative; display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 7px; overflow: hidden; padding: 15px 12px 11px; text-align: center; background: linear-gradient(145deg, #f4efe3, #e9e5d9); }
.product-card__placeholder::before, .product-card__placeholder::after { position: absolute; z-index: 0; width: 45%; height: 7px; background: repeating-linear-gradient(90deg, rgb(49 93 80 / 18%) 0 8px, transparent 8px 13px); content: ""; }
.product-card__placeholder::before { top: 20%; left: -8%; }
.product-card__placeholder::after { right: -8%; bottom: 20%; background: repeating-linear-gradient(90deg, rgb(185 78 60 / 16%) 0 8px, transparent 8px 13px); }
.product-card__placeholder-mark, .product-card__placeholder-title, .product-card__placeholder small { position: relative; z-index: 1; }
.product-card__placeholder-mark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgb(49 93 80 / 35%); color: var(--catalog-green); font: 700 .7rem ui-monospace, monospace; }
.product-card__placeholder-title { display: -webkit-box; max-width: 100%; overflow: hidden; color: var(--catalog-ink); font-family: var(--pixieed-font-sans); font-size: clamp(.88rem, 2.1vw, 1.28rem); font-weight: 700; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.product-card__placeholder small { color: var(--catalog-muted); font-size: .67rem; letter-spacing: .08em; }
.product-card__body { display: flex; min-height: 286px; flex-direction: column; padding: 12px; }
.product-card__meta { display: flex; flex-wrap: wrap; gap: 5px; color: var(--catalog-green); font-size: .68rem; font-weight: 750; }
.product-card__meta span + span::before { margin-right: 5px; color: #a5ada6; content: "·"; }
.product-card h2 { margin: 8px 0 7px; font-size: clamp(.94rem, 1.25vw, 1.13rem); line-height: 1.4; overflow-wrap: anywhere; }
.product-card__description { margin: 0; color: var(--catalog-muted); font-size: .81rem; line-height: 1.6; }
.product-card__byline { margin: 10px 0 0; color: var(--catalog-muted); font-size: .73rem; line-height: 1.5; }
.product-card__actions { display: grid; gap: 7px; margin-top: auto; padding-top: 9px; }
.product-card__source { color: var(--catalog-green); font-size: .74rem; line-height: 1.4; text-underline-offset: 2px; }
.product-card__source--missing { color: #7d5f37; }
.product-card__amazon { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 7px; color: white; background: var(--catalog-green); font-size: .79rem; font-weight: 750; text-align: center; text-decoration: none; }
.product-grid .product-card__amazon { display: none; }
.product-card__amazon:hover { background: #25483e; }
.product-card__commerce-pending { margin: 0; color: var(--catalog-muted); font-size: .75rem; }
.product-card__related-offers[hidden] { display: none !important; }
.product-grid .product-card__related-offers { display: none !important; }
.product-card__related-offers { min-width: 0; margin-top: 14px; padding: 12px; border: 1px solid var(--catalog-line); border-radius: 8px; background: var(--catalog-paper); overflow-wrap: anywhere; }
.product-card__related-offers h4 { margin: 0 0 8px; color: var(--catalog-ink); font-size: .9rem; line-height: 1.45; }
.product-card__yahoo { display: flex; min-width: 0; min-height: 44px; align-items: center; justify-content: center; gap: 8px; margin-top: 7px; padding: 8px 10px; border-radius: 6px; color: white; background: var(--catalog-green); font-size: .82rem; font-weight: 750; line-height: 1.45; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.product-card__yahoo:hover { background: #25483e; }
.product-card__yahoo[hidden] { display: none !important; }
.product-card__yahoo-note { margin: 5px 2px 9px; color: var(--catalog-muted); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-card__yahoo-note[hidden] { display: none !important; }
.catalog-empty { padding: 30px 14px; text-align: center; }
.catalog-empty button { border-color: var(--catalog-green); color: white; background: var(--catalog-green); }
.catalog-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr); align-items: center; gap: 24px; padding-block: 24px 44px; border-top: 1px solid var(--catalog-line); }
.catalog-extra__copy p:last-child { max-width: 55ch; margin: 8px 0 0; color: var(--catalog-muted); font-size: .88rem; }
.catalog-ad-slot { display: grid; min-height: 100px; place-items: center; border: 1px dashed #aeb9b1; color: var(--catalog-muted); background: rgb(255 254 250 / 50%); font-size: .75rem; }
.catalog-footer { padding: 18px 0; border-top: 1px solid var(--catalog-line); background: var(--catalog-white); }
.catalog-footer .catalog-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: .78rem; }
.catalog-footer p { margin: 0 auto 0 0; color: var(--catalog-muted); }
.catalog-footer a { color: var(--catalog-green); }
.books-page .skip-link { position: absolute; z-index: 5; top: 8px; left: 8px; padding: 8px 12px; transform: translateY(-150%); color: white; background: var(--catalog-ink); }
.books-page .skip-link:focus { transform: none; }
.books-page .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.catalog-search-label { display: block; margin-bottom: -6px; color: var(--catalog-ink); line-height: 1.45; }
.catalog-filter-row legend, .catalog-filter-row > label { line-height: 1.45; }
.catalog-filters input[type="search"], .catalog-filter-row > label select { transition: border-color .16s ease, box-shadow .16s ease; }
.catalog-filters input[type="search"]:hover, .catalog-filter-row > label select:hover { border-color: #758b7e; }
.catalog-filters input[type="search"]:focus-visible, .catalog-filter-row > label select:focus-visible { border-color: var(--catalog-green); }
.product-card { border-radius: 3px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.product-card:focus-within { border-color: var(--catalog-green); box-shadow: 0 0 0 2px rgb(49 93 80 / 18%), 0 5px 16px rgb(38 51 50 / 8%); }
.product-card__placeholder { background: var(--catalog-paper); }
.product-card__placeholder::before, .product-card__placeholder::after { display: none; }
.product-card__placeholder-mark { width: auto; height: auto; min-height: 25px; padding: 3px 6px; }
.product-card__placeholder small { font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.product-card__source { display: inline-flex; min-height: 44px; align-items: center; gap: 4px; color: var(--catalog-green); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.product-card__source:hover, .catalog-footer a:hover { color: #21463a; text-decoration-thickness: 2px; }
.product-card__amazon { border: 1px solid var(--catalog-green); transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.product-card__amazon:hover { border-color: #25483e; box-shadow: 0 2px 5px rgb(38 51 50 / 14%); }
.catalog-chips button, .catalog-empty button { transition: border-color .16s ease, background-color .16s ease, color .16s ease; }
.catalog-chips button:hover:not([aria-pressed="true"]) { border-color: var(--catalog-green); background: #f2f5f0; }
@media (hover: hover) and (pointer: fine) {
  .product-card:hover { transform: translateY(-2px); border-color: #aab9ae; box-shadow: 0 7px 18px rgb(38 51 50 / 9%); }
}
@media (prefers-reduced-motion: reduce) {
  .books-page *, .books-page *::before, .books-page *::after { transition: none !important; }
  .books-page .product-card:hover { transform: none !important; }
}
html[data-pixieed-motion="reduced"] .books-page *,
html[data-pixieed-motion="reduced"] .books-page *::before,
html[data-pixieed-motion="reduced"] .books-page *::after { transition: none !important; }
html[data-pixieed-motion="reduced"] .books-page .product-card:hover { transform: none !important; }
@media (min-width: 760px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } .product-card__body { padding: 15px; } }
@media (min-width: 1160px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .catalog-wrap, .catalog-header__inner { width: calc(100% - 28px); } .catalog-header__inner { min-height: 50px; } .catalog-header__inner > p { font-size: .59rem; } .catalog-intro { padding-top: 28px; } .catalog-section { padding-top: 25px; } .catalog-filters { padding: 12px; } .catalog-filter-row { gap: 12px; } .catalog-filter-row > label select { min-width: 120px; } .product-grid { gap: 9px; margin-top: 13px; } .product-card__body { min-height: 305px; padding: 9px; } .product-card__placeholder { padding-inline: 8px; } .product-card__meta { font-size: .62rem; } .product-card h2 { font-size: .9rem; } .product-card__description { font-size: .75rem; } .product-card__byline { font-size: .69rem; } .product-card__source { font-size: .69rem; } .product-card__amazon { font-size: .7rem; } .catalog-extra { grid-template-columns: 1fr; gap: 16px; padding-block: 20px 32px; } .catalog-ad-slot { min-height: 84px; } }
@media (max-width: 759px) { .shop-ad__slot { min-height: 280px; } }
@media (prefers-reduced-motion: reduce) { .books-page *, .books-page *::before, .books-page *::after { scroll-behavior: auto !important; } }

/* Compact shelves keep the full descriptions available in the detail panel. */
.catalog-search { display: flex; gap: 8px; min-width: 0; }
.catalog-search input { min-width: 0; flex: 1; }
.catalog-search button, .product-detail__header button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--catalog-line); border-radius: 4px; color: var(--catalog-green); background: var(--catalog-white); font: inherit; font-size: .85rem; cursor: pointer; }
.catalog-chips { flex-wrap: wrap; overflow: visible; }
.product-grid .product-card__image--empty { height: 42px; aspect-ratio: auto; border-bottom: 0; background: #f1eee5; }
.product-grid .product-card__placeholder-title { display: none; }
.product-grid .product-card__placeholder small { display: none; }
.product-grid .product-card__image--empty .product-card__placeholder { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 4px 10px; text-align: left; }
.product-grid .product-card__placeholder-mark { min-width: 27px; }
.product-grid .product-card__placeholder small { font-size: .69rem; }
.product-grid .product-card { display: flex; flex-direction: column; }
.product-grid .product-card__body { flex: 1; }
.product-card__body { min-height: 0; padding: 16px; gap: 0; }
.product-card h3 { margin: 8px 0 7px; font-size: 1.05rem; line-height: 1.55; overflow-wrap: anywhere; }
.product-card__description { font-size: .85rem; line-height: 1.7; }
.product-card__byline { font-size: .76rem; }
.product-card__actions { padding-top: 16px; }
.product-card__details { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--catalog-green); border-radius: 4px; color: var(--catalog-green); background: transparent; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.product-card__details:hover { background: #edf3ee; }
.catalog-enhanced .product-grid .product-card__metadata-note,
.catalog-enhanced .product-grid .product-card__source { display: none; }
.catalog-enhanced .product-grid .product-card__commerce-pending { display: none; }
.catalog-image-note { margin: 10px 0 0; color: var(--catalog-muted); font-size: .76rem; line-height: 1.55; }
.catalog-filter-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; margin-top: 10px; }
.catalog-filter-status p { margin: 0; color: var(--catalog-muted); font-size: .78rem; }
.catalog-filter-status button { min-height: 44px; padding: 7px 10px; border: 1px solid var(--catalog-line); border-radius: 4px; color: var(--catalog-green); background: var(--catalog-white); font: inherit; font-size: .78rem; cursor: pointer; }
.product-detail { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--catalog-line); border-radius: 10px; color: var(--catalog-ink); background: var(--catalog-white); overscroll-behavior: contain; }
.product-detail::backdrop { background: rgb(21 34 29 / 58%); }
.product-detail__header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--catalog-line); background: var(--catalog-white); }
.product-detail__header > span { color: var(--catalog-green); font-size: .8rem; font-weight: 750; }
.product-detail__content { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: start; gap: 22px; padding: 24px; }
.product-detail__content .product-card__image { aspect-ratio: 1; border: 1px solid var(--catalog-line); border-radius: 6px; }
.product-card__thumbnail { display: flex; width: 96px; height: 96px; flex: 0 0 96px; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: auto; border: 0; background: transparent; }
.product-card__thumbnail img { display: block; max-width: none; max-height: none; object-fit: none; image-rendering: pixelated; }
.product-card__thumbnail[data-size="32"] img { width: 96px; height: 96px; }
.product-card__thumbnail[data-size="96"] img { width: 96px; height: 96px; }
.product-detail__content .product-card__thumbnail { width: 192px; height: 192px; }
.product-detail__content .product-card__thumbnail[data-size="32"] img { width: 192px; height: 192px; }
.product-detail__content .product-card__thumbnail[data-size="96"] img { width: 192px; height: 192px; }
.product-detail--no-image .product-detail__content { grid-template-columns: 1fr; }
.product-detail--no-image .product-detail__content .product-card__image--empty { width: 100%; height: 42px; aspect-ratio: auto; border: 0; border-bottom: 1px solid var(--catalog-line); border-radius: 0; }
.product-detail--no-image .product-card__image--empty .product-card__placeholder { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 4px 10px; text-align: left; }
.product-detail__content .product-card__placeholder-title { display: none; }
.product-detail__content .product-card__placeholder { padding: 8px; }
.product-detail__content .product-card__placeholder small { white-space: nowrap; font-size: .65rem; letter-spacing: 0; }
.product-detail__content .product-card__body { padding: 0; }
.product-detail__content h3 { margin: 8px 0 12px; font-size: 1.3rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-detail__content h2 { margin: 8px 0 12px; font-size: 1.3rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-detail__content .product-card__description { font-size: .93rem; }
.product-detail__content .product-card__metadata-note { padding: 10px; border-radius: 4px; background: var(--catalog-paper); font-size: .8rem; }
.product-detail__notice, .product-detail__gate { margin: 0 24px 20px; padding-top: 16px; border-top: 1px solid var(--catalog-line); color: var(--catalog-muted); font-size: .8rem; line-height: 1.65; }
.product-detail__gate { padding-top: 0; border: 0; }
.catalog-footer .catalog-wrap { align-items: flex-start; }
.catalog-footer__notice { flex-basis: 100%; margin: 0 0 8px; color: var(--catalog-muted); font-size: .75rem; line-height: 1.65; }
@media (max-width: 599px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-grid .product-card { display: flex; min-width: 0; flex-direction: column; align-items: stretch; padding: 9px; gap: 0; }
  .product-grid .product-card__image--empty { width: 100%; height: 32px; aspect-ratio: auto; border: 0; border-radius: 0; }
  .product-grid .product-card__image--empty .product-card__placeholder { padding: 2px 5px; gap: 6px; }
  .product-grid .product-card__placeholder small { font-size: .61rem; letter-spacing: 0; }
  .product-grid .product-card__body { padding: 0; min-height: 0; }
  .product-grid .product-card h3 { display: -webkit-box; overflow: hidden; margin: 6px 0 0; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .product-grid .product-card__description, .product-grid .product-card__byline { display: none; }
  .product-card__meta { font-size: .63rem; line-height: 1.35; }
  .product-grid .product-card__actions { padding-top: 8px; }
  .product-grid .product-card__details { min-height: 40px; padding: 8px; font-size: .78rem; }
  .catalog-disclosure { margin-top: 16px; padding-left: 9px; font-size: .78rem; line-height: 1.5; }
  .catalog-filter-row { align-items: stretch; gap: 12px; }
  .catalog-filter-row fieldset { width: 100%; }
  .catalog-filter-row > label { flex: 1; min-width: 0; }
  .catalog-filter-row > label select { width: 100%; min-width: 0; }
  .catalog-intro { padding-bottom: 24px; }
  .catalog-disclosure { font-size: .85rem; }
  .product-detail { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 8px; }
  .product-detail__header { padding: 10px 14px; }
  .product-detail__content { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .product-detail__content .product-card__image { width: 100px; }
  .product-detail__content h2 { font-size: 1.2rem; }
  .product-detail__notice, .product-detail__gate { margin-inline: 18px; }
}

@media (max-width: 359px) {
  .product-grid .product-card { padding: 7px; }
  .product-grid .product-card h3 { font-size: .82rem; }
  .product-grid .product-card__details { font-size: .73rem; }
  .catalog-wrap, .catalog-header__inner { width: calc(100% - 24px); }
}

/* Match the public tools' shared color, surface, radius and touch-control tokens. */
.catalog-filters {
  gap: 9px;
  padding: 12px;
  border-radius: var(--pixieed-radius-md, 16px);
  background: var(--pixieed-surface, #fff);
  box-shadow: 0 4px 16px rgba(27, 32, 37, .06);
}
.catalog-search-label { margin: 0 0 -5px; color: var(--pixieed-ink, #1b2025); font-size: .76rem; }
.books-page .catalog-filters input[type="search"], .books-page .catalog-filter-row select {
  /* Keep these fields visibly editable above the shared form reset. */
  border: 1px solid #7b858c !important;
  border-radius: var(--pixieed-radius-sm, 8px);
  background: var(--pixieed-surface, #fff) !important;
}
.books-page .catalog-filters input[type="search"]::placeholder { color: #5f6871; opacity: 1; }
.books-page .catalog-filters input[type="search"]:focus-visible, .books-page .catalog-filter-row select:focus-visible { border-color: #17232d !important; }
.catalog-filters input[type="search"]:hover,
.catalog-filter-row > label select:hover { border-color: var(--pixieed-muted, #5f6871); }
.catalog-search button, .product-detail__header button, .catalog-filter-status button {
  border-color: #7b858c;
  border-radius: var(--pixieed-radius-sm, 8px);
  color: var(--pixieed-dark, #17232d);
  transition: color .18s var(--pixieed-ease), background .18s var(--pixieed-ease), transform .18s var(--pixieed-ease);
}
.catalog-search button:hover, .product-detail__header button:hover, .catalog-filter-status button:hover { background: var(--pixieed-surface-muted, #eef1ef); }
.catalog-category-filter { min-width: 0; margin: 0; padding: 0; border: 0; }
.catalog-category-filter legend { margin-bottom: 2px; color: var(--pixieed-muted, #5f6871); font-size: .72rem; font-weight: 750; }
.catalog-chips {
  display: flex;
  max-width: 100%;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  gap: 6px;
  padding: 4px 3px 7px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(27, 32, 37, .32) transparent;
  scrollbar-width: thin;
}
.catalog-chips button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 11px;
  border-color: var(--pixieed-line, rgba(27, 32, 37, .14));
  border-radius: 999px;
  color: var(--pixieed-ink, #1b2025);
  background: var(--pixieed-surface, #fff);
  font-size: .78rem;
  scroll-snap-align: start;
}
.catalog-chip-count {
  min-width: 1.35rem;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--pixieed-muted, #5f6871);
  background: var(--pixieed-surface-muted, #eef1ef);
  font-size: .67rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.catalog-chips button[aria-pressed="true"] {
  border-color: var(--pixieed-accent-strong, #b83f34);
  color: #fff;
  background: var(--pixieed-accent-strong, #b83f34);
  box-shadow: 0 2px 7px rgba(184, 63, 52, .18);
}
.catalog-chips button[aria-pressed="true"]::before { content: "✓"; font-size: .78rem; font-weight: 800; }
.catalog-chips button[aria-pressed="true"] .catalog-chip-count { color: var(--pixieed-accent-strong, #b83f34); background: #fff; }
.catalog-chips button:hover:not([aria-pressed="true"]) { border-color: var(--pixieed-dark, #17232d); background: var(--pixieed-surface-muted, #eef1ef); }
.catalog-more-filters { min-width: 0; }
.catalog-more-filters > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--pixieed-radius-sm, 8px);
  color: var(--pixieed-ink, #1b2025);
  background: var(--pixieed-surface-muted, #eef1ef);
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.catalog-more-filters > summary::-webkit-details-marker { display: none; }
.catalog-more-filters > summary::after { margin-left: 0; color: var(--pixieed-muted, #5f6871); font-size: 1rem; content: "+"; }
.catalog-more-filters[open] > summary::after { content: "−"; }
.catalog-more-filters__selection { margin-left: auto; color: var(--pixieed-muted, #5f6871); font-size: .72rem; font-weight: 600; }
.catalog-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 9px; }
.catalog-filter-row > label { min-width: 0; margin: 0; color: var(--pixieed-muted, #5f6871); font-size: .72rem; font-weight: 750; }
.catalog-filter-row > label select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 3px;
  border-color: var(--pixieed-line, rgba(27, 32, 37, .14));
  border-radius: var(--pixieed-radius-sm, 8px);
  background: var(--pixieed-surface, #fff);
}
.product-grid .product-card { border-radius: var(--pixieed-radius-md, 16px); box-shadow: 0 4px 16px rgba(27, 32, 37, .06); }
.product-card__meta { color: #46515a; }
.product-card h3 { color: var(--pixieed-ink, #1b2025); font-weight: 750; letter-spacing: -.015em; }
.product-grid .product-card__image--empty { background: var(--pixieed-surface-muted, #eef1ef); }
.product-grid .product-card__image--empty .product-card__placeholder { background: var(--pixieed-surface-muted, #eef1ef); }
.product-grid .product-card__placeholder-mark { border-radius: 6px; border-color: var(--pixieed-line, rgba(27, 32, 37, .2)); color: var(--pixieed-dark, #17232d); }
.product-card__amazon { border: 0; border-radius: var(--pixieed-radius-sm, 8px); background: var(--pixieed-accent-strong, #b83f34); }
.product-card__amazon:hover { border-color: transparent; background: var(--pixieed-accent, #e75445); }
.product-card__details { border-radius: var(--pixieed-radius-sm, 8px); border-color: #7b858c; color: var(--pixieed-ink, #1b2025); font-weight: 700; }
.product-card__details:hover { background: var(--pixieed-surface-muted, #eef1ef); }
.product-card:focus-within { border-color: var(--pixieed-dark, #17232d); box-shadow: 0 0 0 2px rgba(23, 35, 45, .16), 0 5px 16px rgba(27, 32, 37, .08); }
.catalog-chips button:active { transform: translateY(1px); }
.catalog-image-note { margin-top: 8px; font-size: .73rem; }
.catalog-filter-status { min-height: 0; margin-top: 6px; }
.product-detail { border-radius: var(--pixieed-radius-md, 16px); }
@media (max-width: 599px) {
  .catalog-filters { gap: 7px; padding: 9px; }
  .catalog-chips { gap: 5px; padding-bottom: 6px; }
  .catalog-chips button { min-height: 44px; padding-inline: 9px; }
  .catalog-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .catalog-filter-row > label select { width: 100%; min-width: 0; padding-inline: 8px 22px; font-size: .75rem; }
  .product-grid .product-card { border-radius: var(--pixieed-radius-md, 16px); }
  .product-detail { border-radius: var(--pixieed-radius-md, 16px); }
}

/* Keep the first shelf close to the title; reveal secondary filters on request. */
.catalog-intro { padding: 13px 0 10px; }
.books-page h1 { margin: 0; font-size: clamp(1.45rem, 2.1vw, 1.8rem); line-height: 1.22; letter-spacing: -.04em; }
.catalog-disclosure { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0; padding: 0; border: 0; color: var(--pixieed-muted, #5f6871); font-size: .72rem; font-weight: 600; line-height: 1.35; }
.catalog-disclosure > span { padding: 1px 5px; border-radius: 999px; color: #8d3028; background: #f7e8e5; font-size: .65rem; font-weight: 800; }
.catalog-section { padding-block: 10px 38px; }
.catalog-filters { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; max-width: 560px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.catalog-search { gap: 6px; }
.catalog-filters input[type="search"] { height: 44px; min-height: 44px; padding-inline: 12px; border-radius: 10px; background: var(--pixieed-surface, #fff); }
.catalog-search button { min-width: 50px; height: 44px; padding-inline: 9px; border-radius: 10px; background: var(--pixieed-surface, #fff); }
.catalog-more-filters { position: static; }
.catalog-more-filters > summary { width: max-content; min-width: 86px; height: 44px; justify-content: center; gap: 5px; padding-inline: 10px; border: 1px solid #7b858c; border-radius: 10px; background: var(--pixieed-surface-muted, #eef1ef); }
.catalog-more-filters__selection { display: none; }
.catalog-more-filters__panel { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: min(420px, calc(100vw - 28px)); padding: 13px; border: 1px solid var(--pixieed-line, rgba(27, 32, 37, .14)); border-radius: 14px; background: var(--pixieed-surface, #fff); box-shadow: 0 12px 32px rgba(27, 32, 37, .16); }
.catalog-category-filter { margin: 0; padding: 0; border: 0; }
.catalog-category-filter legend { margin-bottom: 5px; color: var(--pixieed-muted, #5f6871); font-size: .72rem; font-weight: 750; }
.catalog-chips { flex-wrap: wrap !important; overflow: visible !important; padding: 0; }
.catalog-chips button { min-height: 44px; }
.catalog-filter-row { padding-top: 12px; }
.catalog-count { margin: 0; white-space: nowrap; color: var(--pixieed-muted, #5f6871); font-size: .75rem; font-variant-numeric: tabular-nums; }
.catalog-image-note { margin: 7px 0 0; font-size: .69rem; line-height: 1.4; }
.catalog-filter-status { grid-column: 1 / -1; min-width: 0; margin-top: 0; }
.product-grid { margin-top: 10px; }
.catalog-empty { padding-block: 22px; }
.catalog-more-filters > summary:focus-visible { outline: 3px solid #17232d; outline-offset: 3px; }
.catalog-footer .catalog-image-note { flex-basis: 100%; margin: 0 0 8px; color: var(--catalog-muted); font-size: .75rem; line-height: 1.65; }
@media (min-width: 600px) {
  .catalog-intro { padding-block: 15px 11px; }
  .catalog-section { padding-top: 12px; }
}
@media (max-width: 599px) {
  .catalog-wrap, .catalog-header__inner { width: calc(100% - 28px); }
  .catalog-header__inner { min-height: 48px; }
  .catalog-intro { padding-block: 11px 9px; }
  .catalog-section { padding-block: 9px 30px; }
  .catalog-filters { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .catalog-search { gap: 5px; }
  .catalog-search button { min-width: 45px; padding-inline: 6px; font-size: .75rem; }
  .catalog-more-filters > summary { min-width: 76px; padding-inline: 8px; font-size: .75rem; }
  .catalog-count { font-size: .68rem; }
  .catalog-image-note { margin-top: 6px; }
  .product-grid { margin-top: 9px; }
}

/* Keep the catalog on the shared 1200px grid and use the common page gutters. */
.books-page .catalog-wrap,
.books-page .catalog-header__inner {
  width: min(var(--pixieed-content-max, 1200px), calc(100% - 3rem));
}
.books-page .catalog-intro__inner { max-width: var(--pixieed-content-max, 1200px); }
.books-page .catalog-filters input[type="search"],
.books-page .catalog-search button,
.books-page .catalog-more-filters > summary {
  border-radius: var(--pixieed-radius-sm, 8px);
}
.books-page .product-card__description,
.books-page .catalog-extra__copy p:last-child,
.books-page .product-detail__content .product-card__description {
  font-size: 1rem;
  line-height: 1.7;
}
.books-page .product-detail__notice,
.books-page .product-detail__gate {
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 599px) {
  .books-page .catalog-wrap,
  .books-page .catalog-header__inner {
    width: calc(100% - 24px);
  }
  .books-page .product-grid .product-card__details { min-height: 44px; }
}

/* Smooth, high-resolution category illustrations. Keep the artwork square at every size. */
.catalog-brand img { display: block; }
.catalog-illustration-note { margin: 7px 0 0; color: var(--catalog-muted); font-size: .75rem; line-height: 1.5; }
.product-grid .product-card__illustration {
  position: relative; display: grid; width: 100%; min-width: 0; height: auto; min-height: 0;
  aspect-ratio: 1; flex: none; place-items: center; overflow: hidden; padding: 0;
  border: 0; border-bottom: 1px solid var(--catalog-line); border-radius: 0;
  background: #f4f2ec;
}
.product-grid .product-card__illustration img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.product-card__illustration-label { position: absolute; right: 6px; bottom: 6px; left: 6px; padding: 3px 6px; border-radius: 4px; color: #52645d; background: rgb(244 242 236 / 88%); font-size: .67rem; line-height: 1.35; text-align: center; }
.product-detail__content .product-card__illustration {
  position: relative;
  width: min(100%, 240px); height: auto; min-height: 0; aspect-ratio: 1; flex: none;
  padding: 0; background: #f4f2ec; border: 1px solid var(--catalog-line); border-radius: 8px;
}
.product-detail__content .product-card__illustration[data-size] img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
@media (max-width: 599px) {
  .books-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books-page .product-grid .product-card { min-width: 0; }
  .product-grid .product-card__illustration { min-height: 0; margin: 0 0 9px; padding: 0; border: 0; border-radius: 8px; }
  .product-grid .product-card__illustration img { width: 100%; height: 100%; }
  .product-card__illustration-label { font-size: .62rem; }
  .product-detail__content .product-card__illustration { width: min(100%, 240px); }
}
