/* Category-owned content; never hides siblings via hash state. */
body[data-store-page] .store-category-page { padding-block: 20px 48px; }
body[data-store-page] .store-category-directory { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
body[data-store-page] .store-category-directory p { margin: 0; }
body[data-store-page] .store-category-directory-lead { color: var(--text-dim); }
body[data-store-page] .store-category-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
body[data-store-page] .store-category-tab { padding: 10px 14px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
body[data-store-page] .store-category-tab[aria-current] { color: var(--rgbm-action); border-color: var(--rgbm-action); background: color-mix(in srgb, var(--rgbm-action) 10%, transparent); }
body[data-store-page] .store-category-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; padding: clamp(24px, 4vw, 48px) 0; align-items: end; }
body[data-store-page] .store-category-hero h1 { margin-block: 8px 16px; }
body[data-store-page] .store-category-boundary { padding: 16px; color: var(--text-dim); border-left: 2px solid var(--rgbm-action); }
body[data-store-page] .store-category-content { margin-bottom: 24px; }
body[data-store-page] .store-category-record-grid, body[data-store-page] .store-code-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body[data-store-page] .store-category-record, body[data-store-page] .store-code-product-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none; }
body[data-store-page] .store-category-record :is(h3,p), body[data-store-page] .store-code-product-card :is(h4,p) { margin: 0; }
body[data-store-page] .store-category-record p { color: var(--text-dim); }
body[data-store-page] .store-category-record .store-product-link { margin-top: auto; }
body[data-store-page] .store-book-offer { display: grid; gap: 18px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-top: 3px solid var(--rgbm-action); border-radius: 12px; background: var(--panel); margin-block: 18px; }
body[data-store-page] .store-book-offer h3 { margin: 0; }
body[data-store-page] .store-book-offer-top, body[data-store-page] .store-book-actions { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
body[data-store-page] .store-book-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body[data-store-page] .store-book-facts dd { margin: 8px 0 0; }
body[data-store-page] .store-book-status, body[data-store-page] .store-books-boundary { color: var(--rgbm-action); }
body[data-store-page] #book-details { scroll-margin-top: 120px; }
body[data-store-page] .store-code-shop-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
body[data-store-page] .store-code-shop-meta { display: grid; gap: 8px; }
body[data-store-page] .store-code-shop-meta strong { font-size: 2.5rem; color: var(--rgbm-action); }
body[data-store-page] .store-code-product-art { display: grid; place-items: center; min-height: 100px; font-size: 2.5rem; color: var(--rgbm-navigation); background: color-mix(in srgb, var(--rgbm-navigation) 10%, transparent); border-radius: 10px; }
body[data-store-page] .store-code-products-head { padding-block: 24px; }
body[data-store-page] .store-code-release { padding: 20px; border: 1px solid var(--line); margin-top: 24px; border-radius: 12px; }
body[data-store-page] details summary { cursor: pointer; }
@media (max-width: 1100px) { body[data-store-page] .store-category-record-grid, body[data-store-page] .store-code-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { body[data-store-page] :is(.store-category-directory,.store-category-hero,.store-category-record-grid,.store-code-product-grid,.store-book-facts,.store-code-shop-hero) { grid-template-columns: 1fr; } }

/* Every Store category uses one bounded reading surface. The shared KAP-GRID module owns
 * wheel/key/hash motion; touch keeps its platform momentum inside this element. */
html:has(body[data-store-page][data-route^="store-"]) {
  height: 100% !important;
  overflow: hidden !important;
}
html body[data-store-page][data-template][data-route^="store-"] {
  display: flex !important;
  flex-direction: column;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}
html body[data-store-page][data-template][data-route^="store-"] > .wrap:not(.topbar) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: auto !important;
  width: 100%;
  max-width: none;
  overflow: hidden !important;
  padding-inline: clamp(12px, 1.6vw, 28px);
}
body[data-store-page][data-route^="store-"] > header,
body[data-store-page][data-route^="store-"] .context-bar { flex: 0 0 auto; }
html body[data-store-page][data-template][data-route^="store-"] main.content-field {
  display: block !important;
  flex: 1;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  scrollbar-gutter: auto !important;
  scroll-behavior: auto !important;
}
body[data-store-page][data-route^="store-"] main.content-field > :is(.store-category-page,footer) { flex: none; }
body[data-store-page][data-route^="store-"] main.content-field::-webkit-scrollbar { display: none; width: 0; height: 0; }
body[data-store-page][data-route^="store-"] .store-category-directory { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; padding: 16px; }
body[data-store-page][data-route^="store-"] .store-category-hero { padding-block: clamp(20px, 2.4vw, 32px); }
body[data-route="store-books"] .store-books-workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: stretch; }
body[data-route="store-books"] .store-books-workspace > .store-book-offer { margin: 0; align-content: start; }
body[data-route="store-books"] .store-book-offer-category { background: linear-gradient(135deg, color-mix(in srgb, var(--rgbm-system, var(--rgbm-navigation)) 12%, var(--panel)), var(--panel)); }
body[data-route="store-books"] .store-book-offer-category .store-book-actions { margin-top: 12px; justify-content: flex-start; align-items: center; }
body[data-route="store-books"] .store-book-subtitle { margin: 0; max-width: 64ch; }
body[data-route="store-books"] .store-book-facts { grid-template-columns: 1fr; margin: 0; gap: 0; }
body[data-route="store-books"] .store-book-facts > div { display: grid; grid-template-columns: minmax(100px, .65fr) minmax(0, 1.35fr); gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); }
body[data-route="store-books"] .store-book-facts dt { color: var(--text-dim); }
body[data-route="store-books"] .store-book-facts dd { margin: 0; }
body[data-route="store-books"] .store-book-availability { padding: 16px; border-inline-start: 2px solid var(--rgbm-action); background: color-mix(in srgb, var(--rgbm-action) 6%, var(--panel)); }
body[data-route="store-books"] .store-book-availability :is(h4,p) { margin: 0; }
body[data-route="store-books"] .store-book-availability p { margin-top: 8px; color: var(--text-dim); }
@media (max-width: 900px) {
  body[data-route="store-books"] .store-books-workspace, body[data-store-page][data-route^="store-"] .store-category-directory { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  body[data-route="store-books"] .store-book-facts > div { grid-template-columns: 1fr; gap: 6px; }
}

/* Shared category hierarchy: identity → catalog → delivery/request → footer. */
body[data-store-page][data-route^="store-"] .store-category-content { scroll-margin-block-start: 12px; }
body[data-store-page][data-route^="store-"] :is(.store-category-record-grid,.store-code-product-grid,.store-product-grid) { align-items: stretch; gap: clamp(14px, 1.5vw, 24px); }
body[data-store-page][data-route^="store-"] :is(.store-category-record,.store-code-product-card,.store-product-card) { min-width: 0; border-block-start: 2px solid var(--rgbm-navigation); }
body[data-store-page][data-route^="store-"] :is(.store-category-record,.store-code-product-card,.store-product-card) :is(h3,h4) { font-size: var(--f-size-08, 20px); line-height: var(--f-line-heading, 1.4); }
body[data-store-page][data-route^="store-"] :is(.store-category-record,.store-code-product-card) > p { line-height: var(--f-line-relaxed, 1.7); }
body[data-store-page][data-route^="store-"] .store-code-product-card > .store-primary-action { margin-top: auto; }
body[data-store-page][data-route^="store-"] .store-category-handoff { background: var(--panel); border-inline-start: 3px solid var(--rgbm-action); }
body[data-store-page][data-route^="store-"] .store-service-facts { margin: 0; padding: 14px; background: color-mix(in srgb, var(--rgbm-navigation) 6%, var(--panel)); border: 1px solid var(--line); border-radius: 8px; }
body[data-store-page][data-route^="store-"] .store-service-facts dt { color: var(--rgbm-navigation); margin-bottom: 8px; font-weight: var(--f-weight-semibold, 600); }
body[data-store-page][data-route^="store-"] .store-service-facts dd { margin: 0; color: var(--text-dim); }
