:root {
  color-scheme: dark;
  --bg: #07060f;
  --text: #f5f3ff;
  --muted: #c8c0da;
  --cyan: #bfe8ff;
  --line: rgba(255, 255, 255, .1);
  --card: rgba(16, 12, 28, .92);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; scroll-behavior: smooth; }
html, body { margin: 0; background: #07060f; color: var(--text); overflow-x: hidden; }
body {
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 100% -10%, rgba(76, 29, 149, .45), transparent 55%),
    radial-gradient(900px 520px at -15% 8%, rgba(30, 58, 138, .4), transparent 52%),
    var(--bg);
}
::selection { background: rgba(109, 40, 217, .55); color: #fff; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 80px; }
.site-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 0 8px;
}
.site-top .brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.site-top .brand img { width: 40px; height: auto; border-radius: 10px; }
.site-top .brand strong { font-size: 18px; letter-spacing: -.02em; }
.site-top nav { display: flex; flex-wrap: wrap; gap: 8px; }
.site-top nav a {
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, .35);
  background: rgba(255, 255, 255, .04);
  text-decoration: none; font-size: 14px; font-weight: 650;
}
@media (max-width: 420px) {
  .site-top nav a { padding: 0 10px; font-size: 12px; }
  .page-head h1 { font-size: clamp(28px, 8vw, 40px); word-break: break-word; }
  .card .buyrow { flex-wrap: wrap; }
}

.site-top nav a:hover { border-color: rgba(191, 232, 255, .7); color: var(--cyan); }
.site-top nav a[aria-current="page"] {
  border-color: rgba(191, 232, 255, .85);
  color: var(--cyan);
  background: rgba(109, 40, 217, .22);
}
.site-top nav a.cta {
  background: linear-gradient(105deg, #6d28d9, #1e3a8a);
  border-color: transparent; color: #fff;
}
.site-top nav .cta-wrap {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.launch-badge {
  display: inline-flex; align-items: center;
  min-height: 26px; padding: 0 9px; border-radius: 999px;
  background: rgba(6, 4, 14, .72);
  border: 1px solid rgba(255, 255, 255, .22);
  color: var(--cyan);
  font-size: 11px; font-weight: 750; letter-spacing: .04em;
  white-space: nowrap;
}
.page-head { margin: 12px 0 20px; }
.page-head h1 {
  margin: 0; font-size: clamp(32px, 6vw, 48px);
  letter-spacing: -.04em; line-height: 1.05; font-weight: 700;
}
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 40rem; }
.chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px;
}
.chips button, .chips a.chip {
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, .35);
  background: rgba(255, 255, 255, .04);
  color: var(--text); font-size: 14px; font-weight: 650;
  cursor: pointer; text-decoration: none;
}
.chips button.is-on, .chips a.chip.is-on {
  border-color: rgba(191, 232, 255, .85);
  color: var(--cyan);
  background: rgba(109, 40, 217, .25);
}
.search-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.search-row input[type="search"] {
  flex: 1 1 220px; min-height: 48px;
  padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 6, 16, .85); color: var(--text);
  font: inherit;
}
.search-row input:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 40px rgba(0, 0, 0, .28);
}
.card .shot {
  aspect-ratio: 16 / 10; background: #120c22;
  object-fit: cover; width: 100%; display: block;
}
.card .info { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card .info strong { font-size: 18px; letter-spacing: -.02em; }
.card .maker { color: var(--muted); font-size: 14px; }
.card .maker a { color: var(--cyan); text-decoration: none; }
.card .blurb {
  color: var(--muted); font-size: 14px; line-height: 1.4; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .buyrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px;
}
.card .price { font-size: 14px; font-weight: 700; color: var(--cyan); }
.card .cta {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; border-radius: 999px;
  background: linear-gradient(105deg, #6d28d9, #1e3a8a);
  color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
}
.card .buyrow .price { margin-right: auto; }
.card .cta2 {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.04); color: #e2e8f0; font-weight: 600; font-size: 13px; text-decoration: none;
}
.card .titlerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .titlerow .title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.card .cta2.top { flex: 0 0 auto; margin-left: auto; flex-shrink: 0; min-height: 32px; padding: 0 12px; font-size: 12px; }
.card .cta2:hover { border-color: rgba(34,211,238,.6); color: #fff; }
.empty {
  padding: 32px 20px; border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, .18);
  color: var(--muted); text-align: center;
}
.faq { margin-top: 40px; }
.faq h2 { font-size: 24px; margin: 0 0 12px; }
.faq details {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 16px; margin-bottom: 10px;
  background: rgba(255, 255, 255, .03);
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
footer.foot {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted); font-size: 14px;
}
form.stack { display: flex; flex-direction: column; gap: 14px; max-width: 36rem; }
form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
form .field-hint { margin: -4px 0 0; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.4; }
form input, form select, form textarea {
  min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 6, 16, .85); color: var(--text); font: inherit;
}
form textarea { min-height: 120px; resize: vertical; }
form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
form .check input { min-height: 20px; width: 20px; margin-top: 3px; }
form button[type="submit"] {
  min-height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(105deg, #6d28d9, #1e3a8a);
  color: #fff; font-weight: 700; font-size: 16px;
}
.form-msg { padding: 12px 16px; border-radius: 14px; font-size: 15px; }
.form-msg.ok { background: rgba(34, 197, 94, .15); border: 1px solid rgba(34, 197, 94, .35); }
.form-msg.err { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-item {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  background: rgba(255, 255, 255, .03);
}
.admin-item .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-item button {
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--text); cursor: pointer; font-weight: 600;
}
.admin-item button.approve { border-color: rgba(34, 197, 94, .5); }
.admin-item button.reject { border-color: rgba(239, 68, 68, .5); }

.admin-load {
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(105deg, #6d28d9, #1e3a8a);
  color: #fff; font-weight: 700; font-size: 15px;
}
.card .shot { background-size: cover; background-position: center; }
.wrap { overflow-x: clip; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-load.secondary {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(196, 181, 253, .4);
  color: var(--text);
}
.consent-hint { margin-top: -6px; }

/* Creator dashboard */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dash-panel {
  border: 1px solid var(--line); border-radius: 20px; padding: 16px;
  background: var(--card); margin: 16px 0;
}
.dash-panel h2, .dash-head h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 10px; }
.dash-panel .dash-head { margin-top: 0; }
.dash-head select { min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,6,16,.85); color: var(--text); padding: 0 10px; font: inherit; max-width: 60vw; }
.cta.small, a.cta.small {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px;
  background: linear-gradient(105deg, #6d28d9, #1e3a8a); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
}
.dash-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .dash-summary { grid-template-columns: repeat(5, 1fr); } }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; }
.kpi b { font-size: 26px; letter-spacing: -.03em; color: var(--cyan); }
.kpi span { font-size: 12px; color: var(--muted); }
.chart svg { width: 100%; height: 180px; display: block; }
.chart .bv { fill: rgba(109, 40, 217, .75); }
.chart .lc { fill: none; stroke: #bfe8ff; stroke-width: 2; }
.chart .ax { stroke: rgba(255,255,255,.18); }
.chart .lbl { fill: var(--muted); font-size: 11px; }
.legend { font-size: 13px; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-v { background: rgba(109, 40, 217, .85); }
.sw-c { background: #bfe8ff; margin-left: 8px; }
.dash-list { display: flex; flex-direction: column; gap: 12px; }
.dash-item { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.03); }
.dash-row { display: flex; gap: 12px; align-items: flex-start; }
.dash-row .thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: #120c22; flex: none; }
.dash-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-meta strong { font-size: 17px; word-break: break-word; }
.dash-meta .reason { margin: 0; font-size: 13px; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.st-approved { color: #86efac; border-color: rgba(34,197,94,.45); }
.st-pending { color: #fde68a; border-color: rgba(234,179,8,.45); }
.st-rejected { color: #fca5a5; border-color: rgba(239,68,68,.45); }
.st-unpublished { color: var(--muted); }
.kpis { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.dash-item .actions, .dash-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dash-item .actions button, .dash-item .actions a.view {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; text-decoration: none;
}
.dash-item .actions button.danger { border-color: rgba(239,68,68,.5); }
.dash-item .actions button.primary { background: linear-gradient(105deg, #6d28d9, #1e3a8a); border-color: transparent; }
.dash-item form.edit { margin-top: 12px; max-width: none; }
.dash-panel form.stack button[type="submit"], #magic button { min-height: 48px; }
.save-link { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid rgba(191,232,255,.5); background: rgba(109,40,217,.15); }
.save-link strong { display: block; margin-bottom: 6px; }
.save-link .row { display: flex; gap: 8px; flex-wrap: wrap; }
.save-link input { flex: 1 1 220px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,6,16,.9); color: var(--text); padding: 0 10px; font: 13px ui-monospace, monospace; }
.save-link button, .save-link a { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: linear-gradient(105deg, #6d28d9, #1e3a8a); color: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.card .info a.title { text-decoration: none; }
.detail { display: grid; gap: 20px; }
@media (min-width: 860px) { .detail { grid-template-columns: 1.2fr 1fr; } }
.detail img { width: 100%; border-radius: 20px; aspect-ratio: 16/10; object-fit: cover; background: #120c22; }
.detail .desc { white-space: pre-wrap; color: var(--muted); }
[hidden] { display: none !important; }
button.signout, button.linkish {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; font: inherit; font-weight: 600;
}
button.linkish { background: none; border: 0; color: var(--cyan); text-decoration: underline; }
.site-top nav a.login-btn { border-color: rgba(191, 232, 255, .75); color: var(--cyan); background: rgba(30, 58, 138, .35); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-eye {
  position: absolute; top: 50%; right: 2px; transform: translateY(-50%);
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--cyan); }
.pw-eye:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
form .pw-mismatch, .pw-mismatch { color: #fca5a5; margin-top: -8px; }

/* Share pill (marketplace header) */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.title-row h1 { min-width: 0; }
.share-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer;
  font: 700 15px/1 inherit; font-family: inherit; color: #fff;
  background: linear-gradient(110deg, #7c3aed, #2563eb);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 20px rgba(76, 29, 149, .4);
  transition: transform .15s ease, filter .15s ease; -webkit-tap-highlight-color: transparent;
}
.share-pill svg { width: 18px; height: 18px; }
.share-pill:hover { filter: brightness(1.08); }
.share-pill:active { transform: scale(.96); }
.share-pill:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; font-weight: 650; font-size: 14px; color: #fff;
  background: rgba(16, 12, 28, .96); border: 1px solid rgba(191, 232, 255, .35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast, .share-pill { transition: none; } }
/* Share pill lives in the brand row (top right) */
.site-top .brand { order: 1; }
.site-top nav { order: 2; margin-left: auto; }
.site-top .share-pill { order: 3; min-height: 44px; padding: 0 14px 0 12px; font-size: 14px; gap: 6px; }
.site-top .share-pill svg { width: 17px; height: 17px; }
@media (max-width: 900px) {
  .site-top .share-pill { order: 2; margin-left: auto; }
  .site-top nav { order: 3; flex-basis: 100%; margin-left: 0; }
}
