.store-heading { max-width: 48rem; margin: .5rem 0 2rem; }
.store-eyebrow { color: var(--accent); font: .65rem var(--f-mono); letter-spacing: .14em; }
.store-heading h1 { margin: .45rem 0; color: var(--d-text); font: clamp(2.5rem, 5vw, 4rem) var(--f-display); }
.store-lead { color: var(--d-muted); font-size: 1rem; }
.store-empty { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--d-line); background: rgba(245,244,240,.025); }
.store-content h2 { color: var(--d-text); font: clamp(1.5rem, 3vw, 2.2rem) var(--f-display); }
.store-content p { color: var(--d-muted); max-width: 42rem; line-height: 1.7; }
.store-policy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 2.5rem 0; }
.store-policy h3 { color: var(--d-text); font: 1.15rem var(--f-display); }
.store-policy p, .store-seller p { font-size: .85rem; }
.store-seller { border-left: 2px solid var(--accent); padding: .75rem 1.25rem; }
.store-seller strong { color: var(--accent); }
.store-content .pv-btn { flex: none; padding: .65rem 1rem; }
.store-drafts { margin-top:2rem; border-top:1px solid var(--d-line); padding-top:1rem; }
.store-drafts label { display:block; color:var(--d-muted); margin:.8rem 0 .35rem; }
.store-drafts input:not([type=file]), .store-drafts textarea, .store-drafts select { display:block; box-sizing:border-box; width:min(100%,36rem); padding:.65rem; background:var(--bg); color:var(--d-text); border:1px solid var(--d-line); }
.store-drafts select {
  color-scheme:dark; appearance:none; min-height:2.6rem; padding-right:2.5rem;
  background-color:var(--viewer-0); border-radius:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23cdb0ff' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right .75rem center; background-size:1rem;
  font: .81rem var(--f-sans);
}
.store-drafts select:hover:not(:disabled) { border-color:var(--store-accent); }
.store-drafts select:focus-visible {
  border-color:var(--store-accent); outline:2px solid var(--store-accent); outline-offset:2px;
  box-shadow:none;
}
.store-drafts select:disabled { opacity:.5; cursor:not-allowed; }
.store-drafts select option { background:var(--viewer-0); color:var(--d-text); }
.store-project-picker { padding:1rem 0; margin:1rem 0; border-block:1px solid var(--d-line); }
.store-drafts textarea { min-height:5rem; resize:vertical; }
.store-draft-actions,.store-draft-list { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
.store-draft-list [aria-pressed=true] { border-color:var(--accent); color:var(--accent); }
.store-draft-editor { margin-top:1rem; }
.store-draft-editor li { overflow-wrap:anywhere; margin:.5rem 0; color:var(--d-text); }
.store-draft-editor li .pv-btn { margin-left:.75rem; }
.store-drafts [role=alert] { color:var(--accent); }
@media (max-width: 760px) {
  /* Account, Projects, Community, Store, Guide and Tutorial fit in two rows,
     above the workspace overlay's existing 5.6rem offset. */
  #rail .rail-head { grid-template-columns: repeat(3, auto); }
  .store-policy { grid-template-columns: 1fr; gap: 1rem; }
}

.pv-card.pv-store-project { position:relative; border-color: var(--store-accent); }


:root { --store-accent: #cdb0ff; --store-tint: #cdb0ff1a; }
#rail_store, #rail_store.active, #rail_store[aria-pressed=true] { color:var(--store-accent); border-color:var(--store-accent); }
#pv_store_panel { --accent:var(--store-accent); }
.store-heading h1 { color:var(--store-accent); }
.pv-store-project .store-origin-badge {
  display:flex; align-items:center; justify-content:center; width:24px; height:24px;
  position:absolute; top:.5rem; right:.5rem; z-index:1; box-sizing:border-box;
  width:32px; height:32px; margin:0; padding:5px 0 0; color:var(--store-accent);
  background:var(--bg); border:1px solid var(--store-accent); border-radius:5px;
}
.store-badge-icon { position:relative; display:inline-block; flex:none; width:15px; height:14px;
  border:2px solid var(--store-accent); border-radius:2px; }
.store-badge-icon::before { content:''; position:absolute; width:7px; height:6px; left:2px; top:-7px;
  border:2px solid var(--store-accent); border-bottom:0; border-radius:5px 5px 0 0; }
.store-catalog { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)); gap:1.2rem; }
.store-catalog > h2, .store-catalog > p { grid-column:1/-1; }
.store-kit { min-width:0; border:1px solid var(--d-line); background:var(--bg); border-radius:8px; overflow:hidden; }
.store-kit-image { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; background:var(--viewer-0); color:var(--d-muted); }
.store-kit h3, .store-kit > p { margin:1rem; overflow-wrap:anywhere; }
.store-kit-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem; }
.store-kit-actions .pv-btn:first-child { background:var(--viewer-0); border-color:var(--d-muted); color:var(--d-text); }
.store-kit-actions .pv-btn:last-child { background:#FF5D2A; border-color:#FF5D2A; color:var(--bg); }
.store-kit-actions .pv-btn:hover:not(:disabled) { filter:brightness(1.1); }
.store-kit-actions .pv-btn:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.store-kit-actions .pv-btn:disabled { opacity:.45; cursor:not-allowed; }
.store-preview { width:min(900px,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); box-sizing:border-box;
  overflow:auto; padding:1.4rem; color:#f5f4f0; background:#19151d; border:1px solid var(--store-accent); border-radius:12px; }
.store-preview::backdrop { background:#000b; }
.store-preview h2 { margin:.5rem 0 1rem; font:1.7rem var(--f-display); }
.store-preview .pv-btn { border-color:var(--store-accent); color:var(--store-accent); }
.store-preview-label { color:var(--store-accent); font:.65rem var(--f-mono); letter-spacing:.12em; }
.store-preview-viewport { width:100%; height:min(55dvh,520px); min-height:220px; margin-top:1rem; }
.store-preview-viewport canvas { display:block; width:100%; height:100%; touch-action:none; }
.store-preview p { font-size:.85rem; color:#cbb9d2; }

.store-creator-contact {
  display:inline-flex; align-items:center; gap:.4rem; padding:.34rem .62rem;
  color:#F5F4F0; background:#232326; border:1px solid rgba(245,244,240,.14);
  font:700 .62rem/1 var(--f-mono); letter-spacing:.12em; text-decoration:none; text-transform:uppercase;
  transition:background-color 120ms ease, border-color 120ms ease;
}
.store-creator-contact:hover { background:#000; border-color:#FF5D2A; }
.store-creator-contact:focus-visible { outline:2px solid #FF5D2A; outline-offset:3px; }
.store-creator-contact svg { display:block; width:.95rem; height:.95rem; color:#8C9EFF; }

.store-content .pv-btn.store-publish {
  background:var(--store-accent); border-color:var(--store-accent); color:var(--bg);
}
.store-content .pv-btn.store-publish:hover:not(:disabled) { filter:brightness(1.08); }
.store-content .pv-btn.store-publish:focus-visible { outline:2px solid var(--store-accent); outline-offset:3px; }
.store-content .pv-btn.store-publish:disabled { opacity:.45; cursor:not-allowed; }

#pv_store_panel .store-heading { max-width:none; position:relative; padding-right:16rem; min-height:8rem; }
.store-creator-tools { position:absolute; top:0; right:0; display:grid; gap:.75rem; justify-items:end; }
.store-published-count { display:flex; align-items:center; gap:.8rem; padding:.8rem 1rem; border:1px solid var(--store-accent); background:var(--store-tint); }
.store-published-count strong { color:var(--store-accent); font:3rem/1 var(--f-display); }
.store-published-count span { max-width:7rem; color:var(--d-muted); font:.65rem/1.5 var(--f-mono); text-transform:uppercase; letter-spacing:.06em; }
.store-publish-dialog { box-sizing:border-box; width:min(36rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); overflow:auto; margin:auto; padding:1.5rem; color:var(--d-text); background:var(--bg); border:1px solid var(--store-accent); border-radius:8px; }
.store-publish-dialog::backdrop { background:#000b; }
.store-dialog-heading { display:flex; gap:1rem; align-items:center; justify-content:space-between; }
.store-dialog-heading h2 { margin:0 0 1rem; }
.store-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:.8rem; margin:1rem 0 1.5rem; }
.store-filters label { margin:0; min-width:0; display:grid; gap:.4rem; flex:1 1 10rem; color:var(--d-muted); font:.75rem var(--f-sans); }
.store-filters input, .store-filters select { box-sizing:border-box; width:100%; min-height:2.6rem; padding:.65rem; background:var(--viewer-0); color:var(--d-text); border:1px solid var(--d-line); border-radius:0; color-scheme:dark; font:.81rem var(--f-sans); }
.store-content .store-filters .pv-btn { box-sizing:border-box; min-height:2.6rem; margin:0; }
.store-filters :is(input,select):focus-visible { outline:2px solid var(--store-accent); outline-offset:2px; box-shadow:none; }
.store-content .store-kit-creator { color:var(--d-text); font-size:.8rem; }
.store-content .store-kit-tags { color:var(--store-accent); font:.65rem/1.6 var(--f-mono); }
@media(max-width:600px) {
  #pv_store_panel .store-heading { padding-right:0; }
  .store-creator-tools { position:static; justify-items:start; margin:1rem 0; }
  .store-filters { grid-template-columns:1fr; }
}

.store-owner-actions { display:flex; margin:0 1rem 1rem; }
/* Creator pages and management share the Store's paper, ink and lilac palette. */
body.ui .store-project-link { display:block; color:inherit; text-decoration:none; }
body.ui .store-project-link:hover h3 { text-decoration:underline; text-underline-offset:4px; }
body.ui .store-back { display:inline-block; margin-block:16px 32px; color:var(--ink); }
body.ui .store-detail h1 { font-family:var(--f-display); font-size:clamp(44px,7vw,92px); line-height:1.02; margin:16px 0 24px; overflow-wrap:anywhere; }
body.ui .store-detail h2 { margin-block:28px 16px; }
body.ui .store-detail-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); gap:48px; margin-top:36px; }
body.ui .store-detail-gallery { display:flex; flex-direction:column; gap:18px; min-width:0; }
body.ui .store-detail-gallery img { width:100%; height:auto; max-height:80vh; object-fit:contain; background:var(--paper); border:1px solid var(--rule); }
body.ui .store-detail-price { font-size:36px; margin:0 0 18px; }
body.ui .store-description { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
body.ui .store-creator-summary { display:flex; flex-direction:column; gap:12px; padding:24px; margin-block:32px; border:1px solid var(--ink); background:var(--lilac); color:var(--ink); text-decoration:none; }
body.ui .store-showcase-banner { width:100%; max-height:360px; aspect-ratio:4 / 1; object-fit:cover; margin-bottom:32px; border:1px solid var(--rule); }
body.ui .store-showcase-heading { display:flex; flex-wrap:wrap; align-items:center; gap:16px 24px; }
body.ui .store-showcase-heading .store-eyebrow { flex-basis:100%; }
body.ui .store-showcase-heading h1 { flex:1 1 260px; min-width:0; }
body.ui .store-showcase-heading .pv-btn { flex-shrink:0; }
body.ui .store-showcase-actions { display:flex; flex-wrap:wrap; gap:12px; padding-block:12px; background:var(--paper); }
body.ui .store-showcase-actions[data-editing=true] { position:sticky; top:var(--nav); z-index:3; border-bottom:1px solid var(--rule); }
body.ui .store-showcase-actions [hidden] { display:none; }
body.ui .store-showcase-status { flex-basis:100%; margin:0; }
body.ui .store-showcase-status:empty { display:none; }
body.ui .store-detail > [hidden] { display:none; }
body.ui .store-detail section.store-manager { margin-block:32px; padding:24px; border-block:1px solid var(--rule); background:var(--paper); }
body.ui .store-category-editor { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
body.ui .store-category-form { min-width:0; margin:0; border:1px solid var(--rule); padding:16px; }
body.ui .store-manager .store-category-visible { flex-direction:row; align-items:center; }
body.ui .store-manager .store-category-visible input { width:20px; min-height:20px; accent-color:var(--ink); }
body.ui.editor .store-manager { --d-text:var(--ink); --d-muted:var(--soft); --d-line:var(--rule); --bg:var(--paper); --store-accent:var(--lilac); width:min(940px,calc(100vw - 32px)); background:var(--paper); color:var(--ink); color-scheme:light; border:1px solid var(--rule); border-radius:0; font:400 17px/1.4 var(--f-sans); }
body.ui.editor .store-manager .pv-btn { width:auto; padding:10px 14px; border:0; border-radius:0; background:var(--ink); color:var(--paper); font:500 16px var(--f-display); cursor:pointer; }
body.ui.editor .store-manager .store-views .pv-btn[aria-pressed=true] { background:var(--lilac); color:var(--ink); }
body.ui.editor .store-manager .pv-btn:disabled { opacity:.4; cursor:not-allowed; }
body.ui.editor .store-manager :focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
body.ui .store-manager label { display:flex; flex-direction:column; gap:8px; margin-block:16px; }
body.ui .store-manager input,body.ui .store-manager textarea,body.ui .store-manager select { width:100%; min-height:42px; padding:10px; background:var(--paper); color:var(--ink); border:1px solid var(--rule); box-sizing:border-box; }
body.ui .store-manager textarea { min-height:120px; resize:vertical; }
body.ui .store-manager button { margin:6px 8px 6px 0; }
body.ui .store-manager a { display:inline-block; margin:12px; color:var(--ink); }
body.ui .store-manage-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
body.ui .store-media-slot { border:1px solid var(--rule); padding:16px; display:flex; flex-direction:column; gap:12px; }
body.ui .store-managed-image { width:100%; max-height:180px; object-fit:contain; }
body.ui .store-featured-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; border-bottom:1px solid var(--rule); padding:8px 0; }
body.ui .store-featured-row span { flex:1 1 100%; }
@media(max-width:760px) { body.ui .store-detail-layout { grid-template-columns:minmax(0,1fr); gap:24px; } body.ui .store-manage-gallery,body.ui .store-category-editor { grid-template-columns:minmax(0,1fr); } body.ui .store-detail section.store-manager { padding:16px 0; } }
body.ui.editor #pv_grid .pv-btn.store-publication { background:var(--lilac); color:var(--ink); border-color:var(--ink); }
body.ui.editor #pv_grid .pv-btn.store-publication:disabled { opacity:.4; cursor:not-allowed; }
body.ui.editor .store-favourite { display:inline-flex; align-items:center; justify-content:center; width:34px; height:32px; padding:6px; }
body.ui.editor .store-favourite svg { width:20px; height:20px; }
body.ui.editor .store-favourite[aria-pressed=true] { background:var(--lilac); color:var(--ink); }
body.ui.editor .store-favourite[aria-pressed=true] svg { fill:currentColor; }
body.ui.editor .store-saved-for-later { margin-top:28px; border-top:1px solid var(--rule); padding-top:16px; }
body.ui.editor .store-saved-for-later a { color:var(--ink); }
body.ui.editor .store-saved-for-later .store-cart-item { flex-wrap:wrap; }
body.ui.editor .store-saved-for-later .pv-btn:disabled { opacity:.4; cursor:not-allowed; }
body.ui.editor .store-screenshot-carousel { display:flex; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; width:100%; }
body.ui.editor .store-screenshot-carousel img { flex:0 0 100%; min-width:0; scroll-snap-align:start; aspect-ratio:1; object-fit:contain; }
body.ui.editor .store-carousel-controls { display:flex; justify-content:space-between; gap:12px; }
body.ui.editor .store-project-picker { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; margin:16px 0 24px; }
body.ui.editor #pv_store_panel .store-project-picker .store-source-card { display:flex; flex-direction:column; gap:8px; min-width:0; padding:10px; border:1px solid var(--rule); background:var(--paper); color:var(--ink); text-align:left; white-space:normal; overflow-wrap:anywhere; }
body.ui.editor #pv_store_panel .store-source-card[aria-pressed=true] { background:var(--lilac); outline:2px solid var(--ink); outline-offset:-2px; }
body.ui.editor .store-source-card img,body.ui.editor .store-source-placeholder { width:100%; aspect-ratio:4/3; object-fit:cover; }
body.ui.editor .store-source-placeholder { display:grid; place-items:center; background:var(--primer); font:500 42px var(--f-display); }
