/* Atelier 151 — "HUD" direction, rev 4: ash-grey recolour.
   Same instrument panel, repainted light: ash-grey ground (#B2BEB5, a soft
   sage grey), lifted ash panels, a deeper ash photo well, dark-ash line work,
   charcoal ink with the same undertone. Burnt orange replaces cyan as the
   single accent, split by depth: #A34400 for fills/borders/marks, #7A3400
   where orange is text, #E69A5F on the dark footer band.
   Palette measured (WCAG 2.x):
   #1A1D1B on #B2BEB5 8.8:1 · on #C9D2CA 11.0:1 · on #A2AFA5 7.5:1 · on #B3BFB5 8.9:1
   #252B27 on #B2BEB5 7.5:1 · on #C9D2CA 9.3:1 · on #A2AFA5 6.3:1
   #37413B on #B2BEB5 5.5:1 · on #C9D2CA 6.8:1 · on #ADBAB0 5.3:1 · on #B3BFB5 5.6:1
   #404B44 on #B2BEB5 4.7:1 · on #C9D2CA 5.9:1 · on #B3BFB5 4.8:1 · on the hero chip >=5.6:1
   #7A3400 on #B2BEB5 4.7:1 · on #C9D2CA 5.8:1 · on #D9E0DA 6.7:1 · on #B3BFB5 4.8:1 — orange TEXT
   #5C2900 on #B2BEB5 6.2:1 (link hover)
   #A34400 on #B2BEB5 3.2:1 · on #C9D2CA 4.0:1 — FILL/BORDER/MARK-ONLY, never text
   #FFFFFF on #A34400 6.2:1 (btn, JP badge, selection) · on #C15400 4.6:1 (btn hover)
   #FFFFFF on #7A3400 9.1:1 (btn active)
   #E69A5F on #1F2421 6.9:1 (footer accent only)
   #D9E0DA on #1F2421 11.7:1 · #C3CEC6 9.7:1 · #8E9B92 5.4:1 (footer text)
   #D9E0DA on rgba(26,29,27,.88) >=10.5:1 (EN badge over the well)
   #57635B on #B2BEB5 3.3:1 · on #C9D2CA 4.1:1 — CONTROL BORDERS, never text
   #7B8880 on #B2BEB5 1.9:1 — ORNAMENT ONLY: every state near it is carried by
   words or a >=3:1 channel (orange border, stamp outline, node).
   Prices are IBM Plex Mono 500 only — Orbitron's slashed zero never renders
   a figure. */

:root {
  --bg: #b2beb5;               /* ash grey ground */
  --abyss: #1f2421;            /* footer: the one dark band, ash charcoal */
  --panel: #c9d2ca;            /* cards, modules: lifted ash */
  --panel-hi: #d9e0da;
  --well: #a2afa5;             /* photo viewport: deeper ash */
  --ink: #1a1d1b;
  --ink-2: #252b27;            /* was --bright in the dark rev; the scale has flipped */
  --muted: #37413b;
  --dim: #404b44;
  --signal: #a34400;           /* burnt orange: fills/borders/marks ONLY, never text */
  --signal-deep: #7a3400;      /* burnt orange dark enough to be text on light surfaces */
  --signal-hi: #e69a5f;        /* burnt orange light enough for the dark footer */
  --link: #7a3400;
  --link-hover: #5c2900;
  --line: #7b8880;             /* ornament only */
  --line-hi: #57635b;          /* >=3:1 control borders */
  --btn: #a34400;
  --btn-hi: #c15400;
  --btn-lo: #7a3400;
  --on-btn: #ffffff;
  --on-abyss: #d9e0da;         /* footer primary text */
  --on-abyss-muted: #c3cec6;   /* footer links */
  --on-abyss-dim: #8e9b92;     /* footer fine print */
  --grid: rgba(26, 29, 27, 0.07);
  --tick: rgba(26, 29, 27, 0.45);   /* corner brackets: ornament only, carries no state */
  /* Corner registration brackets: eight background layers on a pseudo-element
     above the viewport. Pure decoration. */
  --ticks:
    linear-gradient(var(--tick), var(--tick)) 0 0/16px 2px,
    linear-gradient(var(--tick), var(--tick)) 0 0/2px 16px,
    linear-gradient(var(--tick), var(--tick)) 100% 0/16px 2px,
    linear-gradient(var(--tick), var(--tick)) 100% 0/2px 16px,
    linear-gradient(var(--tick), var(--tick)) 0 100%/16px 2px,
    linear-gradient(var(--tick), var(--tick)) 0 100%/2px 16px,
    linear-gradient(var(--tick), var(--tick)) 100% 100%/16px 2px,
    linear-gradient(var(--tick), var(--tick)) 100% 100%/2px 16px;
  /* Same brackets, inset 14px, for the hero frame corners. */
  --ticks-hero:
    linear-gradient(var(--tick), var(--tick)) left 14px top 14px/22px 2px,
    linear-gradient(var(--tick), var(--tick)) left 14px top 14px/2px 22px,
    linear-gradient(var(--tick), var(--tick)) right 14px top 14px/22px 2px,
    linear-gradient(var(--tick), var(--tick)) right 14px top 14px/2px 22px,
    linear-gradient(var(--tick), var(--tick)) left 14px bottom 14px/22px 2px,
    linear-gradient(var(--tick), var(--tick)) left 14px bottom 14px/2px 22px,
    linear-gradient(var(--tick), var(--tick)) right 14px bottom 14px/22px 2px,
    linear-gradient(var(--tick), var(--tick)) right 14px bottom 14px/2px 22px;
  --page: 1200px;
  --radius: 6px;
  /* Chamfered modules via asymmetric radii: outlines and overflow clipping
     stay intact — clip-path would clip focus rings, so it is used only on
     non-interactive elements (badges, the hero silhouette). */
  --facet: 4px 14px 4px 14px;
  --facet-s: 3px 10px 3px 10px;
  --facet-l: 6px 22px 6px 22px;
  --glow-card: 0 0 0 1px rgba(163, 68, 0, 0.35), 0 10px 30px rgba(20, 23, 21, 0.35),
    0 0 24px rgba(163, 68, 0, 0.12);
  --shadow-panel: 0 18px 44px rgba(20, 23, 21, 0.4);
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* A light wash at the top settling onto the ash ground. It never drifts
     darker than --bg, so every text token keeps its measured ratio to the
     bottom of the longest page. */
  background: linear-gradient(180deg, #c6d0c7 0, var(--bg) 420px);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0;
}

h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.15rem; }

a { color: var(--link); }            /* 4.7:1 on --bg */
a:hover { color: var(--link-hover); } /* 6.2:1 */

img { max-width: 100%; display: block; }

::selection { background: var(--signal); color: var(--on-btn); }   /* 6.2:1 */

[hidden] { display: none !important; }

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--dim);              /* 4.7:1 on --bg */
}

/* Category-page and About ledes set their colour and measure inline; this
   supplies the type so they are not body-default. */
.lede { font-size: 1.06rem; line-height: 1.6; margin: 16px 0 0; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  /* Solid ash, deliberately not translucent: the burnt-orange brand mark
     keeps >=4.5:1 over anything scrolling beneath. */
  background: #b3bfb5;
  z-index: 20;
}

/* The signal scanline across the top of every page. */
.site-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--signal), rgba(163, 68, 0, 0.3));
  pointer-events: none;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.brand span { color: var(--signal-deep); }   /* 4.8:1 on the header */

.header-end {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Pure-CSS menu state for phones. Hidden on desktop; see the <=820px block. */
.nav-check, .nav-btn { display: none; }

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }

/* Active mark: deep-orange text + orange bar, the reference's "active node". */
.site-nav a[aria-current="page"] {
  color: var(--signal-deep);    /* 4.8:1 on the header */
  border-bottom-color: var(--signal);
}

/* ---------- hero / masthead ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1000px 460px at 10% 0%, rgba(163, 68, 0, 0.08), rgba(163, 68, 0, 0) 62%),
    var(--ticks-hero),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0/100% 40px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0/40px 100%,
    #adbab0;
  background-repeat: no-repeat;
}

/* The one ambient effect: a scan line crossing the masthead. Transform-only,
   faint, clipped by the hero, and stopped under reduced-motion. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(163, 68, 0, 0), rgba(163, 68, 0, 0.14), rgba(163, 68, 0, 0)) 0 0/100% 3px no-repeat;
  transform: translateY(-100%);
  animation: hero-scan 9s linear infinite;
}

@keyframes hero-scan { to { transform: translateY(100%); } }

/* Area-chart silhouette at the base: a warm ridge clipped to peaks.
   Without clip-path support it simply does not render. */
.hero::after {
  content: "";
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 118px;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(180deg, rgba(163, 68, 0, 0.13), rgba(163, 68, 0, 0) 82%);
}

@supports (clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)) {
  .hero::after {
    display: block;
    clip-path: polygon(0 100%, 0 58%, 6% 58%, 9% 34%, 13% 34%, 16% 64%, 22% 64%,
      26% 18%, 31% 18%, 35% 52%, 41% 52%, 45% 10%, 50% 10%, 54% 44%, 60% 44%,
      64% 28%, 70% 28%, 74% 60%, 80% 60%, 84% 36%, 90% 36%, 94% 54%, 100% 54%,
      100% 100%);
  }
}

.hero .wrap { position: relative; z-index: 1; padding-block: 64px 52px; }

/* Eyebrow as a label chip: thin outline, spaced uppercase, status node. */
.hero .mono {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  padding: 6px 12px;
  background: rgba(216, 223, 217, 0.6);
  color: var(--dim);                /* >=5.6:1 on the chip */
}

.hero .mono::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 6px rgba(163, 68, 0, 0.8);
  flex: 0 0 auto;
}

/* Title in the glowing rectangular frame, straight from the reference. */
.hero h1 {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  max-width: 15ch;
  margin-top: 22px;
  padding: 20px 24px;
  border: 1px solid rgba(163, 68, 0, 0.6);
  background: rgba(216, 223, 217, 0.5);
  box-shadow: 0 0 24px rgba(163, 68, 0, 0.14), inset 0 0 24px rgba(163, 68, 0, 0.04);
}

.hero p.lede {
  color: var(--muted);          /* 5.3:1 on the hero ground */
  max-width: 58ch;
  margin: 20px 0 0;
  font-size: 1.06rem;
  line-height: 1.6;
}

/* ---------- catalogue tiles (homepage index) ---------- */

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 30px auto 0;
  padding: 0 24px 46px;
  max-width: var(--page);
}

.cat {
  position: relative;
  display: block;
  padding: 22px 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--facet);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease-out, border-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.cat:hover, .cat:focus-visible {
  transform: translateY(-2px);
  border-color: var(--signal);
  box-shadow: var(--glow-card);
}

.cat:active { transform: translateY(0); box-shadow: none; }

.cat h3 { margin: 12px 0 8px; transition: color 140ms ease-out; }
.cat p { margin: 0 0 14px; color: var(--muted); font-size: 0.92rem; }

/* Index number as an outlined chip. */
.cat > .mono:first-child {
  display: inline-block;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  padding: 2px 8px;
  color: var(--dim);
}

/* "Browse" readout strip: ruled division, strong-ink label. */
.cat .mono:last-child {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--ink-2);
}

@media (hover: hover) {
  .cat:hover h3 { color: var(--signal-deep); }   /* 5.8:1 on the panel */
}

/* ---------- catalogue grid ---------- */

.section { padding-block: 56px; }

/* Category and About page titles get a ruled instrument header. */
.section > h1 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section > h1::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 12px;
  background: var(--signal);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(163, 68, 0, 0.6);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

/* Diamond node before major section titles. Decorative only. */
.section-head h2::before,
.gameband-head h2::before,
.faq h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  background: var(--signal);
  transform: rotate(45deg);
  box-shadow: 0 0 7px rgba(163, 68, 0, 0.5);
}

/* Tick scale stretched between the title and the count. Ornament only. */
.section-head::after, .gameband-head::after {
  content: "";
  flex: 1 1 48px;
  align-self: flex-end;
  height: 6px;
  margin: 0 2px 5px;
  background: repeating-linear-gradient(90deg, rgba(64, 75, 68, 0.4) 0 1px, transparent 1px 9px);
  border-bottom: 1px solid var(--line);
}

.gameband-head::after { border-bottom: 0; margin-bottom: 3px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

/* ---------- product card ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--facet);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease-out, border-color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--signal);
  box-shadow: var(--glow-card);
}

.card:active { transform: translateY(0); box-shadow: none; }

/* The viewport: transparent cut-outs float over a deeper ash well with a
   soft floor shadow under the product and a top light — the deeper mid-ash
   flatters dark packaging and white packaging alike. (.card-media--photo is
   intentionally neutral — cut-out is the default; .is-plate below is the
   white-sweep opt-out.) */
.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(58% 42% at 50% 87%, rgba(26, 29, 27, 0.14), rgba(26, 29, 27, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 42%),
    linear-gradient(rgba(26, 29, 27, 0.06) 1px, transparent 1px) 0 0/100% 26px,
    linear-gradient(90deg, rgba(26, 29, 27, 0.06) 1px, transparent 1px) 0 0/26px 100%,
    var(--well);
}

.card-media img { width: 100%; height: 100%; object-fit: contain; }

/* Corner registration brackets, drawn ABOVE the plate. Ornament only. */
.card-media::before, .detail-media::before, .cat::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  background: var(--ticks);
  background-repeat: no-repeat;
  opacity: 0.55;
  transition: opacity 160ms ease-out;
}

.card-media::before, .cat::before { inset: 8px; }
.detail-media::before { inset: 12px; }

.card:hover .card-media::before, .card:focus-visible .card-media::before,
.cat:hover::before, .cat:focus-visible::before { opacity: 1; }

/* Scan sweep on hover: user-triggered, transform-only, removed under
   reduced-motion. Sold-out units are dormant — no sweep. */
.card:not(.card--out) .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 58%);
  transform: translateX(-102%);
}

@media (hover: hover) {
  .card:not(.card--out):hover .card-media::after,
  .card:not(.card--out):focus-visible .card-media::after {
    transform: translateX(102%);
    transition: transform 650ms ease-out;
  }
}

/* Sold out: the cut-out recedes and a deactivation hatch overlays the well.
   Decorative — the "Sold out" stamp carries the state. */
.card--out .card-media img {
  filter: grayscale(0.7);
  opacity: 0.5;
  transition: filter 160ms ease-out, opacity 160ms ease-out;
}

.card--out:hover .card-media img { filter: grayscale(0.45); opacity: 0.65; }

.card--out .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(26, 29, 27, 0.05) 0 1px, transparent 1px 10px);
}

/* The white-sweep opt-out: a lit specimen plate inside the frame. The
   brackets darken via --tick so they stay visible on white. */
.card-media.is-plate, .detail-media.is-plate {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(26, 29, 27, 0.22), inset 0 0 30px rgba(163, 68, 0, 0.07);
  --tick: rgba(26, 29, 27, 0.6);
}

/* Placeholder for products with no photograph. Typographic, on grid. */
.ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 12px; padding: 22px; text-align: center;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 100%,
    var(--well);
}

/* No burnt orange reaches 4.5:1 on the well, so the tiny format label is ink. */
.ph-fmt {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);            /* 7.5:1 on the well */
}

.ph-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; line-height: 1.3; color: var(--ink-2);   /* 6.3:1 on the well */
  max-width: 16ch;
}

/* Language chips: EN a dark frosted tag, JP a filled burnt-orange tag. The
   text is the signal; the fill only reinforces it. */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 3px;   /* fallback shape when clip-path is unsupported */
}

@supports (clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)) {
  .badge {
    border-radius: 0;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  }
}

.badge--en {
  background: rgba(26, 29, 27, 0.88);
  border: 1px solid rgba(217, 224, 218, 0.45);
  color: var(--panel-hi);        /* >=10.5:1 over the well */
}
.badge--jp { background: var(--signal); color: var(--on-btn); }  /* 6.2:1 */

/* Panel seam between the viewport and the readout body. */
.card-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.card-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);            /* 5.9:1 on the panel */
}

/* Price/stock readout strip: ruled division above the instruments. */
.card-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Prices are the bright readouts: mono, tabular, deep burnt orange — the
   only orange dark enough to be text on ash. */
.price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--signal-deep);     /* 5.8:1 on the panel */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* In-Stock marker: a glowing status node. Graphic only (4.0:1 on the
   panel); the word beside it carries the state. */
.stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 6px rgba(163, 68, 0, 0.75), 0 0 2px rgba(163, 68, 0, 0.9);
  flex: 0 0 auto;
}

/* Sold out: the node is gone and the words become an outlined stamp. */
.stock--out {
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--line-hi);
  border-radius: 2px 8px 2px 8px;
  align-self: flex-start;
}

.stock--out::before { display: none; }

/* Legacy quantity tint from the old build; kept harmlessly. */
.stock--low { color: var(--signal-deep); }

/* ---------- product detail ---------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  padding-block: 48px;
  align-items: start;
}

.gallery { display: block; }

/* The main viewport: positive border, chamfer, brackets, grid, floor shadow. */
.detail-media {
  position: relative;
  background:
    radial-gradient(60% 44% at 50% 88%, rgba(26, 29, 27, 0.16), rgba(26, 29, 27, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0) 40%),
    linear-gradient(rgba(26, 29, 27, 0.07) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(90deg, rgba(26, 29, 27, 0.07) 1px, transparent 1px) 0 0/34px 100%,
    var(--well);
  border-radius: var(--facet-l);
  border: 1px solid var(--line-hi);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* .detail-media--photo is neutral (cut-out default); .is-plate opts back to
   the white plate, styled with .card-media.is-plate above. */
.detail-media img { width: 100%; height: 100%; object-fit: contain; }
.detail-media .ph-title { font-size: 1.3rem; max-width: 20ch; }

/* ---------- gallery ----------

   No-JS fallback is unchanged: thumbnails are plain links that open the
   photograph; gallery.js upgrades them to in-place swapping. */
.thumbs {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}

.thumb {
  width: 72px; height: 72px;
  border-radius: var(--facet-s);
  overflow: hidden;
  border: 1px solid var(--line-hi);
  background: var(--well);
  flex: 0 0 auto;
  opacity: 0.55;
  transition: opacity 140ms, border-color 140ms, box-shadow 140ms;
}

.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.thumb.is-plate { background: #fff; }

.thumb.is-on {
  opacity: 1;
  border-color: var(--signal);
  box-shadow: 0 0 0 1px var(--signal), 0 0 10px rgba(163, 68, 0, 0.3);
}

@media (hover: hover) {
  .thumb:hover { opacity: 1; }
}

/* The focused thumb comes fully opaque so the ring stays >=3:1. */
.thumb:focus-visible {
  outline: 2px solid var(--signal-deep);
  outline-offset: 2px;
  opacity: 1;
}

/* Spec list as a readout panel: one hairline per row, indexed labels. */
.detail dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 22px;
  margin: 24px 0;
  padding: 4px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--facet-s);
}

.detail dl dt, .detail dl dd {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.detail dl dt:first-of-type, .detail dl dd:first-of-type { border-top: 0; }

.detail dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);            /* 5.9:1 on the panel */
}

.detail dt::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  background: var(--signal);
  transform: rotate(45deg);
}

.detail dd { margin: 0; color: var(--ink); }

.detail ul { padding-left: 18px; color: var(--ink); }
.detail ul li { margin-bottom: 5px; }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 6px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

/* The dominant readout on the page. IBM Plex Mono 500 — never Orbitron:
   Orbitron's zero is slashed, and a buyer must not misread the figure.
   Deep burnt orange keeps it dominant at the mono weight. 4.7:1 on --bg,
   and at 2.4rem it is large text besides. */
.price-lg {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 2.4rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--signal-deep);
  white-space: nowrap;
}

/* Case and box priced at once: both figures named, hairline between rows. */
.price-stack { display: flex; flex-direction: column; gap: 8px; }
.price-stack .price-unit + .price-unit {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.price-unit { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-stack .price-unit .price-lg { font-size: 1.5rem; white-space: normal; }

.per, .price-from {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.price-from { margin-right: 2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; }
.chip {
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Primary action: the burnt-orange console key. White label 6.2:1 on the fill. */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--btn);
  color: var(--on-btn);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid transparent;
  vertical-align: middle;
  border-radius: var(--facet-s);
  min-height: 48px;
  line-height: 22px;
  margin-top: 22px;
  box-shadow: 0 0 18px rgba(163, 68, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: background 140ms ease-out, border-color 140ms ease-out,
    color 140ms ease-out, transform 140ms ease-out, box-shadow 140ms ease-out;
}

.ico { flex: 0 0 auto; display: block; overflow: visible; }

/* Scan sweep, user-triggered only: a light sheen across the orange fill. */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 58%);
  transform: translateX(-102%);
}

@media (hover: hover) {
  .btn:hover::after, .btn:focus-visible::after {
    transform: translateX(102%);
    transition: transform 550ms ease-out;
  }
}

.btn:hover { background: var(--btn-hi); transform: translateY(-1px); }  /* white label 4.6:1 */
.btn:active { background: var(--btn-lo); transform: translateY(0); }    /* 9.1:1 */

/* Focus ring clears the saturated fill: offset puts it on the page, with a
   ground-coloured gap ring so it never touches orange-on-orange. */
.btn:focus-visible {
  outline: 2px solid var(--signal-deep);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--bg), 0 0 18px rgba(163, 68, 0, 0.25);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-hi);    /* 3.3:1 control border */
  color: var(--ink);               /* 8.8:1 */
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(163, 68, 0, 0.07);
  border-color: var(--signal);
  color: var(--signal-deep);       /* 4.7:1 */
}
.btn--ghost:active { background: rgba(163, 68, 0, 0.13); }

/* The button group owns the vertical spacing, not the buttons: wrapped
   buttons then sit exactly `gap` apart instead of gap + margin. Standalone
   .btn keeps its own 22px margin-top. */
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ctas .btn { flex: 0 1 auto; margin-top: 0; }

.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.notice {
  border-left: 2px solid var(--signal);
  padding: 10px 0 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 20px 0 0;
}

.price-note {
  font-style: italic;
  color: var(--dim);              /* 4.7:1 on --bg */
  font-size: 0.9rem;
  margin: 18px 0 0;
  max-width: 46ch;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(rgba(217, 224, 218, 0.05) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(217, 224, 218, 0.05) 1px, transparent 1px) 0 0 / 40px 100%,
    var(--abyss);
  color: var(--on-abyss);              /* 11.7:1 on --abyss */
  padding-block: 38px 44px;
  font-size: 0.85rem;
}

/* Mirrors the header scanline, closing the page — in the footer's lighter
   orange, the only place that tint appears. */
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(230, 154, 95, 0.4), var(--signal-hi));
  pointer-events: none;
}

.site-footer .wrap { display: flex; gap: 22px; justify-content: space-between; flex-wrap: wrap; }

.site-footer .brand { color: var(--on-abyss); }
.site-footer .brand span, .site-footer .brand span:hover { color: var(--signal-hi); }  /* 6.9:1 */

/* outline-color here wins over the global :focus-visible rule by specificity,
   so the focus ring stays >=3:1 on the dark band without a new rule. */
.site-footer a { color: var(--on-abyss-muted); outline-color: var(--signal-hi); }  /* 9.7:1 */
.site-footer a:hover { color: var(--signal-hi); }   /* 6.9:1 */

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-link .ico { color: var(--signal-hi); }

.disclaimer { max-width: 62ch; margin-top: 18px; font-size: 0.78rem; line-height: 1.5; color: var(--on-abyss-dim); }  /* 5.4:1 */

/* ---------- homepage rails ----------

   Mechanics unchanged: the row scrolls with CSS scroll-snap alone; the
   script only adds arrows and auto-advance on top. */
.rail-section + .rail-section { margin-top: 46px; }

.rail-section .section-head { margin-bottom: 18px; }

.rail-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);            /* 7.5:1 on --bg */
  white-space: nowrap;
}

.rail-more:hover { color: var(--signal-deep); text-decoration: underline; }

.rail { position: relative; }

.rail-track {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  padding: 4px 2px 12px;
  margin: -4px -2px -12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
  overscroll-behavior-x: contain;
}

.rail-track::-webkit-scrollbar { height: 8px; }
.rail-track::-webkit-scrollbar-track { background: transparent; }
.rail-track::-webkit-scrollbar-thumb {
  background: var(--line-hi);
  border-radius: 4px;
}

/* Edge fade — pure decoration; if mask-image is unsupported the rail simply
   renders without it. */
@supports (mask-image: linear-gradient(to right, black, black)) {
  .rail-track {
    mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  }
}

.rail-track > .card {
  flex: 0 0 clamp(160px, 40vw, 280px);
  scroll-snap-align: start;
}

.rail-nav {
  position: absolute;
  top: calc(50% - 40px);
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: var(--facet-s);
  border: 1px solid var(--line-hi);
  background: var(--panel);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  box-shadow: var(--shadow-panel);
  transition: opacity 220ms ease-out, background 140ms ease-out, border-color 140ms ease-out,
    color 140ms ease-out;
}

.rail:hover .rail-nav,
.rail-nav:focus-visible { opacity: 1; }

.rail-nav:hover { border-color: var(--signal); color: var(--signal-deep); }
.rail-nav:active { background: var(--panel-hi); }
.rail-nav:disabled { opacity: 0 !important; pointer-events: none; }
.rail-nav--prev { left: -6px; }
.rail-nav--next { right: -6px; }

@media (hover: none) {
  .rail-nav { display: none; }
}

@media (max-width: 560px) {
  .rail-track { gap: 12px; }
  .rail-section + .rail-section { margin-top: 34px; }
}

/* ---------- set blocks ---------- */

.setblock { margin: 0; padding-top: 48px; scroll-margin-top: 80px; }
.setblock:first-of-type { padding-top: 8px; }

.setblock > summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 22px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  transition: border-color 140ms ease-out;
}

.setblock > summary::-webkit-details-marker { display: none; }

@media (hover: hover) {
  .setblock > summary:hover { border-bottom-color: var(--line-hi); }
  .setblock > summary:hover h3 { color: var(--signal-deep); }
}

/* An open set block switches its rule to the signal channel. */
.setblock[open] > summary { border-bottom-color: var(--signal); }

.setblock > summary h3 { transition: color 140ms ease-out; }
.setblock > summary > .mono { margin-left: auto; color: var(--dim); }

/* Plus marker that rotates to a cross when the channel opens. The rotation
   and the border carry the state together. */
.setblock > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--signal), var(--signal)) center/12px 2px no-repeat,
    linear-gradient(var(--signal), var(--signal)) center/2px 12px no-repeat;
  transition: transform 180ms ease-out;
}

.setblock[open] > summary::after { transform: rotate(45deg); }

.setblock:not([open]) > summary { margin-bottom: 0; }
.setblock:not([open]) { padding-top: 26px; }

/* Set codes render as data tags. */
.setblock h3 .mono {
  margin-left: 10px;
  margin-right: 0;
  color: var(--ink-2);
  background: var(--panel);
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  padding: 2px 7px;
}

.setblock .grid { row-gap: 20px; }

/* ---------- FAQ (native <details>, no JS) ---------- */

.faq { margin-top: 64px; }
.faq h2 { margin-bottom: 22px; }

.faq-list {
  border-top: 1px solid var(--line);
  max-width: 78ch;
}

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
  list-style: none;
  transition: color 140ms ease-out;
}

.faq-item summary::-webkit-details-marker { display: none; }

@media (hover: hover) {
  .faq-item summary:hover { color: var(--signal-deep); }
}

.faq-item[open] summary { color: var(--signal-deep); }   /* 4.7:1 on --bg */

.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-left: auto;
  margin-top: 4px;
  background:
    linear-gradient(var(--signal), var(--signal)) center/12px 2px no-repeat,
    linear-gradient(var(--signal), var(--signal)) center/2px 12px no-repeat;
  transition: transform 180ms ease-out;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 0 34px 20px 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer p { margin: 0; }

/* ---------- game bands ---------- */

.gameband { padding-top: 18px; scroll-margin-top: 80px; }
.gameband + .gameband { padding-top: 56px; }

.gameband-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-hi);
}

.gameband-head h2 { font-size: clamp(1.35rem, 2.8vw, 1.85rem); font-weight: 700; }

.gameband-head .mono { color: var(--dim); }

.gameband .setblock:first-of-type { padding-top: 30px; }
.gameband .setblock h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }

/* ---------- search ---------- */

.search { position: relative; margin: 0; }

.search input {
  width: 210px;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--facet-s);
  border: 1px solid var(--line-hi);
  background: var(--panel);
  color: var(--ink);
  caret-color: var(--signal-deep);
  font: inherit;
  font-size: 0.88rem;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder { color: var(--dim); }   /* 5.9:1 on the field */

.search input:focus {
  border-color: var(--signal-deep);
  outline: none;
  box-shadow: 0 0 0 3px rgba(163, 68, 0, 0.22);
}

/* The panel ships with the `hidden` attribute set in markup; the script
   removes it once there is something to show. */
.search-panel[hidden] { display: none; }

.search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 48px));
  /* 3px scanline stripe pinned to the panel top. */
  background:
    linear-gradient(90deg, var(--signal), rgba(163, 68, 0, 0.35)) top / 100% 3px no-repeat,
    var(--panel);
  border: 1px solid var(--line-hi);
  border-radius: var(--facet);
  box-shadow: var(--shadow-panel);
  max-height: min(420px, 70vh);
  overflow-y: auto;
  z-index: 30;
}

.search-results { list-style: none; margin: 0; padding: 8px 6px 6px; }

.search-results a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
}

.search-results a:hover,
.search-results [aria-selected="true"] a {
  background: rgba(163, 68, 0, 0.09);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--signal);
}

.search-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--well);
  border: 1px solid var(--line);
}

.search-thumb img { width: 100%; height: 100%; object-fit: contain; }
.search-thumb-blank { display: block; width: 100%; height: 100%; background: var(--panel-hi); }

.search-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }

.search-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--signal-deep);      /* 5.8:1 on the panel */
}

.search-empty { padding: 14px 12px; color: var(--muted); font-size: 0.88rem; }

/* ---------- responsive: <=820px — phones and small tablets ----------

   The phone layout is designed, not squeezed: the sticky header is one 56px
   bar (brand + a pure-CSS menu button); navigation and the script-revealed
   search field fold into a drop-down panel driven by .nav-check. With
   JavaScript off the panel shows the four nav destinations and nothing dead.
   The breakpoint sits at 820px, not 760px: between 761 and ~800px the desktop
   header wraps to a cramped two-row bar, so the collapsed header covers that
   band; from 821px up the desktop header fits on one line. */

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 28px; padding-block: 32px; }
  .section { padding-block: 40px; }
  .setblock, .gameband { scroll-margin-top: 68px; }

  .site-header .wrap { min-height: 56px; padding-block: 6px; flex-wrap: nowrap; gap: 14px; }
  .brand { font-size: 1.05rem; }

  /* Visually hidden but focusable: keyboard users toggle it with space and
     see the ring on the label. clip-path hides it visually; the indicator
     survives on .nav-btn via the sibling rule below. */
  .nav-check {
    display: block;
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    overflow: hidden;
  }

  .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-hi);
    border-radius: var(--facet-s);
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    flex: 0 0 auto;
  }

  .nav-btn .mono { color: var(--dim); font-size: 0.7rem; }

  .nav-btn-bars {
    width: 16px; height: 12px;
    background: linear-gradient(currentColor, currentColor) center/100% 2px no-repeat;
    position: relative;
    color: var(--ink-2);
  }

  .nav-btn-bars::before, .nav-btn-bars::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease-out;
  }

  .nav-btn-bars::before { top: 0; }
  .nav-btn-bars::after { bottom: 0; }

  .nav-btn:hover { border-color: var(--signal); }

  .nav-check:focus-visible ~ .nav-btn {
    outline: 2px solid var(--signal-deep);
    outline-offset: 2px;
  }

  /* Open state: the bars become a cross and the chip goes active. */
  .nav-check:checked ~ .nav-btn { border-color: var(--signal); }
  .nav-check:checked ~ .nav-btn .mono { color: var(--signal-deep); }
  .nav-check:checked ~ .nav-btn .nav-btn-bars { background: none; color: var(--signal-deep); }
  .nav-check:checked ~ .nav-btn .nav-btn-bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-check:checked ~ .nav-btn .nav-btn-bars::after { transform: translateY(-5px) rotate(-45deg); }

  /* The drop-down console: search first (when the script reveals it), then
     the four destinations as full-width rows. A step lighter than the header
     so deep-orange active text keeps >=4.5:1 on it. */
  .header-end {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #b8c4ba;
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 16px;
    box-shadow: var(--shadow-panel);
  }

  .nav-check:checked ~ .header-end { display: flex; }

  .search { order: -1; width: 100%; margin: 0 0 8px; }
  .search input { width: 100%; min-height: 46px; }
  .search-panel { right: auto; left: 0; width: 100%; top: calc(100% + 6px); }

  .site-nav { flex-direction: column; gap: 0; width: 100%; }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 2px 0 10px;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(123, 136, 128, 0.55);
  }

  .site-nav a:last-child { border-bottom: 0; }

  /* Current page: deep-orange text plus an inset bar — two channels. */
  .site-nav a[aria-current="page"] {
    border-bottom-color: rgba(123, 136, 128, 0.55);
    box-shadow: inset 2px 0 0 var(--signal);
  }

  /* Phone hero: the frame and brackets stay, tightened. */
  .hero .wrap { padding-block: 44px 38px; }
  .hero h1 {
    font-size: clamp(1.55rem, 7.4vw, 2.1rem);
    max-width: 17ch;
    margin-top: 18px;
    padding: 14px 16px;
  }
  .hero .mono { font-size: 0.62rem; padding: 5px 10px; }
  .hero p.lede { font-size: 0.98rem; margin-top: 16px; }
  .hero::after { height: 72px; }

  .price-lg { font-size: 2rem; }
  .ctas .btn { flex: 1 1 100%; }
}

/* ---------- responsive: <=560px — small phones ---------- */

@media (max-width: 560px) {
  /* Set-block summary: marker pinned right across two rows; title above,
     count below. */
  .setblock > summary {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title marker"
      "meta  marker";
    align-items: center;
    column-gap: 14px;
    row-gap: 4px;
  }

  .setblock > summary h3 { grid-area: title; }
  .setblock > summary > .mono { grid-area: meta; margin-left: 0; }
  .setblock > summary::after { grid-area: marker; align-self: center; }

  /* Category grid: 2-up from 360px (the 320-359px row layout is below). */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .setblock .grid { row-gap: 12px; }

  .card-body { padding: 10px 10px 12px; gap: 5px; }
  .card-title { font-size: 0.82rem; line-height: 1.25; }
  .card-spec { font-size: 0.6rem; letter-spacing: 0.05em; }
  .card-foot { gap: 2px; padding-top: 6px; }
  .price { font-size: 0.92rem; }
  .stock { font-size: 0.6rem; gap: 5px; }
  .stock--out { padding: 2px 6px; }

  .badge { font-size: 0.55rem; padding: 3px 7px; top: 6px; left: 6px; }

  .ph { padding: 12px; gap: 8px; }
  .ph-fmt { font-size: 0.55rem; letter-spacing: 0.1em; }
  .ph-title { font-size: 0.8rem; max-width: 14ch; }

  .thumb { width: 56px; height: 56px; }
  .thumbs { gap: 8px; }

  .rail-track > .card { flex-basis: clamp(150px, 42vw, 240px); }

  .cats { grid-template-columns: 1fr; gap: 12px; padding-bottom: 36px; }
  .cat { padding: 18px 18px 16px; }

  .section-head::after, .gameband-head::after { flex-basis: 24px; }

  .footer-contact { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- responsive: 320-359px — the narrowest phones ----------

   Below the 2-up threshold the card becomes a horizontal scan-row: viewport
   left, readout right, so the catalogue stays dense instead of stacking
   full-width portraits. */

@media (max-width: 359px) {
  .grid { grid-template-columns: 1fr; }

  .card { flex-direction: row; align-items: stretch; }

  .card-media {
    flex: 0 0 92px;
    width: 92px;
    aspect-ratio: auto;
    align-self: stretch;
  }

  .card-body { border-top: 0; border-left: 1px solid var(--line); padding: 8px 10px; }
  .card-title { font-size: 0.8rem; }
  .badge { font-size: 0.5rem; padding: 2px 6px; top: 4px; left: 4px; }
}

/* Deep burnt orange: 4.7:1 on --bg, 5.8:1 on --panel. On the dark footer the
   links set their own outline-color (see .site-footer a). */
:focus-visible { outline: 2px solid var(--signal-deep); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  /* Kill the ambient scan line and every sweep layer; the sold-out hatch
     stays (it does not move). */
  .hero::before { animation: none; }
  .card:not(.card--out) .card-media::after, .btn::after { display: none; }
  .card, .cat, .rail-nav, .thumb, .btn,
  .card--out .card-media img,
  .card-media::before, .detail-media::before, .cat::before,
  .setblock > summary, .setblock > summary h3, .setblock > summary::after,
  .faq-item summary, .faq-item summary::after,
  .nav-btn-bars::before, .nav-btn-bars::after { transition: none; }
}
