/* Digital Marketplace: the corner shop (js/scenes/shop.js), the product showcase and the kit catalogue.
   Loaded only on marketplace/ (head_extra). The shop stage stays dark in both themes, like the other heroes;
   the catalogue pages keep their print colours in both themes.
   States on .shop, set by script:  is-live (the 3D shop is running)  is-walk (scroll walks you in: tall track,
   sticky stage)  is-arrived (at the counter: the "In stock" list and focus card replace the street copy).
   Without script, or without WebGL, it is a still hero with the street copy and the list, then every section stacked. */

/* ---------- the shop hero ---------- */
.shop {
  position: relative; isolation: isolate; background: #07090b; color: #f2f2f2;
  --text: #f2f2f2; --soft: #d0d0d0; --muted: #a8a8a8; --red-text: #ff4a4a; --focus: #fff; --panel-2: #16181b; --border-2: #3a3d42;
}
.shop-sticky { position: relative; display: grid; align-items: center; min-height: clamp(560px, calc(100svh - var(--head-h)), 1000px); overflow: hidden; }
.shop.is-walk .shop-track { height: 320svh; }
.shop.is-walk .shop-sticky { position: sticky; top: var(--head-h); height: calc(100svh - var(--head-h)); min-height: 0; }
.shop-stage {
  position: absolute; inset: 0; margin: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(40% 55% at 34% 62%, rgba(255, 214, 160, .1), transparent 72%), linear-gradient(#07090b, #0c0f13 60%, #050607);
}
.shop-stage::after {   /* fine grain, a shade behind the words, and a soft foot into the page */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
              linear-gradient(90deg, transparent 50%, rgba(5, 7, 9, .5) 76%, rgba(5, 7, 9, .72)),
              linear-gradient(0deg, rgba(5, 6, 7, .9), transparent 14%);
}
.shop-still, .shop-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.shop-still { z-index: 0; transition: opacity .6s ease; }
.shop.is-live .shop-still { opacity: 0; }
.shop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.shop-stage { background: radial-gradient(50% 60% at 36% 55%, rgba(232, 34, 34, .12), transparent 70%), radial-gradient(40% 50% at 70% 30%, rgba(40, 70, 140, .14), transparent 70%), #05060a; }
/* the printed card: laid over the 3D card where it floats (position and height set by script) */
.shop-card { position: absolute; z-index: 3; left: var(--card-x, 50%); top: var(--card-y, 50%); height: var(--card-h, 40%); aspect-ratio: 3 / 4; translate: -50% -50%; pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)) drop-shadow(0 0 18px rgba(232, 34, 34, .35)); }
.shop-card[hidden] { display: none; }
.shop-card svg { display: block; width: 100%; height: 100%; }
.shop-card.is-in { animation: card-print .5s steps(6) both; }
@keyframes card-print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.shop-hint { position: absolute; left: var(--edge); bottom: 22px; z-index: 3; font: 700 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(229, 229, 229, .72); transition: opacity .4s ease; }
.shop-hint::after { content: " ↓"; }
.shop:not(.is-walk) .shop-hint, .shop.is-arrived .shop-hint { opacity: 0; }

.shop-copy { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding-block: 56px; pointer-events: none; }
.shop-street, .shop-stock { grid-column: 2; pointer-events: auto; }
.shop-street h1 { max-width: 13ch; font-size: clamp(2.2rem, 4.4vw, 3.9rem); }
.shop-street .lede { max-width: 42ch; margin-top: 12px; }
.shop-skip-wrap { margin: 22px 0 0; }
.shop-skip[hidden], .shop-focus[hidden], .shop-speech[hidden] { display: none; }
.shop-stock { margin-top: 36px; }
/* live: street copy and the list share one cell and swap on arrival */
.shop.is-live .shop-street, .shop.is-live .shop-stock { grid-row: 1; margin-top: 0; transition: opacity .5s ease, transform .5s ease; }
/* hidden by opacity, not visibility, so the h1 stays on the page and the list stays reachable by keyboard
   (focusing it walks you in: marketplace-shop.js) */
.shop.is-live:not(.is-arrived) .shop-stock, .shop.is-live.is-arrived .shop-street { opacity: 0; transform: translateY(12px); pointer-events: none; }
.shop.is-live.is-arrived .shop-skip { visibility: hidden; }
.shop.is-live:not(.is-arrived) .shop-stock:focus-within { opacity: 1; transform: none; pointer-events: auto; }

.shop-stock-h { font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.stock-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.stock-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; padding: 10px 6px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .12); background: rgba(5, 7, 9, .35); transition: background .2s ease, padding .2s ease;
}
.stock-num { grid-row: span 2; font: 700 11px/1.6 var(--mono); letter-spacing: .1em; color: var(--red-text); }
.stock-name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.stock-what { font-size: 13px; color: var(--muted); line-height: 1.35; }
.stock-item:hover, .stock-item:focus-visible { background: rgba(232, 34, 34, .14); padding-left: 12px; }
.stock-item[aria-current="true"] { background: rgba(232, 34, 34, .2); }
.shop-under { margin: 14px 0 0; }
.shop-under a { font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--red-text); text-decoration: none; }
.shop-under a::after { content: " →"; }
.shop-under a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the focus card: which product is on the counter */
.shop-focus { margin-bottom: 22px; padding: 18px 18px 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(8, 10, 12, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shop-focus-name { margin: 12px 0 4px; font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.shop-focus-short { margin: 0 0 14px; color: var(--soft); max-width: 40ch; }
.shop-focus-count { margin: 12px 0 0; font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.shop-focus.is-in { animation: shop-in .45s ease both; }
@keyframes shop-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* what he says: a speech bubble by his head (placed by script), subtitles on phones */
.shop-speech { position: absolute; z-index: 4; left: var(--say-x, 30%); top: var(--say-y, 30%); max-width: min(320px, 34vw); pointer-events: none; translate: 14px -100%; }   /* translate, not transform: the entrance animation owns transform */
.shop-say { margin: 0; padding: 12px 16px; background: #f4f4f2; color: #111; font-weight: 600; font-size: 15px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.shop-say::before { content: ""; position: absolute; left: -9px; bottom: 14px; border: 9px solid transparent; border-right-color: #f4f4f2; border-left: 0; }
.shop-speech.is-in { animation: shop-in .3s ease both; }
.shop-speech.is-left { translate: calc(-100% - 14px) -100%; }
.shop-speech.is-left .shop-say::before { left: auto; right: -9px; border-right: 0; border-left: 9px solid #f4f4f2; border-top-color: transparent; border-bottom-color: transparent; }

/* phones: in the walk the stage fills the screen and the words sit at the bottom over a shade */
@media (max-width: 760px) {
  .shop-sticky { display: block; min-height: 0; }
  .shop-stage { position: relative; inset: auto; aspect-ratio: 4 / 5; max-height: 78svh; width: 100%; }
  .shop-stage::after { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px), linear-gradient(0deg, #07090b, transparent 18%); }
  .shop-copy { display: block; padding-block: 8px 40px; }
  .shop.is-walk .shop-track { height: 280svh; }
  .shop.is-walk .shop-stage { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; }
  .shop.is-walk .shop-stage::after { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px), linear-gradient(0deg, rgba(5, 6, 7, .96) 0, rgba(5, 6, 7, .75) 38%, transparent 62%); }
  .shop.is-walk .shop-copy { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr); padding-block: 0 18px; }
  .shop.is-live .shop-street, .shop.is-live .shop-stock { grid-column: 1; }
  .shop.is-live:not(.is-walk) .shop-copy { display: grid; grid-template-columns: minmax(0, 1fr); }
  .shop.is-walk .shop-street h1 { font-size: 2rem; }
  .shop.is-walk .shop-street .lede { font-size: 1rem; }
  .shop.is-walk .shop-hint { bottom: auto; top: 14px; }
  .shop.is-walk .shop-stock-h { display: none; }
  .shop.is-walk .stock-list { display: flex; gap: 6px; overflow-x: auto; border: 0; scrollbar-width: none; scroll-snap-type: x mandatory; padding-bottom: 2px; }
  .shop.is-walk .stock-list li { flex: none; scroll-snap-align: start; }
  .shop.is-walk .stock-item { display: block; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .18); }
  .shop.is-walk .stock-num, .shop.is-walk .stock-what { display: none; }
  .shop.is-walk .stock-name { font-size: 14px; white-space: nowrap; }
  .shop.is-walk .stock-item:hover { padding-left: 10px; }
  .shop.is-walk .shop-focus { margin-bottom: 10px; padding: 12px 12px 10px; }
  .shop.is-walk .shop-focus-name { font-size: 1.45rem; margin-top: 8px; }
  .shop.is-walk .shop-focus-short { font-size: 14px; margin-bottom: 10px; }
  .shop.is-walk .shop-focus-count { display: none; }
  .shop.is-walk .shop-focus .btn { padding: 9px 12px; }
  .shop-speech, .shop-speech.is-left { left: 12px; right: 12px; top: 12px; max-width: none; translate: none; }
  .shop-say { font-size: 14px; background: rgba(5, 6, 7, .82); color: #fff; box-shadow: none; text-align: center; }
  .shop-say::before { display: none; }
}

/* ---------- the showcase ---------- */
.showcase { border-top: 1px solid var(--border); }
.sc-tabs { position: sticky; top: var(--head-h); z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.sc-tabs ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.sc-tabs a { display: block; padding: 15px 14px 13px; white-space: nowrap; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.sc-tabs a:hover { color: var(--text); }
.sc-tabs a[aria-current="true"] { color: var(--red-text); border-bottom-color: var(--red); }
.sc-tab-kits { margin-left: auto; }
.sc-tab-kits a::before { content: "★ "; color: var(--red); }

.sc { padding-block: 0; scroll-margin-top: calc(var(--head-h) + 48px);
  /* each product's banner and floor are dark stages in both themes, so its words keep the Night colours (like .shop) */
  color: #f2f2f2; color-scheme: dark;
  --text: #f2f2f2; --soft: #d0d0d0; --muted: #a8a8a8; --red-text: #ff4a4a; --focus: #fff; --border: #303030; --border-2: #3a3d42;
  --panel: #141414; --panel-2: #1b1b1b; }
.showcase.is-tabbed .sc:not(.is-on), .showcase.is-tabbed .mag:not(.is-on) { display: none; }
.showcase.is-tabbed .is-on { animation: shop-in .4s ease both; }
/* each product takes its spine card's theme: --th is the card's colour, --th-ink the colour printed on it */
/* category colours (.th-<category>) come from marketplace-hues.css, generated from hues.json */
.sc-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.sc-spine svg { display: block; width: 100%; height: auto; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .6); }
.sc-short { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; color: var(--text); max-width: 34ch; margin: 0 0 12px; line-height: 1.3; }
.sc-intro .lede { margin-bottom: 22px; font-size: 1.05rem; }
.sc-hero { margin: 0; }
.sc-zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--border-2); background: #0b0b0d; cursor: zoom-in; }
.sc-zoom img { display: block; width: 100%; height: auto; }
.sc-zoom:hover { border-color: var(--th, var(--red-d)); }
.sc-shot.media-frame { border: 0; }
.sc-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 26px 0 0; }
.sc-fact { position: relative; padding: 9px 10px 9px 42px; border: 1px solid var(--border-2); background: var(--panel); min-width: 0; }
.sc-fact-n { position: absolute; left: 8px; top: 9px; width: 24px; padding: 3px 0; text-align: center; font: 700 10px/1 var(--mono); background: var(--th, var(--red)); color: var(--th-ink, #fff); }
.sc-fact dt { font: 600 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sc-fact dd { margin: 2px 0 0; font: 700 13px/1.3 var(--mono); color: var(--text); overflow-wrap: anywhere; }
/* the dense view: every detail as a small cell, grouped */
.sc-dense { margin-top: clamp(36px, 5vw, 64px); }
.sc-group + .sc-group { margin-top: clamp(28px, 4vw, 48px); }
.sc-group-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--th, var(--red)); font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.sc-group-h span { padding: 4px 6px; background: var(--th, var(--red)); color: var(--th-ink, #fff); letter-spacing: .08em; }
.sc-cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); grid-auto-flow: dense; gap: 8px; }
.sc-cell { position: relative; display: flex; flex-direction: column; padding: 14px 14px 16px; background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--th, var(--red)); min-width: 0; }
.sc-cell.has-shot { grid-column: span 2; }
.sc-cell-n { position: absolute; right: 10px; top: 8px; margin: 0; font: 600 10px/1 var(--mono); color: var(--muted); }
.sc-cell .sc-zoom { margin: -14px -14px 12px; width: calc(100% + 28px); border: 0; border-bottom: 1px solid var(--border); }
.sc-cell .sc-zoom img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; }
.sc-stat { align-self: flex-start; margin: 0 0 10px; padding: 4px 7px; font: 700 13px/1 var(--mono); letter-spacing: .04em; background: var(--th, var(--red)); color: var(--th-ink, #fff); }
.sc-cell h4 { margin: 0 0 6px; font-size: 1rem; letter-spacing: -0.01em; padding-right: 22px; }
.sc-cell p:last-child { margin: 0; font-size: 14px; line-height: 1.45; color: var(--soft); }
.sc-sub { font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.sc-specs { margin-top: clamp(40px, 6vw, 72px); }
.sc-specs dl { margin: 0; display: grid; grid-template-columns: minmax(130px, 220px) 1fr; border: 1px solid var(--border); background: var(--panel); }
.sc-specs dt, .sc-specs dd { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sc-specs dt { font: 600 12px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sc-specs dd { color: var(--soft); }
.sc-specs dl > :nth-last-child(-n + 2) { border-bottom: 0; }
@media (max-width: 1100px) {
}
@media (max-width: 640px) {
  .sc-intro .actions .btn { padding: 10px 12px; }
  .sc-facts { grid-column: 1 / -1; }
  .sc-cell.has-shot { grid-column: auto; }
  .sc-specs dl { grid-template-columns: 1fr; } .sc-specs dt { border-bottom: 0; padding-bottom: 0; }
  .sc-tab-kits { margin-left: 0; }
}

/* ---------- Kitbash Monthly: the catalogue under the counter ---------- */
.mag {
  padding-block: clamp(56px, 8vw, 112px); scroll-margin-top: calc(var(--head-h) + 48px);
  background: radial-gradient(60% 50% at 70% 0%, rgba(232, 34, 34, .08), transparent 70%), var(--bg);
  --paper: #f3eee4; --paper-2: #e9e2d4; --ink: #1b1914; --ink-2: #4b463c; --mag-red: #c81d1d;
}
.mag-head { margin-bottom: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(96px, 170px) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: end; }
.mag-spine svg { display: block; width: 100%; height: auto; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7); }
.mag-head h2 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.03em; font-style: italic; }
.mag-book { position: relative; }
.mag-spreads { list-style: none; margin: 0; padding: 0 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: min(100%, 1060px); gap: 24px; justify-content: safe center; overflow-x: auto; scroll-snap-type: x mandatory; }
.mag-spread { scroll-snap-align: start; display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 2px 0 rgba(0, 0, 0, .2); perspective: 2200px; position: relative; }
.mag-spread::after {   /* gloss, following the pointer (--gx set by script), and the spine's shadow */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent calc(var(--gx, 30%) - 18%), rgba(255, 255, 255, .26) var(--gx, 30%), transparent calc(var(--gx, 30%) + 18%)),
              linear-gradient(90deg, transparent 47%, rgba(0, 0, 0, .14) 49.6%, rgba(0, 0, 0, .22) 50%, rgba(255, 255, 255, .25) 50.4%, transparent 53%);
}
.mag-page { position: relative; padding: clamp(14px, 2vw, 26px); min-width: 0; }
.mag-l { padding-right: clamp(10px, 1.4vw, 18px); }
.mag-img, .mag-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.mag-tbc { display: grid; place-items: center; aspect-ratio: 4 / 5; background: repeating-linear-gradient(135deg, var(--paper-2) 0 14px, #ddd5c5 14px 28px); }
.mag-tbc span { font: 800 14px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); border: 2px solid var(--ink-2); padding: 10px 14px; transform: rotate(-6deg); }
.mag-r { display: flex; flex-direction: column; padding-left: clamp(18px, 2.6vw, 40px); }
.mag-mast { margin: 0 0 clamp(18px, 3vw, 36px); padding-bottom: 10px; border-bottom: 3px solid var(--mag-red); font: 900 italic 13px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--mag-red); display: flex; justify-content: space-between; }
.mag-mast span { color: var(--ink-2); font-style: normal; font-weight: 700; }
.mag-r h3 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: .98; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 10px; }
.mag-strap { font-size: clamp(1rem, 1.4vw, 1.15rem); font-weight: 600; color: var(--ink-2); margin: 0 0 18px; }
.mag-r > p:not([class]) { color: var(--ink-2); font-size: 15px; }
.mag-facts { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; margin: 0 0 18px; padding: 12px 0; border-block: 1px solid rgba(27, 25, 20, .2); }
.mag-facts dt { font: 700 11px/2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mag-red); }
.mag-facts dd { margin: 0; font-weight: 700; line-height: 2; }
.mag-inside { margin: 0 0 18px; padding-left: 18px; color: var(--ink); font-size: 14px; }
.mag-inside li { margin-bottom: 4px; }
.mag-inside li::marker { color: var(--mag-red); }
.mag-cta { align-self: flex-start; margin-top: auto; }
.mag-folio { position: absolute; bottom: 10px; font: 700 10px/1 var(--mono); color: var(--ink-2); opacity: .7; }
.mag-l .mag-folio { left: 14px; } .mag-r .mag-folio { right: 14px; }
.mag-spread.is-tbc .mag-facts dd:last-child { color: var(--mag-red); }
/* script: one spread at a time, turned like a page */
.mag-book.is-flip .mag-spreads { display: grid; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
.mag-book.is-flip .mag-spread { grid-area: 1 / 1; }
.mag-book.is-flip .mag-spread:not(.is-on) { visibility: hidden; }
.mag-book.is-flip .mag-spread.turn-next .mag-r { animation: mag-turn-next .7s cubic-bezier(.3, .1, .2, 1) both; transform-origin: 0 50%; }
.mag-book.is-flip .mag-spread.turn-prev .mag-l { animation: mag-turn-prev .7s cubic-bezier(.3, .1, .2, 1) both; transform-origin: 100% 50%; }
@keyframes mag-turn-next { from { transform: rotateY(-88deg); filter: brightness(.6); } to { transform: none; filter: none; } }
@keyframes mag-turn-prev { from { transform: rotateY(88deg); filter: brightness(.6); } to { transform: none; filter: none; } }
.mag-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.mag-nav[hidden] { display: none; }
.mag-count { margin: 0; font: 700 12px/1 var(--mono); letter-spacing: .14em; color: var(--muted); }
.mag-ix-h { margin-top: clamp(40px, 6vw, 72px); }
.mag-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mag-index a { display: grid; gap: 4px; color: var(--text); text-decoration: none; }
.mag-thumb, .mag-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.mag-index .mag-tbc { aspect-ratio: 4 / 3; background: repeating-linear-gradient(135deg, var(--panel-2) 0 10px, var(--panel) 10px 20px); border: 1px dashed var(--border-2); }
.mag-index a:hover .mag-thumb, .mag-index a[aria-current="true"] .mag-thumb { outline: 2px solid var(--red); outline-offset: 2px; }
.mag-ix-name { font-weight: 700; font-size: 14px; margin-top: 4px; }
.mag-ix-st { font: 600 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .mag-spread { grid-template-columns: 1fr; }
  .mag-spread::after { background: linear-gradient(105deg, transparent calc(var(--gx, 30%) - 18%), rgba(255, 255, 255, .22) var(--gx, 30%), transparent calc(var(--gx, 30%) + 18%)); }
  .mag-l { padding-right: clamp(14px, 2vw, 26px); padding-bottom: 0; }
  .mag-img, .mag-img img, .mag-l .mag-tbc { aspect-ratio: 4 / 3; }
  .mag-r { padding-left: clamp(14px, 2vw, 26px); padding-bottom: 34px; }
  .mag-book.is-flip .mag-spread.turn-next .mag-r, .mag-book.is-flip .mag-spread.turn-prev .mag-l { animation-name: shop-in; }
  .mag-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- screenshots, larger ---------- */
.shop-lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 56px 16px 16px; background: rgba(4, 5, 6, .92);
  color: #f2f2f2; color-scheme: dark; --text: #f2f2f2; --soft: #d0d0d0; --muted: #a8a8a8; --focus: #fff; --border: #303030; --border-2: #3a3d42; --panel: #141414; --panel-2: #1b1b1b; }
.shop-lightbox[hidden] { display: none; }
.shop-lightbox-in { max-width: min(1600px, 100%); max-height: 100%; overflow: auto; }
.shop-lightbox-in img { display: block; max-width: 100%; max-height: calc(100svh - 80px); width: auto; height: auto; margin: 0 auto; }
.shop-lightbox-close { position: absolute; top: 12px; right: 16px; }

@media (prefers-reduced-motion: reduce) {
  .shop-focus.is-in, .shop-speech.is-in, .shop-card.is-in, .showcase.is-tabbed .is-on, .mag-book.is-flip .mag-spread .mag-r, .mag-book.is-flip .mag-spread .mag-l { animation: none !important; }
  .stock-item, .shop-still, .shop.is-live .shop-street, .shop.is-live .shop-stock { transition: none; }
}

/* ---------- expressive display type: heavy, wide, italic, like the brand's titles ---------- */
.shop-street h1, .sc-intro h2, .mag-head h2, .hue-title, .shop-focus-name {
  font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -0.02em; line-height: .92;
  transform: scaleX(1.12); transform-origin: 0 50%; max-width: 89%;
}
.shop-street h1 { font-size: clamp(2.3rem, 4.6vw, 4.2rem); }
.sc-intro h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); color: var(--text); }
.sc-intro h2::after { content: ""; display: block; width: 64px; height: 8px; margin-top: 14px; background: var(--th, var(--red)); transform: skewX(-18deg); }

/* ---------- the divide: the hue system ---------- */
.hues { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--border); overflow: hidden; }
.hue-head { max-width: 60ch; }
.hue-title { font-size: clamp(3rem, 8vw, 7.5rem); margin: 4px 0 18px; background: linear-gradient(90deg, #00a8ff, #09ff67 30%, #ceff09 45%, #ff2200 58%, #ff0051 75%, #9747ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hue-spectrum { position: relative; margin: clamp(40px, 6vw, 72px) 0 12px; padding: 34px 0 0; }
.hue-side { position: absolute; top: 0; margin: 0; font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hue-left { left: 0; } .hue-right { right: 0; }
.hue-cats, .hue-pins { position: relative; list-style: none; margin: 0; padding: 0; }
.hue-cats { height: 40px; }
.hue-cat { position: absolute; bottom: 8px; left: calc(var(--hp) * 100%); translate: -50% 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(.8rem, 1.4vw, 1.15rem); white-space: nowrap; color: var(--text); }
.hue-cat::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 2px; height: 8px; background: var(--text); }
.hue-band { position: relative; height: 26px; border-radius: 2px; }
.hue-line { position: absolute; top: -18px; bottom: -18px; width: 4px; margin-left: -2px; background: #f9f9f9; box-shadow: 0 0 0 3px #ff2200, 0 0 24px #ff2200; }
.hue-line i { position: absolute; top: -26px; left: 50%; translate: -50% 0; font: 700 10px/1 var(--mono); font-style: normal; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: #ff4a2a; }
.hue-pins { height: 150px; margin-top: 18px; }
.hue-pin { position: absolute; left: calc(var(--hp) * 100%); top: calc(var(--row, 0) * 34px); translate: -50% 0; white-space: nowrap; }
.hue-row-1 { --row: 1; } .hue-row-2 { --row: 2; } .hue-row-3 { --row: 3; }
.hue-pin::before { content: ""; position: absolute; left: 50%; top: -18px; width: 1px; height: 16px; background: var(--border-2); }
.hue-row-0::before { height: 16px; } .hue-row-1::before { top: -52px; height: 50px; } .hue-row-2::before { top: -86px; height: 84px; } .hue-row-3::before { top: -120px; height: 118px; }
.hue-pin a, .hue-pin span { display: inline-block; padding: 6px 10px; font-size: 13px; text-decoration: none; }
.hue-pin a { background: var(--text); color: var(--bg); font-weight: 800; }
.hue-pin a:hover { background: var(--red); color: #fff; }
.hue-pin.is-idea span { border: 1px dashed var(--border-2); color: var(--muted); font: 600 11px/1.3 var(--mono); letter-spacing: .06em; }
.hue-pin.is-idea span::before { content: "idea · "; color: var(--red-text); }
.hue-cards { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hue-card { position: relative; padding: 18px 16px 20px; background: var(--th); color: var(--th-ink); min-width: 0; }
.hue-card h3 { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.35rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.hue-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.hue-card-n { font: 700 11px/1 var(--mono) !important; letter-spacing: .14em; opacity: .75; }
.hue-card-k { font: 700 10px/1 var(--mono) !important; letter-spacing: .16em; text-transform: uppercase; opacity: .75; margin-top: 14px !important; }
.hue-card-list { list-style: none; margin: 0; padding: 0; font-weight: 800; font-size: 14px; }
.hue-card-list a { color: inherit; text-underline-offset: 3px; }
.hue-card-list.is-idea { font-weight: 500; font-style: italic; }
.hue-card-list.is-idea li::before { content: "+ "; font-style: normal; font-weight: 800; }
.hue-note { margin: 14px 0 0; font: 600 11px/1.4 var(--mono); letter-spacing: .08em; color: var(--muted); }
@media (max-width: 1100px) { .hue-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* phones: just the band, the line and its two sides; the category cards below carry the products and ideas */
@media (max-width: 760px) {
  .hue-spectrum { margin-top: 36px; padding-top: 30px; }
  .hue-cats, .hue-pins { display: none; }
  .hue-band { height: 22px; }
  .hue-line i { top: auto; bottom: -26px; }
  .hue-spectrum { padding-bottom: 30px; }
  .hue-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the art-direction panel (scenes/shop-debug.js; only with ?debug or the O key) ---------- */
.shop-debug { position: fixed; z-index: 300; top: calc(var(--head-h) + 8px); right: 8px; width: min(360px, calc(100vw - 16px)); max-height: calc(100svh - var(--head-h) - 16px); overflow: auto;
  background: rgba(10, 11, 13, .94); color: #e5e5e5; color-scheme: dark; border: 1px solid #333; font: 12px/1.35 var(--mono); padding: 10px 12px 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sd-head { display: flex; align-items: center; gap: 8px; position: sticky; top: -10px; background: rgba(10, 11, 13, .98); padding: 4px 0 8px; margin-top: -4px; }
.sd-head strong { font: 900 italic 15px/1 var(--ui); text-transform: uppercase; }
.sd-key { color: #8f8f8f; margin-right: auto; }
.sd-btn { font: 600 11px/1 var(--mono); padding: 7px 9px; background: #1b1b1b; color: #e5e5e5; border: 1px solid #3a3a3a; cursor: pointer; }
.sd-btn:hover { border-color: #e82222; }
.sd-perf { border: 1px solid #2a2a2a; padding: 8px; margin-bottom: 6px; background: #0f0f11; }
.sd-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.sd-row b { font-weight: 700; }
.sd-row[data-grade="good"] b { color: #09ff67; } .sd-row[data-grade="ok"] b { color: #ceff09; } .sd-row[data-grade="bad"] b { color: #ff2200; }
.sd-meta { margin: 6px 0 0; color: #8f8f8f; font-size: 10.5px; overflow-wrap: anywhere; }
.sd-check { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #d0d0d0; }
.sd-group { margin: 12px 0 4px; color: #ff4a4a; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; }
.sd-ctl { display: grid; grid-template-columns: minmax(0, 1fr) 110px 58px; gap: 6px; align-items: center; padding: 2px 0 2px 6px; }
.sd-ctl.is-changed { background: rgba(232, 34, 34, .14); }
.sd-ctl input[type="range"] { width: 100%; accent-color: #e82222; }
.sd-ctl input[type="color"] { grid-column: span 2; width: 100%; height: 22px; background: none; border: 1px solid #333; }
.sd-num { width: 100%; font: 11px var(--mono); background: #151515; color: #e5e5e5; border: 1px solid #333; padding: 2px 4px; }
.sd-name { color: #cfcfcf; }
.sd-out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sd-json { width: 100%; font: 11px var(--mono); background: #0f0f11; color: #cfcfcf; border: 1px solid #333; }
@media (max-width: 760px) {
  .mag-head { grid-template-columns: minmax(0, 1fr); }
  .mag-spine { width: min(170px, 46vw); }
  .mag-head h2 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .sc-intro h2 { font-size: clamp(1.6rem, 7.5vw, 2.2rem); overflow-wrap: anywhere; }
}


/* ---------- the showcase banner (make_marketplace.py: sc_art, sparkles, holo_defs) ----------
   A dark stage whose colour drifts between the product's colour and its neighbours on the spectrum; the art stands in a
   rounded triangle that masks its foot while its top breaks out; an outlined triangle and + marks around it. */
@property --sc-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --sc-x { syntax: '<percentage>'; inherits: true; initial-value: 30%; }
.holo-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.holo-chip { display: grid; place-items: center; width: 46px; aspect-ratio: 1; border-radius: 10px; flex: none;
  background: radial-gradient(120% 120% at 30% 20%, #23252c 0%, #101115 60%, #0b0c0f 100%);
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 14px rgba(0, 0, 0, .35); }
.holo-chip-lg { width: 64px; border-radius: 14px; }
.holo-icon { width: 72%; height: 72%; overflow: visible; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.holo-icon .hi-base { stroke: url(#holo-rainbow); filter: drop-shadow(0 0 2px rgba(140, 220, 255, .45)); }
.holo-icon .hi-glint { stroke: url(#holo-glint); stroke-width: 1.2; mix-blend-mode: screen; }

.sc-banner { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(56px, 8vw, 120px) clamp(40px, 6vw, 88px);
  background:
    radial-gradient(55% 70% at var(--sc-x) 40%, color-mix(in srgb, var(--th) 22%, transparent), transparent 70%),
    radial-gradient(45% 60% at 88% 85%, color-mix(in srgb, var(--th-2) 20%, transparent), transparent 70%),
    linear-gradient(100deg, #06070a 0%, #0a0b10 45%, color-mix(in srgb, var(--th-deep) 75%, #06070a) 100%);
  animation: sc-drift 16s ease-in-out infinite alternate; }
.sc-banner::before { content: ""; position: absolute; inset: -40%; z-index: -1; opacity: .5; mix-blend-mode: screen;
  background: conic-gradient(from var(--sc-a) at 70% 50%, transparent 0 20%, color-mix(in srgb, var(--th) 16%, transparent) 30%, transparent 42%,
    color-mix(in srgb, var(--th-3) 14%, transparent) 62%, transparent 75%, color-mix(in srgb, var(--th-2) 14%, transparent) 88%, transparent);
  animation: sc-spin 40s linear infinite; }
@keyframes sc-drift { from { --sc-x: 18%; } to { --sc-x: 62%; } }
@keyframes sc-spin { to { --sc-a: 360deg; } }

.sc-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.sc-intro h2.sc-title::after { content: none; }
.sc-intro h2.sc-title { margin: 0; font: 900 italic clamp(3rem, 8vw, 7.2rem)/.86 var(--ui); letter-spacing: -.03em; text-transform: uppercase;
  color: var(--th); background: linear-gradient(100deg, var(--th) 0%, var(--th) 40%, var(--th-2) 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; background-size: 220% 100%; animation: sc-ink 9s ease-in-out infinite alternate; overflow-wrap: anywhere; }
@keyframes sc-ink { from { background-position: 0 0; } to { background-position: 100% 0; } }
.sc-banner .sc-short { margin: 14px 0 12px clamp(0px, 8vw, 120px); font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 400; color: #f4f4f4; }
.sc-banner .lede { margin-left: clamp(0px, 8vw, 120px); color: var(--soft); max-width: 46ch; }
.sc-banner .actions { margin-left: clamp(0px, 8vw, 120px); }

/* the art: filled triangle behind, the art masked by "everything above the triangle's top edge + the triangle" */
.sc-art { position: relative; margin: 0; aspect-ratio: 1; width: min(100%, 520px); justify-self: center; }
.sc-tri, .sc-tri-line { position: absolute; display: block; }
.sc-tri { inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 30px 40px color-mix(in srgb, var(--th) 35%, transparent)); }
.sc-stop-a { stop-color: var(--th); } .sc-stop-b { stop-color: var(--th-2); }
.sc-art-in { position: absolute; inset: -18% 0 0; display: flex; align-items: flex-end; justify-content: center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 118' preserveAspectRatio='none'%3E%3Crect width='100' height='63'/%3E%3Cpath d='M6 60H94L50 116Z' stroke='%23000' stroke-width='10' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 118' preserveAspectRatio='none'%3E%3Crect width='100' height='63'/%3E%3Cpath d='M6 60H94L50 116Z' stroke='%23000' stroke-width='10' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.sc-art-img, .sc-art-img img { display: block; width: 100%; height: auto; }
.sc-art-box { width: 40%; margin-bottom: 24%; perspective: 900px; }
.sc-art-box svg { display: block; width: 100%; height: auto; transform: rotateY(-22deg) rotateZ(-6deg); transform-origin: 50% 100%;
  box-shadow: -18px 30px 40px -10px rgba(0, 0, 0, .65); animation: sc-bob 7s ease-in-out infinite alternate; }
@keyframes sc-bob { from { transform: rotateY(-22deg) rotateZ(-6deg) translateY(0); } to { transform: rotateY(-12deg) rotateZ(-4deg) translateY(-14px); } }
.sc-tri-line { right: -4%; bottom: -6%; width: 34%; height: 34%; overflow: visible; transform: rotate(-14deg); }
.sc-tri-line path { fill: none; stroke: var(--th-2); stroke-width: 5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 6px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--th-2) 60%, transparent)); }

/* + marks */
.sc-plus { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sc-plus i { position: absolute; width: 26px; height: 26px; opacity: .85; animation: sc-twinkle 5s ease-in-out infinite; }
.sc-plus i::before, .sc-plus i::after { content: ""; position: absolute; background: var(--th); }
.sc-plus i::before { left: 12px; top: 0; width: 2px; height: 26px; } .sc-plus i::after { top: 12px; left: 0; width: 26px; height: 2px; }
.sc-plus i:nth-child(even)::before, .sc-plus i:nth-child(even)::after { background: var(--th-2); }
.sp-1 { left: 7%; top: 16%; } .sp-2 { left: 34%; top: 12%; animation-delay: -1.2s !important; } .sp-3 { left: 19%; top: 78%; animation-delay: -2.5s !important; }
.sp-4 { left: 46%; top: 70%; animation-delay: -3.1s !important; } .sp-5 { right: 6%; top: 22%; animation-delay: -.7s !important; } .sp-6 { right: 38%; bottom: 10%; animation-delay: -4s !important; }
@keyframes sc-twinkle { 0%, 100% { opacity: .85; transform: scale(1) rotate(0); } 50% { opacity: .3; transform: scale(.7) rotate(45deg); } }
.sc-head { position: relative; z-index: 1; }

/* the lower part: open rows on a tinted floor, no boxes */
.sc-floor { position: relative; padding-block: clamp(36px, 5vw, 72px) clamp(56px, 7vw, 104px);
  background:
    radial-gradient(70% 50% at var(--sc-x) 0%, color-mix(in srgb, var(--th) 16%, transparent), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--th-2) 12%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--th-deep) 55%, #08090c) 0%, #08090c 70%);
  animation: sc-drift 16s ease-in-out infinite alternate; }
.sc-lower { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.sc-floor .sc-facts { margin: 0; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 24px; }
.sc-floor .sc-fact { border: 0; border-top: 2px solid var(--th); background: none; padding: 10px 0 0; }
.sc-floor .sc-fact-n { display: none; }
.sc-floor .sc-zoom { border: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--th) 45%, #000); }
.sc-floor .sc-group-h { border-bottom: 0; padding-bottom: 0; color: var(--th); font-size: 13px; }
.sc-floor .sc-group-h span { background: none; color: var(--th-2); padding: 0; }
.sc-floor .sc-cells { gap: 28px 32px; }
.sc-floor .sc-cell { background: none; border: 0; padding: 0; }
.sc-floor .sc-cell::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 12px; background: linear-gradient(90deg, var(--th), var(--th-2)); }
.sc-floor .sc-cell .sc-zoom { margin: 0 0 12px; width: 100%; }
.sc-floor .sc-cell-n { position: static; order: -1; margin-bottom: 6px; color: color-mix(in srgb, var(--th) 70%, #fff); }
.sc-floor .sc-stat { background: none; color: var(--th); padding: 0; font-size: 15px; }
.sc-floor .sc-specs dl { border: 0; background: none; }
.sc-floor .sc-specs dt, .sc-floor .sc-specs dd { border-bottom: 1px solid color-mix(in srgb, var(--th) 18%, transparent); }

@media (max-width: 900px) {
  .sc-intro h2.sc-title { font-size: clamp(2.6rem, 14vw, 4.4rem); }
  .sc-head, .sc-lower { grid-template-columns: minmax(0, 1fr); }
  .sc-art { width: min(80%, 420px); order: -1; margin-bottom: 8px; }
  .sc-banner .sc-short, .sc-banner .lede, .sc-banner .actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-banner, .sc-banner::before, .sc-floor, .sc-title, .sc-art-box svg, .sc-plus i { animation: none !important; }
}
