/* every page opts in to cross-document view transitions, so a navigation never pairs an opted-in page with one that
   is not (the browser aborts those with "InvalidStateError ... opt-in disabled"); the game page styles its own */
@view-transition { navigation: auto; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 'Mulish', 'Muli', system-ui, sans-serif; color: var(--ink); background: var(--page); }
a { color: inherit; text-decoration: none; font-weight: 700; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; margin: 0; }
.w { max-width: 1040px; margin: 0 auto; padding-inline: 16px; }
.top .w { display: flex; align-items: center; gap: 12px; padding-block: 18px; }
.top img { width: 34px; height: 30px; display: block; }
.top .name { font-size: 20px; }
.top nav { margin-left: auto; display: flex; gap: 24px; font-size: 15px; }
.top nav a { opacity: .7; } .top nav a.on { opacity: 1; }
.hero .w { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-block: 48px 72px; }
.num { font: 700 15px/1 'Fira Mono', ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, currentColor 65%, transparent); }
.hero { color: var(--hero-fg, #fff); }
.num b { display: block; font: 700 clamp(72px, 13vw, 132px)/.9 'Mulish', system-ui, sans-serif; letter-spacing: 0; color: var(--hero-fg, #fff); margin: 6px 0 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 12px; }
.hero p.d { font-size: 18px; opacity: .78; max-width: 34ch; margin-bottom: 28px; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 34px; border-radius: 999px; font: 700 17px 'Mulish', system-ui, sans-serif; transition: transform .3s cubic-bezier(.25,0,0,1), box-shadow .3s cubic-bezier(.25,0,0,1); }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 18px; }
.pay { font-size: 14px; opacity: .65; }
.art { position: relative; }
.art img.cover { width: 100%; display: block; border-radius: 10px; }
.shelf { padding-block: 56px 8px; }
.shelf h2 { font-size: 28px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.shelf h2 small { font-size: 15px; font-weight: 600; opacity: .6; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border-radius: 10px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; min-width: 0; transition: transform .3s cubic-bezier(.25,0,0,1), box-shadow .3s cubic-bezier(.25,0,0,1); }
.card:hover { transform: translateY(-3px); }
.card .pic { aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .b { padding: 16px 20px 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { font-size: 18px; }
.card .m { font-size: 14px; opacity: .6; }
.card .tag { font: 700 12px 'Fira Mono', monospace; letter-spacing: .08em; }
.soon .pic { display: grid; place-items: center; }
.soon .pic span { font: 700 13px 'Fira Mono', monospace; letter-spacing: .12em; padding: 6px 14px; border-radius: 999px; }
footer { margin-top: 72px; }
footer .w { display: flex; align-items: center; gap: 10px; padding-block: 32px; font-size: 14px; }
footer img { width: 20px; height: 18px; }
footer .r { margin-left: auto; opacity: .6; }
.label { position: absolute; top: 12px; left: 12px; z-index: 5; font: 700 11px 'Fira Mono', monospace; letter-spacing: .1em; padding: 5px 10px; border-radius: 999px; background: #fff; color: #111; }
@media (max-width: 760px) {
  .hero .w { grid-template-columns: 1fr; gap: 28px; padding-block: 28px 56px; }
  .art { order: -1; }
  .grid { grid-template-columns: 1fr; }
  .top nav { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

:root { --ink: #111; --page: #f3f1ec; --card: #fbfaf7; }
body::before { content: ""; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E"); opacity: .14; pointer-events: none; z-index: 50; mix-blend-mode: multiply; }
.top { background: #0b0b0b; color: #fff; }
footer { background: #0b0b0b; color: #f3f1ec; }

.card { box-shadow: 0 0 0 2px #111, 6px 6px 0 #111; border-radius: 6px; }
.card:hover { box-shadow: 0 0 0 2px #111, 9px 9px 0 #111; }
.card .pic { border-bottom: 2px solid #111; }
.soon .pic span { background: #111; color: #f3f1ec; }

.hero { position: relative; overflow: hidden; color: #f3f1ec; background: #111 url("/tex/ht-hero-tr2.svg") right top / cover no-repeat; }
.hero .w { position: relative; z-index: 2; }
.art img.cover { border-radius: 6px; box-shadow: 10px 10px 0 #f3f1ec, 10px 10px 0 2px #111; }
.btn { background: #f3f1ec; color: #111; box-shadow: 4px 4px 0 #6b6b6b; }
.num b { -webkit-text-stroke: 2px #f3f1ec; color: transparent; }
.store { background: none; }
.soon .pic { background: var(--card) url("/tex/ht-card-tr.svg") right top / cover no-repeat; }
.arcade { margin-top: 0; padding-block: 40px 72px; color: #fff; background: #111 url("/tex/ht-arcade-mid.svg") right center / cover no-repeat; }
.fadeup { height: 72px; margin-top: 56px; background: url(/tex/fade-fine-up.svg) 0 0 / auto 72px repeat-x; }
.arcade .card { box-shadow: 0 0 0 2px #fff, 6px 6px 0 #fff; background: #111; }
.arcade .card .pic { border-color: #fff; background: #111 url("/tex/ht-card-tr-light.svg") right top / cover no-repeat; }
.arcade .soon .pic span { background: #fff; color: #111; }
footer { margin-top: 0; border-top: 1px solid #262626; }
.hexfade { height: 72px; margin-top: -1px; background: url(/tex/fade-fine.svg) 0 0 / auto 72px repeat-x; }
.top img, footer img { width: 36px; height: 32px; }

/* product page */
.page { padding-block: 48px 72px; }
.product { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; gap: 24px; } .page { padding-block: 28px 56px; } }
.product img.cover { width: 100%; display: block; border-radius: 6px; box-shadow: 0 0 0 2px #111, 8px 8px 0 #111; }
.product h1 { font-size: clamp(34px, 5vw, 44px); margin-bottom: 8px; }
.product p { margin-bottom: 0; }
.price { font-size: 28px; font-weight: 700; margin: 16px 0 24px; }
.price small { font-size: 15px; font-weight: 600; opacity: .6; }
.stack { display: grid; gap: 14px; }
.stack .btn { width: 100%; border: 0; cursor: pointer; }
.btn.solid { background: #111; color: #f3f1ec; box-shadow: 4px 4px 0 #6b6b6b; }
.btn.outline { background: var(--card); color: #111; box-shadow: inset 0 0 0 2px #111, 4px 4px 0 #111; }
.btn.quiet { background: rgba(17,17,17,.06); color: #111; box-shadow: none; font-size: 15px; height: auto; min-height: 52px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn:focus-visible, a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.panel { background: var(--card); border-radius: 6px; box-shadow: 0 0 0 2px #111, 6px 6px 0 #111; padding: 24px; margin-top: 8px; }
.panel[hidden] { display: none; }
.panel h3 { font-size: 18px; margin-bottom: 8px; }
.qr { display: flex; justify-content: center; margin: 8px 0 16px; }
.qr img { width: 200px; height: 200px; image-rendering: pixelated; }
.mono { font-family: 'Fira Mono', ui-monospace, monospace; word-break: break-all; font-size: 14px; }
.copy { display: block; width: 100%; text-align: left; background: rgba(17,17,17,.06); border: 0; border-radius: 6px; padding: 12px; cursor: pointer; color: #111; margin: 6px 0 14px; }
.status { font-weight: 700; margin: 12px 0 0; }
.status.ok { color: #137a6b; }
.status.err { color: #b8382a; }
.fine { font-size: 14px; opacity: .65; }
.fine.center { text-align: center; margin: 4px 0 -4px; }

/* ---- 3D store theme (body.t3d): ink plates, paper text #f3f1ec, the green CTA, checker accents. ----
   Matches /lab/store/. Markup classes and ids are the same as before, so store.js and the checkout
   flow are untouched; only paint changes. */
.t3d { --plate: #141414; --ring: 0 0 0 1.5px #ffffff22 inset; --green: #21bca5; --green-ink: #04221d; --green-lip: #0b6f61;
  --chk: repeating-conic-gradient(#f3f1ec 0 25%, #111 0 50%); background: #0b0b0b; color: #f3f1ec; }
.t3d::before { mix-blend-mode: screen; opacity: .06; }
.t3d .hexfade, .t3d .fadeup { height: 14px; margin: 0; background: var(--chk) 0 0 / 14px 14px; }
.t3d .fadeup { margin-top: 56px; }

/* the stage */
.stage { position: relative; height: calc(100svh - 68px); min-height: 560px; max-height: 980px; background: #000; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.st-bar { position: absolute; left: 12px; right: 12px; bottom: calc(46px + env(safe-area-inset-bottom)); display: grid;
  grid-template-columns: 48px 1fr 48px; gap: 10px; align-items: stretch; max-width: 560px; margin: 0 auto; }
.st-nav { background: #111; color: #f3f1ec; border: 0; border-radius: 12px; font: 800 24px/1 system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 4px 0 #000, var(--ring); }
.st-nav:active { transform: translateY(3px); box-shadow: var(--ring); }
.st-plate { background: #111; color: #f3f1ec; border-radius: 14px; padding: 10px 12px 12px; display: grid; gap: 8px; box-shadow: var(--ring); }
.st-plate .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#st-title { font: 800 19px/1.15 'Mulish', system-ui, sans-serif; margin: 0; }
#st-code { white-space: nowrap; font: 600 11px 'Fira Mono', ui-monospace, monospace; opacity: .6; letter-spacing: .06em; }
.st-cta { display: block; text-align: center; font: 800 16px/1 'Mulish', system-ui, sans-serif; padding: 12px 0; border-radius: 10px;
  background: var(--green); color: var(--green-ink); box-shadow: 0 4px 0 var(--green-lip); }
.st-cta:active { transform: translateY(3px); box-shadow: none; }
.st-cta.off { background: #2a2a2a; color: #8a8a86; box-shadow: none; pointer-events: none; }
.st-dots { position: absolute; left: 0; right: 0; bottom: calc(176px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.st-dots i { width: 7px; height: 7px; border-radius: 2px; background: #ffffff40; }
.st-dots i.on { background: #f3f1ec; }
.st-more { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom));
  font: 700 12px 'Fira Mono', ui-monospace, monospace; letter-spacing: .08em; color: #f3f1ec; background: #111;
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--ring); white-space: nowrap; }

/* buttons: the green CTA, paper outline, quiet */
.t3d .btn { border-radius: 12px; height: 54px; font-weight: 800; }
.t3d .hero .btn, .t3d .btn.solid { background: var(--green); color: var(--green-ink); box-shadow: 0 4px 0 var(--green-lip); }
.t3d .btn.outline { background: transparent; color: #f3f1ec; box-shadow: inset 0 0 0 2px #f3f1ec, 0 4px 0 #000; }
.t3d .btn.quiet { background: #ffffff10; color: #f3f1ec; box-shadow: var(--ring); }
.t3d .btn:hover { transform: translateY(-1px); }
.t3d .btn:active { transform: translateY(3px); box-shadow: none; }

/* shelves: ink plates on black, a checker strip between */
.t3d .store, .t3d .arcade { background: #0b0b0b; color: #f3f1ec; }
.t3d .arcade { background: #0b0b0b; }   /* no hexagon halftone: Andrew moved the store to checker */
.t3d .card, .t3d .arcade .card { background: var(--plate); border-radius: 14px; box-shadow: var(--ring), 0 6px 0 #000; }
.t3d .card:hover, .t3d .arcade .card:hover { box-shadow: var(--ring), 0 9px 0 #000; }
.t3d .card .pic, .t3d .arcade .card .pic { border-bottom: 0; margin: 8px 8px 0; border-radius: 9px; }
.t3d .soon .pic, .t3d .arcade .soon .pic { background: var(--chk) 0 0 / 22px 22px; opacity: .22; }
.t3d .soon .pic span { opacity: 1; }
.t3d .cart .pic { background: repeating-conic-gradient(#e7e5df 0 25%, #f3f1ec 0 50%) 0 0 / 24px 24px; }
.t3d .cart .pic img { object-fit: contain; padding: 12px; }
.t3d .label { background: #111; color: #f3f1ec; box-shadow: var(--ring); }
.t3d .card .m { opacity: .55; }
.t3d .card:not(.soon) .m { opacity: 1; color: var(--green); font-weight: 800; }

/* product + checkout */
.t3d .page { padding-top: 32px; }
.t3d .product img.cover { border-radius: 14px; box-shadow: var(--ring), 0 0 0 6px #111, 0 0 0 8px #f3f1ec; }
.t3d .product > div { background: #111; border-radius: 16px; padding: 22px 20px 24px; box-shadow: var(--ring); }
.t3d .product h1 { font-weight: 900; letter-spacing: -.01em; }
.t3d .product > div > p { opacity: .78; }
.t3d .price { color: #f3f1ec; display: flex; align-items: baseline; gap: 10px; padding-top: 14px; border-top: 1px solid #ffffff1c; }
.t3d .price small { opacity: .55; }
.t3d .panel { background: var(--plate); color: #f3f1ec; border-radius: 14px; box-shadow: var(--ring); }
.t3d .panel h3::before { content: ""; display: block; height: 8px; margin: -6px 0 14px; border-radius: 2px; background: var(--chk) 0 0 / 8px 8px; }
.t3d .qr img { background: #fff; padding: 10px; border-radius: 10px; width: 220px; height: 220px; box-sizing: border-box; }
.t3d .copy { background: #ffffff10; color: #f3f1ec; box-shadow: var(--ring); border-radius: 10px; }
.t3d .status.ok { color: var(--green); }
.t3d .status.err { color: #ff7a66; }
.t3d .fine { opacity: .6; }
.t3d .fine a, .t3d #recovery-link { color: var(--green); }
.t3d .hero { background: linear-gradient(180deg, #111 10%, #111c 100%), repeating-conic-gradient(#2c2c2c 0 25%, #111 0 50%) 0 0 / 28px 28px; }

/* stage: loader plate over the Rive splash, the speaker toggle */
html[data-stage="pending"] .hero, html[data-stage="3d"] .hero { display: none; }
html[data-stage="pending"] .stage, html[data-stage="3d"] .stage { display: block; }
.st-loader { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: #0b0b0b; color: #f3f1ec; font: 700 12px 'Fira Mono', ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase;
  transition: opacity .4s cubic-bezier(.25,0,0,1); }
.st-loader.gone { opacity: 0; pointer-events: none; }
.st-loader .chk { display: grid; grid-template-columns: 14px 14px; gap: 0; padding: 6px; border-radius: 6px; box-shadow: 0 0 0 1.5px #ffffff22 inset; }
.st-loader .chk { grid-template-columns: repeat(3, 12px); }
.st-loader .chk i { width: 12px; height: 12px; background: #f3f1ec; animation: chk .9s steps(1) infinite; }
.st-loader .chk i:nth-child(even) { background: #2a2a2a; animation-name: chk2; }
@keyframes chk { 0% { background: #f3f1ec; } 50% { background: #2a2a2a; } }
@keyframes chk2 { 0% { background: #2a2a2a; } 50% { background: #f3f1ec; } }
.st-loader span { opacity: .55; }
.st-sound { position: absolute; z-index: 2; top: 12px; right: 12px; width: 44px; height: 38px; border: 0; border-radius: 11px;
  background: #111; color: #f3f1ec; display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 3px 0 #000, var(--ring); }
.st-sound svg { width: 20px; height: 16px; opacity: .75; }
.st-sound.on svg { opacity: 1; }
.st-sound .w { display: none; }
.st-sound.on { color: #21bca5; }
.st-sound.on .w { display: inline; } .st-sound.on .x { display: none; }
@media (prefers-reduced-motion: reduce) { .st-loader .chk i { animation: none; } }

/* product pages: the 3D cart (cart3d.js) fades in over the cover once GPU Canvas draws; the cover keeps the layout */
.cover3d { position: relative; }
.cart3d { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; border-radius: 14px; overflow: hidden; background: #000; }
.cart3d.on { opacity: 1; }
.cart3d canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }

/* the game card line Andrew settled 2026-10-14: plain, all white, one beat per line */
p.tag, .hero p.d.tag, .t3d .product > div > p.tag { color: #fff; opacity: 1; }
/* two lines, never three: each line holds, and the type steps down on narrow phones */
p.tag { white-space: nowrap; font-size: min(16px, 3.95vw); }
.hero p.d.tag { font-size: min(18px, 4.5vw); max-width: none; }
