/* ============================================================
   BLITZWORD SITE STYLES
   One stylesheet for the whole single-page site (the home page and the
   shop). The page shown is set on <html data-route="home|shop">, and every
   rule from a page applies only on its own route, so the two pages can use
   the same class names without touching each other.

   Sections: HOME (the home page's styles), SHOP (the shop's styles), then
   SITE (the router, the shared header and the store bar's arrival).
   ============================================================ */

/* ############################################################
   HOME
   ############################################################ */
/* ============================================================
   TOKENS
============================================================ */
:root[data-route="home"] {
  --ink:       #111111;
  --mute:      #8d8d8d;
  --label:     #9a9a9a;
  --ray-a:     #efefef;
  --ray-b:     #ffffff;

  /* Level colors, from Assets/Colors/Blitzword.pal. L1 red, L2 green, L3 blue. */
  --l1: #f43f5e;  --l1-soft: #fecdd3;  --l1-ink: #460809;
  --l2: #22c55e;  --l2-soft: #bbf7d0;  --l2-ink: #032e15;
  --l3: #3b82f6;  --l3-soft: #bfdbfe;  --l3-ink: #162456;
  --orange-soft: #ffedd5;                 /* the header's Instagram sticker on hover */

  --bar-bg: #111111;                      /* store bar */
  --bar-ink: #ffffff;
  --shop-green: #4ade80;                  /* Green 400: the stamp and the Buy Blitzword button */

  --col:  660px;                          /* content column */
  --gap:  clamp(44px, 7vw, 68px);         /* space between sections */
  --top:  clamp(56px, 9vw, 96px);         /* space above the logo */
  --logo: clamp(190px, 38vw, 262px);      /* logo width */
  --display: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --body:    'Barlow', system-ui, sans-serif;

  /* A resting card on a table: tight contact shadow plus a soft spread. */
  --card-shadow:
    0 0.5px 0.5px rgba(0,0,0,0.20),
    0 1px 2px rgba(0,0,0,0.12),
    0 4px 8px rgba(0,0,0,0.10),
    0 12px 24px rgba(0,0,0,0.10);
  /* A card in the air: the shadow drops away and blurs. */
  --lift-shadow:
    0 10px 20px rgba(0,0,0,0.14),
    0 28px 56px rgba(0,0,0,0.20);
}

[data-route="home"] *, [data-route="home"] *::before, [data-route="home"] *::after { box-sizing: border-box; margin: 0; padding: 0; }

html[data-route="home"] { background: var(--ray-b); }

[data-route="home"] body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--ray-b);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SUNBURST
   Same geometry as Assets/Starburst Patterns/White.svg: 48 wedges of
   7.5 degrees, alternating light gray and white. It sits on the page, so it
   scrolls with the content, and turns slowly around the center of the
   logo: the space above the logo plus half the logo's height (58 / 86 of
   its width, from the SVG).

   Performance: the turning is a transform on one layer, so the browser's
   compositor does it off the main thread with no repainting. The layer is
   a square just big enough to reach the page's farthest corner; the script
   at the bottom sizes it, and the browser only draws the part on screen.
============================================================ */
/* Everything under the launch bar. The rays are measured from its top, so
   the bar's height never moves their center off the logo. */
[data-route="home"] .site { position: relative; }

[data-route="home"] .rays {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
[data-route="home"] .rays-spin {
  --size: 300vmax;                     /* replaced by the script with the exact size */
  position: absolute;
  left: 50%;
  top: calc(var(--top) + var(--logo) * 29 / 86);
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  background: repeating-conic-gradient(var(--ray-a) 0deg 7.5deg, var(--ray-b) 7.5deg 15deg);
  will-change: transform;
  /* The pattern repeats every 15 degrees, so turning 15 degrees and starting
     over looks the same as a full turn. One full turn every 5.2 minutes. */
  animation: rays-turn 13s linear infinite;
}
@keyframes rays-turn { to { transform: rotate(15deg); } }

[data-route="home"] img { display: block; max-width: 100%; }
[data-route="home"] button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ============================================================
   PAGE
============================================================ */
[data-route="home"] .page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--col) + 32px);
  margin: 0 auto;
  padding: var(--top) 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
[data-route="home"] .page > * + * { margin-top: var(--gap); }

/* Display headline: gray, with the key phrase in ink */
[data-route="home"] .display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 5.2vw, 36px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--mute);
}
[data-route="home"] .display span { display: block; }
[data-route="home"] .display strong { color: var(--ink); font-weight: 800; }

[data-route="home"] .copy {
  font-size: clamp(16px, 2.6vw, 19px);
  line-height: 1.35;
  max-width: 30em;
}
[data-route="home"] .copy strong { font-weight: 700; }

/* ============================================================
   HERO
============================================================ */
/* Centered on the letters, not the image: the TM sits past the "d" and would
   pull the word 2.3% of the logo's width to the left. */
[data-route="home"] .logo { width: var(--logo); margin: 0 auto; transform: translateX(2.3%); }
[data-route="home"] .logo img { width: 100%; height: auto; }
[data-route="home"] .hero .display { margin-top: clamp(36px, 6vw, 56px); }

/* ============================================================
   CARDS (shared)
   Printed cards have a 3.5 mm corner on a 63 x 88 mm card, so the radius
   is set as a fraction of width and height separately.
============================================================ */
[data-route="home"] .card {
  position: absolute;
  inset: 0;
  border-radius: 5.5% / 3.95%;
  box-shadow: var(--card-shadow);
  background: #fff;
}
[data-route="home"] .card > img, [data-route="home"] .card > .ph {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}
/* Sheen and a hairline edge, so white cards read as objects on a white page */
[data-route="home"] .card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 32%, rgba(0,0,0,0) 72%, rgba(0,0,0,0.05) 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.07);
}
/* Extra shadow for a card that is off the table. Only its opacity animates. */
[data-route="home"] .card > .lift {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--lift-shadow);
  opacity: 0;
  pointer-events: none;
}

/* Rendered cards (the showcase art): the image already has the card's
   shape, corners and lighting, so the page adds only a soft shadow that
   follows its outline. Each render is scaled to the slot's width and
   centered on its height, since the tilt makes their heights vary. */
[data-route="home"] .card.render { background: none; box-shadow: none; border-radius: 0; }
[data-route="home"] .card.render::after { display: none; }
[data-route="home"] .card.render > img {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: auto;
  border-radius: 0;
  transform: translateY(-50%);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18)) drop-shadow(0 10px 16px rgba(0,0,0,0.14));
}

/* ============================================================
   PLACEHOLDER CARDS
   Stand-ins until the real carousel PNGs arrive.
============================================================ */
[data-route="home"] .ph {
  position: relative;
  overflow: hidden;
  font-family: var(--display);
  text-transform: uppercase;
}
[data-route="home"] .ph-rule {
  background: repeating-conic-gradient(from 0deg at 50% 50%, var(--lv) 0deg 12deg, var(--lv-soft) 12deg 24deg);
  padding: 12% 8% 26%;
  display: flex;
}
[data-route="home"] .ph-rule-panel {
  flex: 1;
  background: #fff;
  border: 2px solid var(--lv-ink);
  border-radius: 8px;
  color: var(--lv-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
  padding: 8%;
}
[data-route="home"] .ph-rule-panel small { font-size: clamp(8px, 1.4vw, 11px); font-weight: 700; letter-spacing: 0.04em; }
[data-route="home"] .ph-rule-panel b { font-size: clamp(15px, 3.1vw, 25px); font-weight: 800; line-height: 0.9; }
[data-route="home"] .ph-word {
  background: linear-gradient(165deg, #fff 0 50%, #111 50% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-route="home"] .ph-word.inverse { background: linear-gradient(165deg, #111 0 50%, #fff 50% 100%); }
[data-route="home"] .ph-word b {
  font-size: clamp(16px, 3.6vw, 30px);
  font-weight: 800;
  color: #fff;
  mix-blend-mode: difference;
  transform: rotate(-15deg);
}
[data-route="home"] .ph-tag {
  position: absolute;
  left: 8%;
  bottom: 5%;
  font-family: var(--body);
  text-transform: none;
  font-size: clamp(9px, 1.3vw, 11px);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.9);
  color: #333;
}

/* ============================================================
   SHOWCASE CAROUSEL (rule card + two word cards)
   Each slot holds the resting card and, during a change, the incoming
   one on top of it. Positions and tilts are percentages of the stage.
============================================================ */
[data-route="home"] .showcase { width: 100%; }
[data-route="home"] .stage {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 52;
}
[data-route="home"] .slot {
  position: absolute;
  width: 31.5%;
  aspect-ratio: 1115 / 1563;
  transform: rotate(var(--rot));
}
[data-route="home"] .slot-rule { left: 1%;   top: 3%; --rot: -1.5deg; z-index: 3; }

/* Hover lift, shared by the hero cards and the play pile: a card under the
   pointer grows a little and leans a few pixels toward it. Uses the
   separate scale and translate properties, so it never fights the
   rotation or the animations on the cards inside. */
[data-route="home"] .lift-on-hover { transition: scale 0.7s cubic-bezier(.2,.7,.2,1), translate 0.9s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) {
  [data-route="home"] .lift-on-hover:hover { scale: 1.025; translate: var(--hx, 0px) var(--hy, 0px); }
  [data-route="home"] .slot.lift-on-hover:hover { z-index: 4; }
  [data-route="home"] .stage.dragging .lift-on-hover { scale: 1; translate: none; }
}
[data-route="home"] .slot-a { left: 33%;  top: 4%; --rot:  1.5deg; z-index: 2; }
[data-route="home"] .slot-b { left: 64%;  top: 5%; --rot:  4.5deg; z-index: 1; }

/* Drag to change sets. pan-y keeps vertical page scrolling on phones. */
[data-route="home"] .stage { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
[data-route="home"] .stage.dragging { cursor: grabbing; }
[data-route="home"] .stage:focus-visible { outline: 3px solid var(--l3); outline-offset: 8px; border-radius: 12px; }

/* Story bars: one per set. The current one fills with the timer. */
[data-route="home"] .bars {
  display: flex;
  gap: 6px;
  width: min(300px, 70%);
  margin: clamp(14px, 3vw, 24px) auto 0;
}
[data-route="home"] .bar { flex: 1; padding: 10px 0; }
[data-route="home"] .bar-track {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgba(0,0,0,0.14);
  overflow: hidden;
  transition: transform 0.15s ease;
}
[data-route="home"] .bar-fill {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left center;
  transform: scaleX(0);
}
[data-route="home"] .bar.done .bar-fill { transform: scaleX(1); }
/* Thickens on hover by scaling, not by height, so nothing below it moves */
[data-route="home"] .bar:hover .bar-track { transform: scaleY(1.75); }
[data-route="home"] .bar:focus-visible { outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   STATS
============================================================ */
[data-route="home"] .stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(24px, 6vw, 44px);
}
[data-route="home"] .stat-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 4.4vw, 31px);
  line-height: 1;
}
[data-route="home"] .stat-top svg { width: 0.66em; height: 0.66em; color: var(--mute); stroke-width: 2.25; }
[data-route="home"] .stat-label {
  display: block;
  margin-top: 6px;
  font-size: clamp(10px, 1.6vw, 12px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}

/* ============================================================
   HOW TO PLAY BANNER
   A looping WebP sits in .howto-media. The whole banner is one button.
============================================================ */
[data-route="home"] .howto {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 518 / 147;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  color: #fff;
  background: #1a1a1a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.10), 0 16px 32px rgba(0,0,0,0.16);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  isolation: isolate;
}
[data-route="home"] .howto-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
/* A 10 second clip of the how-to video, cropped to fill the banner */
[data-route="home"] .howto-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
[data-route="home"] .howto-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* A dark vignette all round, plus extra shade behind the text on the left */
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 25%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.85) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.1) 100%);
  box-shadow: inset 0 0 48px rgba(0,0,0,0.55);
  transition: opacity 0.3s ease;
}
[data-route="home"] .howto-text {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
[data-route="home"] .howto-kicker { font-size: clamp(15px, 3.2vw, 23px); font-weight: 600; line-height: 1; }
[data-route="home"] .howto-logo { width: clamp(150px, 38vw, 250px); height: auto; filter: brightness(0) invert(1); margin: 2px 0 4px; }
[data-route="home"] .howto-sub { font-size: clamp(12px, 2.1vw, 15px); font-weight: 500; opacity: 0.85; }

[data-route="home"] .howto-play {
  position: absolute;
  right: 6%;
  top: 50%;
  width: clamp(56px, 11vw, 76px);
  aspect-ratio: 1;
  margin-top: calc(clamp(56px, 11vw, 76px) / -2);
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
[data-route="home"] .howto-play svg { width: 34%; height: 34%; margin-left: 2%; }   /* a hair right of center, so the triangle looks centered */
/* A soft ring that breathes, then opens up on hover */
[data-route="home"] .howto-play::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45);
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
  0%   { transform: scale(0.88); opacity: 0.9; }
  100% { transform: scale(1.18); opacity: 0; }
}

[data-route="home"] .howto:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 24px 44px rgba(0,0,0,0.22); }
[data-route="home"] .howto:hover .howto-media { transform: scale(1.05); }
[data-route="home"] .howto:hover .howto-shade { opacity: 0.75; }
[data-route="home"] .howto:hover .howto-play { transform: scale(1.1); }
[data-route="home"] .howto:active .howto-play { transform: scale(0.97); }
[data-route="home"] .howto:focus-visible { outline: 3px solid var(--l3); outline-offset: 4px; }

/* ============================================================
   EIGHT-CARD FAN (static image)
============================================================ */
[data-route="home"] .fan { width: 100%; height: auto; }

/* ============================================================
   TABLE (the looping play pile)
============================================================ */
[data-route="home"] .table {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 46;
  isolation: isolate;          /* decks, pile and bubbles layer against each other here */
}
/* Three columns with narrow gaps: close to the pile, but not over it */
[data-route="home"] .deck, [data-route="home"] .pile {
  position: absolute;
  top: 5%;
  width: 27%;
  aspect-ratio: 1115 / 1563;
}
[data-route="home"] .deck-left { left: 6.5%; }
[data-route="home"] .deck-right { right: 6.5%; }
[data-route="home"] .pile { left: 36.5%; z-index: 3; }    /* word cards sit above everything but the bubble */
[data-route="home"] .deck, [data-route="home"] .pile { cursor: zoom-in; }
[data-route="home"] .deck:focus-visible, [data-route="home"] .pile:focus-visible { outline: 3px solid var(--l3); outline-offset: 6px; border-radius: 8px; }

[data-route="home"] .deck-cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: rotate(var(--rot));
  transition: opacity 0.28s ease;
}
[data-route="home"] .deck-left  .deck-cards { --rot: -3deg; }
[data-route="home"] .deck-right .deck-cards { --rot:  3deg; }
/* One card of the same level behind each rule, peeking out away from the pile */
[data-route="home"] .deck-left  .under { transform: translate(-6%, 1.5%) rotate(-5deg); }
[data-route="home"] .deck-right .under { transform: translate(6%, 1.5%) rotate(5deg); }
[data-route="home"] .deck .top { transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .deck .top > .lift { transition: opacity 0.3s ease; }
[data-route="home"] .deck.active .top { transform: translateY(-3%) scale(1.03); }
[data-route="home"] .deck.active .top > .lift { opacity: 0.6; }
[data-route="home"] .deck.idle .deck-cards { opacity: 0.4; }

/* Announcement bubble. Same device as the live site: it covers the rule not
   in use, in the colors of the rule that is, with its tail pointing at the pile. */
[data-route="home"] .bubble {
  position: absolute;
  top: 50%;
  z-index: 5;
  max-width: 128%;
  padding: 0.6em 1em;
  border: 2.5px solid var(--text, #111);
  border-radius: 14px;
  background: var(--bg, #fff);
  color: var(--text, #111);
  font-weight: 700;
  font-size: clamp(14px, 3vw, 22px);
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: opacity 0.22s ease-out, transform 0.38s cubic-bezier(.34,1.56,.64,1);
}
[data-route="home"] .bubble.show { opacity: 1; }
/* Over the right rule: anchored to its inner edge, tail pointing left */
[data-route="home"] .deck-right .bubble { left: 2px;  transform-origin: left center;  transform: translateY(-50%) scale(0); }
/* Over the left rule: anchored to its inner edge, tail pointing right */
[data-route="home"] .deck-left  .bubble { right: 2px; transform-origin: right center; transform: translateY(-50%) scale(0); }
[data-route="home"] .deck .bubble.show { transform: translateY(-50%) scale(1); }
[data-route="home"] .bubble.pulse { animation: bubble-pulse 0.32s ease-out; }
@keyframes bubble-pulse { 0% { scale: 1; } 35% { scale: 1.12; } 100% { scale: 1; } }

/* Tail: an outline triangle with a fill triangle inside it, centered on the bubble's height */
[data-route="home"] .bubble::before, [data-route="home"] .bubble::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent;
}
[data-route="home"] .bubble::before { top: 50%; margin-top: -13px; }
[data-route="home"] .bubble::after { top: 50%; margin-top: -10.5px; }
[data-route="home"] .deck-right .bubble::before { left: -21px;  border-width: 13px 21px 13px 0;     border-right-color: var(--text, #111); }
[data-route="home"] .deck-right .bubble::after { left: -16px;  border-width: 10.5px 16px 10.5px 0; border-right-color: var(--bg, #fff); }
[data-route="home"] .deck-left  .bubble::before { right: -21px; border-width: 13px 0 13px 21px;     border-left-color: var(--text, #111); }
[data-route="home"] .deck-left  .bubble::after { right: -16px; border-width: 10.5px 0 10.5px 16px; border-left-color: var(--bg, #fff); }

[data-route="home"] .pile .card { will-change: transform; }

/* Word cards on the pile: the art sits 2.5% in from each edge, so the small
   corner words get more room. The gap is filled with the same art stretched
   to the full card, whose edge pixels line up with the art's own edges,
   diagonal split included. */
[data-route="home"] .card.word { background-position: center; background-size: 100% 100%; }
[data-route="home"] .card.word > img { position: absolute; inset: 2.5%; width: 95%; height: 95%; }

/* ============================================================
   FOOTER
============================================================ */
[data-route="home"] .site-footer {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--gap) * 1.4);
  background: #000;
  color: #fff;
  clip-path: polygon(0 clamp(28px, 5vw, 64px), 100% 0, 100% 100%, 0 100%);
  padding: clamp(80px, 11vw, 128px) 16px clamp(48px, 7vw, 72px);
}
[data-route="home"] .footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px clamp(24px, 5vw, 40px);
}
[data-route="home"] .footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(16px, 2.6vw, 19px);
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}
[data-route="home"] .footer-copy {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
[data-route="home"] .footer-copy a { color: rgba(255,255,255,0.8); text-underline-offset: 2px; }
[data-route="home"] .footer-copy a:hover, [data-route="home"] .footer-copy a:focus-visible { color: #fff; }
[data-route="home"] .footer-links svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.35s cubic-bezier(.34,1.56,.64,1); }
/* Hover: the link lifts and its icon pops; the other two dim */
[data-route="home"] .footer-links:has(a:is(:hover, :focus-visible)) a { opacity: 0.45; }
[data-route="home"] .footer-links a:is(:hover, :focus-visible) { opacity: 1 !important; transform: translateY(-3px); }
[data-route="home"] .footer-links a:is(:hover, :focus-visible) svg { transform: scale(1.3) rotate(-10deg); }

/* ============================================================
   VIDEO MODAL
============================================================ */
[data-route="home"] .modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
[data-route="home"] .modal.open { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
[data-route="home"] .modal-frame {
  position: relative;
  width: min(1080px, 100%);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 96px);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
[data-route="home"] .modal.open .modal-frame { transform: scale(1); }

/* Card lightbox */
[data-route="home"] .lightbox { cursor: zoom-out; }
[data-route="home"] .lightbox img {
  max-width: min(90vw, 640px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  transform: scale(0.88);
  transition: transform 0.35s cubic-bezier(.34,1.42,.64,1);
}
[data-route="home"] .lightbox.open img { transform: scale(1); }
[data-route="home"] .lightbox img.flat { border-radius: 4.4% / 3.15%; }   /* flat card art has square corners */
[data-route="home"] .lightbox-hint {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
[data-route="home"] .modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
[data-route="home"] .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.18s ease;
}
[data-route="home"] .modal-close:hover { background: rgba(255,255,255,0.24); }
[data-route="home"] .modal-close svg { width: 20px; height: 20px; }
[data-route="home"] body.modal-open { overflow: hidden; }

/* ============================================================
   STORE BAR
   Fixed to the top of the window. Tall at the top of the page, with the
   message running across it like a ticker tape. Once the visitor scrolls,
   the bar shrinks, the text scales down with it, and the ticker pauses
   right where it is. Scrolling back to the top carries on from there.
   The whole bar links to the shop.
   The page is padded by the tall height, so shrinking never moves content.
============================================================ */
:root[data-route="home"] { --bar-big: 72px; --bar-small: 56px; }
[data-route="home"] body { padding-top: var(--bar-big); }

/* The button's size, as a number the fade at the ticker's right end can
   follow while it animates */
@property --cta-s { syntax: '<number>'; inherits: true; initial-value: 1; }

[data-route="home"] .shop-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--bar-big);
  display: flex;
  align-items: center;
  background: var(--bar-bg);
  color: var(--bar-ink);
  border-bottom: 3px solid #000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.14);
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  --cta-s: 1;                  /* button scale */
  --cta-m: 16px;               /* button's gap to the right edge */
  --cta-w: 240px;              /* button's width; the script measures it */
  transition: height 0.3s cubic-bezier(.2,.8,.2,1), --cta-s 0.3s cubic-bezier(.2,.8,.2,1);
}
[data-route="home"] .shop-bar.small { height: var(--bar-small); --cta-s: 0.8; }
[data-route="home"] .shop-bar:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }

[data-route="home"] .shop-phrase { display: inline-flex; align-items: center; gap: 0.28em; white-space: nowrap; }
[data-route="home"] .shop-bolt { width: auto; height: 0.95em; flex-shrink: 0; }
/* The discount stamp that rides in the ticker */
[data-route="home"] .shop-stamp {
  display: inline-block;
  transform: rotate(-2deg);
  background: var(--shop-green);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.26em 0.42em 0.2em;
}

/* The ticker. The track clips; the zoom scales the whole ticker about the
   track's center when the bar shrinks; the reel slides. The reel holds
   three identical runs and slides across the middle one, so it loops
   without a seam and there is text past both edges even when scaled down. */
:root[data-route="home"] { --shop-rest-scale: 0.68; }        /* small text size / big text size */
/* The track spans the whole bar, behind the button. Its right-hand fade
   ends just short of the button's left edge, and follows it as the button
   shrinks, so there is never a gap between the text and the button. */
[data-route="home"] .shop-track {
  --fade-r: calc(var(--cta-m) + var(--cta-w) * var(--cta-s) + 22px);
  display: none; position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - var(--fade-r) - 24px), transparent calc(100% - var(--fade-r)));
          mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - var(--fade-r) - 24px), transparent calc(100% - var(--fade-r)));
}
[data-route="home"] .shop-bar.ticking .shop-track { display: block; }
[data-route="home"] .shop-zoom {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
[data-route="home"] .shop-bar.small .shop-zoom { transform: scale(var(--shop-rest-scale)); }
[data-route="home"] .shop-reel { position: relative; display: flex; flex-shrink: 0; will-change: transform; }
[data-route="home"] .shop-run, [data-route="home"] .shop-unit { display: flex; flex-shrink: 0; align-items: center; gap: 0.6em; }
[data-route="home"] .shop-run { padding-right: 0.6em; font-size: 28px; }

/* The still message: only used when motion is turned off */
[data-route="home"] .shop-msg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-width: 0;
  overflow: hidden;
  padding: 0 16px;
  font-size: 28px;
  transition: font-size 0.3s ease;
}
[data-route="home"] .shop-bar.small .shop-msg { font-size: 19px; }
[data-route="home"] .shop-bar.ticking .shop-msg { display: none; }

[data-route="home"] .shop-bar-cta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 var(--cta-m) 0 auto;
  padding: 14px 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transform-origin: right center;
  scale: var(--cta-s);         /* shrinks by scale, so nothing else moves */
  transition: transform 0.15s ease;
}
[data-route="home"] .shop-bar:hover .shop-bar-cta { transform: translateY(-1px) scale(1.04); }
[data-route="home"] .shop-bar:active .shop-bar-cta { transform: scale(0.97); }
[data-route="home"] .shop-bar-cta svg { width: 1.1em; height: 1.1em; }

/* ============================================================
   SHOP BUTTON
   Under the carousel: "Buy Blitzword", linking to the shop. A green sticker
   with an ink outline and a hard shadow. A soft band of light sweeps
   across it every 5 seconds, and the arrow pokes right twice just as the
   light reaches it. Both share one clock (5s, 1.5s delay), so change them
   together. It lifts on hover and presses on click.
============================================================ */
[data-route="home"] .shop-button { text-decoration: none; color: var(--ink); }
[data-route="home"] .shop-button-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 16px 28px;
  overflow: hidden;
  background: var(--shop-green);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
  line-height: 1;
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}
[data-route="home"] .shop-button-face > svg:last-child {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  animation: shop-nudge 5s ease-in-out 1.5s infinite;
}
@keyframes shop-nudge {
  0%, 11%, 27%, 100% { translate: 0; }
  15%, 23%           { translate: 6px; }
  19%                { translate: 0; }
}
[data-route="home"] .shop-button-face::after {
  content: '';
  position: absolute;
  inset: -20% auto -20% 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5) 50%, transparent);
  transform: translateX(-150%) skewX(-18deg);
  animation: shop-sheen 5s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes shop-sheen {
  0%       { transform: translateX(-150%) skewX(-18deg); }
  24%, 100% { transform: translateX(320%) skewX(-18deg); }
}
[data-route="home"] .shop-button:hover .shop-button-face { translate: -2px -2px; box-shadow: 7px 7px 0 var(--ink); }
[data-route="home"] .shop-button:active .shop-button-face { translate: 3px 3px; box-shadow: 2px 2px 0 var(--ink); }
[data-route="home"] .shop-button:focus-visible { outline: none; }
[data-route="home"] .shop-button:focus-visible .shop-button-face { outline: 3px solid var(--l3); outline-offset: 4px; }

/* ============================================================
   SMALL SCREENS
============================================================ */
@media (max-width: 560px) {
  /* On a phone the lines wrap on their own; a forced break would strand a word */
  [data-route="home"] br.wide { display: none; }
  :root[data-route="home"] { --bar-big: 58px; --bar-small: 52px; }
  :root[data-route="home"] { --shop-rest-scale: 0.75; }
  [data-route="home"] .shop-run { font-size: 20px; }
  [data-route="home"] .shop-msg { font-size: 20px; padding: 0 10px; }
  [data-route="home"] .shop-bar.small .shop-msg { font-size: 15px; }
  /* Without motion, the slim bar keeps just the discount */
  [data-route="home"] .shop-bar.small .shop-msg :is(.shop-bolt, .shop-lead) { display: none; }
  [data-route="home"] .shop-bar { --cta-m: 10px; }
  [data-route="home"] .shop-bar.small { --cta-s: 0.88; }
  [data-route="home"] .shop-bar-cta { padding: 10px 14px; font-size: 12px; }
  [data-route="home"] .shop-button-face { font-size: 20px; padding: 13px 20px; }
  [data-route="home"] .howto { aspect-ratio: 16 / 8; }
  [data-route="home"] .howto-text { left: 7%; }
  [data-route="home"] .howto-logo { width: 46vw; }
  [data-route="home"] .bubble { white-space: normal; width: max-content; max-width: 32vw; text-align: center; border-width: 2px; border-radius: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-route="home"] .rays-spin { animation: none; }
  [data-route="home"] .howto-play::before { animation: none; }
  [data-route="home"] .shop-button-face::after { display: none; }
  [data-route="home"] .shop-button-face > svg:last-child { animation: none; }
}

/* ============================================================
   SITE HEADER
   Locked to the top. Home (Shop on the home page) on the left, the
   horizontal logo in the middle, Instagram then Contact on the right.
   No background on the sunburst; once the page scrolls it turns into a
   white bar with a soft shadow and tightens up. The links are white stickers, each tilted a
   little, that straighten and fill with ink on hover.
============================================================ */
:root[data-route="home"] { --hd-pt: 36px; --hd-pb: 24px; --hd-row: 50px; }
@media (max-width: 560px) { :root[data-route="home"] { --hd-pt: 22px; --hd-pb: 14px; --hd-row: 38px; } }
[data-route="home"] .hd { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transition: top .3s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .hd .in { max-width: 1080px; margin: 0 auto; min-height: calc(var(--hd-pt) + var(--hd-row) + var(--hd-pb)); padding: var(--hd-pt) clamp(16px, 4vw, 40px) var(--hd-pb);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; transition: padding .3s cubic-bezier(.2,.8,.2,1), min-height .3s cubic-bezier(.2,.8,.2,1); }
/* Scrolled: a plain white bar with a soft shadow under it */
[data-route="home"] .hd .fx { position: absolute; z-index: -1; inset: 0; pointer-events: none; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.08); opacity: 0; transform: translateY(-100%); transition: opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .hd.stuck .fx { opacity: 1; transform: none; }
[data-route="home"] .hd.stuck .in { --hd-pt: 18px; --hd-pb: 18px; }
@media (max-width: 560px) { [data-route="home"] .hd.stuck .in { --hd-pt: 12px; --hd-pb: 12px; } }
[data-route="home"] .hd a { text-decoration: none; color: var(--ink); }
[data-route="home"] .hd a:focus-visible { outline: 3px solid var(--l3); outline-offset: 3px; border-radius: 10px; }
[data-route="home"] .hd .hd-logo { display: block; line-height: 0; }
[data-route="home"] .hd .hd-logo img { height: 44px; width: auto; }
[data-route="home"] .hd.stuck .hd-logo img { height: 36px; }
[data-route="home"] .hd svg { flex-shrink: 0; }
[data-route="home"] .hd .in > :first-child { justify-self: start; }
[data-route="home"] .hd .in > :last-child { justify-self: end; }
[data-route="home"] .hd .l { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px 6px 13px; font-family: var(--display); font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.05; transform: rotate(-1deg); }
[data-route="home"] .hd .l .ic { width: 19px; height: 19px; margin-top: -3px; }
[data-route="home"] .hd .r { display: inline-flex; align-items: center; gap: 12px; }
[data-route="home"] .hd .r a { display: grid; place-items: center; width: 46px; height: 46px; }
[data-route="home"] .hd .r svg { width: 23px; height: 23px; }
[data-route="home"] .hd .l, [data-route="home"] .hd .r a { background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 1.5px 1.5px 0 var(--ink); transition: transform .2s cubic-bezier(.34,1.56,.64,1), background-color .15s ease, color .15s ease; }
[data-route="home"] .hd .ig { transform: rotate(1.5deg); }
[data-route="home"] .hd .ct { transform: rotate(-1.5deg); }
/* Hover: the sticker straightens and fills with ink */
[data-route="home"] .hd .l:hover, [data-route="home"] .hd .r a:hover { background: var(--ink); color: #fff; transform: rotate(0) scale(1.04); }
@media (max-width: 560px) {
  [data-route="home"] .hd .in { gap: 8px; }
  [data-route="home"] .hd .l { font-size: 15px; padding: 6px 9px 3px; }
  [data-route="home"] .hd .l .ic { width: 15px; height: 15px; }
  [data-route="home"] .hd .r { gap: 7px; }
  [data-route="home"] .hd .r a { width: 34px; height: 34px; }
  [data-route="home"] .hd .r svg { width: 18px; height: 18px; }
  [data-route="home"] .hd .hd-logo img { height: 30px; }
  [data-route="home"] .hd.stuck .hd-logo img { height: 28px; }
}
/* On the home page the header sits under the store bar and follows it as it shrinks */
[data-route="home"] .hd { top: var(--bar-big); }
[data-route="home"] .shop-bar.small + .hd { top: var(--bar-small); }
@media (max-width: 560px) { :root[data-route="home"] { --top: 84px; } }
/* The logo: hidden until the big logo has scrolled
   under the header, then a quick zoom and fade in, eased out. */
[data-route="home"] .hd .hd-logo img { opacity: 0; transform: scale(.82);
  transition: opacity .22s ease-out, transform .32s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .hd.stuck .hd-logo img { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-route="home"] .hd .hd-logo img { transform: none; } }
/* At the same moment the store bar slides up out of sight and the header
   takes the top of the window */
[data-route="home"] .shop-bar { transition: height 0.3s cubic-bezier(.2,.8,.2,1), --cta-s 0.3s cubic-bezier(.2,.8,.2,1), transform .3s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .shop-bar.gone { transform: translateY(-100%); box-shadow: none; }
[data-route="home"] .shop-bar.gone + .hd { top: 0; }

/* ############################################################
   SHOP
   ############################################################ */
/* ============================================================
   TOKENS (the home page's, plus the two mode colors)
============================================================ */
:root[data-route="shop"] {
  --ink: #111111; --mute: #8d8d8d; --label: #9a9a9a; --line: #e2e2e2;
  --ray-a: #efefef; --ray-b: #ffffff;
  --l1: #f43f5e; --l1-soft: #fecdd3;
  --l2: #22c55e; --l2-soft: #bbf7d0; --l2-ink: #032e15;
  --l3: #3b82f6; --l3-soft: #bfdbfe; --l3-ink: #162456;
  --orange: #f97316; --orange-soft: #ffedd5; --orange-ink: #431407;
  --purple: #a855f7; --purple-soft: #f3e8ff; --purple-ink: #3b0764;
  --purple-l: #c084fc; --orange-l: #fb923c;   /* Purple 400 and Orange 400, a shade lighter */
  --gap: clamp(64px, 10vw, 120px);
  --display: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --card-shadow: 0 0.5px 0.5px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.1), 0 12px 24px rgba(0,0,0,.1);
}
[data-route="shop"] *, [data-route="shop"] *::before, [data-route="shop"] *::after { box-sizing: border-box; margin: 0; padding: 0; }
html[data-route="shop"] { background: #fff; }
[data-route="shop"] body { font-family: var(--body); color: var(--ink); background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
[data-route="shop"] img { display: block; max-width: 100%; height: auto; }
[data-route="shop"] a { color: inherit; }
[data-route="shop"] button { font: inherit; color: inherit; }
[data-route="shop"] .wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
[data-route="shop"] .h2 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 52px); line-height: .92; text-transform: uppercase; text-align: center; }
[data-route="shop"] .sub { text-align: center; font-size: 18px; line-height: 1.4; color: #555; max-width: 32em; margin: 12px auto 0; }

/* ============================================================
   HERO: the boxes beside the receipt, on the sunburst
============================================================ */
[data-route="shop"] .hero { position: relative; overflow: hidden; padding: calc(var(--hd-pt) + var(--hd-row) + var(--hd-pb) + 8px) 0 clamp(48px, 7vw, 88px); }
[data-route="shop"] .picker { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
[data-route="shop"] .stage { position: relative; aspect-ratio: 800 / 740; }
[data-route="shop"] .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s ease; }
[data-route="shop"] .stage img.out { opacity: 0; }
[data-route="shop"] .r-label { font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
[data-route="shop"] .stepper { display: flex; align-items: stretch; width: 100%; margin-bottom: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
/* The stepper: two round ink buttons either side of the number, in a pale well */
[data-route="shop"] .stepper { align-items: center; justify-content: space-between; padding: 8px; background: #f3f3f3; border: 0; border-radius: 999px; }
[data-route="shop"] .step-btn { width: 56px; height: 56px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 3px 0 #000, 0 6px 12px rgba(0,0,0,.18); transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
[data-route="shop"] .step-btn svg { width: 28px; height: 28px; }
[data-route="shop"] .step-btn:not([disabled]):hover { transform: translateY(-1px) scale(1.05); }
[data-route="shop"] .step-btn:not([disabled]):active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
[data-route="shop"] .step-btn[disabled] { background: #d4d4d4; box-shadow: none; cursor: default; }
[data-route="shop"] .step-btn:focus-visible { outline: 3px solid var(--l3); outline-offset: 3px; }
[data-route="shop"] .step-count { flex: 1; text-align: center; padding: 4px 0 0; font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: .95; }
[data-route="shop"] .step-count b { display: block; font-size: 52px; font-variant-numeric: tabular-nums; }
[data-route="shop"] .step-count small { font-size: 14px; letter-spacing: .1em; color: var(--mute); }
[data-route="shop"] .receipt { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 20px 22px; box-shadow: 6px 6px 0 var(--ink); }
[data-route="shop"] .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-weight: 700; font-size: 18px; border-bottom: 2px dashed #ddd; font-variant-numeric: tabular-nums; }
[data-route="shop"] .row:last-of-type { border-bottom: 0; }
[data-route="shop"] .tag { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 15px; padding: 5px 9px 3px; border-radius: 7px; }
[data-route="shop"] .row-off .tag { background: var(--l2-soft); color: var(--l2-ink); }
[data-route="shop"] .row-ship .tag { background: var(--l3-soft); color: var(--l3-ink); }
[data-route="shop"] .row .v { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 28px; }
[data-route="shop"] .row-off .v { color: #15803d; }
/* No discount on this pack: the discount line goes grey */
[data-route="shop"] .row-off.none .tag { background: #eee; color: #888; }
[data-route="shop"] .row-off.none .v { color: #999; font-size: 18px; }
/* Paid shipping: a grey callout to the right of the price, styled like "Buy 3+ to save" */
[data-route="shop"] .row-ship { border-bottom: 0; }
/* Paid shipping: a sticker on the receipt's top right corner. It floats over the page,
   so the receipt never changes size. It pops on when you land on a pack that pays shipping. */
[data-route="shop"] .receipt { position: relative; }
[data-route="shop"] .ship-sticker { position: absolute; z-index: 5; top: -16px; right: -14px; pointer-events: none;
  --rot: rotate(6deg); transform: var(--rot);
  background: #4ade80; color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 10px 4px; font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase; line-height: 1.05; white-space: nowrap; }
[data-route="shop"] .ship-sticker[hidden] { display: none; }
[data-route="shop"] .ship-sticker.pop { animation: sticker-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes sticker-pop { from { transform: var(--rot) scale(.6); opacity: 0; } to { transform: var(--rot) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { [data-route="shop"] .ship-sticker.pop { animation: none; } }
@media (max-width: 420px) { [data-route="shop"] .ship-sticker { right: -6px; font-size: 15px; } }
[data-route="shop"] .total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 12px; border-top: 3px solid var(--ink); font-family: var(--display); font-weight: 800; text-transform: uppercase; }
[data-route="shop"] .total span { font-size: 18px; }
[data-route="shop"] .total b { font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
[data-route="shop"] .fine { font-size: 13px; color: var(--mute); line-height: 1.4; margin-top: 12px; text-align: center; }
[data-route="shop"] .buy { display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%; margin-top: 16px; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); background: var(--l3); color: #fff; cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase; line-height: 1; padding: 16px 28px; transition: translate .15s ease, box-shadow .15s ease; }
[data-route="shop"] .buy:hover { translate: -2px -2px; box-shadow: 7px 7px 0 var(--ink); }
[data-route="shop"] .buy:active { translate: 3px 3px; box-shadow: 2px 2px 0 var(--ink); }
[data-route="shop"] .buy:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[data-route="shop"] .buy svg { width: 1em; height: 1em; }
@media (max-width: 820px) {
  [data-route="shop"] .picker { grid-template-columns: 1fr; gap: 12px; }
  [data-route="shop"] .nav ul li:last-child { display: none; }
}

/* ============================================================
   WHAT'S IN THE BOX
============================================================ */
[data-route="shop"] .contents { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px); margin-top: clamp(28px, 4vw, 44px); }
[data-route="shop"] .item { text-align: center; }
[data-route="shop"] .box-sec .contents { margin-bottom: 0; }
[data-route="shop"] .item .art { position: relative; height: 210px; display: flex; align-items: center; justify-content: center; }
[data-route="shop"] .item .art img { position: absolute; width: 112px; border-radius: 7px; box-shadow: var(--card-shadow); }
[data-route="shop"] .item h3 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; margin-top: 18px; }
[data-route="shop"] .item h3 b { font-size: 40px; display: block; }
[data-route="shop"] .item p { font-size: 16px; line-height: 1.45; color: #555; margin-top: 8px; max-width: 18em; margin-left: auto; margin-right: auto; }
[data-route="shop"] .art-words img:nth-child(1) { transform: translateX(-46px) rotate(-10deg); }
[data-route="shop"] .art-words img:nth-child(2) { transform: rotate(-1deg); z-index: 1; }
[data-route="shop"] .art-words img:nth-child(3) { transform: translateX(46px) rotate(8deg); z-index: 2; }
[data-route="shop"] .art-rules img:nth-child(1) { transform: translateX(-46px) rotate(-9deg); }
[data-route="shop"] .art-rules img:nth-child(2) { transform: rotate(0deg); z-index: 1; }
[data-route="shop"] .art-rules img:nth-child(3) { transform: translateX(46px) rotate(9deg); z-index: 2; }
[data-route="shop"] .art-sheet img { width: 128px !important; border-radius: 4px !important; }
[data-route="shop"] .art-sheet img:nth-child(1) { transform: translateX(-30px) rotate(-6deg); }
[data-route="shop"] .art-sheet img:nth-child(2) { transform: translateX(30px) rotate(5deg); z-index: 1; }
@media (max-width: 760px) {
  [data-route="shop"] .contents { grid-template-columns: 1fr; gap: 36px; }
  [data-route="shop"] .item .art { height: 190px; }
}

/* ============================================================
   SHIPPING QUESTIONS
============================================================ */
[data-route="shop"] .faq { max-width: 760px; margin: clamp(24px, 3vw, 36px) auto 0; }
[data-route="shop"] .faq-sec .h2 { max-width: 760px; margin: 0 auto; text-align: left; }   /* lines up with the questions */
[data-route="shop"] .faq details { border-top: 2px solid var(--ink); }
[data-route="shop"] .faq details:last-child { border-bottom: 2px solid var(--ink); }
[data-route="shop"] .faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 800; font-size: 18px; }
[data-route="shop"] .faq summary::-webkit-details-marker { display: none; }
[data-route="shop"] .faq summary::after { content: '+'; font-family: var(--display); font-size: 30px; line-height: .7; }
[data-route="shop"] .faq details[open] summary::after { content: '\2212'; }
[data-route="shop"] .faq summary:focus-visible { outline: 3px solid var(--l3); outline-offset: 2px; }
[data-route="shop"] .faq details p { padding: 0 0 18px; font-size: 17px; line-height: 1.5; color: #444; max-width: 38em; }


/* ============================================================
   TWO WAYS TO PLAY
   A ruled table: one row per fact, Strategy and Speed side by side. Each
   row label has an icon in the home page style; each game name has a thick
   bar in its color under its column.
============================================================ */
[data-route="shop"] .ways { max-width: 900px; margin: clamp(28px, 4vw, 44px) auto 0; }
[data-route="shop"] .ways table { width: 100%; border-collapse: collapse; font-size: 17px; }
[data-route="shop"] .ways th, [data-route="shop"] .ways td { text-align: left; vertical-align: top; }
[data-route="shop"] .ways thead th { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 1; }
[data-route="shop"] .ways tbody th { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
[data-route="shop"] .ways td { line-height: 1.45; }
[data-route="shop"] .ways td b { font-family: var(--display); font-weight: 800; font-size: 22px; text-transform: uppercase; }

[data-route="shop"] .ways th, [data-route="shop"] .ways td { padding: 16px 14px 14px 0; border-bottom: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); }
[data-route="shop"] .ways thead th { font-size: clamp(30px, 3.8vw, 42px); padding-bottom: 12px; border-bottom: 0; }
[data-route="shop"] .ways tbody th { width: 24%; padding-top: 19px; }
[data-route="shop"] .ways tbody th span { opacity: .6; }
[data-route="shop"] .ways td { width: 38%; }

[data-route="shop"] .ways .ic { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 10px; opacity: .55; }
[data-route="shop"] .ways thead th span { display: block; padding-bottom: 12px; border-bottom: 6px solid; }
[data-route="shop"] .ways thead th.strat span { border-color: var(--purple-l); }
[data-route="shop"] .ways thead th.speed span { border-color: var(--orange-l); }
[data-route="shop"] .ways thead th:not(:first-child) { color: inherit; }

@media (max-width: 760px) {
  [data-route="shop"] .ways td b { font-size: 18px; }
  [data-route="shop"] .ways table { font-size: 15px; }
  [data-route="shop"] .ways tbody th { width: 28%; }
  [data-route="shop"] .ways .ic { display: block; margin: 0 0 6px; }
}


/* ============================================================
   SOLD OUT AND COMING SOON
   Sold out: the boxes go grey under a red "Sold out" sticker, the prices
   dim, the Buy button turns grey and a note pointing to Instagram
   replaces the fine print. Coming soon: only the Buy button and the
   note change, for the counts whose Stripe link is not set yet.
============================================================ */
[data-route="shop"] .stage .sold-stamp { display: none; }
[data-route="shop"] [data-state="sold"] .stage .sold-stamp {
  display: block; position: absolute; left: 50%; top: 46%; z-index: 2; translate: -50% -50%; rotate: -6deg;
  background: var(--l1); color: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5.4vw, 60px); text-transform: uppercase; line-height: 1;
  padding: 12px 26px 9px; white-space: nowrap;
}
[data-route="shop"] [data-state="sold"] .stage img:not(.out) { filter: grayscale(1); opacity: .45; }
[data-route="shop"] [data-state="sold"] .receipt .row, [data-route="shop"] [data-state="sold"] .receipt .total { opacity: .35; }
[data-route="shop"] .buy[disabled] { background: #d9d9d9; color: #6b6b6b; border-color: #bdbdbd; box-shadow: none; cursor: not-allowed; translate: 0; }
[data-route="shop"] .state-note { display: none; margin-top: 12px; text-align: center; font-size: 15px; line-height: 1.45; color: #333; }
[data-route="shop"] .state-note a { font-weight: 800; }
[data-route="shop"] [data-state="sold"] .note-sold, [data-route="shop"] [data-state="soon"] .note-soon { display: block; }
[data-route="shop"] [data-state="sold"] .fine, [data-route="shop"] [data-state="soon"] .fine { display: none; }

/* ============================================================
   SECTION BANDS
   Each section is its own band of color, cut on a slant like the home
   page footer: sunburst for the hero, light grey for the box, black for
   the two ways to play, white for the questions.
============================================================ */
[data-route="shop"] .hero { background: repeating-conic-gradient(from 0deg at 50% 62%, var(--ray-a) 0deg 7.5deg, var(--ray-b) 7.5deg 15deg); }
[data-route="shop"] .sec { position: relative; padding: calc(var(--gap) + clamp(28px, 5vw, 64px)) 0 var(--gap); margin-top: calc(clamp(28px, 5vw, 64px) * -1); clip-path: polygon(0 clamp(28px, 5vw, 64px), 100% 0, 100% 100%, 0 100%); }
[data-route="shop"] .box-sec { background: #f2f2f2; }
[data-route="shop"] .modes-sec { background: var(--ink); color: #fff; clip-path: polygon(0 0, 100% clamp(28px, 5vw, 64px), 100% 100%, 0 100%); }
[data-route="shop"] .modes-sec .sub { color: #bbb; }
[data-route="shop"] .faq-sec { background: #fff; }
[data-route="shop"] .site-footer { margin-top: 0; }

/* ============================================================
   FOOTER, as on the home page
============================================================ */
[data-route="shop"] .site-footer { position: relative; background: #000; color: #fff; clip-path: polygon(0 clamp(28px, 5vw, 64px), 100% 0, 100% 100%, 0 100%); padding: clamp(80px, 11vw, 128px) 16px clamp(48px, 7vw, 72px); }
[data-route="shop"] .footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px clamp(24px, 5vw, 40px); }
[data-route="shop"] .footer-links a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: clamp(16px, 2.6vw, 19px); transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease; }
[data-route="shop"] .footer-links svg { width: 18px; height: 18px; flex-shrink: 0; }
[data-route="shop"] .footer-links:has(a:is(:hover, :focus-visible)) a { opacity: .45; }
[data-route="shop"] .footer-links a:is(:hover, :focus-visible) { opacity: 1 !important; transform: translateY(-3px); }
[data-route="shop"] .footer-copy { margin-top: 22px; text-align: center; font-size: 13px; color: rgba(255,255,255,.5); }
[data-route="shop"] .footer-copy a { color: rgba(255,255,255,.8); text-underline-offset: 2px; }
[data-route="shop"] .footer-copy a:hover, [data-route="shop"] .footer-copy a:focus-visible { color: #fff; }

/* ============================================================
   SITE HEADER
   Locked to the top. Home (Shop on the home page) on the left, the
   horizontal logo in the middle, Instagram then Contact on the right.
   No background on the sunburst; once the page scrolls it turns into a
   white bar with a soft shadow and tightens up. The links are white stickers, each tilted a
   little, that straighten and fill with ink on hover.
============================================================ */
:root[data-route="shop"] { --hd-pt: 36px; --hd-pb: 24px; --hd-row: 50px; }
@media (max-width: 560px) { :root[data-route="shop"] { --hd-pt: 22px; --hd-pb: 14px; --hd-row: 38px; } }
[data-route="shop"] .hd { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transition: top .3s cubic-bezier(.2,.8,.2,1); }
[data-route="shop"] .hd .in { max-width: 1080px; margin: 0 auto; min-height: calc(var(--hd-pt) + var(--hd-row) + var(--hd-pb)); padding: var(--hd-pt) clamp(16px, 4vw, 40px) var(--hd-pb);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; transition: padding .3s cubic-bezier(.2,.8,.2,1), min-height .3s cubic-bezier(.2,.8,.2,1); }
/* Scrolled: a plain white bar with a soft shadow under it */
[data-route="shop"] .hd .fx { position: absolute; z-index: -1; inset: 0; pointer-events: none; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.08); opacity: 0; transform: translateY(-100%); transition: opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
[data-route="shop"] .hd.stuck .fx { opacity: 1; transform: none; }
[data-route="shop"] .hd.stuck .in { --hd-pt: 18px; --hd-pb: 18px; }
@media (max-width: 560px) { [data-route="shop"] .hd.stuck .in { --hd-pt: 12px; --hd-pb: 12px; } }
[data-route="shop"] .hd a { text-decoration: none; color: var(--ink); }
[data-route="shop"] .hd a:focus-visible { outline: 3px solid var(--l3); outline-offset: 3px; border-radius: 10px; }
[data-route="shop"] .hd .hd-logo { display: block; line-height: 0; }
[data-route="shop"] .hd .hd-logo img { height: 44px; width: auto; transition: height .3s cubic-bezier(.2,.8,.2,1), opacity .22s ease-out, transform .32s cubic-bezier(.2,.8,.2,1); }
[data-route="shop"] .hd.stuck .hd-logo img { height: 36px; }
[data-route="shop"] .hd svg { flex-shrink: 0; }
[data-route="shop"] .hd .in > :first-child { justify-self: start; }
[data-route="shop"] .hd .in > :last-child { justify-self: end; }
[data-route="shop"] .hd .l { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px 6px 13px; font-family: var(--display); font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.05; transform: rotate(-1deg); }
[data-route="shop"] .hd .l .ic { width: 19px; height: 19px; margin-top: -3px; }
[data-route="shop"] .hd .r { display: inline-flex; align-items: center; gap: 12px; }
[data-route="shop"] .hd .r a { display: grid; place-items: center; width: 46px; height: 46px; }
[data-route="shop"] .hd .r svg { width: 23px; height: 23px; }
[data-route="shop"] .hd .l, [data-route="shop"] .hd .r a { background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 1.5px 1.5px 0 var(--ink); transition: transform .2s cubic-bezier(.34,1.56,.64,1), background-color .15s ease, color .15s ease; }
[data-route="shop"] .hd .ig { transform: rotate(1.5deg); }
[data-route="shop"] .hd .ct { transform: rotate(-1.5deg); }
/* Hover: the sticker straightens and fills with ink */
[data-route="shop"] .hd .l:hover, [data-route="shop"] .hd .r a:hover { background: var(--ink); color: #fff; transform: rotate(0) scale(1.04); }
@media (max-width: 560px) {
  [data-route="shop"] .hd .in { gap: 8px; }
  [data-route="shop"] .hd .l { font-size: 15px; padding: 6px 9px 3px; }
  [data-route="shop"] .hd .l .ic { width: 15px; height: 15px; }
  [data-route="shop"] .hd .r { gap: 7px; }
  [data-route="shop"] .hd .r a { width: 34px; height: 34px; }
  [data-route="shop"] .hd .r svg { width: 18px; height: 18px; }
  [data-route="shop"] .hd .hd-logo img { height: 30px; }
  [data-route="shop"] .hd.stuck .hd-logo img { height: 28px; }
}

/* ############################################################
   SITE
   ############################################################ */

/* A page that is not on screen. Its markup is only there once it has been
   visited or fetched ahead. */
[data-view][hidden] { display: none !important; }

/* For screen readers and search engines, not seen */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The header has both stickers; each route shows its own */
.hd .end { display: inline-flex; }
[data-route="home"] .hd .to-home, [data-route="shop"] .hd .to-shop { display: none; }

/* The store bar belongs to the home page */
[data-route="shop"] .shop-bar { display: none; }

/* ---------- The store bar arrives ----------
   On every arrival at the home page (a load, a refresh, or coming back from
   the shop) the bar starts above the window and slides down, and the page's
   top padding grows with it, so the content is pushed down into place. The
   header rides down with the bar. html.bar-pre is the starting position; the
   script removes it a moment after the page is drawn. */
[data-route="home"] body { transition: padding-top .5s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .shop-bar { transition: height .5s cubic-bezier(.2,.8,.2,1), --cta-s .5s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1); }
[data-route="home"] .hd { transition: top .5s cubic-bezier(.2,.8,.2,1); }
html.bar-pre[data-route="home"] body { padding-top: 0; }
html.bar-pre[data-route="home"] .shop-bar { transform: translateY(-100%); box-shadow: none; }
html.bar-pre[data-route="home"] .hd { top: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  [data-route="home"] body, [data-route="home"] .shop-bar, [data-route="home"] .hd { transition: none; }
}
/* Arriving at the home page past the fold: the top space, the bar and the
   header take their places at once */
html.still body, html.still .shop-bar, html.still .hd, html.still .hd * { transition: none !important; }

/* ---------- Moving between pages ----------
   The old page fades out and the new one fades in, rising a few pixels. Only
   the page fades: the header and the store bar stay live, so they can animate
   on their own or hold perfectly still. html.page-out and html.page-in are set
   by the script. */
[data-view] { transition: opacity .34s cubic-bezier(.2,.8,.2,1), translate .34s cubic-bezier(.2,.8,.2,1); }
html.page-out [data-view] { opacity: 0; transition-duration: .18s; transition-timing-function: ease-in; }
html.page-in [data-view] { opacity: 0; translate: 0 12px; transition: none; }
@media (prefers-reduced-motion: reduce) { [data-view] { transition: none; } }

