    /* The way into the full storefront: a quiet row under the shop's name,
       not a banner competing with the products. */
    .shop-live-app {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 16px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 14px;
      color: var(--cre8-view-fg);
      background: var(--cre8-view-surface);
      text-decoration: none;
      transition: border-color 140ms ease, background 140ms ease;
    }
    .shop-live-app:hover {
      border-color: var(--cre8-view-accent);
      background: color-mix(in srgb, var(--cre8-view-accent) 6%, var(--cre8-view-surface));
    }
    .shop-live-app span {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 4px 12px;
    }
    .shop-live-app small {
      color: var(--cre8-view-fg-faint);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
    .shop-live-app strong {
      color: var(--cre8-view-fg);
      font-size: 15px;
      font-weight: 600;
    }
    .shop-live-app em {
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
      font-style: normal;
    }
    .shop-live-app b {
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      flex: 0 0 32px;
      border-radius: 50%;
      color: var(--cre8-view-fg);
      border: 1px solid var(--cre8-view-border);
      font-size: 16px;
    }
    /* Product tiles: the picture first, then the name, then the price. The
       card primitive puts its header first, so its body's children join the
       card's own column and the picture is ordered ahead. */
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) {
      display: flex;
      flex-direction: column;
      gap: 8px;
      height: 100%;
      overflow: hidden;
      padding: 0 0 14px;
    }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__body { display: contents; }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) .shop-card-media,
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) .shop-card-media-empty { order: -1; }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__header {
      display: grid;
      gap: 4px;
      padding: 0 14px;
      border: 0;
      margin: 0;
    }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) .primitive-card__title {
      font-size: 15px;
      line-height: 1.3;
    }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) .primitive-card__badge {
      justify-self: start;
      padding: 0;
      border: 0;
      background: none;
      color: var(--cre8-view-fg);
      font-size: 15px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-row,
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__subtitle { padding: 0 14px; }
    /* Card chrome comes from the shared .cre8-card primitive. */
    .shop-live-snapshot .hint {
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
      margin-bottom: 8px;
    }
    .shop-live-snapshot .row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    /* Product tiles now render as canonical ItemCards (.primitive-card) laid
       out by the base-theme `.primitive-section--grid`. Only the per-tile media
       framing stays app-local. */
    /* Box chrome comes from the shared .cre8-empty/.cre8-empty--error
       primitives; only the shop-specific light-scheme tones stay here. */
    .shop-doc-error {
      border-color: light-dark(rgba(192,54,44,0.4), rgba(239,68,68,0.4));
      color: light-dark(#c0362c, #ef4444);
      background: light-dark(#fdf4f3, rgba(255,255,255,0.02));
    }
    /* Storefront layout and card chrome come from the shared List and ItemCard.
       Only the product-image mosaic is Shop-specific. */
    /* Rows sized `minmax(0, 1fr)` so a photo's own height never stretches the
       tile past its aspect ratio: every storefront card is the same height. */
    .shop-card-mosaic {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      grid-auto-rows: minmax(0, 1fr);
      gap: 2px;
      aspect-ratio: 16 / 10;
      overflow: hidden;
      margin-bottom: 8px;
      background: var(--cre8-view-surface-alt);
    }
    .shop-card-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; min-width: 0; min-height: 0; }
    .shop-card-mosaic--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .shop-card-mosaic--3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .shop-card-mosaic--3 img:first-child { grid-row: span 2; }
    .shop-card-mosaic--empty {
      place-items: center;
      color: var(--cre8-view-fg-faint);
      font-size: 40px;
      font-weight: 800;
      letter-spacing: 0.04em;
      background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--cre8-view-accent) 18%, transparent), transparent 60%),
        var(--cre8-view-surface-alt);
    }
    /* Zero-data states render on the shared .cre8-empty primitive. */
    .shop-card-media img {
      width: 100%;
      aspect-ratio: 1 / 1;
      height: auto;
      object-fit: cover;
      display: block;
      transition: transform 240ms ease;
    }
    .shop-card-media { overflow: hidden; }
    .primitive-card__link:hover .shop-card-media img { transform: scale(1.03); }
    .shop-card-media-empty {
      width: 100%;
      aspect-ratio: 1 / 1;
      height: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--cre8-view-fg-faint);
      font-size: 34px;
      font-weight: 800;
      letter-spacing: 0.04em;
      background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--cre8-view-accent) 16%, transparent), transparent 60%),
        var(--cre8-view-surface-alt);
    }
    .shop-variants {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .shop-variant {
      display: inline-flex;
      align-items: center;
      padding: 5px 12px;
      border-radius: 999px;
      border: 1px solid light-dark(rgba(16,24,20,0.14), rgba(255,255,255,0.1));
      background: light-dark(#f2f5f3, rgba(0,0,0,0.2));
      font-size: 13px;
      color: var(--cre8-view-fg-muted);
      text-decoration: none;
      transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
    }
    .shop-variant:hover {
      color: var(--cre8-view-fg);
      border-color: light-dark(rgba(16,24,20,0.30), rgba(255,255,255,0.25));
    }
    .shop-variant--current {
      color: var(--cre8-view-fg);
      border-color: var(--cre8-view-accent);
      background: color-mix(in srgb, var(--cre8-view-accent) 12%, transparent);
      box-shadow: inset 0 0 0 1px var(--cre8-view-accent);
    }
    .shop-variants-group { display: grid; gap: 8px; }
    .shop-variants__label {
      margin: 0;
      color: var(--cre8-view-fg-muted);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .shop-variants-group .shop-variant {
      min-height: 40px;
      padding: 6px 14px;
      gap: 8px;
      border-radius: 12px;
      font-size: 14px;
    }
    .shop-variant__price {
      color: var(--cre8-view-fg-muted);
      font-size: 12px;
      font-variant-numeric: tabular-nums;
    }
    .shop-launch-runway {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 2px 0;
    }
    .shop-launch-runway strong {
      color: var(--cre8-view-fg);
      font-size: 15px;
    }
    .shop-launch-runway p {
      max-width: 720px;
      margin: 6px 0 0;
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
      line-height: 1.55;
    }
    .shop-launch-runway__action {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-radius: 10px;
      color: #fff;
      background: linear-gradient(135deg, #0f7652, #1f9d6b);
      box-shadow: 0 8px 24px rgba(31,157,107,0.22);
      font-size: 13px;
      font-weight: 600;
      text-decoration: none;
    }
    .shop-launch-runway__action:hover {
      background: linear-gradient(135deg, #0d6949, #188b5e);
    }
    .shop-acceptance-summary {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin: 0 0 18px;
      padding: 18px;
      border: 1px solid light-dark(rgba(214,146,26,0.28), rgba(255,190,74,0.28));
      border-radius: 14px;
      background: light-dark(rgba(255,246,225,0.72), rgba(255,180,45,0.08));
    }
    .shop-acceptance-summary.is-ready {
      border-color: light-dark(rgba(31,157,107,0.32), rgba(81,216,138,0.34));
      background: light-dark(rgba(230,248,239,0.78), rgba(81,216,138,0.08));
    }
    .shop-acceptance-summary small {
      display: block;
      margin: 0 0 5px;
      color: var(--cre8-view-fg-faint);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.14em;
    }
    .shop-acceptance-summary strong {
      color: var(--cre8-view-fg);
      font-size: 20px;
    }
    .shop-acceptance-summary p {
      margin: 6px 0 0;
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
    }
    .shop-acceptance-summary__meta {
      display: flex;
      align-items: flex-end;
      gap: 6px;
      flex-direction: column;
      color: var(--cre8-view-fg-muted);
      font-size: 11px;
    }
    .shop-acceptance-summary__meta span {
      padding: 5px 8px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 999px;
    }
    .shop-acceptance-actions {
      display: flex;
      justify-content: flex-end;
      padding-top: 16px;
    }
    @media (max-width: 720px) {
      .shop-launch-runway {
        align-items: stretch;
        flex-direction: column;
      }
      .shop-launch-runway__action {
        justify-content: center;
      }
      .shop-acceptance-summary {
        flex-direction: column;
      }
      .shop-acceptance-summary__meta {
        align-items: flex-start;
      }
    }
    /* Table chrome (widths, cell padding, rules, right-aligned .num columns)
       comes from the shared .cre8-table primitive; only the order-total
       footer and link colour are shop-specific. */
    .shop-order-address th {
      color: var(--cre8-view-fg-muted);
      font-weight: 500;
    }
    .shop-order-items tfoot .shop-order-total-row td {
      color: var(--cre8-view-fg-muted);
      border-bottom: none;
      padding-top: 4px;
      padding-bottom: 2px;
    }
    .shop-order-items tfoot .shop-order-total-row--discount td {
      color: light-dark(#1f9d6b, #51d88a);
    }
    .shop-order-items tfoot .shop-order-total-row--grand td {
      color: var(--cre8-view-fg);
      font-weight: 600;
      border-top: 1px solid light-dark(rgba(16,24,20,0.14), rgba(255,255,255,0.1));
    }
    .shop-order-items a {
      color: var(--cre8-view-fg);
      font-weight: 600;
    }
    .shop-order-ref { color: var(--cre8-view-fg-faint); font-size: 12px; }
    /* Quiet supporting copy beside a link or under a card title. */
    .shop-muted { color: var(--cre8-view-fg-muted); font-size: 13px; }
    /* Fabrication receipts: one line per stage, hashes wrap inside the card. */
    .shop-machine-receipts { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 14px; overflow-wrap: anywhere; }
    /* A scene listing: its caption line and, when the seller sent prop
       placements, the top-down plan. */
    .shop-scene-preview { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--cre8-view-border); border-radius: 16px; background: var(--cre8-view-surface-alt); color: var(--cre8-view-fg); }
    .shop-scene-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    .shop-scene-summary, .shop-scene-caption, .shop-scene-status { margin: 0; color: var(--cre8-view-fg-soft); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
    .shop-scene-figure { margin: 0; min-width: 0; }
    .shop-scene-figure figcaption { padding-top: 8px; font-size: 12px; color: var(--cre8-view-fg-soft); }
    .shop-scene-plan { display: block; width: 100%; height: clamp(240px, 32vw, 360px); border: 1px solid var(--cre8-view-border-strong); border-radius: 12px; box-sizing: border-box; }
    .shop-scene-plan__background { fill: var(--cre8-view-surface); }
    .shop-scene-plan__object { stroke: var(--cre8-view-fg-soft); stroke-opacity: .5; }
    .shop-scene-enhancement { display: grid; gap: 12px; min-width: 0; }
    .shop-scene-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
    .shop-scene-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; max-width: 100%; padding: 8px 16px; border: 1px solid var(--cre8-view-border-strong); border-radius: 8px; background: var(--cre8-view-surface); color: var(--cre8-view-fg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
    .shop-scene-button:hover { border-color: var(--cre8-view-accent); }
    .shop-scene-button:focus-visible, .shop-scene-viewport canvas:focus-visible { outline: 2px solid var(--cre8-view-accent); outline-offset: 3px; }
    .shop-scene-button:disabled { cursor: wait; opacity: .65; }
    .shop-scene-viewport { position: relative; width: 100%; height: clamp(240px, 32vw, 360px); min-width: 0; overflow: hidden; border: 1px solid var(--cre8-view-border-strong); border-radius: 12px; box-sizing: border-box; }
    .shop-scene-preview [hidden] { display: none !important; }
    .shop-pdp__media--scene { min-width: 0; }
    @media (max-width: 760px) { .shop-pdp__media--scene .shop-scene-preview { padding: 12px; } }
    /* Way-back and onward links are the shared .cre8-doc-back link. */
    /* Semantic status badges — make order/product lifecycle scannable. Pill
       chrome is the shared .cre8-pill primitive toned by its intent modifier
       (chosen in `shop_status_intent`); what stays here is the shop's own
       delta: the leading state dot and the capitalized, humanized label. */
    .shop-status-banner {
      margin: 2px 0 8px;
    }
    .shop-status {
      font-weight: 500;
      text-transform: capitalize;
    }
    .shop-status::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }
    /* ── Tablet point-of-sale (/view/shop/merchant/{shop_id}/pos) ─────────────────
       Big touch targets: a product grid on the left, a sticky ticket + tender
       pad on the right. Sized for a tablet in the hand, collapses to a stack on
       a phone. */
    .pos-wrap {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      flex-wrap: wrap;
    }
    .pos-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
      min-width: 0;
      gap: 12px;
      flex: 1 1 340px;
    }
    /* An empty catalog is one empty state across the whole grid, not a tile. */
    .pos-grid > .cre8-empty { grid-column: 1 / -1; }
    .pos-tile {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-height: 92px;
      padding: 16px;
      border-radius: 8px;
      border: 1px solid var(--cre8-view-border);
      background: var(--cre8-view-surface);
      box-shadow: 0 1px 2px light-dark(rgba(16,24,20,0.05), rgba(0,0,0,0.22));
      text-align: left;
      cursor: pointer;
      font: inherit;
      color: inherit;
      transition: transform 90ms ease, border-color 120ms ease, box-shadow 120ms ease;
    }
    .pos-tile:hover { border-color: var(--cre8-view-accent); }
    .pos-tile:active { transform: scale(0.97); }
    .pos-tile-name { font-weight: 700; font-size: 15px; color: var(--cre8-view-fg); }
    .pos-tile-price { font-variant-numeric: tabular-nums; color: var(--cre8-view-accent); font-weight: 600; }
    .pos-tile-sub { font-size: 12px; color: var(--cre8-view-fg-muted); }
    .pos-cart {
      flex: 1 1 300px;
      min-width: 0;
      box-sizing: border-box;
      max-width: 100%;
      position: sticky;
      top: 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 16px;
      border-radius: 8px;
      border: 1px solid var(--cre8-view-border);
      background: var(--cre8-view-surface);
    }
    .pos-cart-title { margin: 0; font-size: 14px; color: var(--cre8-view-fg-muted); }
    .pos-lines { display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
    .pos-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
    .pos-line-name { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--cre8-view-fg); }
    .pos-line-amt { font-variant-numeric: tabular-nums; }
    .pos-line-del {
      width: 36px; height: 36px; border-radius: 6px; cursor: pointer; font: inherit; line-height: 1;
      border: 1px solid var(--cre8-view-border-strong);
      background: var(--cre8-view-surface); color: var(--cre8-view-danger);
    }
    .pos-total-row {
      display: flex; justify-content: space-between; align-items: baseline;
      padding-top: 8px; border-top: 1px solid var(--cre8-view-border);
      font-weight: 700; font-size: 18px; color: var(--cre8-view-fg);
      font-variant-numeric: tabular-nums;
    }
    .pos-tender { display: flex; gap: 8px; }
    .pos-btn {
      flex: 1; min-height: 52px; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px;
      border: 1px solid transparent; transition: transform 90ms ease, opacity 120ms ease;
    }
    .pos-btn:active { transform: scale(0.98); }
    .pos-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .pos-btn--ghost {
      flex: 0 0 88px;
      border-color: var(--cre8-view-border-strong);
      background: var(--cre8-view-surface); color: var(--cre8-view-fg-muted);
    }
    .pos-btn--charge { background: var(--cre8-view-accent); color: var(--cre8-view-on-accent); }
    .pos-receipt { min-height: 20px; font-size: 13px; }
    .pos-ok { color: var(--cre8-view-accent); }
    .pos-ok a { color: inherit; }
    .pos-err { color: var(--cre8-view-danger); }
    
    .pos-wrap :focus-visible { outline: 2px solid var(--cre8-view-accent); outline-offset: 3px; }

    /* Central-view sections: provenance timeline, Proof-of-Make badge, and
       the multi-location stock ledger on the product page. */
    .shop-lineage-root { margin: 0 0 10px; }
    .shop-lineage { list-style: none; margin: 0; padding: 0; }
    .shop-lineage li {
      display: grid; grid-template-columns: 92px 120px 1fr; gap: 8px; padding: 6px 0;
      border-bottom: 1px solid light-dark(rgba(16,24,20,0.1), rgba(255,255,255,0.08));
    }
    .shop-lineage-when { color: var(--cre8-view-fg-muted); font-variant-numeric: tabular-nums; font-size: 13px; }
    .shop-lineage-verb { font-weight: 600; }
    .shop-lineage-detail { color: var(--cre8-view-fg-muted); overflow-wrap: anywhere; }
    .shop-lineage-more { margin: 6px 0 0; font-size: 13px; color: var(--cre8-view-fg-muted); }
    .shop-proof { margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
    .shop-proof-ok {
      background: light-dark(rgba(31,157,107,0.12), rgba(52,201,138,0.14));
      color: light-dark(#0f6e56, #7fe3b8);
    }
    .shop-proof-bad {
      background: light-dark(rgba(200,80,80,0.12), rgba(255,120,120,0.14));
      color: var(--cre8-view-danger);
    }
    /* Chrome from .cre8-table; the totals row keeps its heavier rule. */
    .shop-stock-locations tfoot td { font-weight: 700; border-top: 2px solid light-dark(rgba(16,24,20,0.2), rgba(255,255,255,0.18)); }

    /* Weigh-priced ticket lines: the cashier types the scale readout. */
    .pos-line-qty {
      width: 64px; font: inherit; text-align: right; border-radius: 8px; padding: 2px 6px;
      border: 1px solid light-dark(rgba(16,24,20,0.16), rgba(255,255,255,0.14));
      background: light-dark(#ffffff, rgba(0,0,0,0.2)); color: var(--cre8-view-fg);
    }
    /* ── Product page: picture beside the buy box ─────────────────────────── */
    .shop-pdp {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
      gap: 28px;
      align-items: start;
    }
    .shop-pdp__media {
      display: grid;
      gap: 10px;
      position: sticky;
      top: 16px;
    }
    .shop-pdp__hero-img {
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      border-radius: 16px;
      border: 1px solid var(--cre8-view-border);
      display: block;
      background: var(--cre8-view-surface-alt);
    }
    .shop-pdp__thumbs {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
      gap: 8px;
    }
    .shop-pdp__thumbs img {
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      border-radius: 10px;
      border: 1px solid var(--cre8-view-border);
      display: block;
    }
    .shop-pdp__media--empty {
      aspect-ratio: 1 / 1;
      place-items: center;
      border-radius: 16px;
      border: 1px solid var(--cre8-view-border);
      background:
        radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--cre8-view-accent) 20%, transparent), transparent 58%),
        var(--cre8-view-surface-alt);
    }
    .shop-pdp__media--empty span {
      color: var(--cre8-view-fg-faint);
      font-size: clamp(56px, 9vw, 112px);
      font-weight: 800;
      letter-spacing: 0.04em;
    }
    .shop-pdp__buy {
      display: grid;
      gap: 14px;
    }
    .shop-pdp__price {
      margin: 0;
      font-size: clamp(26px, 3vw, 34px);
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--cre8-view-fg);
    }
    .shop-pdp__stock {
      margin: 0;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 600;
    }
    .shop-pdp__stock::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
    }
    .shop-pdp__stock--in { color: var(--cre8-view-accent); }
    .shop-pdp__stock--low { color: light-dark(#a15c00, #f5b454); }
    .shop-pdp__stock--out { color: var(--cre8-view-danger); }
    .shop-pdp__note {
      margin: 0;
      color: var(--cre8-view-fg-muted);
      font-size: 14px;
    }
    .shop-pdp__buy .shop-variants {
      padding-top: 2px;
    }
    .shop-pdp__badge {
      justify-self: start;
      margin: 0;
      padding: 3px 10px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--cre8-view-accent) 14%, transparent);
      color: var(--cre8-view-fg);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
    }
    .shop-pdp__spec {
      margin: -6px 0 0;
      color: var(--cre8-view-fg-muted);
      font-size: 14px;
    }
    .shop-pdp__preview audio { width: 100%; }
    .shop-pdp__owner {
      display: grid;
      gap: 8px;
      padding: 16px;
      border: 1px dashed var(--cre8-view-border);
      border-radius: 14px;
      background: var(--cre8-view-surface-alt);
    }
    .shop-pdp__owner p { margin: 0; color: var(--cre8-view-fg-muted); font-size: 14px; }
    .shop-pdp__owner strong { color: var(--cre8-view-fg); }
    .shop-pdp__owner a { margin-right: 14px; color: var(--cre8-view-fg); font-weight: 600; }
    .shop-pdp__cart-link, .shop-storefront__cart { margin: 0; font-size: 14px; }
    .shop-pdp__cart-link a, .shop-storefront__cart a { color: var(--cre8-view-fg); font-weight: 600; }
    .shop-pdp__file { scroll-margin-top: 24px; }
    .shop-pdp__file:target .shop-download { box-shadow: 0 0 0 3px color-mix(in srgb, var(--cre8-view-accent) 40%, transparent); }
    .shop-order-downloads { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
    .shop-order-downloads a {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 12px 14px; border: 1px solid var(--cre8-view-border); border-radius: 12px;
      color: var(--cre8-view-fg); text-decoration: none; font-weight: 600;
    }
    .shop-order-downloads a::after { content: "\2193"; color: var(--cre8-view-accent); }
    .shop-order-downloads a:hover { border-color: var(--cre8-view-accent); }
    .shop-pdp__edition {
      margin: 0;
      justify-self: start;
      padding: 4px 10px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--cre8-view-fg);
    }
    .shop-pdp__facts {
      margin: 0;
      color: var(--cre8-view-fg-muted);
      font-size: 14px;
    }
    .shop-pdp__editions {
      display: grid;
      gap: 8px;
      padding-top: 6px;
      border-top: 1px solid var(--cre8-view-border);
    }
    .shop-pdp__editions h2 {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
    }
    @media (max-width: 760px) {
      .shop-pdp {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
      }
      .shop-pdp__media {
        position: static;
      }
    }
    /* ── Cart: lines beside the total and checkout ──────────────────────── */
    .shop-cart {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
      gap: 24px;
      align-items: start;
    }
    .shop-cart__lines {
      display: grid;
      gap: 10px;
    }
    .shop-cart__line {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 14px;
      background: var(--cre8-view-surface);
    }
    .shop-cart__line-main {
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .shop-cart__line-main a {
      color: var(--cre8-view-fg);
      text-decoration: none;
    }
    .shop-cart__line-main a:hover {
      text-decoration: underline;
    }
    .shop-cart__line-main span {
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
    }
    .shop-cart__line form {
      margin: 0;
    }
    .shop-cart__summary {
      display: grid;
      gap: 12px;
      padding: 18px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 16px;
      background: var(--cre8-view-surface);
      position: sticky;
      top: 16px;
    }
    .shop-cart__total {
      margin: 0;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      font-size: 15px;
      color: var(--cre8-view-fg-muted);
    }
    .shop-cart__total strong {
      color: var(--cre8-view-fg);
      font-size: 24px;
      letter-spacing: -0.02em;
    }
    @media (max-width: 760px) {
      .shop-cart {
        grid-template-columns: minmax(0, 1fr);
      }
      .shop-cart__summary {
        position: static;
      }
      .shop-cart__line {
        grid-template-columns: minmax(0, 1fr) auto;
      }
    }

/* A digital product's file: its format, name and size, then either the
   download (owned) or what buying unlocks. */
.shop-download {
  display: grid; gap: 12px; padding: 16px;
  border: 1px solid var(--cre8-view-border-subtle); border-radius: 16px;
  background: var(--cre8-view-surface);
}
.shop-download--owned { border-color: color-mix(in srgb, var(--cre8-view-accent) 45%, transparent); }
.shop-download-file { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-download-format {
  flex: none; display: grid; place-items: center; width: 52px; height: 60px;
  border-radius: 8px 16px 8px 8px; background: var(--cre8-view-chip-bg);
  color: var(--cre8-view-fg); font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
}
.shop-download-name { display: grid; gap: 2px; min-width: 0; }
.shop-download-name strong { overflow-wrap: anywhere; }
.shop-download-size { color: var(--cre8-view-fg-muted); font-size: 12px; }
.shop-download-owned, .shop-download-locked { margin: 0; color: var(--cre8-view-fg-soft); font-size: 13px; line-height: 1.5; }
.shop-download-btn {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
  background: var(--cre8-view-accent); color: light-dark(#fff, #06140d); font-weight: 750; text-decoration: none;
}
.shop-download-btn:hover { filter: brightness(1.06); }
    /* The storefront's live strip earns its space only when it says something
       live (a van's whereabouts); a lone product count repeats the grid below. */
    .primitive-live-slot:has(> .shop-live-snapshot[data-cre8-live-kind="shop"]):not(:has(.pill + .pill)) { display: none; }
    /* The product's facts (delivery, format, edition) as quiet label/value rows. */
    .shop-product-overview dl {
      display: grid;
      grid-template-columns: max-content 1fr;
      gap: 6px 16px;
      margin: 12px 0 0;
    }
    .shop-product-overview dt {
      color: var(--cre8-view-fg-muted);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      align-self: baseline;
    }
    .shop-product-overview dd { margin: 0; color: var(--cre8-view-fg); }
    /* A product tile is one surface: the card header carries no band of its
       own, and the badge row lines up with the title and price above it. */
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__header { background: transparent; }
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) .primitive-row { padding: 0 14px; gap: 6px; flex-wrap: wrap; }
    /* Phones show products two to a row, not one giant square at a time. */
    @media (max-width: 600px) {
      .primitive-section--grid:has(> .primitive-card__link .shop-card-media, > .primitive-card__link .shop-card-media-empty) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }
      .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__header { padding: 0 10px; }
      .primitive-card:has(.shop-card-media, .shop-card-media-empty) .primitive-card__title { font-size: 14px; }
      .primitive-card:has(.shop-card-media, .shop-card-media-empty) .primitive-row { padding: 0 10px; }
    }
    /* Product page: the product leads. The way back to the shop is a quiet
       outlined chip in the hero (the system's secondary action shape), not a
       filled button competing with Buy and not a bare underlined link. */
    .primitive-page:has(.shop-pdp) .primitive-section--app-hero .primitive-action {
      min-height: 0;
      padding: 6px 12px;
      border: 1px solid var(--cre8-view-border);
      border-radius: 999px;
      background: transparent;
      box-shadow: none;
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
      font-weight: 650;
      text-decoration: none;
    }
    .primitive-page:has(.shop-pdp) .primitive-section--app-hero .primitive-action:hover {
      border-color: var(--cre8-view-accent);
      color: var(--cre8-view-fg);
    }
    /* One primary action in the buy box: Pay. Add to cart is its quiet
       full-width second, without a heading repeating the button. */
    .shop-pdp__buy form[data-connection="Shop.CartAdd"] .primitive-form__header { display: none; }
    .shop-pdp__buy form[data-connection="Shop.CartAdd"] [type="submit"] {
      width: 100%;
      background: transparent;
      border: 1px solid var(--cre8-view-border);
      color: var(--cre8-view-fg);
    }
    .shop-pdp__buy form[data-connection="Shop.CartAdd"] [type="submit"]:hover { border-color: var(--cre8-view-accent); }
    /* A tab's panel does not repeat its own label as a heading. */
    .shop-pdp ~ .primitive-tabs .primitive-tab > h2.primitive-text:first-child { display: none; }
    /* A tile's caption line (edition, format) sits with the title, muted. */
    .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__body > .primitive-text {
      padding: 0 14px;
      color: var(--cre8-view-fg-muted);
      font-size: 13px;
    }
    @media (max-width: 600px) {
      .primitive-card:has(.shop-card-media, .shop-card-media-empty) > .primitive-card__body > .primitive-text { padding: 0 10px; }
    }
    /* The storefront banner opens the richer client storefront, which only a
       reader who turned the local client on (Settings) is taken to. For
       everyone else it would link to the page they are already on. */
    .shop-live-app { display: none; }
    :root[data-cre8-local-client="on"] .shop-live-app { display: flex; }
    /* The owner's product list thumbnail and the editor's picture strip. */
    .shop-product-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
    .shop-pictures__list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 8px 0; padding: 0; }
    .shop-pictures__list li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
    .shop-pictures__list img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
