/* Mind Maze Games — paper, ink and two loud colours per game. */
:root {
  --paper: #f4efe6;
  --paper-2: #ebe3d4;
  --ink: #17131f;
  --ink-soft: #4a4453;
  --coral: #ff6b4a;
  --gold: #ffc531;
  --teal: #12b5a0;
  --pink: #ff8fb1;
  --plum: #4b2a8c;
  --plum-2: #2a1752;
  --radius: 22px;
  --display: "Fraunces", Georgia, serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --shadow: 6px 6px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.05rem/1.6 var(--body);
  overflow-x: hidden;
}
/* risograph grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.22;
  /* no mix-blend-mode: the grain is pure black, so multiply and normal blending give the same pixels, and normal is far cheaper to paint */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--gold); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 10px; background: var(--ink); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-14deg) scale(1.1); }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-weight: 500; }
.nav nav a { text-decoration: none; position: relative; }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .25s; border-radius: 3px; }
.nav nav a:hover::after, .nav nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 2px solid var(--ink); border-radius: 999px;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--coral); }
.btn-ink:hover { box-shadow: 6px 6px 0 var(--coral); }
.btn-small { padding: 10px 18px; font-size: .95rem; }
.btn-play { background: var(--gold); color: var(--ink); }
.btn-play svg { width: 20px; height: 20px; fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline wavy var(--coral); text-underline-offset: 4px; cursor: pointer; color: inherit; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 7vw, 96px) clamp(16px, 5vw, 64px) clamp(40px, 6vw, 80px);
  max-width: 1320px; margin: 0 auto;
}
.kicker { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; margin: 0 0 12px; }
.kicker::before { content: "✺ "; color: var(--coral); }
h1 {
  margin: 0; font: 900 clamp(4rem, 12vw, 9.5rem)/.86 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -0.045em;
}
h1 .line { display: block; }
h1 em { color: var(--coral); font-weight: 600; text-shadow: 5px 5px 0 var(--gold); }
.harp .ch { display: inline-block; transition: transform .35s cubic-bezier(.3,1.8,.5,1), color .2s; }
.harp .ch:hover { transform: translateY(-.12em) rotate(var(--r, -8deg)); color: var(--teal); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 30ch; margin: 22px 0 28px; color: var(--ink-soft); }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hint { font-family: var(--display); font-style: italic; font-size: 1.15rem; }

.maze-card {
  position: relative; margin: 0;
  background: #fffaf1; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 16px 16px 12px; box-shadow: 10px 10px 0 var(--teal);
  transform: rotate(1.4deg);
}
#maze { display: block; width: 100%; aspect-ratio: 1; touch-action: none; border-radius: 12px; cursor: grab; background: #fffaf1; }
#maze:active { cursor: grabbing; }
.maze-card figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-weight: 500; font-size: .95rem; }
.tape { position: absolute; width: 110px; height: 30px; background: color-mix(in srgb, var(--gold) 70%, transparent); top: -14px; z-index: 2; }
.tape-l { left: 24px; transform: rotate(-8deg); }
.tape-r { right: 24px; transform: rotate(6deg); background: color-mix(in srgb, var(--pink) 70%, transparent); }

/* confetti */
.confetti { position: fixed; top: 0; left: 0; width: 10px; height: 14px; pointer-events: none; z-index: 150; border-radius: 2px; animation: fly 1.3s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes fly {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); border-block: 2px solid var(--ink); overflow: hidden; transform: rotate(-1.2deg); margin: 10px -10px; }
.marquee-track { display: flex; gap: 28px; width: max-content; padding: 14px 0; font: 700 clamp(1.3rem, 2.6vw, 2rem)/1 var(--display); font-style: italic; animation: slide 28s linear infinite; }
.marquee i { color: var(--gold); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section-title { font: 800 clamp(2.4rem, 6vw, 4.6rem)/1 var(--display); letter-spacing: -0.035em; margin: 0 0 12px; text-align: center; font-variation-settings: "SOFT" 100, "WONK" 1; }
.section-title em { color: var(--coral); }
.section-sub { text-align: center; color: var(--ink-soft); margin: 0 0 40px; }
.games, .play { padding: clamp(56px, 9vw, 120px) clamp(16px, 5vw, 64px) 0; max-width: 1320px; margin: 0 auto; }

/* ---------- game posters ---------- */
.game {
  --c1: var(--teal); --c2: var(--pink); --bg: #dff6f1;
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center;
  margin: clamp(40px, 6vw, 72px) 0; padding: clamp(24px, 4vw, 52px);
  background: var(--bg); border: 2px solid var(--ink); border-radius: calc(var(--radius) * 1.6);
  box-shadow: 12px 12px 0 var(--c1);
}
.game-owl { --c1: var(--plum); --c2: var(--gold); --bg: #ece4ff; }
.game-owl .game-art { order: 2; }
.game-art { position: relative; min-height: 420px; display: grid; place-items: center; }
.fan { position: relative; width: min(100%, 420px); height: 420px; }
.fan img {
  position: absolute; left: 50%; top: 50%; width: 46%; border-radius: 18px; border: 2px solid var(--ink); background: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .55s cubic-bezier(.3,1.5,.5,1);
}
.fan img:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); z-index: 3; }
.fan img:nth-child(2) { transform: translate(-95%, -46%) rotate(-11deg); z-index: 2; }
.fan img:nth-child(3) { transform: translate(-5%, -46%) rotate(11deg); z-index: 1; }
.game:hover .fan img:nth-child(1) { transform: translate(-50%, -54%) rotate(-2deg) scale(1.04); }
.game:hover .fan img:nth-child(2) { transform: translate(-118%, -44%) rotate(-17deg); }
.game:hover .fan img:nth-child(3) { transform: translate(18%, -44%) rotate(17deg); }

.sticker {
  position: absolute; right: 2%; top: 4%; z-index: 5;
  width: 112px; height: 112px; display: grid; place-content: center; text-align: center;
  font: 900 2.2rem/.9 var(--display); color: var(--ink);
  background: var(--c2); border: 2px solid var(--ink); border-radius: 50%;
  transform: rotate(12deg); box-shadow: 4px 4px 0 var(--ink);
  animation: bob 3.2s ease-in-out infinite;
}
.sticker small { font: 700 .8rem/1.2 var(--body); }
.sticker-b { left: 2%; right: auto; transform: rotate(-12deg); }
@keyframes bob { 50% { translate: 0 -8px; } }

.app-icon { border-radius: 24px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); margin-bottom: 16px; transition: transform .4s cubic-bezier(.3,1.8,.5,1); }
.app-icon:hover { transform: rotate(-8deg) scale(1.08); }
.game h3 { font: 900 clamp(2rem, 4vw, 3.2rem)/1 var(--display); letter-spacing: -0.03em; margin: 0 0 6px; }
.game h3 span { font-weight: 400; font-style: italic; font-size: .55em; color: var(--ink-soft); }
.tagline { font: 600 italic 1.3rem/1.3 var(--display); color: var(--c1); margin: 0 0 12px; }
.game-owl .tagline { color: var(--plum); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 24px; }
.chips li { background: #fffaf1; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 500; }

.strip {
  grid-column: 1 / -1; order: 3; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 18px; scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.strip img { flex: 0 0 auto; width: clamp(140px, 18vw, 190px); border-radius: 14px; border: 2px solid var(--ink); scroll-snap-align: start; transition: transform .3s; }
.strip img:hover { transform: translateY(-6px) rotate(-1.5deg); }

/* ---------- toys ---------- */
.toys { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.toy { border: 2px solid var(--ink); border-radius: calc(var(--radius) * 1.3); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
/* one colour per game; dark cards flip the text and button colours */
.toy-teal { background: var(--teal); box-shadow: 10px 10px 0 var(--ink); }
.toy-plum { background: var(--plum); color: #fff; box-shadow: 10px 10px 0 var(--gold); }
.toy-coral { background: var(--coral); box-shadow: 10px 10px 0 var(--ink); }
.toy-gold { background: var(--gold); box-shadow: 10px 10px 0 var(--coral); }
.toy-pink { background: var(--pink); box-shadow: 10px 10px 0 var(--plum); }
.toy-cobalt { background: #3557ff; color: #fff; box-shadow: 10px 10px 0 var(--gold); }
.toy-mint { background: #3ddc97; box-shadow: 10px 10px 0 var(--ink); }
.toy-ink { background: var(--ink); color: var(--paper); box-shadow: 10px 10px 0 var(--teal); }
:is(.toy-plum, .toy-cobalt, .toy-ink, .toy-night) .btn-ink { background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--paper); }
:is(.toy-plum, .toy-cobalt, .toy-ink, .toy-night) .swap { background: transparent; color: inherit; border-color: currentColor; }
.toy { transition: background .3s; }
.toy-tag { margin: -8px 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.toy-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: auto; gap: 12px; }
.swap { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 .9rem/1 var(--body); cursor: pointer; transition: transform .25s cubic-bezier(.3,1.8,.5,1); }
.swap:hover { transform: rotate(-4deg) scale(1.06); }
.swap small { opacity: .6; font-weight: 500; }
.stage { width: 100%; max-width: 380px; align-self: center; display: flex; flex-direction: column; gap: 12px; }
.flip-out { animation: flipOut .22s ease-in forwards; }
.flip-in { animation: flipIn .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes flipOut { to { transform: perspective(900px) rotateY(90deg) scale(.95); } }
@keyframes flipIn { from { transform: perspective(900px) rotateY(-90deg) scale(.95); } }
.pop-in { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.toy-head { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.toy h3 { font: 900 2rem/1 var(--display); margin: 0; }
.toy-score { font-weight: 700; background: var(--paper); color: var(--ink); padding: 4px 12px; border-radius: 999px; border: 2px solid var(--ink); }
.toy-how { margin: 0; }

.toy-score { display: inline-block; }
.mem-grid, .ten-grid { width: 100%; max-width: 380px; align-self: center; }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-grid button {
  aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 16px; cursor: pointer;
  font: 900 clamp(1.4rem, 3.4vw, 2rem)/1 var(--display); color: var(--ink);
  background: #c9f1ea; box-shadow: 3px 3px 0 #0b6f62;
  transition: transform .18s cubic-bezier(.3,1.8,.5,1), background .15s, box-shadow .15s;
}
.mem-grid button:not(:disabled):hover { transform: translateY(-3px); background: #e3faf5; }
.mem-grid button:not(:disabled):active { transform: translateY(2px); box-shadow: 1px 1px 0 #0b6f62; }
.mem-grid button:disabled { cursor: default; }
.mem-grid button.lit { background: var(--gold); transform: scale(1.06) rotate(-4deg); box-shadow: 0 0 0 4px #fff, 0 0 26px 6px var(--gold); }
.mem-grid button.hit { background: var(--gold); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.mem-grid button.miss { background: var(--coral); color: #fff; animation: pop .35s; }
.mem-grid button.was { background: #c9f1ea; outline: 4px dashed var(--gold); outline-offset: -8px; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.14) rotate(-5deg); } 100% { transform: scale(1); } }
.shake { animation: shake .35s; }
@keyframes shake { 25% { translate: -7px 0; } 75% { translate: 7px 0; } }

/* make ten: tiles are placed by transform, so a column falling is just a transition */
.ten-grid { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; background: var(--plum-2); border: 2px solid var(--ink); overflow: hidden; }
.tile {
  position: absolute; left: 0; top: 0; width: 25%; height: 20%; padding: 5px;
  border: 0; background: none; cursor: pointer; color: var(--ink);
  transition: transform .5s cubic-bezier(.34,1.45,.64,1);
}
.tile .face {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: #fffaf1; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  font: 900 clamp(1.4rem, 3.4vw, 2.1rem)/1 var(--display);
  transition: transform .18s cubic-bezier(.3,1.8,.5,1), background .15s, box-shadow .15s;
}
.tile:not(:disabled):hover .face { transform: translateY(-2px); }
.tile:not(:disabled):active .face { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tile:disabled { cursor: default; }
.tile:disabled .face { background: #d9cff0; }
.tile.sel .face { background: var(--gold); transform: translateY(-5px) rotate(-5deg) scale(1.05); box-shadow: 0 8px 0 var(--ink); }
.tile.nope { animation: none; background: none !important; }
.tile.nope .face { animation: nope .35s; background: var(--coral); }
@keyframes nope { 25% { transform: translateX(-6px) rotate(-4deg); } 75% { transform: translateX(6px) rotate(4deg); } }
.tile.gone { pointer-events: none; }
.tile.gone .face { animation: gone .32s ease-in forwards; background: var(--gold); }
@keyframes gone { 40% { transform: scale(1.25) rotate(10deg); } 100% { transform: scale(0) rotate(-20deg); opacity: 0; } }
.tile.born .face { animation: born .45s cubic-bezier(.3,1.7,.5,1) var(--d) backwards; }
@keyframes born { from { transform: scale(0) rotate(30deg); } }
.tbar { width: 100%; max-width: 380px; align-self: center; height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); overflow: hidden; }
.tbar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transition: background .3s; }
.toy-gold .tbar i { background: var(--paper); }
.toy.low .tbar i { background: var(--coral); }

/* shared answer keys and question panel */
.q { background: #fffaf1; color: var(--ink); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); padding: 26px 12px; text-align: center; font: 900 clamp(2rem, 6vw, 2.8rem)/1 var(--display); letter-spacing: -0.02em; }
.q-word { font-size: clamp(2.6rem, 8vw, 3.6rem); letter-spacing: .02em; }
.q-seq { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.key { background: #fffaf1; color: var(--ink); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 16px 8px; font: 900 1.6rem/1 var(--display); cursor: pointer; transition: transform .15s cubic-bezier(.3,1.8,.5,1), box-shadow .15s, background .15s; }
.key:not(:disabled):hover { transform: translateY(-2px); }
.key:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.key:disabled { opacity: .5; cursor: default; }
.nope { animation: nope .35s; background: var(--coral) !important; }

/* odd one out */
.odd-grid { display: grid; gap: 6px; aspect-ratio: 1; }
.odd-grid .cell { background: #fffaf1; color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; font: 900 1em/1 var(--display); cursor: pointer; padding: 0; display: grid; place-items: center; transition: transform .15s; }
.odd-grid .cell:not(:disabled):hover { transform: scale(1.06); }
.odd-grid .cell:disabled { cursor: default; }

/* word twist */
.word-slots { display: flex; justify-content: center; gap: 6px; min-height: 64px; background: none; border: 0; padding: 0; cursor: pointer; }
.slot { width: 48px; height: 58px; border-radius: 12px; border: 2px dashed currentColor; display: grid; place-items: center; font: 900 1.8rem/1 var(--display); }
.slot.on { background: var(--gold); color: var(--ink); border: 2px solid var(--ink); animation: pop .3s cubic-bezier(.3,1.8,.5,1); }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.letter { width: 56px; padding: 14px 0; }
.skip { align-self: center; color: inherit; font-size: .9rem; }

/* owl pop */
.pop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; aspect-ratio: 1; }
.hole { position: relative; overflow: hidden; border: 2px solid var(--ink); border-radius: 50% 50% 18px 18px; background: radial-gradient(ellipse at 50% 85%, #0e5a3c 0 38%, #1c8f5e 40%); cursor: pointer; padding: 0; }
.hole:disabled { cursor: default; }
.critter { position: absolute; left: 0; right: 0; bottom: -10%; font-size: clamp(2.2rem, 7vw, 3.2rem); line-height: 1; transform: translateY(110%); transition: transform .16s cubic-bezier(.3,1.6,.5,1); }
.hole.up .critter { transform: translateY(-14%); }
.hole.bomb { background: radial-gradient(ellipse at 50% 85%, #5a0e0e 0 38%, #b33a2b 40%); }
.hole.bonk { animation: pop .3s; }
.toy.low .toy-score { animation: shake .4s infinite; }

/* floating score text */
.float {
  position: fixed; z-index: 160; pointer-events: none; white-space: nowrap;
  font: 900 1.9rem/1 var(--display); color: #fff;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink);
  animation: floatUp 1.05s cubic-bezier(.2,.9,.3,1) forwards;
}
.float.gold { color: var(--gold); }
.float.big { font-size: 2.6rem; }
.float.small { font-size: 1.3rem; color: var(--gold); }
@keyframes floatUp {
  0% { transform: translate(-50%, -50%) scale(.3) rotate(var(--tilt)); opacity: 0; }
  20% { transform: translate(-50%, -80%) scale(1.25) rotate(var(--tilt)); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -190%) scale(1) rotate(0deg); opacity: 0; }
}
.bump { animation: bump .4s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); } }

/* sound toggle */
.sound { background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font: 700 .85rem/1.4 var(--body); cursor: pointer; color: var(--ink); }
.sound[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }

/* ---------- about + footer ---------- */
.about { max-width: 900px; margin: 0 auto; padding: clamp(72px, 10vw, 140px) clamp(16px, 5vw, 64px); text-align: center; }
.big-quote { font: 800 clamp(2rem, 5vw, 3.6rem)/1.05 var(--display); letter-spacing: -0.03em; margin: 0 0 24px; }
.big-quote em { color: var(--teal); font-weight: 500; }
.foot { border-top: 2px solid var(--ink); padding: 32px clamp(16px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 800 1.1rem/1 var(--display); }
.foot-brand img { border-radius: 8px; background: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.fine { width: 100%; margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ---------- legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 32px) 80px; }
.legal h1 { font-size: clamp(3rem, 9vw, 5.6rem); margin-bottom: 12px; }
.legal .updated { font-weight: 700; display: inline-block; background: var(--gold); border: 2px solid var(--ink); padding: 4px 12px; border-radius: 999px; transform: rotate(-1.5deg); }
.legal h2 { font: 800 1.7rem/1.15 var(--display); margin: 44px 0 10px; letter-spacing: -0.02em; }
.legal h2::before { content: "✺ "; color: var(--coral); }
.legal h3 { font: 700 1.15rem/1.3 var(--body); margin: 24px 0 6px; }
.legal li { margin-bottom: 6px; }
.legal a { text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.summary { background: #fffaf1; border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 24px; box-shadow: 8px 8px 0 var(--teal); margin: 28px 0; }
.summary h2 { margin-top: 4px; }
.summary ul { padding-left: 20px; margin: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
.legal th, .legal td { text-align: left; border: 2px solid var(--ink); padding: 8px 12px; vertical-align: top; }
.legal th { background: var(--paper-2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px) rotate(-.6deg); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero, .game, .toys { grid-template-columns: 1fr; }
  .game-owl .game-art { order: 0; }
  .game-art { min-height: 340px; }
  .fan { height: 340px; }
  .maze-card { transform: none; }
  .nav nav { gap: 14px; font-size: .95rem; }
  .nav nav a[href="#play"], .nav nav a[href="/#play"] { display: none; }
}
@media (max-width: 420px) { .brand span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- game card polish ---------- */
.toys button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.toy-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.streak { font-weight: 700; font-size: .95rem; background: var(--ink); color: var(--gold); border-radius: 999px; padding: 0 10px; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width .3s, opacity .2s, padding .3s; }
.streak.on { max-width: 80px; opacity: 1; padding: 4px 10px; }
.toy-score { font-variant-numeric: tabular-nums; }

.stage { position: relative; }
.ov {
  position: absolute; inset: -6px; z-index: 5; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: color-mix(in srgb, var(--ink) 55%, transparent); color: #fff;
  backdrop-filter: blur(4px) saturate(1.2); -webkit-backdrop-filter: blur(4px) saturate(1.2);
  animation: ovIn .3s ease-out;
}
@keyframes ovIn { from { opacity: 0; backdrop-filter: blur(0); } }
.play-big {
  width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer;
  background: var(--gold); color: var(--ink); font-size: 2.3rem; box-shadow: 0 6px 0 var(--ink);
  display: grid; place-items: center; padding-left: 8px;
  animation: breathe 1.8s ease-in-out infinite;
  transition: transform .15s;
}
.play-big:hover { transform: scale(1.08) rotate(-6deg); animation-play-state: paused; }
.play-big:active { transform: scale(.94); box-shadow: 0 2px 0 var(--ink); }
@keyframes breathe { 50% { transform: scale(1.07); box-shadow: 0 6px 0 var(--ink), 0 0 0 12px color-mix(in srgb, var(--gold) 30%, transparent); } }
.ov-sub { margin: 4px 0 0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; opacity: .85; }
.ov-title { margin: 0; font: 900 2rem/1 var(--display); animation: pop .4s cubic-bezier(.3,1.8,.5,1); }
.ov-score { font: 900 4.4rem/1 var(--display); color: var(--gold); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); font-variant-numeric: tabular-nums; }
.ov .btn { margin-top: 12px; }
.ribbon { margin: 6px 0 0; background: var(--coral); color: #fff; font: 800 1rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; padding: 8px 16px; border: 2px solid var(--ink); transform: rotate(-4deg); animation: pop .5s .4s cubic-bezier(.3,1.8,.5,1) backwards; }
.count { font: 900 6rem/1 var(--display); color: var(--gold); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); }

.dots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dot { width: 14px; height: 14px; padding: 0; border-radius: 999px; border: 2px solid var(--ink); background: var(--hue); cursor: pointer; transition: width .3s cubic-bezier(.3,1.5,.5,1), transform .15s; }
:is(.toy-plum, .toy-cobalt, .toy-ink, .toy-night) .dot { border-color: var(--paper); }
.dot:hover:not(:disabled) { transform: scale(1.3); }
.dot.on { width: 30px; background: var(--paper); box-shadow: inset 0 0 0 3px var(--hue); }
.dot.taken { opacity: .3; cursor: not-allowed; }

.tbar.gain { animation: barGain .5s; }
.tbar.loss { animation: barLoss .5s; }
@keyframes barGain { 30% { box-shadow: 0 0 0 4px #3ddc97; transform: scaleY(1.6); } }
@keyframes barLoss { 30% { box-shadow: 0 0 0 4px var(--coral); transform: translateX(-4px) scaleY(1.4); } 60% { transform: translateX(4px); } }

.key-in { animation: keyIn .35s cubic-bezier(.3,1.6,.5,1) var(--d, 0ms) backwards; }
@keyframes keyIn { from { transform: translateY(12px) scale(.9); opacity: 0; } }
.key.yes { background: #3ddc97 !important; transform: scale(1.06) rotate(-2deg); }
.key.yes::after { content: " ✓"; }
.key:disabled.yes { opacity: 1; }
.odd-grid .cell, .letter { animation: born .4s cubic-bezier(.3,1.7,.5,1) var(--d, 0ms) backwards; }
.tile.hint .face { animation: hint .9s ease-in-out 2; background: #fff3c4; }
@keyframes hint { 20%, 60% { transform: rotate(-8deg) scale(1.06); } 40%, 80% { transform: rotate(8deg) scale(1.06); } }
.hole.up:not(.bomb) .critter { animation: peek .5s ease-in-out infinite alternate; }
@keyframes peek { from { rotate: -9deg; } to { rotate: 9deg; } }
.hole.bomb.up .critter { animation: fizz .18s linear infinite; }
@keyframes fizz { 50% { translate: 1px -1px; } }
.toy-foot { flex-wrap: wrap; }

/* ---------- playful text ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.harp { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.harp .wd { display: inline-block; white-space: nowrap; }
.harp .ch { cursor: default; }
.ch.boing { animation: boing .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes boing { 30% { transform: translateY(-.28em) scale(1.15) rotate(var(--r, -8deg)); color: var(--gold); } }
.w { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--gold) 70%, transparent) 62%) no-repeat 0 0 / 0% 100%; transition: background-size .3s ease; border-radius: 3px; }
.w:hover { background-size: 100% 100%; }
.w.hop { display: inline-block; animation: hop .4s cubic-bezier(.3,1.8,.5,1); }
@keyframes hop { 40% { transform: translateY(-.35em) rotate(-4deg); } }
.kicker { cursor: default; }
.sticker { cursor: pointer; }
.sticker.spin { animation: stickerSpin .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes stickerSpin { to { rotate: 360deg; } }
.chips li { transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.chips li:hover { transform: translateY(-3px) rotate(-3deg); }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { transition: color .2s; }
.marquee span:hover { color: var(--gold); }

/* ---------- why play ---------- */
.why { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 64px) 0; max-width: 1180px; margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-top: 36px; }
.why-card { background: #fffaf1; border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: 6px 6px 0 var(--ink); transition: transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.why-card:nth-child(odd) { rotate: -.8deg; }
.why-card:nth-child(even) { rotate: .8deg; }
.why-card:hover { transform: translateY(-6px); box-shadow: 10px 12px 0 var(--ink); }
.why-card h3 { font: 800 1.35rem/1.1 var(--display); margin: 6px 0 10px; }
.why-card p { margin: 0 0 12px; line-height: 1.5; }
.why-num { font: 900 clamp(2.4rem, 5vw, 3.4rem)/1 var(--display); color: var(--coral); letter-spacing: -.03em; }
.why-card:nth-child(2) .why-num { color: var(--plum); }
.why-card:nth-child(3) .why-num { color: var(--teal); }
.why-card:nth-child(4) .why-num { color: #3557ff; }
.why-fine { background: var(--gold); border-style: dashed; }
.why-fine .why-num { color: var(--ink); }
.src { font-size: .78rem; opacity: .7; margin: 0 !important; }
.why-skills { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.why-skills li { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; background: var(--paper); font-size: .92rem; transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.why-skills li:hover { transform: translateY(-3px) rotate(2deg); }
.why-skills b { font-family: var(--display); margin-right: 4px; }

/* ---------- hidden games ---------- */
.toy-night { background: #141a4d radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 78% 12%, #fff 50%, transparent 52%), radial-gradient(2px 2px at 64% 72%, #ffc531 50%, transparent 52%), radial-gradient(1.5px 1.5px at 30% 86%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 90% 52%, #fff 50%, transparent 52%); background-color: #141a4d; color: var(--paper); box-shadow: 10px 10px 0 var(--gold); }
.dot.secret { box-shadow: 0 0 0 3px var(--gold); }
.dot.secret.on { box-shadow: inset 0 0 0 3px var(--hue), 0 0 0 3px var(--gold); }
.secrets { font-style: italic; }
.secrets b { font-style: normal; color: var(--coral); }
.secrets.all b { color: var(--teal); }
.brand { -webkit-tap-highlight-color: transparent; }
.marquee i { cursor: default; display: inline-block; }
.qd-pad { width: 100%; min-height: 220px; border: 2px solid var(--paper); border-radius: 22px; background: #ff6b4a; color: #fff; font: 900 clamp(1.4rem, 4vw, 2rem)/1.1 var(--display); cursor: pointer; transition: background .12s, transform .12s; }
.qd-pad.go { background: #3ddc97; color: var(--ink); transform: scale(1.03); }
.qd-pad:disabled { cursor: default; }
.song-grid { width: 100%; max-width: 270px; align-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.song-pad { aspect-ratio: 1; border: 2px solid var(--paper); border-radius: 50% 50% 22px 22px; background: color-mix(in srgb, var(--c) 45%, #141a4d); font-size: 2.6rem; cursor: pointer; filter: saturate(.7); transition: transform .15s; }
.song-pad:not(:disabled):active { transform: scale(.94); }
.song-pad.lit { animation: sing .35s cubic-bezier(.3,1.8,.5,1); }
@keyframes sing { 35% { background: var(--c); filter: none; transform: scale(1.1) rotate(-6deg); box-shadow: 0 0 28px 6px var(--c); } }
.song-pad.miss { background: var(--coral); }
.lo-grid { width: 100%; max-width: 320px; align-self: center; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lo { aspect-ratio: 1; border: 2px solid #3a4290; border-radius: 14px; background: #232a66; cursor: pointer; transition: background .2s, box-shadow .2s, transform .15s; }
.lo.on { background: var(--gold); border-color: #fff3c4; box-shadow: 0 0 18px 4px rgba(255, 197, 49, .6); }
.lo:not(:disabled):active { transform: scale(.92); }
.lo.born { animation: born .4s cubic-bezier(.3,1.7,.5,1) var(--d, 0ms) backwards; }
@media (prefers-reduced-motion: reduce) { .ch.boing, .w.hop, .sticker.spin, .song-pad.lit { animation-duration: .01s; } }

/* ---------- blog and news ---------- */
.read { padding: clamp(56px, 8vw, 110px) clamp(16px, 5vw, 64px) 0; max-width: 1180px; margin: 0 auto; }
.read .section-sub a { font-weight: 700; }
.post-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.post-card { background: #fffaf1; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--ink); display: flex; flex-direction: column; transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s; }
.post-card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 8px 10px 0 var(--coral); }
.post-card > a { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 10px; color: inherit; text-decoration: none; flex: 1; }
.post-card > a b { font: 800 1.25rem/1.15 var(--display); letter-spacing: -.01em; }
.post-card > a span:last-child { color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }
.post-card-meta { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); }
.post-card.empty { padding: 20px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 18px; margin: 0; }
.tags li { font-size: .75rem; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; }
.sub main { padding: 0 clamp(16px, 5vw, 64px); }
.post-index { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) 0; }
.post { max-width: 700px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 24px; }
.crumbs { font-size: .9rem; margin-bottom: 18px; }
.crumbs a { color: inherit; }
.post-meta { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); margin: 0 0 10px; }
.post-title { font: 800 clamp(2.1rem, 6vw, 3.4rem)/1.05 var(--display); letter-spacing: -.03em; margin: 0 0 14px; font-variation-settings: "SOFT" 100, "WONK" 1; }
.post-lede { font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 28px; }
.post-body { font-size: 1.08rem; line-height: 1.7; }
.post-body h2 { font: 800 1.6rem/1.2 var(--display); margin: 2em 0 .5em; }
.post-body h3 { font: 700 1.25rem/1.3 var(--display); margin: 1.6em 0 .4em; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.1em; }
.post-body li { margin-bottom: .35em; }
.post-body a { color: inherit; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a.app-link { background: color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 4px; padding: 0 3px; text-decoration: none; font-weight: 700; }
.post-body blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 5px solid var(--teal); background: #fffaf1; border-radius: 0 12px 12px 0; font: italic 600 1.2rem/1.45 var(--display); }
.post-body blockquote p { margin: 0; }
.post .tags { padding: 16px 0 0; }
.post-source { font-size: .9rem; border-top: 2px dashed var(--ink); padding-top: 14px; margin-top: 28px; }
.post-cta { max-width: 700px; margin: 12px auto 0; padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--teal); box-shadow: 8px 8px 0 var(--ink); display: grid; gap: 14px; }
.post-cta h2 { font: 800 1.5rem/1 var(--display); margin: 0; }
.app-card { display: flex; gap: 14px; align-items: center; background: #fffaf1; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; color: inherit; text-decoration: none; transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.app-card:hover { transform: translateY(-3px) rotate(-1deg); }
.app-card img { border-radius: 14px; flex: none; }
.app-card span { display: flex; flex-direction: column; gap: 3px; }
.app-card small { color: var(--ink-soft); }
.app-card i { font-style: normal; font-weight: 700; color: var(--coral); }
.post-cta .btn { justify-self: start; }
.related { max-width: 1180px; margin: 0 auto; padding: 56px 0 72px; }
.related h2 { font: 800 1.8rem/1 var(--display); text-align: center; margin: 0; }
.post-meta a { color: inherit; }
.post-how { font-size: .85rem; color: var(--ink-soft); background: #fffaf1; border: 1.5px dashed var(--ink); border-radius: 12px; padding: 10px 14px; margin-top: 22px; }
.post-sisters { max-width: 700px; margin: 28px auto 0; padding: 20px 24px; border: 2px dashed var(--ink); border-radius: var(--radius); display: grid; gap: 12px; }
.post-sisters h2 { font: 800 1.3rem/1 var(--display); margin: 0; }
.sister-card { display: flex; flex-direction: column; gap: 3px; background: #fffaf1; border: 2px solid var(--ink); border-radius: 16px; padding: 12px 14px; color: inherit; text-decoration: none; transition: transform .2s cubic-bezier(.3,1.8,.5,1); }
.sister-card:hover { transform: translateY(-3px) rotate(-1deg); }
.sister-card small { color: var(--ink-soft); }
.sister-card i { font-style: normal; font-weight: 700; color: var(--coral); }
