/* Gear tab mock-up. Tokens, fonts, header, card and sheet styles are copied from public/style.css
   so the tab can be ported by dropping the "Gear" section below into that file. */
:root {
  --bg: #f6f7fb; --bg-2: #ffffff; --ink: #0b1a33; --muted: #5b6b85; --line: #e3e7ef;
  --accent: #ff6a13; --accent-ink: #ffffff; --blue: #1856c9; --green: #1f9d55; --amber: #d98b0b; --red: #d33a2c;
  --shadow: 0 1px 2px rgba(11,26,51,.06), 0 8px 24px rgba(11,26,51,.06);
  --skin: #e8b89a; --overlay: rgba(11,26,51,.55);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1222; --bg-2: #121b30; --ink: #eef2fa; --muted: #9aa8c2; --line: #233150;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --overlay: rgba(2,6,16,.65);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1222; --bg-2: #121b30; --ink: #eef2fa; --muted: #9aa8c2; --line: #233150;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --overlay: rgba(2,6,16,.65);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Segoe UI, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body.sheet-open { overflow: hidden; }
main { max-width: 1100px; margin: 0 auto; padding-block: 0 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; }
h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); }
a { color: var(--blue); }
button { font: inherit; font-weight: 600; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.card { background: var(--bg-2); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.badge { display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--line); color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.badge.st-confirmed { background: rgba(31,157,85,.15); color: var(--green); }
.badge.st-partial { background: rgba(217,139,11,.16); color: var(--amber); }
.badge.st-placeholder { background: rgba(211,58,44,.12); color: var(--red); }

/* Header, as on the tracker, plus a tab strip */
.top { max-width: 1100px; margin: 0 auto; padding-block: 14px 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 14px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--bg-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.theme-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); font-size: 18px; line-height: 1; }
.tabs { max-width: 1100px; margin: 0 auto 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 6px; }
.tab { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.tab.on { background: var(--ink); color: var(--bg); }
.tabs-note { margin-left: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .tabs-note { display: none; } }

/* ===== Gear ===== */
.gear-hero { border-radius: 18px; padding: 20px 22px; color: #fff; background: linear-gradient(135deg, #0b1a33 0%, #1856c9 60%, #ff6a13 140%); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.gh-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.gh-title { font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 6px 0; text-wrap: balance; }
.gh-sub { margin: 0; opacity: .92; font-size: 15px; max-width: 52ch; }

.gear-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 700px) { .gear-layout { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1000px) { .gear-layout { grid-template-columns: minmax(0, 1fr) 380px; } .panel { position: sticky; top: 12px; } }

/* The figure */
.stage-card { display: grid; gap: 12px; }
.stage { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; align-items: stretch; }
@media (min-width: 700px) { .stage { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; } }
.figure { position: relative; width: 100%; max-width: 100%; aspect-ratio: 540 / 1958; -webkit-tap-highlight-color: transparent; align-self: start; }
.figure .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 10px 18px rgba(11,26,51,.25)); transition: filter .25s ease; }
.figure.has-sel .photo { filter: drop-shadow(0 10px 18px rgba(11,26,51,.25)) saturate(.85) brightness(.92); }
.figure .overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spot { fill: none; stroke: var(--accent); stroke-width: 7; opacity: 0; transition: opacity .2s ease; }
.figure.has-sel .spot { opacity: .85; }
.skin { fill: var(--skin); }
.skin-stroke { fill: none; stroke: var(--skin); stroke-linecap: round; }
.shadow { fill: rgba(11,26,51,.12); }
.head-ring { fill: var(--bg-2); stroke: var(--line); stroke-width: 3; }
.part { cursor: pointer; transition: opacity .25s ease, filter .25s ease; }
.figure.has-sel .part:not(.on) { opacity: .5; }
.part.on { filter: url(#glow); }
.figure-note { margin: 0; font-size: 13px; color: var(--muted); }

.anchor { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 12px; height: 12px; padding: 0; border-radius: 50%; background: var(--bg-2); border: 2.5px solid var(--muted); box-shadow: 0 1px 3px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.anchor::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: ring 2.4s ease-out infinite; }
.anchor:nth-child(2n)::after { animation-delay: .8s; }
.anchor:nth-child(3n)::after { animation-delay: 1.5s; }
.anchor.on { background: var(--accent); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.35); z-index: 2; }
.anchor.hover { border-color: var(--accent); }
.anchor.on::after, .anchor.seen::after { animation: none; }
.leads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lead { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .5; transition: stroke .2s ease, opacity .2s ease, stroke-width .2s ease; }
.lead.hover { opacity: .9; stroke: var(--ink); }
.lead.on { stroke: var(--accent); stroke-width: 2.5; opacity: 1; }
.lead-dot { fill: var(--muted); opacity: .5; }
.lead-dot.on { fill: var(--accent); opacity: 1; }
@keyframes ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.pops { position: absolute; inset: 0; pointer-events: none; }
.pop { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); font-size: 26px; animation: pop-up .8s cubic-bezier(.2,.9,.2,1) forwards; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
@keyframes pop-up { 0% { transform: translate(-50%, -50%) scale(.4) rotate(-10deg); opacity: 0; } 40% { transform: translate(-50%, -110%) scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: translate(-50%, -190%) scale(1) rotate(-4deg); opacity: 0; } }

/* The labels: one per item, spread down the figure, each with a line to its thing */
.labels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 3px; min-width: 0; position: relative; z-index: 1; }
.labels li { display: flex; min-width: 0; }
.kit-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; text-align: left; padding: 5px 8px; border-radius: 12px; background: var(--bg-2); color: var(--ink); font-weight: 400; border: 1px solid var(--line); transition: border-color .15s ease, background .15s ease; }
.kit-item:hover { border-color: var(--muted); background: var(--bg); }
.kit-item.on { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.kit-item .thumb { display: none; width: 36px; height: 36px; border-radius: 9px; background: var(--bg); place-items: center; overflow: hidden; font-size: 18px; }
.kit-item .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kit-item .ki-zone, .kit-item .ki-name, .kit-item .ki-brand { display: block; }
.kit-item .ki-zone { display: none; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kit-item .ki-name { font-weight: 700; font-size: 13px; line-height: 1.15; }
.kit-item .ki-brand { font-size: 11px; color: var(--muted); }
.kit-item .ki-go { color: var(--muted); font-weight: 700; font-size: 16px; }
.kit-item .ki-text { min-width: 0; }
@media (min-width: 700px) {
  .kit-item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 7px 10px; }
  .kit-item .thumb { display: grid; }
  .kit-item .ki-zone { display: block; }
  .kit-item .ki-name { font-size: 14px; }
  .kit-item .ki-brand { font-size: 12px; }
}
.kit-head, .kit-count { display: none; }

/* Where the card lives: a side panel on desktop, a sheet on phones */
.panel { display: none; }
@media (min-width: 1000px) { .panel { display: block; min-height: 300px; } }
.panel-empty { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 40px 10px; color: var(--muted); }
.pe-emoji { font-size: 34px; }
.pe-title { font-weight: 700; color: var(--ink); }
.sheet { position: fixed; inset: 0; z-index: 1960; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade-in .2s ease-out; }
.sheet-inner { background: var(--bg-2); color: var(--ink); width: 100%; max-width: 540px; max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; padding-block: 10px max(20px, env(safe-area-inset-bottom, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.3); animation: sheet-up .25s cubic-bezier(.2,.9,.2,1) both; overscroll-behavior: contain; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 2px auto 12px; }
.sheet-close { margin-top: 14px; width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
@media (min-width: 700px) { .sheet { align-items: center; padding: 20px; } .sheet-inner { border-radius: 22px; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

/* The gear card */
.gcard { display: grid; gap: 12px; }
.gcard-media { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 14px; background: var(--bg); overflow: hidden; display: grid; place-items: center; }
.gcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; padding: 8px; }
.gcard-media img.photo { object-fit: cover; object-position: center 20%; padding: 0; }
.gcard-media .fallback { font-size: 64px; }
.gcard-media .cap { position: absolute; left: 8px; bottom: 8px; right: 8px; width: max-content; max-width: calc(100% - 16px); font-size: 11px; color: #fff; background: rgba(11,26,51,.72); padding: 3px 9px; border-radius: 999px; }
.gcard-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gcard-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0 0; text-wrap: balance; }
.gcard-title:focus { outline: none; }
.gcard-brand { color: var(--muted); font-size: 14px; margin-top: -8px; }
.gcard-tag { margin: 0; font-size: 15px; }
.rows { border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row .rk { color: var(--muted); flex: 0 0 auto; min-width: 72px; }
.row .rv { font-weight: 600; text-align: right; min-width: 0; }
.gcard-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gcard-price b { font-size: 22px; font-variant-numeric: tabular-nums; }
.gcard-price .pn { font-size: 12px; color: var(--muted); }
.gcard-link { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 9px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.gcard-link:hover { border-color: var(--blue); }
.gcard-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gcard-note { font-size: 13px; color: var(--muted); margin: 0; }
.why { display: grid; gap: 6px; background: var(--bg); border-radius: 14px; padding: 12px; }
.why label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.why textarea { font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; min-height: 64px; }
.why .hint { font-size: 12px; color: var(--muted); }
.why-k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.why-text { margin: 0; font-size: 15px; }
.subs { display: grid; gap: 12px; }
.sub-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.sub-card .sc-img { width: 84px; height: 84px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; overflow: hidden; font-size: 28px; }
.sub-card .sc-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sub-card .sc-body { min-width: 0; display: grid; gap: 8px; }
.sub-card .sc-title { font-weight: 800; }
.sub-card .sc-brand { color: var(--muted); font-size: 13px; }
.sub-card .row { padding: 6px 0; font-size: 13px; }
.sub-card .gcard-price b { font-size: 18px; }
@media (max-width: 400px) { .sub-card { grid-template-columns: 64px minmax(0, 1fr); } .sub-card .sc-img { width: 64px; height: 64px; } }

/* The rainbow vest: no product photo exists, so a swatch, Soar's photo of another colour, and a slot for Nick's own */
.rainbow-box { display: grid; gap: 10px; }
.swatch { height: 56px; border-radius: 12px; background: linear-gradient(90deg, #ff3b30, #ff9500, #ffd60a, #34c759, #0a84ff, #af52de); position: relative; overflow: hidden; }
.swatch::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 8px 8px, rgba(255,255,255,.35) 2px, transparent 2.5px); background-size: 16px 16px; }
.own-photo { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; }
.own-photo img { width: 84px; height: 84px; object-fit: contain; border-radius: 12px; background: var(--bg); padding: 4px; }
.own-photo .op-text { font-size: 13px; color: var(--muted); }
.upload { display: grid; gap: 6px; position: relative; }
.upload .btn { display: inline-flex; width: max-content; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.upload input:focus-visible + .u-note { outline: 2px solid var(--blue); }
.upload .u-note { font-size: 12px; color: var(--muted); }

/* About, footer, toast */
.about { display: grid; gap: 8px; font-size: 14px; }
.about > div { padding: 8px 0; border-top: 1px solid var(--line); }
footer { color: var(--muted); font-size: 13px; display: grid; gap: 4px; padding-top: 8px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); z-index: 2000; animation: fade-in .2s ease-out; max-width: calc(100% - 32px); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .anchor::after, .pop, .sheet, .sheet-inner, .toast { animation: none; }
  .anchor, .part, .lead, .kit-item { transition: none; }
  .pop { display: none; }
}

/* ===== Merch: the sweatshirt page ===== */
.gear-hero.merch { background: linear-gradient(135deg, #0b1a33 0%, #1f6b3a 55%, #c8a24a 140%); }
.merch-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.merch-price { display: grid; line-height: 1.05; }
.merch-price .mp-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.merch-price b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.cart-btn { background: #fff; color: #1f6b3a; font-weight: 800; }
.stamp { display: inline-block; padding: 6px 12px; border: 3px solid #ff3b30; color: #ff3b30; border-radius: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; transform: rotate(-8deg); background: rgba(255,255,255,.1); }
.stamp.shake { animation: stamp-shake .5s ease; }
@keyframes stamp-shake { 0%, 100% { transform: rotate(-8deg); } 25% { transform: rotate(-14deg) scale(1.1); } 60% { transform: rotate(-4deg) scale(1.04); } }
.figure.merch { aspect-ratio: 490 / 1000; }
.badge.st-exclusive { background: rgba(31,107,58,.15); color: #2a8a4c; }
.badge.st-limited { background: rgba(124,58,237,.14); color: #8b5cf6; }
.badge.st-sold-out { background: rgba(255,59,48,.14); color: #ff3b30; }
@media (prefers-reduced-motion: reduce) { .stamp.shake { animation: none; } }

/* The merch figure keeps the same column as the gear figure; tap it for the big version */
.figure .photo { cursor: zoom-in; }
/* Tap the photo to see it big */
.lightbox { position: fixed; inset: 0; z-index: 1970; background: rgba(2,6,16,.88); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); cursor: zoom-out; animation: fade-in .2s ease-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 20px 40px rgba(0,0,0,.6)); }
.lightbox .lb-note { position: absolute; bottom: max(14px, env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }

/* The visible way in to the big photo */
.zoom-btn { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 6px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12px; font-weight: 700; white-space: nowrap; z-index: 3; }
.zoom-btn:hover { border-color: var(--accent); }
