.store-shell {
  --store-line: color-mix(in srgb, var(--md-sys-color-on-surface) 15%, transparent);
  --store-muted: var(--md-sys-color-on-surface-variant);
  --store-paper: var(--md-sys-color-surface-container-lowest);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 8px clamp(10px, 3vw, 42px) clamp(48px, 6vw, 90px);
}
.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--store-line);
  border-radius: var(--corner);
  background: var(--md-sys-color-surface-container-low);
}
.store-intro {
  align-self: center;
  padding: clamp(24px, 3vw, 44px) clamp(24px, 4.2vw, 64px);
}
.store-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--md-sys-color-primary);
  font-size: .85rem;
  font-weight: 680;
  letter-spacing: .03em;
}
.store-kicker .symbol { font-size: 21px; }
.store-intro h1 { max-width: 17ch; font-size: clamp(2rem, 4vw, 3.4rem); }
.store-lead {
  max-width: 37ch;
  margin-top: 16px;
  color: var(--store-muted);
  font-size: 1rem;
}
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 17px;
  border: 0;
  border-radius: 100px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}
.store-button:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 87%, var(--md-sys-color-on-primary)); }
.store-button .symbol { font-size: 19px; }
.store-intro .store-button { margin-top: 23px; }

.store-display {
  position: relative;
  display: grid;
  min-height: clamp(280px, 29vw, 390px);
  place-items: center;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 44%, var(--md-sys-color-secondary-container), transparent 68%);
}
.store-display-orbit {
  position: absolute;
  z-index: -1;
  width: 81%;
  height: 72%;
  border: 1px solid var(--store-line);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.store-display > .symbol { font-size: 84px; color: var(--md-sys-color-primary); }
.store-book {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px 9px 9px 4px;
  background: var(--md-sys-color-surface-container-highest);
  box-shadow: 0 12px 25px #0003, 0 2px 5px #0003;
}
.store-book::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0003, transparent 5%, #ffffff28 6%, transparent 8%);
  content: '';
  pointer-events: none;
}
.store-book img { display: block; width: 100%; height: 100%; object-fit: contain; }
.store-cover-placeholder {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 15%;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.store-display .store-book { position: absolute; width: min(33%, 188px); }
.store-display .store-book:nth-child(2):not(:last-child) { transform: translate(-62%, 5%) rotate(-14deg) scale(.86); }
.store-display .store-book:nth-child(3) { z-index: 2; transform: translate(0, -2%) rotate(-4deg); }
.store-display .store-book:nth-child(4) { transform: translate(62%, 5%) rotate(11deg) scale(.89); }

.store-catalog { margin-top: clamp(30px, 4vw, 50px); scroll-margin-top: 20px; }
.store-catalog-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.store-catalog-heading h2,
.store-detail-lower h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.2; letter-spacing: -.025em; }
.store-catalog-heading p { color: var(--store-muted); font-size: .9rem; }
.store-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--store-line);
  border-radius: 18px;
  background: var(--md-sys-color-surface-container-low);
}
.store-field { display: grid; min-width: 0; gap: 5px; color: var(--store-muted); font-size: .8rem; font-weight: 620; }
.store-field select,
.store-account-form input,
.store-search {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--store-line);
  border-radius: 10px;
  background: var(--store-paper);
  color: var(--md-sys-color-on-surface);
  font: 400 .91rem/1.2 var(--md-sys-typescale-body-medium-font);
}
.store-search { display: flex; align-items: center; gap: 7px; }
.store-search .symbol { font-size: 20px; }
.store-search:focus-within { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
.store-search input { width: 100%; min-width: 0; align-self: stretch; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; }
.store-search input::placeholder { color: var(--store-muted); opacity: 1; }

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.store-card { min-width: 0; }
.store-card > article {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--store-line);
  border-radius: 20px;
  background: var(--store-paper);
  color: inherit;
  transition: border-color var(--motion-effects), box-shadow var(--motion-effects);
}
.store-card > article:hover { border-color: var(--md-sys-color-primary); box-shadow: 0 6px 18px #0001; }
.store-card > article:has(a:focus-visible) { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }
.store-card h3 a { color: inherit; text-decoration: none; outline: none; }
.store-card h3 a::after { position: absolute; inset: 0; content: ''; }
.store-card-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 25px;
  background: radial-gradient(ellipse at 50% 31%, var(--md-sys-color-secondary-container), var(--md-sys-color-surface-container-high));
}
.store-card:nth-child(3n+2) .store-card-art {
  background: radial-gradient(ellipse at 50% 31%, var(--md-sys-color-primary-container), var(--md-sys-color-surface-container-high));
}
.store-card:nth-child(3n) .store-card-art {
  background: radial-gradient(ellipse at 50% 31%, var(--md-sys-color-tertiary-container), var(--md-sys-color-surface-container-high));
}
.store-card-art .store-book { width: min(57%, 151px); }
.store-access {
  position: absolute;
  top: 11px;
  right: 11px;
  padding: 4px 10px;
  border: 1px solid var(--store-line);
  border-radius: 100px;
  background: var(--store-paper);
  font-size: .79rem;
  font-weight: 650;
}
.store-access[data-free] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.store-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: clamp(14px, 1.7vw, 22px); }
.store-metadata { display: flex; flex-wrap: wrap; gap: 6px; color: var(--store-muted); font-size: .8rem; font-weight: 640; }
.store-metadata span:not(.symbol) { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; background: var(--md-sys-color-surface-container); }
.store-metadata .symbol { font-size: 15px; }
.store-card h3 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.24; overflow-wrap: anywhere; }
.store-card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--store-muted);
  font-size: .91rem;
  overflow-wrap: anywhere;
}
.store-card-link { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 8px; color: var(--md-sys-color-primary); font-size: .88rem; font-weight: 680; }
.store-card-link .symbol { font-size: 18px; }
.store-empty { display: grid; justify-items: center; gap: 8px; padding: 42px 18px; border: 1px dashed var(--store-line); border-radius: 20px; text-align: center; }
.store-empty > .symbol { color: var(--md-sys-color-primary); }
.store-empty p { color: var(--store-muted); }
.store-empty .store-button { margin-top: 6px; }

.store-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0 0 12px;
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}
.store-back .symbol { font-size: 19px; }
.store-back:hover { text-decoration: underline; }
.store-detail {
  display: grid;
  grid-template-columns: clamp(13.5rem, 25.5vw, 18rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--store-line);
  border-radius: 20px;
  background: var(--store-paper);
}
.store-detail-heading .store-kicker { margin-bottom: 8px; font-size: .8rem; }
.store-detail-heading .store-kicker .symbol { font-size: 17px; }
.store-detail-heading h1 { max-width: 32ch; margin: 8px 0 6px; font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.12; letter-spacing: -.03em; text-wrap: wrap; }
.store-byline { color: var(--store-muted); font-size: .875rem; }
.store-description { max-width: 70ch; margin-top: 10px; color: var(--store-muted); font-size: .95rem; overflow-wrap: anywhere; }
.store-themes { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.store-themes li { padding: 2px 9px; border: 1px solid var(--store-line); border-radius: 100px; font-size: .8rem; }
.store-detail-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 12px;
  margin-top: 12px;
}
.store-detail-lower > section { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--store-line); border-radius: 16px; background: var(--md-sys-color-surface-container-low); }
.store-detail-lower > section:only-child { grid-column: 1 / -1; }
.store-contents ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.store-contents li { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 10px; background: var(--store-paper); }
.store-contents li .symbol { color: var(--md-sys-color-primary); }
.store-contents small { display: block; color: var(--store-muted); }
.store-access-panel .store-price { margin-top: 11px; font-size: 1.22rem; font-weight: 650; }
.store-access-panel .store-button { margin-top: 14px; }
main[data-account-page] { display: grid; margin-inline-end: var(--rail-width); }
.store-account-shell {
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 52px) clamp(10px, 3vw, 42px);
}
.store-account {
  width: min(100%, 25.5rem);
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--store-line);
  border-radius: 24px;
  background: var(--md-sys-color-surface-container-low);
  box-shadow: 0 12px 38px color-mix(in srgb, var(--md-sys-color-shadow) 9%, transparent);
}
.store-account h1 { text-align: center; margin: 0 0 18px; font-size: clamp(1.9rem, 4vw, 2.5rem); }
.store-account [data-account-status]:empty,
.store-account [data-verification-status]:empty { display: none; }
.store-account-providers { display: grid; justify-items: stretch; gap: 8px; max-width: 320px; margin: 0 auto; }
.store-provider-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: 10px;
  background: #fff;
  color: #1f1f1f;
  font-size: .875rem;
  font-weight: 550;
}
.store-provider-google img { flex: none; object-fit: contain; }
.store-provider-google:hover { background: #f2f2f2; }
.store-provider-apple { display: grid; place-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; }
.store-provider-apple img { display: block; max-width: 100%; height: auto; }
.store-account-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  color: var(--store-muted);
  font-size: .8rem;
}
.store-account-divider::before, .store-account-divider::after { content: ''; flex: 1; height: 1px; background: var(--store-line); }
.store-account-form .store-field { margin-top: 10px; }
.store-account-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; }
.store-account-actions .store-button { flex: 1 0 100%; justify-content: center; margin-top: 18px; }
.store-text-button {
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--md-sys-color-primary);
  font-size: .85rem;
  font-weight: 620;
}
.store-account button:disabled { cursor: wait; opacity: .65; }
.store-account [data-email-verification] { margin-top: 14px; }

@media (max-width: 879px) {
  main[data-account-page] { margin-inline-end: 0; }
}

@media (max-width: 750px) {
  .store-shell { padding-top: 4px; }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store-field:first-child { grid-column: 1 / -1; }
  .store-detail-lower { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .store-hero { grid-template-columns: 1fr; }
  .store-intro { padding-bottom: 10px; }
  .store-display { min-height: clamp(175px, 49vw, 256px); }
  .store-display .store-book { width: min(27%, 133px); }
  .store-display-orbit { width: 75%; height: 74%; }
  .store-grid { grid-template-columns: 1fr; }
  .store-card-art { padding: 27px; }
  .store-card-art .store-book { width: min(46%, 145px); }
  .store-detail { grid-template-columns: clamp(4.5rem, 24vw, 7rem) minmax(0, 1fr); gap: 12px; }
  .store-detail-body { display: contents; }
  .store-detail-heading h1 { font-size: 1.25rem; }
  .store-detail :is(.store-description, .store-themes) { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 460px) {
  .store-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-field:last-child { grid-column: 1 / -1; }
}

/* Catalog landing composition. The controls and publication cards use live data. */
.store-catalog-page .store-filters { margin-block: 0 clamp(22px, 3vw, 36px); }
@media (min-width: 880px) {
  .store-catalog-page .store-hero { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .store-catalog-page .store-intro h1 { max-width: 24ch; }
  .store-catalog-page .store-lead { max-width: 58ch; }
}
