/* App catalog and app-family pages only. Keep the tool/blog layouts independent. */
.app-storefront-page .chatbot-window:not(.open) { visibility: hidden; }
.app-storefront-page {
  --store-header-height: 82px;
}
.app-storefront-page .site-main {
  padding-top: 24px;
}
.app-storefront-page .site-main > * {
  min-width: 0;
}
.app-storefront-page :is(a, button, input):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.app-storefront-page [id] {
  scroll-margin-top: calc(var(--store-header-height) + 64px);
}
.store-icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}
[dir="rtl"] :is(.store-icon--arrow, .store-icon--back) {
  transform: scaleX(-1);
}
.store-kicker {
  display: block;
  color: var(--accent);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 7px;
}
.store-catalog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 8px 0 24px;
}
.store-catalog-heading h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -.04em;
  margin-bottom: 8px;
}
.store-catalog-heading p,
.store-section-heading p {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.6;
}
.store-catalog-heading > div { min-width: 0; }
.store-catalog-heading h1 { overflow-wrap: anywhere; }
.store-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
  flex: 0 0 auto;
  min-height: 44px;
}
.store-search {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  padding-inline: 16px 6px;
  max-width: 680px;
  box-shadow: var(--shadow-sm);
}
.store-search > .store-icon { color: var(--muted); }
.store-search input {
  min-width: 0;
  flex: 1;
  width: 100%;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  min-height: 42px;
}
.store-search input::placeholder { color: var(--muted); opacity: 1; }
.store-search button {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  min-height: 42px;
  color: var(--accent);
  background: var(--accent-soft);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.store-category-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 3px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--muted);
  background: var(--panel-strong);
  font-size: .83rem;
  font-weight: 600;
}
.store-chip[aria-current] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.store-chip:hover { color: var(--accent); }
.store-chip .store-icon { width: 16px; height: 16px; }
.store-section { margin-top: 30px; }
.store-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.store-section-heading h2 {
  font-size: clamp(1.18rem, 2.5vw, 1.45rem);
  line-height: 1.4;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.store-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
}
.store-featured-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 3px 3px 14px;
}
.store-app-card { min-width: 0; }
.store-app-link {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  height: 100%;
  padding: 18px 12px;
  border-radius: 16px;
  color: var(--text);
  transition: background .15s;
}
.store-app-link:hover { background: var(--accent-soft); }
.store-app-icon {
  width: 68px;
  height: 68px;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--panel-strong);
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}
.store-app-copy { min-width: 0; }
.store-app-category {
  display: block;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.45;
  margin-bottom: 4px;
}
.store-app-copy h3 {
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.store-app-copy p {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.55;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.store-app-platforms {
  display: block;
  width: fit-content;
  color: var(--muted);
  font-size: .67rem;
  margin-top: 7px;
}
.store-app-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
}
.store-app-view .store-icon { width: 14px; height: 14px; }
.store-featured-rail .store-app-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  scroll-snap-align: start;
}
.store-featured-rail .store-app-link {
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 24px;
  gap: 18px;
  align-items: start;
  border-radius: inherit;
}
.store-featured-rail .store-app-icon { width: 82px; height: 82px; border-radius: 19px; }
.store-featured-rail .store-app-copy { grid-column: 1 / -1; }
.store-featured-rail .store-app-copy h3 { font-size: 1.1rem; }
.store-featured-rail .store-app-category { color: var(--accent); }
.store-featured-rail .store-app-view { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
.store-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.store-catalog-grid .store-app-card { border-bottom: 1px solid var(--line); }
.store-filter-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  font-size: .88rem;
}
.store-filter-summary a { color: var(--accent); flex-shrink: 0; }
.store-filter-summary p { overflow-wrap: anywhere; }
.app-storefront-page .breadcrumbs {
  font-size: .76rem;
  margin-bottom: 24px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.store-product {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  column-gap: 30px;
  row-gap: 18px;
  padding: 10px 0 24px;
}
.store-product-icon {
  grid-row: span 2;
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 30px;
  background: var(--panel-strong);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.store-product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.store-product h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
  line-height: 1.25;
  letter-spacing: -.03em;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.store-product-description {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 780px;
}
.store-product-download { grid-column: 2; }
.store-product-download .hero-actions { gap: 12px; }
.store-product-download .btn-store { min-width: 175px; border-radius: 12px; }
.store-download-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: .77rem;
  color: var(--muted);
}
.store-download-hint .store-icon { width: 15px; height: 15px; color: var(--success); }
.store-purchase-note { display: block; font-size: .72rem; color: var(--muted); margin-top: 5px; }
.store-product-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  margin-top: 12px;
  padding-block: 18px;
}
.store-product-facts > div { padding: 0 20px; border-inline-end: 1px solid var(--line); min-width: 0; }
.store-product-facts > div:first-child { padding-inline-start: 0; }
.store-product-facts > div:last-child { border: 0; }
.store-product-facts dt { color: var(--muted); font-size: .74rem; margin-bottom: 6px; }
.store-product-facts dd { color: var(--text); font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.store-family {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.store-family p { font-size: .85rem; color: var(--muted); line-height: 1.6; }
.store-ar-nav {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  gap: 8px;
  padding: 5px 2px 10px;
  scrollbar-width: thin;
}
.store-family .store-ar-nav { margin-top: 12px; padding-bottom: 2px; }
.store-ar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 46px;
  padding: 10px 18px;
  font-size: .84rem;
  font-weight: 600;
  background: var(--panel-strong);
}
.store-ar-nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.store-ar-nav a:hover { color: var(--accent); }
.store-section-nav {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--store-header-height);
  background: var(--bg);
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
.store-section-nav a {
  flex: 0 0 auto;
  padding: 16px 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.store-section-nav a:hover,
.store-section-nav a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.store-screenshots {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 4px 3px 14px;
}
.store-screenshot {
  display: block;
  position: relative;
  height: 340px;
  aspect-ratio: var(--shot-ratio);
  flex: 0 0 auto;
  max-width: 84%;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--panel-strong);
  scroll-snap-align: start;
}
.store-screenshot img { width: 100%; height: 100%; object-fit: contain; }
.store-screenshot-expand {
  position: absolute;
  bottom: 9px;
  inset-inline-end: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #142236cc;
}
.store-screenshot-expand .store-icon { width: 16px; height: 16px; }
.store-preview {
  padding: 0;
  margin: auto;
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100dvh - 32px));
  max-height: none;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg);
}
.store-preview[open] { display: flex; flex-direction: column; }
.store-preview::backdrop { background: #020817da; }
.store-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.store-preview button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
}
.store-preview button:disabled { opacity: .45; cursor: default; }
.store-preview-stage { display: flex; min-height: 0; flex: 1; padding: 12px; justify-content: center; align-items: center; }
.store-preview-stage img { width: 100%; height: 100%; object-fit: contain; }
.store-preview-controls { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; flex-shrink: 0; }
.app-storefront-page .app-detail-layout { margin-top: 32px; align-items: start; }
.app-storefront-page :is(.detail-card, .app-section-card) { box-shadow: none; border-radius: 16px; }
.app-storefront-page .detail-card h2 { font-size: 1.15rem; margin-bottom: 16px; line-height: 1.5; }
.app-storefront-page .prose-card p,
.app-storefront-page .app-section-card p { font-size: .95rem; line-height: 1.85; }
.app-storefront-page .detail-main,
.app-storefront-page .detail-sidebar { min-width: 0; }
.app-storefront-page .detail-sidebar a { overflow-wrap: anywhere; }
.app-storefront-page .app-section-grid { grid-template-columns: 1fr; }
.app-storefront-page .app-section-card h3 { font-size: 1.05rem; line-height: 1.5; }
.app-storefront-page .app-section-list { font-size: .94rem; line-height: 1.85; }
.store-cards-hero { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.store-cards-hero > img { width: 72px; height: 72px; border-radius: 16px; object-fit: contain; flex: 0 0 auto; border: 1px solid var(--line); }
.store-cards-hero .section-heading { margin: 0; }
.store-cards-hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.4; margin-bottom: 8px; }
.store-printed-note { display: flex; align-items: start; gap: 14px; padding: 18px; border-radius: 14px; background: var(--accent-soft); margin-top: 24px; }
.store-printed-note > .store-icon { margin-top: 4px; color: var(--accent); }
.store-printed-note h2 { font-size: .94rem; margin-bottom: 6px; }
.store-printed-note p { font-size: .84rem; line-height: 1.75; color: var(--muted); }
.store-card-search { margin-bottom: 20px; }
.store-card-search[hidden] { display: none; }
.store-no-collections { color: var(--muted); padding: 20px 0; }
.store-cards-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.app-storefront-page .cards-section-card { border-radius: 16px; padding: 16px; gap: 14px; }
.app-storefront-page .cards-section-info { min-width: 0; }
.app-storefront-page .cards-section-info h2 { font-size: .94rem; line-height: 1.5; }
.app-storefront-page .cards-section-card[hidden] { display: none; }
.app-storefront-page .cards-gallery-grid { gap: 14px; }
.app-storefront-page .cards-market-note { line-height: 1.7; }
.app-storefront-page .cards-lightbox {
  margin: 0;
  padding: 20px;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  color: #fff;
}
.app-storefront-page .cards-lightbox:not([open]) { display: none; }
.app-storefront-page .cards-lightbox::backdrop { background: #020817e8; }
@media (max-width: 1000px) {
  .store-featured-rail { grid-auto-columns: calc((100% - 16px) / 2.4); }
  .store-catalog-grid { column-gap: 16px; }
  .store-app-link { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; padding-inline: 6px; }
  .store-app-icon { width: 60px; height: 60px; }
  .store-app-view .store-icon { display: none; }
}
@media (max-width: 680px) {
  .app-storefront-page { --store-header-height: 66px; }
  .app-storefront-page .site-main { width: calc(100% - 32px); padding-top: 18px; padding-bottom: 100px; }
  .app-storefront-page .site-header { padding-block: 10px; }
  .app-storefront-page .header-shell { width: calc(100% - 32px); }
  .app-storefront-page .brand small { display: none; }
  .app-storefront-page .mobile-menu-toggle { width: 42px; height: 42px; }
  .app-storefront-page .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .app-storefront-page .chatbot-fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; }
  .store-catalog-heading { gap: 12px; padding: 2px 0 20px; align-items: start; }
  .store-catalog-heading h1 { font-size: clamp(1.65rem, 7.2vw, 2.05rem); }
  .store-catalog-heading p { font-size: .86rem; }
  .store-catalog-heading .store-all-link { font-size: .75rem; padding-top: 18px; gap: 4px; }
  .store-catalog-heading .store-all-link .store-icon { width: 16px; }
  .store-kicker { font-size: .68rem; }
  .store-search { border-radius: 12px; gap: 8px; }
  .store-search button { padding-inline: 12px; }
  .store-search input { font-size: 1rem; }
  .store-category-rail { padding-top: 14px; }
  .store-chip { font-size: .78rem; padding-inline: 13px; }
  .store-section { margin-top: 24px; }
  .store-section-heading { margin-bottom: 12px; }
  .store-section-heading p { font-size: .8rem; }
  .store-featured-rail { grid-auto-columns: 78%; gap: 12px; margin-inline: -2px; }
  .store-featured-rail .store-app-link { padding: 18px; gap: 14px; grid-template-columns: 70px minmax(0, 1fr); }
  .store-featured-rail .store-app-icon { width: 70px; height: 70px; border-radius: 16px; }
  .store-featured-rail .store-app-copy h3 { font-size: 1.03rem; }
  .store-catalog-grid { grid-template-columns: 1fr; gap: 0; }
  .store-app-link { padding: 18px 0; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; }
  .store-app-icon { width: 62px; height: 62px; border-radius: 14px; }
  .store-app-copy h3 { font-size: .94rem; }
  .store-app-copy p { font-size: .78rem; }
  .store-app-view { padding: 7px 12px; font-size: .73rem; }
  .store-count { font-size: .72rem; padding: 6px 9px; }
  .app-storefront-page .breadcrumbs { margin-bottom: 18px; font-size: .68rem; }
  .store-product { grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding-top: 2px; padding-bottom: 18px; }
  .store-product-icon { width: 78px; height: 78px; border-radius: 18px; grid-row: auto; }
  .store-product h1 { font-size: 1.4rem; line-height: 1.4; margin-bottom: 8px; }
  .store-product-categories { font-size: .68rem; gap: 7px; }
  .store-product-description { font-size: .82rem; line-height: 1.65; }
  .store-product-download { grid-column: 1 / -1; }
  .store-product-download .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .store-product-download .btn { min-width: 0; width: 100%; font-size: .82rem; padding: 12px 8px; gap: 6px; }
  .store-product-download .hero-actions > :only-child { grid-column: 1 / -1; }
  .store-download-hint { font-size: .69rem; }
  .store-purchase-note { font-size: .67rem; }
  .store-product-facts { margin-top: 3px; padding-block: 14px; row-gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-product-facts > div { padding-inline: 12px; }
  .store-product-facts > div:nth-child(odd) { padding-inline-start: 0; }
  .store-product-facts > div:nth-child(even) { border: 0; }
  .store-product-facts dt { font-size: .68rem; margin-bottom: 3px; }
  .store-product-facts dd { font-size: .76rem; }
  .store-family { padding: 14px; margin-bottom: 14px; border-radius: 14px; }
  .store-family p { font-size: .76rem; }
  .store-ar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; overflow: visible; }
  .store-ar-nav a { gap: 5px; padding: 10px 12px; font-size: .74rem; min-height: 44px; }
  .store-ar-nav .store-icon { width: 16px; height: 16px; }
  .store-section-nav { gap: 22px; margin-inline: -16px; padding-inline: 16px; }
  .store-section-nav a { padding: 13px 0; font-size: .78rem; }
  .store-screenshots { gap: 12px; }
  .store-screenshot { height: 260px; border-radius: 14px; max-width: 85%; }
  .store-preview { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 14px; }
  .store-preview-controls button { font-size: .75rem; }
  .app-storefront-page .app-detail-layout { margin-top: 24px; gap: 20px; }
  .app-storefront-page .detail-card { padding: 18px; }
  .app-storefront-page .detail-card h2 { font-size: 1.07rem; }
  .app-storefront-page :is(.prose-card p, .app-section-list, .app-section-card p) { font-size: .9rem; }
  .app-storefront-page .app-detail-layout .detail-sidebar { display: grid; gap: 16px; }
  .app-storefront-page .section-heading h2 { font-size: 1.15rem; }
  .store-cards-hero { gap: 12px; align-items: start; }
  .store-cards-hero > img { width: 56px; height: 56px; border-radius: 12px; }
  .store-cards-hero h1 { font-size: 1.25rem; }
  .store-cards-hero p { font-size: .84rem; }
  .store-printed-note { padding: 14px; gap: 10px; }
  .store-printed-note p { font-size: .79rem; }
  .store-cards-actions .btn { font-size: .78rem; padding: 10px 12px; min-height: 44px; }
  .app-storefront-page .cards-sections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-storefront-page .cards-section-card { flex-direction: column; align-items: start; padding: 14px; gap: 10px; }
  .app-storefront-page .cards-section-icon { width: 58px; height: 58px; border-radius: 12px; }
  .app-storefront-page .cards-section-info h2 { font-size: .83rem; }
  .app-storefront-page .cards-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-storefront-page #cards-info .detail-sidebar { order: -1; }
  .app-storefront-page .cards-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-storefront-page .cards-cta-block .hero-actions { display: flex; flex-wrap: wrap; width: 100%; min-width: 0; gap: 10px; }
  .app-storefront-page .cards-cta-block .btn-store { flex: 1 1 140px; min-width: 0; width: auto; font-size: .82rem; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-storefront-page *, .app-storefront-page *::before, .app-storefront-page *::after { scroll-behavior: auto; transition: none; }
}
.app-storefront-page .cards-gallery-img { object-fit: contain; }
