/* shop.css: the Power-Up Shop (/shop/). Loads after styles.css, oasis.css and pages.css and only adds.
   Spacing on 8px steps. Animates transform and opacity only. Small text 13px or more. */

/* ---------- hero: disclosure in plain view ---------- */
.shop-hero .scene-art { object-position: center 55%; }
.shop-hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem); line-height: 1.04; max-width: 18ch; text-wrap: balance; }
.shop-hero .hud { max-width: 640px; margin-inline: auto; }
.disclose { display: inline-flex; align-items: flex-start; gap: 12px; max-width: 600px; margin: 8px auto 0; padding: 16px 20px; border: 1px solid color-mix(in oklab, var(--gold) 55%, var(--line-strong)); border-radius: 16px; background: color-mix(in oklab, var(--bg) 88%, transparent); color: var(--text); font-size: 1rem; line-height: 1.55; text-align: left; }
.disclose svg { flex: none; margin-top: 2px; color: var(--gold); }
.disclose b { color: var(--gold); font-weight: 600; }

/* ---------- sponsored power-ups ---------- */
.shop-sponsored { padding-top: 32px; }
@media (min-width: 900px) { .shop-sponsored { padding-top: 40px; } }
.sp-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 16px; max-width: 1180px; }
@media (min-width: 760px) { .sp-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.sp-slot { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; justify-items: center; gap: 8px; padding: 24px; text-align: center; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.sp-slot.is-open { border-style: dashed; background: color-mix(in oklab, var(--surface) 70%, transparent); }
.sp-slot h3 { font-size: var(--step-1); }
.sp-slot p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; max-width: 32ch; }
.sp-slot .sp-job { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sp-tag { position: absolute; top: 16px; left: 16px; padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--gold) 60%, var(--line-strong)); background: var(--bg); font-family: var(--font-mono); font-size: 0.8125rem !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold) !important; line-height: 1.4; }
.sp-tile { display: grid; place-items: center; width: 56px; height: 56px; margin-top: 24px; border-radius: 14px; border: 1px dashed var(--line-strong); background: var(--bg); font-family: var(--font-pixel); font-size: 1rem; color: var(--dim); }
.sp-slot:not(.is-open) .sp-tile { border: 1px solid color-mix(in oklab, var(--p, var(--gold)) 60%, var(--line-strong)); background: color-mix(in oklab, var(--p, var(--gold)) 16%, var(--surface)); color: var(--p, var(--gold)); font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.sp-slot .link-arrow { min-height: 44px; padding-inline: 8px; border-radius: 8px; }
@media (max-width: 759px) {
  .sp-slot.is-open { grid-template-columns: 1fr; grid-template-rows: none; justify-items: start; text-align: left; gap: 8px; padding: 16px 20px; }
  .sp-slot.is-open .sp-tag { position: static; }
  .sp-slot.is-open .sp-tile { display: none; }
  .sp-slot.is-open p { max-width: none; }
  .sp-slot.is-open .link-arrow { padding-inline: 0; }
}
.sp-slot .btn { min-height: 44px; white-space: normal; text-align: center; justify-content: center; }

/* ---------- shelf controls ---------- */
.shelf-controls { display: grid; gap: 24px; max-width: 960px; margin: 0 auto; justify-items: center; }
.shop-search { width: 100%; max-width: 560px; }
.shop-search label { text-align: center; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 48px; min-height: 52px; border-radius: 999px; font-size: 1.05rem; }
.search-box input::-webkit-search-cancel-button { filter: invert(1) brightness(1.6); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in oklab, var(--bg) 82%, transparent); color: var(--text); font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.chip-btn .n { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); }
@media (hover: hover) { .chip-btn:hover { border-color: var(--gold); } }
.chip-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chip-btn:active { transform: scale(0.97); }
.chip-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.chip-btn[aria-pressed="true"] .n { color: var(--gold-ink); }

.shelf-count { margin: 32px auto 0; text-align: center; font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.shelf-count b { color: var(--gold); font-weight: 500; }
.draft-note { max-width: 720px; margin: 16px auto 0; padding: 12px 16px; border: 1px dashed var(--magenta); border-radius: 12px; color: var(--text); font-size: 0.9375rem; line-height: 1.55; text-align: center; background: color-mix(in oklab, var(--bg) 85%, transparent); }
.draft-note b { color: #ffb3d6; }

/* ---------- the power-up cards ---------- */
.shelf { list-style: none; margin: 24px auto 0; padding: 0; display: grid; gap: 16px; max-width: 1180px; }
@media (min-width: 680px) { .shelf { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1080px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
.pu { --p: var(--gold); display: grid; }
.pu > article { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 20px 20px 24px 24px; background: linear-gradient(180deg, var(--surface-2), var(--surface) 60%); box-shadow: 0 20px 40px -32px color-mix(in oklab, var(--p) 55%, transparent), 0 8px 24px -16px rgba(0, 0, 0, 0.8); transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out); }
.pu > article::before { content: ""; position: absolute; inset: 0 24px auto; height: 2px; border-radius: 0 0 2px 2px; background: linear-gradient(90deg, transparent, var(--p), transparent); opacity: 0.8; }
@media (hover: hover) { .pu > article:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--p) 55%, var(--line-strong)); } }
.pu > article:focus-within { border-color: color-mix(in oklab, var(--gold) 60%, var(--line-strong)); }
.pu.is-mine > article { border-color: color-mix(in oklab, var(--gold) 40%, var(--line-strong)); }

.pu-top { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.pu-tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; border: 1px solid color-mix(in oklab, var(--p) 60%, var(--line-strong)); background: radial-gradient(circle at 30% 25%, color-mix(in oklab, var(--p) 30%, var(--surface-2)), color-mix(in oklab, var(--p) 10%, var(--bg))); color: var(--p); font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; box-shadow: inset 0 0 0 3px var(--bg), 0 0 24px -8px color-mix(in oklab, var(--p) 70%, transparent); }
.pu-id { min-width: 0; display: grid; gap: 4px; }
.pu-id h3 { font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; }
.pu-job { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pu-rank { align-self: start; display: grid; justify-items: center; min-width: 48px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); line-height: 1.1; }
.pu-rank small { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pu-rank b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--text); }
.pu.is-mine .pu-rank b { color: var(--gold); }

.pu-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 0.875rem; font-weight: 600; line-height: 1.5; }
.pu-badge svg { flex: none; }
.pu-pitch { flex: 1 1 auto; color: var(--text); font-size: 1rem; line-height: 1.6; }
.pu-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pu-facts li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.pu-facts li svg { margin-top: 3px; color: var(--p); }
.pu-facts li.no svg { color: var(--dim); }
.pu-facts b { color: var(--text); font-weight: 600; }

.pu-coupon { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 12px 16px; border: 1px dashed color-mix(in oklab, var(--gold) 55%, var(--line-strong)); border-radius: 14px; background: color-mix(in oklab, var(--gold) 6%, var(--bg)); }
.pu-coupon .lbl { display: block; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pu-coupon code { display: block; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; letter-spacing: 0.06em; color: var(--gold); overflow-wrap: anywhere; }
.pu-coupon .desc { display: block; margin-top: 4px; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.pu-copy { min-height: 44px; min-width: 96px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--gold); background: transparent; color: var(--gold); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out); }
@media (hover: hover) { .pu-copy:hover { background: color-mix(in oklab, var(--gold) 14%, transparent); } }
.pu-copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pu-copy:active { transform: scale(0.96); }
.pu-copy.is-copied { background: var(--gold); color: var(--gold-ink); }

.pu-go { margin-top: auto; justify-content: center; width: 100%; min-height: 48px; white-space: normal; text-align: center; line-height: 1.2; }
.pu-go svg { flex: none; }
.pu-go:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* entrance: a short stagger when the shelf first fills or a filter changes */
.shelf.is-animating .pu { animation: pu-in 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes pu-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .shelf.is-animating .pu { animation: none; } .pu > article { transition: none; } }
.motion-paused .shelf.is-animating .pu { animation: none; }

.shelf-empty { display: grid; gap: 12px; justify-items: center; max-width: 520px; margin: 32px auto 0; padding: 32px 24px; border: 1px dashed var(--line-strong); border-radius: 20px; text-align: center; background: color-mix(in oklab, var(--bg) 80%, transparent); }
.shelf-empty[hidden] { display: none; }
.shelf-empty h3 { font-size: var(--step-1); }
.shelf-empty p:not(.pixel) { color: var(--muted); }
.shelf-empty .btn { min-height: 44px; }
.checked-line { margin: 40px auto 0; max-width: 60ch; text-align: center; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.checked-line [data-shop-checked] { color: var(--text); font-weight: 600; }

/* ---------- advertise here ---------- */
.shop-advertise .section-head h2 { max-width: 20ch; margin-inline: auto; text-wrap: balance; }
.shop-advertise .lede.centred { margin-inline: auto; text-align: center; }
.ad-gets { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 16px; max-width: 960px; }
@media (min-width: 760px) { .ad-gets { grid-template-columns: 1fr 1fr; gap: 24px; } }
.ad-gets li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 24px; border: 1px solid color-mix(in oklab, var(--gold) 40%, var(--line-strong)); border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); line-height: 1.55; }
.ad-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--gold); color: var(--gold-ink); }
.ad-gets b { display: block; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.ad-gets li > div > span { display: block; color: var(--muted); font-size: 1rem; }
.ad-how-h { margin: 56px auto 24px; text-align: center; font-size: var(--step-2); }
.ad-steps { list-style: none; padding: 0; }
.ad-steps .coop-step { align-content: start; }
.ad-steps h4, .ad-steps p { margin: 0; }
.ad-steps h4 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.15; }
.ad-form { margin-top: 48px; }
