/* 腦細猜猜猜 landing page. Colours, shapes and motion follow the game (design/main-screen). */
:root {
  --cream: #FFF6E3; --dots: #FBE9C8; --ink: #5A3E2B; --soft: #A88663; --body: #7D5F45;
  --line: #F2DBAE; --edge: #E6C48A; --white: #FFFFFF;
  --tray: #FFE7BA; --tray-hi: #FFF3DA; --hole: #F6D9A2; --slot: #F4DDB2;
  --tile: #FFFDF7; --tile-line: #F3DFB6; --tile-edge: #E0BB7E;
  --sun: #FFCC4D; --sun-e: #E2A21C; --sun-ink: #7A4E0E; --sun-line: #F5C64F;
  --coral: #FF8F7E; --coral-e: #DD5E4D; --coral-bg: #FFE1DC; --coral-line: #F4A79B;
  --sky: #5FB8EC; --sky-e: #3584BF;
  --leaf: #8BC867; --leaf-e: #5E9E3C; --leaf-ink: #4A8A2A; --leaf-line: #7AB957;
  --grape: #A58BDD; --grape-e: #7B5BB5; --grape-bg: #F3ECFD; --grape-ink: #6A4BAA;
  --violet: #7F51F5; --violet-e: #5B33C9;
  --mint: #4CC3A5; --mint-e: #2E9A80;
  --gold: #F4900C; --bezel: #2A211C;
  --f-num: "Fredoka", "Chiron GoRound TC", "PingFang TC", "Noto Sans TC", sans-serif;
  --f-zh: "Chiron GoRound TC", "PingFang TC", "Noto Sans TC", "Fredoka", sans-serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cg fill='%23FBE9C8'%3E%3Ccircle cx='18' cy='22' r='3'/%3E%3Ccircle cx='100' cy='88' r='3'/%3E%3Cpath d='M72 12h4V7h4v5h5v4h-5v5h-4v-5h-4z'/%3E%3Cpath d='M32 98l3.5 6.5 7 1-5 5 1.2 7-6.7-3.4-6.7 3.4 1.2-7-5-5 7-1z'/%3E%3Cpath d='M120 36l4 4-4 4-4-4z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; overflow-x: hidden; color: var(--ink); font-family: var(--f-zh); font-weight: 500;
  background: var(--cream) var(--pattern); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.em { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; }
button { all: unset; box-sizing: border-box; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 12px; }
.num { font-family: var(--f-num); font-weight: 600; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.center { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 34px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 68px; display: flex; align-items: center; gap: 14px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2)); transition: background .25s, box-shadow .25s;
}
.nav.solid { background: rgba(255, 246, 227, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 3px 0 rgba(230, 196, 138, .45); }
.nav-logo img { height: 48px; width: auto; transition: transform .2s; }
.nav-logo:hover img { transform: rotate(-3deg) scale(1.04); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 14px; font-size: 16px; font-weight: 700; text-decoration: none; color: var(--body); }
.nav-links a:hover { background: var(--white); color: var(--ink); box-shadow: 0 3px 0 var(--edge); }
.round {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--white);
  border: 2.5px solid var(--line); box-shadow: 0 3px 0 var(--edge); font-size: 22px;
}
.round:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.round .off, .round[aria-pressed="false"] .on { display: none; }
.round[aria-pressed="false"] .off { display: block; }
.round .em { display: block; vertical-align: 0; }
.nav-cta {
  height: 44px; display: grid; place-items: center; padding: 0 18px; border-radius: 22px; background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-e); color: var(--white); font-size: 16px; font-weight: 700; text-decoration: none;
  text-shadow: 0 1.5px 0 var(--coral-e); white-space: nowrap;
}
.nav-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-e); }

/* ---------- hero ---------- */
.hero {
  max-width: 1180px; margin: 0 auto; padding: 24px 20px 90px; display: grid; grid-template-columns: 1fr 400px;
  align-items: center; gap: 56px;
}
.hero-logo { margin: 0; }
.hero-logo img { width: min(100%, 560px); filter: drop-shadow(0 8px 0 rgba(230, 196, 138, .55)); animation: float 5s ease-in-out infinite; transform-origin: 40% 60%; }
.hero-title { margin: 26px 0 0; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; line-height: 1.15; letter-spacing: .01em; }
.hero-title em { font-style: normal; color: var(--coral-e); }
.hero-sub { margin: 16px 0 0; max-width: 520px; text-wrap: pretty; font-size: 19px; line-height: 1.75; color: var(--body); }
.hero-sub b { color: var(--ink); font-size: 1.15em; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.store {
  position: relative; min-width: 178px; height: 64px; display: flex; flex-direction: column; justify-content: center;
  padding: 0 22px; border-radius: 20px; background: var(--bezel); box-shadow: 0 5px 0 #000; color: var(--white);
  text-decoration: none; transition: transform .1s;
}
.store small { font-size: 12px; font-weight: 700; color: #CDBBA8; letter-spacing: .08em; }
.store b { font-family: var(--f-num); font-size: 24px; font-weight: 600; line-height: 1.1; }
.store::after {
  content: "即將推出"; position: absolute; top: -12px; right: -10px; height: 26px; display: grid; place-items: center;
  padding: 0 10px; border-radius: 13px; background: var(--sun); box-shadow: 0 3px 0 var(--sun-e); color: var(--sun-ink);
  font-size: 12px; font-weight: 700; transform: rotate(8deg);
}
a.store:hover { transform: translateY(-2px) rotate(-1deg); }
.perks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 15px; font-weight: 700; color: var(--body); }
.perks .em { width: 22px; height: 22px; margin-right: 4px; vertical-align: -5px; }

.hero-play { position: relative; justify-self: center; }
.floaters span {
  position: absolute; left: var(--x); top: var(--y); width: calc(54px * var(--z)); height: calc(54px * var(--z)); z-index: 0;
  animation: bob 4s ease-in-out infinite; animation-delay: var(--d); translate: var(--px, 0) var(--py, 0); transition: translate .5s ease-out;
}
.floaters .em { width: 100%; height: 100%; filter: drop-shadow(0 4px 0 rgba(160, 110, 40, .15)); }
.try {
  position: absolute; z-index: 3; left: -150px; top: 250px; display: flex; flex-direction: column; align-items: center;
  padding: 10px 16px; border-radius: 18px; background: var(--coral); box-shadow: 0 4px 0 var(--coral-e);
  color: var(--white); font-size: 20px; font-weight: 700; transform: rotate(-9deg); text-shadow: 0 2px 0 var(--coral-e);
  animation: nudge 2.4s ease-in-out infinite;
}
.try i { position: absolute; right: -44px; top: 50%; width: 38px; height: 38px; margin-top: -19px; animation: point 1.2s ease-in-out infinite; }
.try i .em { width: 100%; height: 100%; }

/* the phone: the game's bezel and screen, holding the playable demo */
.phone { position: relative; z-index: 2; padding: 12px; border-radius: 58px; background: var(--bezel); box-shadow: 0 40px 70px -30px rgba(70, 45, 20, .5), 0 0 0 3px #4A3B31 inset; }
.screen {
  position: relative; width: 376px; height: 724px; border-radius: 46px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--cream) var(--pattern); user-select: none; -webkit-user-select: none;
}

.g-top { height: 64px; flex: none; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 20px 4px 16px; }
.g-logo { height: 50px; width: auto; }
.g-demo { height: 28px; display: grid; place-items: center; padding: 0 12px; border-radius: 14px; background: var(--grape); box-shadow: 0 3px 0 var(--grape-e); color: var(--white); font-size: 13px; font-weight: 700; }
.g-card { position: relative; flex: none; margin: 18px 16px 0; padding: 10px 12px 12px; border-radius: 30px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--edge); }
.g-card.pop { animation: pop .4s; }
.g-head { height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 4px 54px; }
.g-no { font-size: 15px; font-weight: 700; color: var(--soft); }
.g-no span { font-family: var(--f-num); font-weight: 600; font-size: 19px; }
.cat {
  position: relative; min-width: 76px; height: 28px; display: inline-grid; place-items: center; padding: 0 12px; overflow: hidden;
  border-radius: 14px; background: #FFF1C7; color: #8A5A0E; font-size: 14px; font-weight: 700;
}
.cat .label { grid-area: 1 / 1; visibility: hidden; white-space: nowrap; }
.cat .mask {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  background: repeating-linear-gradient(135deg, var(--sun) 0 6px, #FFDC70 6px 12px); color: var(--sun-ink);
  font-size: 14px; letter-spacing: .1em; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}
.cat.open .label { visibility: visible; }
.cat.open .mask { display: none; }
.cat.flip { animation: flip .56s cubic-bezier(.4, 0, .2, 1); }
.cat.big { height: 36px; min-width: 110px; border-radius: 18px; font-size: 17px; }
.cat.big .mask { font-size: 17px; }

.lvstar { --p: 0; position: absolute; left: -20px; top: -20px; width: 85px; height: 85px; z-index: 2; }
.lvstar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lvstar path { fill: none; stroke-linejoin: round; }
.lvstar .sh { stroke: #D9A441; stroke-width: 19; }
.lvstar .track { stroke: #E6CF9C; stroke-width: 19; }
.lvstar .rim { stroke: #FF8A1F; stroke-width: 19; stroke-dasharray: calc(var(--p) * 1px) 300px; transition: stroke-dasharray .7s cubic-bezier(.3, 1.5, .5, 1); }
.lvstar .face { fill: #FFC93D; stroke: #FFC93D; stroke-width: 8; }
.lvstar b { position: absolute; left: 0; right: 0; top: 31px; text-align: center; font-family: var(--f-num); font-weight: 700; font-size: 28px; line-height: 30px; color: var(--white); text-shadow: 0 2px 0 #C47A08, 0 0 3px rgba(196, 122, 8, .5); }
.lvstar.up { animation: levelup .9s cubic-bezier(.3, 1.4, .5, 1); }

.clue { height: 132px; display: flex; align-items: center; justify-content: center; gap: 14px; border-radius: 22px; background: var(--cream); }
.clue .em { width: var(--esz, 72px); height: var(--esz, 72px); animation: bob 3s ease-in-out infinite; }
.clue .em:nth-child(2) { animation-delay: -.5s; } .clue .em:nth-child(3) { animation-delay: -1s; } .clue .em:nth-child(4) { animation-delay: -1.5s; }

.g-mid { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; padding: 6px 0 4px; }
.g-msg { grid-row: 1; align-self: end; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; font-size: 15px; font-weight: 700; color: var(--soft); text-align: center; line-height: 1.35; }
.g-msg.win { font-size: 24px; color: var(--leaf-ink); }
.g-msg .em { width: 26px; height: 26px; }
.slots { grid-row: 2; display: flex; gap: 8px; }
.s {
  --sz: 56px; width: var(--sz); height: var(--sz); display: grid; place-items: center; border-radius: 15px; background: var(--slot);
  border: 2px solid transparent; box-shadow: inset 0 3px 0 rgba(160, 110, 40, .13); font-size: 30px; font-weight: 700; line-height: 1; color: var(--ink); cursor: pointer;
}
.s.f { background: var(--white); border-color: var(--line); box-shadow: 0 4px 0 var(--edge); }
.s.l { background: #FFE08A; border-color: var(--sun-line); box-shadow: 0 4px 0 var(--sun-e); cursor: default; }
.s.bad { background: var(--coral-bg); border-color: var(--coral-line); box-shadow: 0 4px 0 #E58A7C; }
.s.ok { background: var(--leaf); border-color: var(--leaf-line); box-shadow: 0 4px 0 var(--leaf-e); color: var(--white); animation: pop .45s backwards; animation-delay: calc(var(--i) * 60ms); }
.s.land { animation: land .24s ease-out; }
.slots.sh { animation: sh .38s; }

.g-tray { flex: none; padding: 16px 16px 26px; border-radius: 34px 34px 0 0; background: var(--tray); box-shadow: inset 0 3px 0 var(--tray-hi); }
.items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.item {
  --b: var(--sun); --e: var(--sun-e); --c: var(--sun-ink); --n: var(--sun-ink);
  position: relative; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 20px; background: var(--b); color: var(--c); box-shadow: 0 5px 0 var(--e); font-size: 14px; font-weight: 700; line-height: 1.1;
  transition: transform .08s, box-shadow .08s;
}
.item:active, .item.press { transform: translateY(4px); box-shadow: 0 1px 0 var(--e); }
.item b { font-weight: 700; text-shadow: 0 1.5px 0 var(--e); }
.item .ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--white); }
.item .ic img { width: 23px; height: 23px; }
.item .count {
  position: absolute; top: -10px; right: -9px; min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 7px;
  border-radius: 14px; background: var(--white); border: 2.5px solid var(--e); color: var(--n); font-family: var(--f-num); font-size: 14px; font-weight: 700; line-height: 1;
}
.item.reveal { --b: var(--sun); --e: var(--sun-e); --c: var(--sun-ink); --n: var(--sun-ink); }
.item.fill { --b: var(--mint); --e: var(--mint-e); --c: var(--white); --n: #1F7A63; }
.item.trash { --b: var(--coral); --e: var(--coral-e); --c: var(--white); --n: #C2463A; }
.item.skip { --b: var(--sky); --e: var(--sky-e); --c: var(--white); --n: #2B6EA3; }
.item.empty { --b: #F1E3C8; --e: #DCC69E; --c: #B39672; }
.item.empty b { text-shadow: none; }
.item.empty .ic { opacity: .5; filter: grayscale(.7); }
.item.empty .count { background: var(--leaf); border-color: var(--white); color: var(--white); box-shadow: 0 2px 0 var(--leaf-e); }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px 5px; margin-top: 16px; }
.t {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: var(--tile); border: 2px solid var(--tile-line);
  box-shadow: 0 4px 0 var(--tile-edge); font-size: 26px; font-weight: 700; line-height: 1; color: var(--ink); transition: transform .06s;
}
.t:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tile-edge); }
.t.used { background: var(--hole); border-color: transparent; box-shadow: inset 0 3px 0 rgba(160, 110, 40, .16); color: transparent; pointer-events: none; }
.t.gone { background: transparent; border: 2px dashed var(--hole); box-shadow: none; color: transparent; pointer-events: none; }
.t.poof { animation: poof .35s ease-in forwards; }
.screen.busy .tiles, .screen.busy .slots, .screen.busy .items { pointer-events: none; }
.g-done { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: rgba(70, 45, 22, .45); }
.g-done.show { animation: fade .25s ease-out; }
.g-done.show .g-done-card { animation: pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.g-done-card { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px 22px; border-radius: 32px; background: var(--cream); border: 4px solid var(--white); box-shadow: 0 8px 0 var(--edge); text-align: center; }
.g-done-art .em { width: 72px; height: 72px; animation: bob 2.4s ease-in-out infinite; }
.g-done-card h3 { margin: 4px 0 0; font-size: 26px; font-weight: 700; }
.g-done-card p { margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: var(--body); }
.g-done-card .chunky { justify-content: center; width: 100%; text-decoration: none; }
.again { margin-top: 6px; padding: 8px 14px; border-radius: 14px; font-size: 15px; font-weight: 700; color: var(--soft); }
.again:hover { color: var(--ink); background: var(--white); }
@keyframes fade { from { opacity: 0; } }
.fly { position: fixed; z-index: 60; display: grid; place-items: center; border-radius: 14px; background: var(--white); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--edge); font-weight: 700; line-height: 1; color: var(--ink); pointer-events: none; font-family: var(--f-zh); }

/* ---------- tapes ---------- */
.tapes { position: relative; height: 210px; margin: -20px 0 10px; overflow: hidden; }
.tape { position: absolute; left: -5%; width: 110%; height: 78px; display: flex; align-items: center; overflow: hidden; }
.tape.a { top: 38px; transform: rotate(-3deg); background: var(--sun); box-shadow: 0 6px 0 var(--sun-e); z-index: 1; }
.tape.b { top: 96px; transform: rotate(2.4deg); background: var(--violet); box-shadow: 0 6px 0 var(--violet-e); }
.tape-run { display: flex; gap: 22px; padding-left: 22px; white-space: nowrap; animation: run 60s linear infinite; will-change: transform; }
.tape.b .tape-run { animation-direction: reverse; animation-duration: 70s; }
.chip { flex: none; height: 52px; display: flex; align-items: center; gap: 4px; padding: 0 14px; border-radius: 18px; background: var(--white); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.chip .em { width: 34px; height: 34px; }
.chip q { quotes: none; margin-left: 6px; padding: 0 8px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: repeating-linear-gradient(135deg, var(--sun) 0 5px, #FFDC70 5px 10px); color: var(--sun-ink); font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.tape.b .chip { background: #F3ECFD; }
.star-sep { flex: none; width: 26px; height: 26px; align-self: center; }

/* ---------- sections ---------- */
.sec { position: relative; max-width: 1180px; margin: 0 auto; padding: 90px 20px; }
.sec.sand, .sec.grape { max-width: none; padding-inline: max(20px, calc((100vw - 1140px) / 2)); }
.sec.sand { background: var(--tray); box-shadow: inset 0 4px 0 var(--tray-hi); border-radius: 56px; margin-inline: 12px; }
.h2 { margin: 0; text-align: center; font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.h2.small { font-size: clamp(24px, 2.6vw, 32px); }
.kicker {
  display: table; margin: 0 auto 14px; padding: 6px 16px; border-radius: 16px; background: var(--ink); color: var(--white);
  font-size: 16px; font-weight: 700; letter-spacing: .12em; transform: rotate(-2deg);
}
.lead { margin: 14px auto 0; max-width: 560px; text-align: center; font-size: 18px; line-height: 1.7; color: var(--body); }

/* how to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin: 52px 0 0; padding: 0; list-style: none; }
.step { position: relative; padding: 26px 26px 30px; border-radius: 32px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 7px 0 var(--edge); text-align: center; }
.step:nth-child(1) { transform: rotate(-1.2deg); } .step:nth-child(3) { transform: rotate(1.2deg); }
.step h3 { margin: 18px 0 8px; font-size: 24px; font-weight: 700; }
.step p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--body); text-wrap: pretty; }
.step-n { position: absolute; top: -18px; left: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); box-shadow: 0 4px 0 var(--coral-e); border: 3px solid var(--white); color: var(--white); font-family: var(--f-num); font-size: 22px; font-weight: 700; }
.step-art { position: relative; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-radius: 22px; background: var(--cream); }
.mini-clue { display: flex; gap: 14px; }
.mini-clue .em { width: 64px; height: 64px; animation: bob 3s ease-in-out infinite; }
.mini-clue .em + .em { animation-delay: -1.2s; }
.mini-clue.sm .em { width: 40px; height: 40px; }
.mini-slots, .mini-tiles { display: flex; gap: 6px; }
.mini-slots i, .mini-tiles i {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-style: normal; font-size: 23px; font-weight: 700;
  background: var(--white); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--edge);
}
.mini-slots i:empty { background: var(--slot); border-color: transparent; box-shadow: inset 0 3px 0 rgba(160, 110, 40, .13); }
.mini-tiles i { width: 36px; height: 36px; font-size: 19px; border-radius: 10px; background: var(--tile); border-color: var(--tile-line); box-shadow: 0 3px 0 var(--tile-edge); }
.mini-tiles i.gone { background: var(--hole); border-color: transparent; box-shadow: inset 0 3px 0 rgba(160, 110, 40, .16); color: transparent; }
.mini-slots.ok i { background: var(--leaf); border-color: var(--leaf-line); box-shadow: 0 3px 0 var(--leaf-e); color: var(--white); animation: okloop 3.2s infinite; }
.mini-slots.ok i:nth-child(2) { animation-delay: .08s; } .mini-slots.ok i:nth-child(3) { animation-delay: .16s; }
.mini-slots i.l { background: #FFE08A; border-color: var(--sun-line); box-shadow: 0 3px 0 var(--sun-e); }
.mini-slots i.g { background: var(--leaf); border-color: var(--leaf-line); box-shadow: 0 3px 0 var(--leaf-e); color: var(--white); }
.art-pick .drop { animation: dropin 3.2s infinite; }
.art-pick .press { animation: pressloop 3.2s infinite; }
.art-pick .tap { position: absolute; right: 22%; bottom: 2px; width: 40px; height: 40px; animation: taploop 3.2s infinite; }
.art-pick .tap .em { width: 100%; height: 100%; }
.mini-star { position: absolute; top: 14px; right: 18%; width: 46px; height: 46px; animation: spin 3.2s infinite; }
.mini-star .em { width: 100%; height: 100%; }

/* scratch cards */
.scratch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.scard { position: relative; padding: 18px 18px 18px; border-radius: 28px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--edge); animation: pop .4s backwards; }
.scard:nth-child(2n) { animation-delay: .06s; } .scard:nth-child(3n) { animation-delay: .12s; }
.scard .sclue { height: 92px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 18px; background: var(--cream); }
.scard .sclue .em { width: var(--sesz, 52px); height: var(--sesz, 52px); }
.sans { position: relative; height: 60px; margin-top: 12px; border-radius: 16px; overflow: hidden; background: var(--leaf); box-shadow: 0 4px 0 var(--leaf-e); }
.sans b { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 8px; color: var(--white); font-size: 24px; font-weight: 700; letter-spacing: .06em; text-shadow: 0 2px 0 var(--leaf-e); white-space: nowrap; }
.sans canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .4s; }
.sans canvas.gone { opacity: 0; pointer-events: none; }
.scard.done .sans { animation: pop .4s; }
.score { height: 52px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 26px; background: var(--white); border: 2.5px solid var(--line); font-size: 17px; font-weight: 700; color: var(--body); }
.score b { margin: 0 4px; font-family: var(--f-num); font-weight: 700; color: var(--ink); font-size: 20px; }

.chunky {
  height: 56px; display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; border-radius: 22px; font-size: 19px; font-weight: 700;
  background: var(--b); box-shadow: 0 6px 0 var(--e); color: var(--c); text-shadow: 0 2px 0 var(--e); transition: transform .08s, box-shadow .08s;
}
.chunky:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--e); }
.chunky .em { width: 26px; height: 26px; }
.chunky.white { --b: var(--white); --e: #D9CBF4; --c: var(--grape-ink); text-shadow: none; }
.chunky.coral { --b: var(--coral); --e: var(--coral-e); --c: var(--white); text-decoration: none; }

/* items */
.powers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.power { padding: 22px 18px 24px; border-radius: 30px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--edge); text-align: center; }
.power .item { width: 92px; margin: -52px auto 0; animation: hover 2.4s ease-in-out infinite; }
.power:nth-child(2) .item { animation-delay: -.6s; } .power:nth-child(3) .item { animation-delay: -1.2s; } .power:nth-child(4) .item { animation-delay: -1.8s; }
.power .item:active { animation: none; }
.power h3 { margin: 16px 0 6px; font-size: 22px; font-weight: 700; }
.power p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--body); }
.stage { height: 118px; margin-top: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: 20px; background: var(--cream); }
.power .mini-tiles i.poof { animation: poof .35s ease-in forwards; }
.power .mini-slots i.land { animation: land .26s ease-out; }
.power.reveal { border-color: #FFE7A3; } .power.fill { border-color: #BDEBDD; } .power.trash { border-color: #FFCFC7; } .power.skip { border-color: #C3E5F8; }

/* categories */
.cats-sec { text-align: center; }
.bigcount { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 28px; }
.bigcount b { font-size: clamp(72px, 11vw, 136px); line-height: 1; color: var(--coral); text-shadow: 0 6px 0 var(--coral-e); letter-spacing: .02em; }
.bigcount span { font-size: 22px; font-weight: 700; color: var(--body); }
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 900px; margin: 36px auto 0; padding: 0; list-style: none; }
.cats li {
  height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 10px; border-radius: 29px; background: var(--white);
  border: 2.5px solid var(--line); box-shadow: 0 4px 0 var(--edge); font-size: 17px; font-weight: 700; transition: transform .2s; transform: rotate(var(--r, 0deg));
}
.cats li:hover { transform: rotate(0) scale(1.06); }
.cats li .ce { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); }
.cats li .ce .em { width: 28px; height: 28px; }

/* gift */
.sec.grape { overflow: hidden; background: var(--violet); color: var(--white); border-radius: 56px; margin-inline: 12px; }
.sec.grape .h2, .sec.grape .lead { position: relative; color: var(--white); }
.sec.grape .lead { color: #E7DCFF; min-height: 1.7em; }
.sec.grape .kicker { background: var(--sun); color: var(--sun-ink); }
.rays {
  position: absolute; left: 50%; top: 62%; width: 1600px; height: 1600px; margin: -800px 0 0 -800px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .07) 0 10deg, transparent 10deg 20deg); animation: turn 60s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 60%); mask-image: radial-gradient(circle, #000 0, transparent 60%);
}
.boxes { position: relative; display: flex; justify-content: center; gap: clamp(16px, 5vw, 56px); margin-top: 48px; min-height: 210px; align-items: center; }
.box { position: relative; width: 170px; height: 170px; display: grid; place-items: center; border-radius: 40px; transition: transform .3s, opacity .3s; animation: hover 2.6s ease-in-out infinite; }
.box:nth-child(2) { animation-delay: -.8s; } .box:nth-child(3) { animation-delay: -1.6s; }
.box .lid .em { width: 140px; height: 140px; filter: drop-shadow(0 10px 0 rgba(40, 10, 90, .35)); }
.box:hover .lid { display: block; animation: wiggle .7s ease-in-out; }
.boxes.picked .box { animation: none; }
.boxes.picked .box:not(.chosen) { opacity: .35; transform: scale(.82); pointer-events: none; }
.box.chosen .lid { animation: shake .7s ease-in-out; }
.box.opened { pointer-events: none; }
.box .prize {
  position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 34px;
  background: var(--b); box-shadow: 0 8px 0 var(--e); border: 4px solid var(--white); color: var(--white); animation: prize .6s cubic-bezier(.3, 1.6, .5, 1);
}
.box .prize .ic { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: var(--white); }
.box .prize .ic img { width: 46px; height: 46px; }
.box .prize b { font-size: 24px; font-weight: 700; text-shadow: 0 2px 0 var(--e); }
.box .prize b span { font-family: var(--f-num); }
.prize.reveal { --b: var(--sun); --e: var(--sun-e); color: var(--sun-ink); } .prize.reveal b { text-shadow: none; }
.prize.fill { --b: var(--mint); --e: var(--mint-e); } .prize.trash { --b: var(--coral); --e: var(--coral-e); } .prize.skip { --b: var(--sky); --e: var(--sky-e); }

/* download */
#download { padding-top: 200px; }
.cta { position: relative; max-width: 760px; margin: 0 auto; }
.cta-card {
  position: relative; z-index: 2; padding: 46px 30px 48px; border-radius: 44px; background: var(--white); border: 4px solid var(--line);
  box-shadow: 0 10px 0 var(--edge); text-align: center;
}
.cta-card h2 { margin: 22px 0 6px; font-size: clamp(34px, 4vw, 48px); font-weight: 700; }
.cta-card p { margin: 0; font-size: 18px; color: var(--body); text-wrap: balance; }
.cta-card .stores { justify-content: center; margin-top: 30px; }
.cta-icon { width: 128px; height: 128px; margin: 0 auto; border-radius: 30px; box-shadow: 0 8px 0 var(--violet-e), 0 0 0 5px var(--white), 0 0 0 8px var(--line); animation: float 4s ease-in-out infinite; }
.boss { position: absolute; z-index: 1; right: 4%; top: -168px; width: 270px; transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); transform: translateY(var(--peek, 60px)); }
.boss img { width: 100%; }
.boss.jump { animation: jump .6s cubic-bezier(.3, 1.4, .5, 1); }
.bubble {
  position: absolute; z-index: 3; right: calc(4% + 230px); top: -170px; max-width: 260px; padding: 14px 18px; border-radius: 22px; background: var(--ink); color: var(--white);
  font-size: 17px; font-weight: 700; line-height: 1.45; opacity: 0; transform: scale(.6) rotate(-4deg); transform-origin: 100% 100%; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none;
}
.bubble::after { content: ""; position: absolute; right: -10px; bottom: 14px; border: 10px solid transparent; border-left-color: var(--ink); border-right: 0; }
.bubble.show { opacity: 1; transform: scale(1) rotate(-4deg); }

/* footer */
.foot { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 30px 20px 60px; text-align: center; }
.foot-logo { width: 160px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.foot-links a { padding: 8px 16px; border-radius: 16px; background: var(--white); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--edge); font-size: 15px; font-weight: 700; text-decoration: none; }
.foot-links a:active { transform: translateY(3px); box-shadow: none; }
.fine { margin: 0; font-size: 13px; line-height: 1.8; color: var(--soft); }

/* effects */
.cf { position: fixed; z-index: 70; width: 9px; height: 13px; border-radius: 3px; pointer-events: none; animation: confetti 1.1s cubic-bezier(.15, .7, .4, 1) forwards; }
.rain { position: fixed; top: -60px; z-index: 80; width: 44px; height: 44px; pointer-events: none; animation: rain linear forwards; }
.rain .em { width: 100%; height: 100%; }

@keyframes bob { 50% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes hover { 50% { transform: translateY(-10px); } }
@keyframes point { 50% { transform: translateX(6px); } }
@keyframes nudge { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(-5deg) translateX(6px); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes land { 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes sh { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes flip { 0% { transform: perspective(200px) rotateX(0); } 49.9% { transform: perspective(200px) rotateX(90deg) scale(1.08); } 50% { transform: perspective(200px) rotateX(-90deg) scale(1.08); } 100% { transform: perspective(200px) rotateX(0); } }
@keyframes poof { to { transform: scale(.2) rotate(25deg); opacity: 0; } }
@keyframes levelup { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(14deg); } 100% { transform: scale(1); } }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes rain { to { transform: translateY(calc(100vh + 120px)) rotate(var(--r)); } }
@keyframes run { to { transform: translateX(-50%); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes wiggle { 15% { transform: rotate(-7deg) scale(1.06); } 30% { transform: rotate(6deg) scale(1.06); } 45% { transform: rotate(-5deg) scale(1.04); } 60% { transform: rotate(4deg) scale(1.02); } 75% { transform: rotate(-2deg); } }
@keyframes shake { 0%, 100% { transform: none; } 10%, 50%, 90% { transform: rotate(-10deg) scale(1.05); } 30%, 70% { transform: rotate(10deg) scale(1.08); } }
@keyframes prize { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes jump { 40% { transform: translateY(-24px) rotate(-4deg); } 100% { transform: translateY(var(--peek, 60px)); } }
@keyframes dropin { 0%, 30% { opacity: 0; transform: translateY(40px) scale(.7); } 45% { opacity: 1; transform: translateY(0) scale(1.12); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes pressloop { 0%, 20% { transform: none; color: var(--ink); } 28% { transform: translateY(3px); box-shadow: 0 0 0 var(--tile-edge); } 36%, 100% { background: var(--hole); border-color: transparent; box-shadow: inset 0 3px 0 rgba(160, 110, 40, .16); color: transparent; } }
@keyframes taploop { 0% { transform: translate(30px, 30px); opacity: 0; } 15% { opacity: 1; transform: translate(0, 0); } 28% { transform: translate(0, 6px) scale(.9); } 40% { transform: translate(0, 0); opacity: 1; } 55%, 100% { transform: translate(30px, 30px); opacity: 0; } }
@keyframes okloop { 0%, 8% { transform: scale(.7); } 18% { transform: scale(1.14); } 26%, 100% { transform: none; } }
@keyframes spin { 0%, 15% { transform: scale(0) rotate(-90deg); } 30% { transform: scale(1.2) rotate(10deg); } 40%, 100% { transform: none; } }

/* ---------- narrow screens ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 36px; padding-top: 10px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { margin-inline: auto; }
  .stores, .perks { justify-content: center; }
  .try { left: -120px; top: 200px; }
  .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .step:nth-child(n) { transform: none; }
  .powers { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .scratch-grid { grid-template-columns: repeat(2, 1fr); max-width: 680px; margin-inline: auto; }
  .nav-links { display: none; }
  .round { margin-left: auto; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 70px; }
  .nav { height: 60px; gap: 10px; padding: 0 16px; }
  .nav-logo img { height: 40px; }
  .nav-cta { height: 40px; padding: 0 14px; font-size: 15px; }
  .round { width: 40px; height: 40px; font-size: 20px; }
  .hero { padding: 6px 16px 60px; }
  .hero-sub { font-size: 17px; }
  .store { min-width: 150px; height: 58px; padding: 0 16px; }
  .store b { font-size: 20px; }
  .hero-play { width: 100%; }
  .phone { padding: 0; background: none; box-shadow: none; }
  .screen { width: 100%; max-width: 400px; height: auto; margin: 0 auto; border-radius: 34px; border: 3px solid var(--line); box-shadow: 0 8px 0 var(--edge); }
  .g-top { display: none; }  /* the top bar above already shows the logo */
  .g-card { margin-top: 30px; }
  .g-mid { grid-template-rows: auto auto; gap: 8px; padding: 14px 0 22px; }
  .g-msg { grid-row: 1; }
  .slots { grid-row: 2; }
  .g-tray { padding: 14px 12px 18px; border-radius: 28px; }
  .items { gap: 8px; }
  .item { height: 64px; font-size: 13px; }
  .t { font-size: 24px; border-radius: 12px; }
  .s { --sz: 52px; font-size: 28px; }
  .try { left: auto; right: 6px; top: -30px; font-size: 16px; padding: 8px 12px; }
  .try i { display: none; }
  .floaters { display: none; }
  .sec { padding: 64px 16px; }
  .sec.sand, .sec.grape { margin-inline: 0; border-radius: 36px; padding-inline: 16px; }
  .scratch-grid { grid-template-columns: 1fr; gap: 18px; }
  .powers { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .tapes { height: 170px; }
  .tape { height: 64px; }
  .tape.a { top: 30px; } .tape.b { top: 80px; }
  .chip { height: 44px; } .chip .em { width: 28px; height: 28px; }
  .box { width: 100px; height: 100px; border-radius: 28px; }
  .box .lid .em { width: 86px; height: 86px; }
  .box .prize { inset: 0; border-radius: 26px; border-width: 3px; gap: 4px; }
  .box .prize .ic { width: 44px; height: 44px; } .box .prize .ic img { width: 28px; height: 28px; }
  .box .prize b { font-size: 16px; }
  .boxes { min-height: 140px; gap: 14px; }
  #download { padding-top: 150px; }
  .boss { width: 180px; top: -112px; right: 2%; }
  .bubble { right: auto; left: 0; top: -150px; max-width: 200px; font-size: 15px; }
  .bubble::after { display: none; }
  .cta-card { padding: 36px 18px 40px; border-radius: 34px; }
  .cats li { height: 50px; font-size: 15px; padding-right: 14px; }
  .cats li .ce { width: 34px; height: 34px; } .cats li .ce .em { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tape-run { animation: none; }
  .cf, .rain { display: none; }
}

/* ---------- inner pages (privacy, support, 404) ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 30px 20px 40px; }
.doc { padding: 40px 44px 46px; border-radius: 40px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 8px 0 var(--edge); }
.doc h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 700; }
.doc .updated { margin: 8px 0 0; font-size: 14px; color: var(--soft); }
.doc h2 { margin: 34px 0 10px; font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.doc h2 .em { width: 28px; height: 28px; }
.doc p, .doc li { font-size: 16px; line-height: 1.85; color: var(--body); }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 1.3em; }
.doc a { color: var(--grape-ink); font-weight: 700; }
.doc a.chunky { color: var(--c); max-width: 100%; padding: 0 20px; font-size: 17px; }
.doc b { color: var(--ink); }
.faq { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: 22px; background: var(--cream); border: 2px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 17px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sun); box-shadow: 0 3px 0 var(--sun-e); color: var(--sun-ink); font-family: var(--f-num); font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary .em { width: 30px; height: 30px; flex: none; }
.faq details p { margin: 0; padding: 0 22px 18px 62px; }
.mail { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 26px; border-radius: 28px; background: var(--grape-bg); text-align: center; }
.mail p { margin: 0; width: 100%; color: var(--grape-ink); font-weight: 700; }
.lost { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; text-align: center; }
.lost .clue { width: min(100%, 360px); height: 140px; gap: 18px; background: var(--white); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--edge); border-radius: 30px; }
.lost h1 { margin: 16px 0 0; font-size: clamp(30px, 5vw, 44px); }
.lost p { margin: 0; font-size: 18px; color: var(--body); }
.lost .slots { margin: 6px 0 18px; }
.lost .s { cursor: default; }
@media (max-width: 640px) {
  .page { padding: 16px 12px 30px; }
  .doc { padding: 28px 20px 32px; border-radius: 30px; }
  .faq details p { padding: 0 18px 16px 18px; }
}
