/* Cache epoch 2026-09-28: issue a new hashed URL for the one-hour CSS policy. */
.shop-catalog__heading-main { flex: 1 1 18rem; min-width: 0; }
.shop-catalog__heading-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.shop-catalog__heading-line h1 { margin: 0; }
.shop-catalog__how summary {
  display: grid; place-items: center; width: 30px; height: 30px;
  list-style: none; cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft); color: var(--ink); font-weight: 800;
}
.shop-catalog__how summary::-webkit-details-marker { display: none; }
.shop-catalog__how summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.shop-catalog__how[open] { flex-basis: 100%; }
.shop-catalog__how-copy {
  max-width: 40rem; margin-top: .5rem; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.shop-catalog__how-copy h2 { margin: 0 0 .35rem; font-size: 1rem; }
.shop-catalog__how-copy p { margin: 0; color: var(--muted); line-height: 1.5; }

.shop-page .shop-links h3,
.shop-page .shop-contacts h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  color: var(--muted, #64748b);
}

/* The whole shop cover is visible; identity sits below the media panel. */
.shop-page .hero-cover.hero-cover--shop {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.shop-page .hero-cover--shop .hero-cover__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1240 / 434;
  background: linear-gradient(120deg, #694084, #9b59b6 62%, #b784ca);
}

.shop-page .hero-cover--shop .hero-cover__media .hero-cover__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-page .hero-cover--shop .hero-cover__card {
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.95rem;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  color: var(--ink);
}

.shop-page .hero-cover--shop .hero-cover__avatar {
  width: 56px;
  height: 56px;
  border: 2px solid var(--line);
  font-size: 1.35rem;
}

.shop-page .hero-cover--shop .hero-cover__identity h1 {
  font-size: 1.35rem;
  color: var(--ink);
}

.shop-page .hero-cover--shop .hero-cover__identity .eyebrow {
  color: var(--muted);
}

.shop-page .hero-cover--shop .hero-cover__subtitle {
  color: var(--muted);
}

.shop-page .community-hero__description {
  margin-top: 0.65rem;
}

.shop-page .text-expand {
  margin: 0.65rem 1.25rem 0;
  max-width: 78ch;
}

.shop-page .side-card .text-expand {
  margin: 0;
  max-width: none;
}

.shop-page .text-expand__summary {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.shop-page .text-expand__summary::marker { content: ""; }
.shop-page .text-expand__summary::-webkit-details-marker {
  display: none;
}

.shop-page .text-expand__summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 2px;
}

.shop-page .text-expand__preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.shop-page .text-expand__more,
.shop-page .text-expand__hide {
  color: var(--purple);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(107, 61, 139, 0.35);
  text-underline-offset: 0.12em;
  white-space: nowrap;
}

.shop-page .text-expand__summary:hover .text-expand__more,
.shop-page .text-expand__summary:hover .text-expand__hide,
.shop-page .text-expand__summary:focus-visible .text-expand__more,
.shop-page .text-expand__summary:focus-visible .text-expand__hide {
  text-decoration-color: var(--purple);
}

.shop-page .text-expand__hide { display: none; }

.shop-page .text-expand[open] .text-expand__preview,
.shop-page .text-expand[open] .text-expand__more {
  display: none;
}

.shop-page .text-expand[open] .text-expand__hide { display: inline; }

.shop-page .text-expand__body {
  margin-top: 0.6rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.shop-page .community-hero__description.text-expand__body {
  margin: 0.6rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.shop-page .community-hero__description:not(.text-expand__body) {
  max-width: 78ch;
  margin-left: 1.25rem;
  margin-right: 1.25rem;
  padding-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.shop-page .community-hero__actions {
  padding-top: 0.55rem;
}

@media (max-width: 640px) {
  .shop-page .hero-cover--shop .hero-cover__card {
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0.65rem 0.75rem;
  }

  .shop-page .hero-cover--shop .hero-cover__avatar {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .shop-page .hero-cover--shop .hero-cover__identity h1 {
    font-size: 1.05rem;
  }

  .shop-page .text-expand,
  .shop-page .community-hero__description:not(.text-expand__body) {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }
}

.shop-page .shop-links ul,
.shop-page .shop-contacts dl {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.shop-page .shop-contacts dl {
  display: grid;
  gap: 0.35rem;
}

.shop-page .shop-contacts dt {
  font-weight: 600;
  font-size: 0.8125rem;
}

.shop-page .shop-contacts dd {
  margin: 0;
  word-break: break-word;
}

.shop-catalog .shop-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(28, 24, 35, .06);
}

.shop-catalog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.shop-catalog__grid > .empty-state { grid-column: 1 / -1; }
.shop-catalog .shop-card__cover { position: relative; min-height: 100px; aspect-ratio: 1240 / 434; background: linear-gradient(125deg, #24212b, #5e4670 68%, #9473a0); }
.shop-catalog .shop-card__cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shop-catalog .shop-card__content { display: flex; flex: 1; flex-direction: column; gap: .7rem; padding: 1rem 1.15rem 1.2rem; }
.shop-catalog .shop-card__heading { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.shop-catalog .shop-card__avatar { position: relative; display: grid; flex: 0 0 48px; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; background: var(--purple-soft); color: var(--purple-dark); font-weight: 800; }
.shop-catalog .shop-card__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-catalog .shop-card h2 { margin: 0; font-size: 1.12rem; overflow-wrap: anywhere; }
.shop-catalog .shop-card__description { margin: 0; min-height: 3em; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.shop-catalog .shop-card__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; min-width: 0; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-soft); color: var(--ink); font-size: .78rem; }
.shop-catalog .shop-card__cta { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; font-weight: 700; }
.shop-catalog .shop-card__cta:hover { text-decoration: underline; }
@media (max-width: 620px) { .shop-catalog__grid { gap: .75rem; } }

.shop-form .form-row + .form-row {
  margin-top: 1rem;
}

.shop-form .stack-form { max-width: 820px; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.shop-form .form-row label { display: block; margin-bottom: .35rem; font-size: .86rem; font-weight: 700; }
.shop-form .form-row input:not([type="checkbox"]), .shop-form .form-row textarea { width: 100%; }
.shop-form .form-row textarea { min-height: 96px; }
.shop-form .form-row .hint { margin: .3rem 0 0; color: var(--muted); font-size: .78rem; }
.shop-form .form-row .field-error { margin: .3rem 0 0; color: var(--danger); font-size: .82rem; }
.shop-form .stack-form > .btn { margin-top: 1.3rem; }

.shop-settings__intro h1 {
  margin-bottom: 0.35rem;
}

.shop-settings__shop-link {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.shop-settings__shop-link a {
  font-weight: 650;
}

.shop-settings__tabs {
  max-width: 820px;
  margin-bottom: 0;
}

.shop-settings__panel {
  max-width: 820px;
  margin-top: 0;
  padding: 1rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
}

.shop-settings__panel > h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.shop-settings__anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.shop-settings__anchors a {
  color: var(--muted);
  font-weight: 650;
}

.shop-settings__anchors a:hover {
  color: var(--purple);
}

.shop-settings__alert {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e8c4c4;
  border-radius: var(--radius);
  background: #fff5f5;
  color: var(--danger);
  font-size: 0.86rem;
}

.shop-settings__alert ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.shop-settings__alert a {
  color: inherit;
}

.shop-settings__group + .shop-settings__group {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.shop-settings__group-title {
  margin: 0 0 0.85rem;
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.shop-settings__slug-readonly {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-soft);
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
}

.shop-settings__form > .btn {
  margin-top: 1.35rem;
}

.shop-settings__inline-form {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.shop-settings__people {
  margin-top: 0.5rem;
}

.shop-settings__people-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.shop-settings__people-row > a {
  flex: 1 1 10rem;
  min-width: 0;
}

.shop-settings__access-badge {
  flex: 0 0 auto;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shop-settings__people-row .shop-settings__access-badge {
  background: #eee5f3;
  color: var(--purple-dark);
}

.shop-settings__row-action {
  flex: 1 1 100%;
}

.shop-settings__row-action .btn {
  width: 100%;
}

.shop-settings__role-access {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 0.82rem;
}

.shop-subscriber-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
  .shop-settings__row-action {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .shop-settings__row-action .btn {
    width: auto;
    min-width: 8.5rem;
  }
}

@media (max-width: 620px) {
  .shop-settings__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    min-height: 0;
    padding: 0;
  }

  .shop-settings__tabs a {
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 0.35rem;
    font-size: 0.78rem;
    text-align: center;
  }

  .shop-settings__panel {
    padding: 0.85rem 0.9rem 1.1rem;
  }
}

/* Dark appearance theme (DREAD2-228): shop pages inherit the token overrides
   from site.css; these raw-hex pairs keep light-only panels readable. */
:root[data-theme="dark"] .shop-settings__panel,
:root[data-theme="dark"] .shop-catalog__how-copy,
:root[data-theme="dark"] .shop-card,
:root[data-theme="dark"] .shop-page .side-card .text-expand__more,
:root[data-theme="dark"] .shop-page .side-card .text-expand__hide { color: var(--ink); }
:root[data-theme="dark"] :is(.shop-card, .shop-settings__panel, .shop-catalog__how-copy) { background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .shop-card .shop-card__description { color: var(--muted); }
:root[data-theme="dark"] .shop-settings__fieldset { border-color: var(--line); background: var(--paper-soft); }
:root[data-theme="dark"] .shop-settings__fieldset legend { color: var(--purple); }

/* Owner and subscriber details sit below the unobscured catalog image. */
.shop-card__meta {
  min-width: 0;
}
.shop-card__subscribers { white-space: nowrap; color: var(--muted); }
.shop-card__owner-link { min-width: 0; }
.shop-card__owner-link > a {
  display: flex; align-items: center; gap: .4rem; min-width: 0; width: 100%; overflow: hidden;
  color: var(--ink); font-weight: 650; text-decoration: none; white-space: nowrap;
}
.shop-card__owner-link > a:hover { color: var(--purple); text-decoration: none; }
.shop-card__owner-link > a:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 3px; }
.shop-card__owner-avatar {
  position: relative; display: inline-grid; flex: 0 0 auto; place-items: center;
  width: 24px; height: 24px; overflow: hidden; border-radius: 50%;
  background: var(--purple-soft); color: var(--purple); font-size: .72rem; font-weight: 750;
}
.shop-card__owner-avatar .entity-avatar__letter { width: 100%; height: 100%; }
.shop-card__owner-avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: inherit; object-fit: cover;
}
.shop-card__owner-name {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink); font-size: .78rem; white-space: nowrap; line-height: 1.2;
}
.shop-card__owner-link .author-badge { flex: 0 0 auto; }

.shop-settings .image-current-preview--cover {
  position: relative;
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 1240 / 434;
}
.shop-settings .image-current-preview--cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
