:root {
  --paper: #FFFDF7;
  --ink: #2B2141;
  --red: #FF4D6D;
  --blue: #3D9BFF;
  --yellow: #FFC53D;
  --green: #3ECF6E;
  --amber: #E89B00; /* yellow, but readable as text on paper */
  --grid: rgba(61, 155, 255, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.55;
}

h1, h2, h3, .logo, .btn, .badge {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
}

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

.top {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px clamp(20px, 5vw, 64px) 6px;
}

.logo {
  font-size: 44px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.l-t { color: var(--red); }
.l-o { color: var(--blue); }
.l-k { color: var(--amber); }
.l-i { color: var(--green); }

.logo-tip {
  width: 0; height: 0;
  margin-left: 7px;
  align-self: flex-end;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 22px solid var(--ink);
  transform: rotate(180deg);
}

.tag {
  margin: 0;
  font-weight: 700;
  opacity: 0.65;
}

/* ---------- account ---------- */

.account { margin-left: auto; align-self: center; }

.btn-small {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(43, 33, 65, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-small:hover:not(:disabled), .btn-small:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(43, 33, 65, 0.3);
}
.btn-small:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.btn-small.primary { background: var(--yellow); }
.btn-small:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 3px 3px 0 rgba(43, 33, 65, 0.18);
}
.coin-count { color: #9a6a00; }

.linkish {
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ---------- auth modal ---------- */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 33, 65, 0.4);
  backdrop-filter: blur(3px);
}
.auth-overlay.hidden { display: none; }
.auth-panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 8px 9px 0 rgba(43, 33, 65, 0.35);
  padding: 28px 32px;
  max-width: 380px;
  width: calc(100% - 40px);
  transform: rotate(-0.5deg);
}
.auth-panel h2 { font-size: 27px; font-weight: 800; margin: 0 0 6px; }
.auth-sub { font-size: 14.5px; margin: 0 0 18px; opacity: 0.75; }
.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
  opacity: 0.6;
}
.auth-input {
  width: 100%;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 14px;
}
.auth-input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.auth-error { color: var(--red); font-weight: 700; font-size: 14px; margin: 0 0 12px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.auth-close { display: block; margin: 0 auto; color: var(--ink); opacity: 0.6; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 64px);
  max-width: 1160px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.02;
}

.squiggle {
  display: block;
  width: min(320px, 80%);
  margin: 6px 0 2px;
}
.squiggle path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 1.1s ease-out 0.25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.lede {
  font-size: 18px;
  max-width: 46ch;
  margin: 14px 0 26px;
}

.btn {
  display: inline-block;
  padding: 14px 34px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  background: var(--yellow);
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.fine {
  font-size: 13.5px;
  opacity: 0.6;
  margin-top: 16px;
}

.hero-art {
  display: block;
  transform: rotate(1.6deg);
  filter: drop-shadow(8px 10px 0 rgba(43, 33, 65, 0.12));
  transition: transform 0.15s ease;
}
.hero-art:hover { transform: rotate(0.4deg) scale(1.015); }
.hero-art svg { display: block; width: 100%; height: auto; }

/* ---------- game shelf ---------- */

.shelf {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(20px, 5vw, 64px) 64px;
}

.shelf h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 20px;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 5px 6px 0 rgba(43, 33, 65, 0.18);
}
.card.live { transform: rotate(-1deg); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card.live:hover, .card.live:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 7px 10px 0 rgba(43, 33, 65, 0.22);
}
.card.live:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.card.soon { transform: rotate(1deg); opacity: 0.72; border-style: dashed; box-shadow: none; }

.thumb {
  position: relative;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 22px;
  padding-bottom: 0;
  transition: transform 0.22s ease;
}
/* shared depth: a soft top sheen + bottom shading so every scene reads as lit */
.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 16px 22px -16px rgba(255, 255, 255, 0.55),
    inset 0 -22px 28px -20px rgba(43, 33, 65, 0.30);
}
/* the card lifts; the scene gently pushes in, clipped by the card's rounded corners */
.card.live:hover .thumb,
.card.live:focus-visible .thumb {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .thumb { transition: none; }
  .card.live:hover .thumb,
  .card.live:focus-visible .thumb { transform: none; }
}
.thumb-cpr {
  background:
    repeating-linear-gradient(#EAF6FF 0 2px, transparent 2px 34px),
    #FFFEF9;
}
.thumb-rr {
  position: relative;
  background-color: #41464f;
  background-image:
    repeating-linear-gradient(180deg, #f4f1e8 0 16px, transparent 16px 36px),
    repeating-linear-gradient(180deg, #f4f1e8 0 16px, transparent 16px 36px);
  background-size: 5px 100%, 5px 100%;
  background-position: 33% 0, 67% 0;
  background-repeat: no-repeat;
}
.css-car {
  position: absolute;
  width: 36px;
  height: 62px;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
}
.css-car::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 9px;
  height: 13px;
  background: #bfe3ff;
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.car-red { background: var(--red); left: 26%; bottom: 12px; transform: rotate(-3deg); }
.car-blue { background: var(--blue); right: 22%; top: 14px; transform: rotate(2deg); }

.thumb-sts {
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  padding-bottom: 14px;
  background: linear-gradient(#eaf6ff, #fffef9);
}
.sts-block {
  height: 15px;
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  margin-top: -2.5px;
}
.sts-block.s1 { width: 96px; background: var(--red); }
.sts-block.s2 { width: 80px; background: var(--blue); transform: translateX(5px); }
.sts-block.s3 { width: 64px; background: var(--green); transform: translateX(-3px); }
.sts-block.s4 { width: 50px; background: var(--yellow); transform: translateX(4px); }

.thumb-cd {
  position: relative;
  background: repeating-linear-gradient(90deg, #fffef9 0 44px, #f2e3c9 44px 88px);
}
.cd-hero {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 34px;
  height: 30px;
  transform: translateX(-50%);
  background: var(--green);
  border: 2.5px solid var(--ink);
  border-radius: 10px 10px 6px 6px;
}
.cd-hero::after {
  content: '• •';
  position: absolute;
  top: 3px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--ink);
}
.cd-pencil {
  position: absolute;
  top: 26px;
  left: 14px;
  width: 76px;
  height: 13px;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 3px;
}
.cd-pencil::after {
  content: '';
  position: absolute;
  right: -14px;
  top: -2.5px;
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
  border-left: 12px solid #e9c69a;
}

.thumb-tg {
  position: relative;
  background:
    repeating-linear-gradient(#eaf6ff 0 2px, transparent 2px 30px),
    #fffef9;
}
.tg-line {
  position: absolute;
  left: 34px;
  top: 74px;
  width: 120px;
  border-top: 3px dashed rgba(43, 33, 65, 0.35);
  transform: rotate(-14deg);
}
.tg-ball {
  position: absolute;
  left: 22px;
  top: 82px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
}
.tg-hole {
  position: absolute;
  right: 34px;
  top: 52px;
  width: 30px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
}
.tg-flag {
  position: absolute;
  right: 46px;
  top: 16px;
  width: 3px;
  height: 40px;
  background: var(--ink);
}
.tg-flag::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 20px solid var(--red);
}

.thumb-mr {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #bfe3ff, #eaf6ff);
}
.thumb-me {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #ffc53d, #ffdca3);
}
.mr-track {
  position: absolute;
  left: -20px;
  top: 46px;
  width: 140%;
  height: 46px;
  background: #41464f;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-9deg);
}
.mr-track::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  border-top: 3px dashed #f4f1e8;
}
.mr-marble {
  position: absolute;
  left: 44%;
  top: 44px;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 22%, var(--blue) 60%);
  transform: rotate(-9deg);
}

.thumb-rw {
  position: relative;
  overflow: hidden;
  background: #0d0221;
}
.rw-sun {
  position: absolute;
  left: 50%;
  top: 25%;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #ff007f 0%, #ff8c00 100%);
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.65);
}
.rw-grid {
  position: absolute;
  left: -20%;
  bottom: 0;
  width: 140%;
  height: 60%;
  background-image: 
    linear-gradient(rgba(255, 0, 127, 0.3) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 0, 127, 0.3) 1.5px, transparent 1.5px);
  background-size: 15px 15px;
  transform: perspective(40px) rotateX(40deg);
  transform-origin: bottom center;
}
.rw-laser {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 64%;
  height: 6px;
  background: #00ffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  transform: rotate(-3deg);
}

.thumb-lw {
  position: relative;
  overflow: hidden;
  background: #060112;
}
.lw-timeline {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  height: 8px;
  background: rgba(43, 33, 65, 0.5);
  border: 1.5px solid var(--ink);
}
.lw-timeline::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  width: 3px;
  height: 9px;
  background: #fff;
}
.lw-ship {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) rotate(25deg);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 20px solid #00ffff;
  filter: drop-shadow(0 0 4px #00ffff);
}
.lw-laserbeam {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 60px;
  height: 3px;
  background: #ff007f;
  transform: rotate(-35deg);
  transform-origin: left center;
  box-shadow: 0 0 6px #ff007f;
}

.thumb-cf {
  position: relative;
  overflow: hidden;
  background: #ffeed6;
}
.cf-grid {
  position: absolute;
  left: -20%;
  bottom: 0;
  width: 140%;
  height: 55%;
  background-image: 
    linear-gradient(rgba(255, 140, 0, 0.4) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 140, 0, 0.4) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  transform: perspective(35px) rotateX(42deg);
  transform-origin: bottom center;
  z-index: 1;
}
.cf-ship {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) rotate(-12deg);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 22px solid #2B2141;
  z-index: 3;
}
.cf-cube {
  position: absolute;
  width: 16px;
  height: 18px;
  background: #ff4d6d;
  border: 2px solid var(--ink);
  border-radius: 3px;
  z-index: 2;
}
.cf-cube.c1 { left: 24%; top: 38%; transform: scale(0.65); }
.cf-cube.c2 { right: 28%; top: 48%; transform: scale(0.8); }
.cf-cube.c3 { left: 42%; top: 22%; transform: scale(0.5); }

/* Graphite Asteroids Card */
.thumb-ga {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: 
    linear-gradient(rgba(43, 33, 65, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 33, 65, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
}
.thumb-ga::before {
  content: '';
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 77, 109, 0.3);
}
.ga-ship {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 16px solid var(--ink);
}
.ga-asteroid {
  position: absolute;
  border: 1.8px solid var(--ink);
  border-radius: 4px;
}
.ga-asteroid.a1 { width: 18px; height: 16px; left: 20%; top: 22%; transform: rotate(15deg); }
.ga-asteroid.a2 { width: 14px; height: 15px; right: 25%; bottom: 25%; transform: rotate(-35deg); }

/* Doodle Bounce Card */
.thumb-db {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.06) 1.5px, transparent 1.5px);
  background-size: 100% 18px;
}
.thumb-db::before {
  content: '';
  position: absolute;
  left: 30px; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255, 77, 109, 0.4);
}
.db-character {
  position: absolute;
  left: 48%; top: 40%;
  width: 14px; height: 14px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.db-platform {
  position: absolute;
  height: 4px;
  background: var(--green);
  border-radius: 99px;
}
.db-platform.p1 { width: 34px; left: 24%; bottom: 24%; }
.db-platform.p2 { width: 34px; right: 18%; top: 52%; }
.db-platform.p3 { width: 34px; left: 40%; top: 22%; }

/* Ink Invaders Card */
.thumb-ii {
  position: relative;
  overflow: hidden;
  background: #0b1a30;
  background-image: 
    linear-gradient(rgba(29, 62, 105, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 62, 105, 0.6) 1px, transparent 1px);
  background-size: 16px 16px;
}
.ii-core {
  position: absolute;
  right: 18%; bottom: 20%;
  width: 16px; height: 16px;
  border: 2px solid #fffdf7;
  border-radius: 50%;
}
.ii-droplet {
  position: absolute;
  width: 10px; height: 10px;
  background: rgba(61, 155, 255, 0.45);
  border: 1.5px solid #fffdf7;
  border-radius: 50%;
}
.ii-droplet.d1 { left: 22%; top: 32%; }
.ii-droplet.d2 { left: 45%; top: 55%; }
.ii-tower {
  position: absolute;
  width: 10px; height: 14px;
  border: 1.8px solid #fffdf7;
  left: 55%; top: 28%;
}

/* Drafting Pinball Card */
.thumb-dp {
  position: relative;
  overflow: hidden;
  background: #0b1a30;
  background-image: 
    linear-gradient(rgba(29, 62, 105, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 62, 105, 0.6) 1px, transparent 1px);
  background-size: 16px 16px;
}
.dp-ball {
  position: absolute;
  left: 45%; top: 38%;
  width: 12px; height: 12px;
  background: #1d3e69;
  border: 2px solid #fffdf7;
  border-radius: 50%;
}
.dp-bumper {
  position: absolute;
  left: 60%; top: 22%;
  width: 22px; height: 22px;
  border: 2px solid var(--yellow);
  background: rgba(255, 197, 61, 0.15);
  border-radius: 50%;
}
.dp-flipper {
  position: absolute;
  width: 26px; height: 6px;
  background: #1d3e69;
  border: 1.8px solid #fffdf7;
  bottom: 24%;
}
.dp-flipper.fl { left: 24%; transform: rotate(15deg); }
.dp-flipper.fr { right: 24%; transform: rotate(-15deg); }

/* Ink Bubbles Card */
.thumb-ib {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.05) 1px, transparent 1px);
  background-size: 100% 16px;
}
.ib-nozzle {
  position: absolute;
  left: 50%; bottom: -8px;
  transform: translateX(-50%);
  width: 22px; height: 26px;
  border: 2.2px solid var(--ink);
  background: #fff;
  border-radius: 6px;
}
.ib-bubble {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.8px solid var(--ink);
  border-radius: 50%;
}
.ib-bubble.b1 { left: 36%; top: 24%; background: var(--red); }
.ib-bubble.b2 { right: 38%; top: 32%; background: var(--blue); }

/* Grid Tetris Card */
.thumb-gt {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.05) 1px, transparent 1px);
  background-size: 100% 16px;
}
.gt-block {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.8px solid var(--ink);
  background: var(--blue);
}
.gt-block.t1 { left: 40%; bottom: 18%; background: var(--red); }
.gt-block.t2 { left: 52%; bottom: 18%; background: var(--red); }
.gt-block.t3 { left: 46%; bottom: 31%; background: var(--red); }
.gt-block.t4 { left: 58%; bottom: 31%; background: var(--blue); }

/* Ink Ghost Run Card */
.thumb-igr {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: 
    linear-gradient(rgba(43, 33, 65, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 33, 65, 0.04) 1px, transparent 1px);
  background-size: 14px 14px;
}
.igr-dot {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(43, 33, 65, 0.4);
  border-radius: 50%;
}
.igr-dot.d1 { left: 30%; top: 40%; }
.igr-dot.d2 { left: 45%; top: 40%; }
.igr-ghost {
  position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 50% 50% 0 0;
}
.igr-ghost.g1 { left: 24%; top: 48%; background: var(--red); }
.igr-ghost.g2 { right: 28%; top: 38%; background: var(--blue); }

/* Ruler Breakout Card */
.thumb-rb {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.03) 1px, transparent 1px);
  background-size: 100% 16px;
}
.rb-pencil {
  position: absolute;
  width: 28px; height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}
.rb-pencil.p1 { left: 30%; top: 22%; background: var(--red); }
.rb-pencil.p2 { left: 52%; top: 22%; background: var(--yellow); }
.rb-ball {
  position: absolute;
  left: 45%; top: 45%;
  width: 10px; height: 10px;
  border: 1.8px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.rb-ruler {
  position: absolute;
  left: 50%; bottom: 20%;
  transform: translateX(-50%);
  width: 64px; height: 10px;
  border: 1.8px solid var(--ink);
  background: #fffdf7;
}

/* Paperplane Flyer Card */
.thumb-pf {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.03) 1px, transparent 1px);
  background-size: 100% 16px;
}
.pf-plane {
  position: absolute;
  left: 22%; top: 44%;
  width: 18px; height: 10px;
  border: 1.8px solid var(--ink);
  background: #fff;
  clip-path: polygon(100% 50%, 0 0, 30% 50%, 0 100%);
}
.pf-pencil {
  position: absolute;
  width: 14px; height: 42px;
  border: 1.8px solid var(--ink);
  background: var(--blue);
}
.pf-pencil.u1 { right: 38%; top: -8px; }
.pf-pencil.d1 { right: 26%; bottom: -8px; background: var(--red); }

/* Calculator Hack Card */
.thumb-ch {
  position: relative;
  overflow: hidden;
  background: var(--paper); /* green LCD */
  background-image: linear-gradient(rgba(43, 51, 35, 0.06) 1px, transparent 1px);
  background-size: 100% 12px;
}
.ch-eq {
  position: absolute;
  left: 12px; top: 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.ch-button {
  position: absolute;
  width: 16px; height: 14px;
  border: 1.5px solid var(--ink);
  background: #fff;
  font-family: monospace;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
}
.ch-button.b1 { right: 34px; bottom: 12px; }
.ch-button.b2 { right: 14px; bottom: 12px; }

/* Ink Snake Card */
.thumb-is {
  position: relative;
  overflow: hidden;
  background: #fffdf7;
  background-image: 
    linear-gradient(rgba(43, 33, 65, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 33, 65, 0.04) 1px, transparent 1px);
  background-size: 14px 14px;
}
.is-refill {
  position: absolute;
  width: 8px; height: 8px;
  border: 1.5px solid var(--ink);
  background: var(--green);
  transform: rotate(45deg);
}
.is-refill.f1 { left: 35%; top: 30%; }
.is-refill.f2 { left: 60%; top: 55%; }
.is-nib {
  position: absolute;
  left: 45%; top: 46%;
  width: 14px; height: 14px;
  border: 1.8px solid var(--ink);
  background: var(--blue);
  border-radius: 50%;
}

/* Desk Football Card */
.thumb-df {
  position: relative;
  overflow: hidden;
  background: #FFFDF7;
  background-image: linear-gradient(rgba(43, 33, 65, 0.03) 1px, transparent 1px);
  background-size: 100% 16px;
}
.df-post {
  position: absolute;
  width: 8px; height: 28px;
  border: 1.8px solid var(--ink);
  background: var(--yellow);
  top: 15px;
}
.df-post.l { left: 35%; }
.df-post.r { right: 35%; }
.df-football {
  position: absolute;
  left: 48%; bottom: 25%;
  transform: translateX(-50%);
  width: 16px; height: 14px;
  border: 1.8px solid var(--ink);
  background: #fff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Pencil Bridge Card */
.thumb-pb {
  position: relative;
  overflow: hidden;
  background: #0b1a30;
  background-image: 
    linear-gradient(rgba(29, 62, 105, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 62, 105, 0.6) 1px, transparent 1px);
  background-size: 16px 16px;
}
.pb-tack {
  position: absolute;
  width: 8px; height: 8px;
  border: 1.5px solid #fffdf7;
  border-radius: 50%;
  top: 45%;
}
.pb-tack.l { left: 24%; background: var(--red); }
.pb-tack.r { right: 24%; background: var(--red); }
.pb-girder {
  position: absolute;
  left: 28%; top: 49%;
  width: 44%; height: 4px;
  background: #fffdf7;
}
.pb-ball {
  position: absolute;
  left: 45%; top: 22%;
  width: 10px; height: 10px;
  border: 1.5px solid #fffdf7;
  border-radius: 50%;
  background: var(--blue);
}

/* Shop tabs styling */
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}
.tab-btn {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(43, 33, 65, 0.18);
  transition: transform 0.05s, background 0.05s, color 0.05s;
  text-transform: capitalize;
}
.tab-btn:hover {
  background: #f7f5ef;
}
.tab-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(43, 33, 65, 0.1);
}
.tab-btn.active {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

/* Papercraft Pilot 3D Card — folded dart threading a course of loops */
.thumb-pf3 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #bfe3ff 0%, #eaf6ff 55%, #fffdf7 100%);
}
.thumb-pf3::before { /* drifting clouds */
  content: '';
  position: absolute;
  left: 8%; top: 30%;
  width: 40px; height: 15px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 70px 26px 0 -2px #fff, 34px -12px 0 -6px #fff;
  opacity: 0.9;
}
.pf3-ring { /* front goal ring */
  position: absolute;
  left: 58%; top: 30%;
  width: 40px; height: 40px;
  border: 5px solid var(--green);
  border-radius: 50%;
  transform: rotateX(52deg) rotate(-6deg);
}
.pf3-ring::before { /* a second ring receding into the distance */
  content: '';
  position: absolute;
  left: 50%; top: -30px;
  width: 22px; height: 22px;
  margin-left: -11px;
  border: 3.5px solid #8fd6a6;
  border-radius: 50%;
  transform: rotateX(52deg);
}
.pf3-plane { /* folded paper dart, two-tone for the crease */
  position: absolute;
  left: 20%; top: 45%;
  width: 30px; height: 34px;
  background: linear-gradient(90deg, #ffffff 0 50%, #e5edf6 50% 100%);
  clip-path: polygon(50% 0%, 0% 100%, 50% 80%, 100% 100%);
  transform: rotate(-16deg);
  filter: drop-shadow(2px 5px 1px rgba(43, 33, 65, 0.18));
  z-index: 2;
}
.pf3-plane::before { /* center crease */
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 1.6px; height: 82%;
  background: rgba(43, 33, 65, 0.45);
  transform: translateX(-50%);
}

/* Tilting Labyrinth 3D Card — steel marble on a tilted grid board */
.thumb-tl3 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #eef3fa, #fffdf7);
}
.tl3-board {
  position: absolute;
  left: 50%; top: 52%;
  width: 104px; height: 82px;
  margin: -41px 0 0 -52px;
  background:
    linear-gradient(rgba(43, 33, 65, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 33, 65, 0.10) 1px, transparent 1px),
    #fbf4e2;
  background-size: 13px 13px, 13px 13px, 100% 100%;
  border: 3px solid var(--ink);
  border-radius: 4px;
  transform: perspective(220px) rotateX(48deg) rotateZ(-12deg);
  box-shadow: 0 14px 18px -8px rgba(43, 33, 65, 0.4);
}
.tl3-board::before { /* sharpener crater to avoid */
  content: '';
  position: absolute;
  left: 22%; top: 28%;
  width: 20px; height: 20px;
  background: radial-gradient(circle at 50% 40%, #1c1630, #4a4260);
  border-radius: 50%;
  box-shadow: inset 0 -3px 3px rgba(0, 0, 0, 0.5);
}
.tl3-board::after { /* green goal cup */
  content: '';
  position: absolute;
  right: 15%; bottom: 16%;
  width: 16px; height: 16px;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.tl3-ball {
  position: absolute;
  left: 52%; top: 40%;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 18%, #b9c0cc 55%, #6c7480 100%);
  border: 1.5px solid var(--ink);
  box-shadow: 3px 5px 4px rgba(43, 33, 65, 0.35);
  z-index: 2;
}

/* Desktop Bowl 3D Card — marble rolling up a perspective lane at the pins */
.thumb-db3 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(#f2d9b8 0%, #d9b78a 55%, #b98c5e 100%);
}
.thumb-db3::before { /* lane in perspective */
  content: '';
  position: absolute;
  left: 50%; bottom: -6px;
  width: 58px; height: 118px;
  margin-left: -29px;
  background: linear-gradient(#eBcfa4, #c9a06e);
  border-left: 4px solid rgba(43, 33, 65, 0.22);
  border-right: 4px solid rgba(43, 33, 65, 0.22);
  transform: perspective(120px) rotateX(50deg);
  transform-origin: bottom center;
}
.db3-pin { /* white ten-pin */
  position: absolute;
  width: 8px; height: 22px;
  background: #fff;
  border: 1.6px solid var(--ink);
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  top: 22%;
  z-index: 2;
}
.db3-pin::before { /* red neck stripe */
  content: '';
  position: absolute;
  left: -1px; right: -1px; top: 5px;
  height: 3px;
  background: var(--red);
}
.db3-pin.f1 { left: 42%; }
.db3-pin.f2 { left: 52%; }
.db3-pin.f1::after { /* a third pin behind, for a fuller rack */
  content: '';
  position: absolute;
  left: 9px; top: -5px;
  width: 7px; height: 20px;
  background: #f4f4f4;
  border: 1.5px solid var(--ink);
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
}
.db3-ball {
  position: absolute;
  left: 46%; bottom: 13%;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7fc4ff 0 16%, var(--blue) 55%, #245e9e 100%);
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 4px rgba(43, 33, 65, 0.35);
  z-index: 3;
}

.thumb-soon {
  align-items: center;
  background: repeating-linear-gradient(45deg, #F4F1E8 0 14px, #FDFBF3 14px 28px);
  font-family: 'Baloo 2', sans-serif;
  font-size: 54px;
  font-weight: 800;
  color: rgba(43, 33, 65, 0.25);
}

.mini-pencil {
  width: 22px;
  height: 86px;
  border: 2.5px solid var(--ink);
  border-radius: 5px 5px 0 0;
  position: relative;
}
.mini-pencil::after {
  content: '';
  position: absolute;
  left: -2.5px;
  bottom: -24px;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 24px solid #E9C69A;
}
.p-red { background: var(--red); height: 96px; }
.p-blue { background: var(--blue); height: 74px; margin-bottom: 8px; transform: rotate(4deg); }
.p-yellow { background: var(--yellow); height: 60px; margin-bottom: 14px; transform: rotate(-5deg); }

.card-body { padding: 14px 18px 18px; }
.card-body h3 { margin: 0 0 2px; font-size: 21px; font-weight: 800; }
.card-body p { margin: 0; font-size: 14.5px; opacity: 0.7; }

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 14px;
  font-size: 14px;
  font-weight: 800;
  background: var(--green);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
}
.badge.muted { background: #EDE9DD; }

/* ---------- upgrade shop ---------- */

.shop-hint { margin: -10px 0 20px; font-weight: 700; opacity: 0.65; }

.shop-card { padding: 18px 20px; gap: 8px; }
.shop-head { display: flex; align-items: center; gap: 12px; }
.shop-icon { font-size: 34px; }
.shop-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.shop-game {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
}
.shop-desc { margin: 4px 0 10px; font-size: 14.5px; opacity: 0.75; flex: 1; }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-level { font-size: 15px; letter-spacing: 3px; color: var(--green); }

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

.foot {
  border-top: 3px solid var(--ink);
  background: #fff;
  padding: 18px clamp(20px, 5vw, 64px);
  font-size: 14.5px;
  font-weight: 600;
}
.foot p { margin: 0; opacity: 0.75; }

/* ---------- responsive & motion ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  .squiggle path { animation: none; stroke-dashoffset: 0; }
  .btn, .card.live, .hero-art { transition: none; }
}
