/* Tiny Clicks — bright, soft, chunky. */
:root {
  --sky: #bfe9ff;
  --sky-2: #e6f7ff;
  --sun: #ffd84d;
  --berry: #ff5c8a;
  --orange: #ff9f43;
  --leaf: #5ccf6b;
  --sea: #3fb6ff;
  --grape: #a26bff;
  --ink: #2b2f4a;
  --cream: #fff8e7;
  --white: #ffffff;
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", "Comic Sans MS", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 18% 9% at 15% 18%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 12% 7% at 22% 15%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 20% 9% at 82% 12%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 12% 6% at 75% 10%, #fff 60%, transparent 62%),
    linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 70%, #fff3c4 100%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus { outline: none; }
button:focus-visible { outline: 5px solid var(--sea); outline-offset: 4px; }

img, svg { -webkit-user-drag: none; }

.screen {
  position: fixed;
  inset: 0;
}

/* ---------- start ---------- */
#start {
  display: grid;
  place-items: center;
  padding: 16px;
}
.start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3vh, 28px);
  text-align: center;
}
.start-buddy {
  width: clamp(110px, 22vmin, 190px);
  animation: bob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 10px 0 rgba(43, 47, 74, 0.12));
}
.logo {
  margin: 0;
  font-size: clamp(44px, 11vmin, 104px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.logo span {
  display: inline-block;
  color: var(--white);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
  animation: hop 1.8s ease-in-out infinite;
}
.logo .gap { width: 0.35em; }
.logo span:nth-child(6n+1) { color: var(--berry); animation-delay: 0s; }
.logo span:nth-child(6n+2) { color: var(--sun); animation-delay: .1s; }
.logo span:nth-child(6n+3) { color: var(--leaf); animation-delay: .2s; }
.logo span:nth-child(6n+4) { color: var(--sea); animation-delay: .3s; }
.logo span:nth-child(6n+5) { color: var(--grape); animation-delay: .4s; }
.logo span:nth-child(6n+6) { color: var(--orange); animation-delay: .5s; }

.play-btn {
  width: clamp(150px, 30vmin, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 12px 0 #c93a64, 0 0 0 0 rgba(255, 92, 138, 0.45);
  display: grid;
  place-items: center;
  animation: pulse 1.6s ease-out infinite;
  transition: transform .12s;
}
.play-btn svg { width: 62%; margin-left: 8%; }
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: translateY(8px); box-shadow: 0 4px 0 #c93a64; }
.start-note {
  margin: 0;
  font-size: clamp(14px, 2.4vmin, 18px);
  font-weight: 700;
  opacity: .75;
  max-width: 34ch;
}

/* ---------- home ---------- */
#home {
  overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 90px;
}
.home-head { text-align: center; }
.home-title {
  margin: 8px 0 18px;
  font-size: clamp(28px, 6vmin, 52px);
  font-weight: 900;
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 42vw), 1fr));
  gap: clamp(14px, 2.5vw, 28px);
  max-width: 1100px;
  margin: 0 auto;
}
.tile {
  --c: var(--berry);
  position: relative;
  aspect-ratio: 1 / 0.92;
  border-radius: 36px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 55%),
    var(--c);
  box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 65%, #000 20%), 0 18px 30px rgba(43, 47, 74, 0.15);
  border: 5px solid rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  animation: tileIn .5s cubic-bezier(.3, 1.6, .5, 1) both;
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), box-shadow .15s;
}
.tile:hover { transform: translateY(-6px) rotate(-2deg) scale(1.03); }
.tile:nth-child(even):hover { transform: translateY(-6px) rotate(2deg) scale(1.03); }
.tile:active { transform: translateY(8px) scale(.98); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 65%, #000 20%); }
.tile-icon {
  width: 52%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: clamp(48px, 10vmin, 90px);
  line-height: 1;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.12));
  transition: transform .2s;
}
.tile-icon { position: relative; min-height: 0; }
.tile-icon > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile:hover .tile-icon { animation: wiggle .5s ease-in-out; }
.tile-title {
  font-size: clamp(18px, 3vmin, 28px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}
.tile-skill {
  font-size: clamp(11px, 1.8vmin, 15px);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
}
.tile-stars {
  position: absolute;
  top: 10px;
  right: 14px;
  font-weight: 900;
  font-size: clamp(14px, 2.2vmin, 18px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 2px 10px;
}
.tile-stars:empty { display: none; }

.peek-icon { position: relative; width: 100%; height: 100%; display: block; }
.peek-icon .peek-animal { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); font-size: .9em; }
.peek-icon svg { position: absolute; left: 0; bottom: 0; width: 100%; }

/* ---------- stage ---------- */
.game {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
.fill { position: absolute; inset: 0; display: block; }

.home-btn {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 0 rgba(43, 47, 74, 0.25);
  display: grid;
  place-items: center;
  z-index: 20;
  transition: transform .12s;
}
.home-btn svg { width: 62%; }
.home-btn:hover { transform: scale(1.08) rotate(-4deg); }
.home-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(43, 47, 74, 0.25); }

.star-count {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 0 rgba(43, 47, 74, 0.2);
  font-size: 30px;
  font-weight: 900;
  pointer-events: none;
}
.star-icon { width: 46px; height: 46px; display: block; }
.star-icon svg { width: 100%; height: 100%; }
.star-count.bump { animation: bump .5s cubic-bezier(.3, 1.8, .5, 1); }

/* ---------- reward ---------- */
.reward-star {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(60vmin, 320px);
  z-index: 50;
  pointer-events: none;
  animation: reward 1.9s cubic-bezier(.4, 0, .3, 1) forwards;
  filter: drop-shadow(0 14px 0 rgba(43, 47, 74, 0.15));
}
.reward-star svg { width: 100%; display: block; }

/* ---------- particles ---------- */
.particle {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: fly .9s ease-out forwards;
  z-index: 40;
}
body > .particle { position: fixed; }
.particle.char { line-height: 1; }

/* ---------- grown-ups ---------- */
.lock {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  z-index: 60;
  padding: 5px;
  background: conic-gradient(var(--berry) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, 0.55) 0);
  opacity: .55;
  transition: opacity .2s, transform .2s;
}
.lock:hover, .lock.holding { opacity: 1; }
.lock.holding { transform: scale(1.15); }
.lock-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--white);
  font-size: 20px;
}
body:not(.started) .lock { display: none; }

.parent {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(43, 47, 74, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  -webkit-user-select: text;
  user-select: text;
}
.parent-card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow-y: auto;
  background: var(--white);
  border-radius: 28px;
  padding: 26px 22px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.parent-card h2 { margin: 0; font-size: 26px; font-family: var(--font); }
.parent-sub { margin: 4px 0 18px; opacity: .65; }
.parent-actions { display: grid; gap: 10px; }
.parent-actions button, .parent-close {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f2f4fb;
  font-weight: 650;
  font-size: 16px;
}
.parent-actions button:hover { background: #e6e9f6; }
.parent-tip { font-size: 14px; opacity: .7; margin: 16px 0; }
.parent-close { background: var(--leaf); color: #fff; text-align: center; font-weight: 800; }
kbd { background: #f2f4fb; border-radius: 6px; padding: 1px 6px; border: 1px solid #d9ddec; }

/* ========== activities ========== */

/* Sparkle Trail */
.game-sparkle {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.8) 0 1.5px, transparent 2px) 0 0 / 140px 140px,
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.6) 0 1px, transparent 1.5px) 0 0 / 90px 90px,
    radial-gradient(ellipse at 50% 110%, #5b3fa6 0%, #2a2468 45%, #141a3d 100%);
  cursor: none;
}
.buddy {
  position: absolute;
  left: 0;
  top: 0;
  width: 130px;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 0 18px rgba(255, 216, 77, 0.8));
}
.buddy svg { width: 100%; display: block; }

/* Balloon Pop */
.game-balloons {
  background:
    radial-gradient(ellipse 14% 7% at 20% 25%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 10% 6% at 27% 22%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 16% 7% at 78% 40%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 9% 5% at 72% 37%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 120% 30% at 50% 108%, #7ed957 60%, transparent 61%),
    linear-gradient(180deg, #8fd8ff 0%, #c9efff 100%);
}
.balloon {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  background: none;
  will-change: transform;
  filter: drop-shadow(0 8px 6px rgba(43, 47, 74, 0.15));
}
.balloon svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.balloon::before { /* forgiving hit area */
  content: "";
  position: absolute;
  inset: -16px -16px 30% -16px;
  border-radius: 50%;
}

/* Peekaboo Garden */
.game-peekaboo {
  background:
    radial-gradient(circle at 62% 12%, #ffe680 0 50px, rgba(255, 230, 128, 0.35) 52px 80px, transparent 82px),
    linear-gradient(180deg, #9be2ff 0%, #d7f4ff 42%, #8fdc6a 42%, #6cc24a 100%);
}
.garden {
  position: absolute;
  inset: 110px 4vw 4vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2vh 3vw;
}
.spot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.spot .animal {
  position: absolute;
  left: 50%;
  bottom: 30%;
  font-size: min(18vmin, 120px);
  line-height: 1;
  transform: translate(-50%, 40%) scale(.6);
  opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.8, .5, 1), opacity .2s;
  pointer-events: none;
}
.spot.up .animal { transform: translate(-50%, -78%) scale(1.1); opacity: 1; }
.spot .bush {
  position: relative;
  width: min(100%, 300px);
  pointer-events: none;
}
.spot .bush svg { width: 100%; display: block; position: relative; z-index: 1; }
.spot .found { z-index: 2; }
@media (orientation: portrait) {
  .garden { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .game-peekaboo {
    background:
      radial-gradient(circle at 62% 8%, #ffe680 0 40px, rgba(255, 230, 128, 0.35) 42px 64px, transparent 66px),
      linear-gradient(180deg, #9be2ff 0%, #d7f4ff 22%, #8fdc6a 22%, #6cc24a 100%);
  }
}
.spot.up .bush, .spot.rustle .bush { animation: rustle .45s ease-in-out; }
.spot .found {
  position: absolute;
  top: 6%;
  right: 12%;
  font-size: 22px;
  opacity: 0;
  transition: opacity .3s;
}
.spot.seen .found { opacity: 1; }

/* Magic Paint */
.game-paint {
  background:
    radial-gradient(circle, rgba(43, 47, 74, 0.06) 1px, transparent 1.5px) 0 0 / 22px 22px,
    #fffdf6;
  cursor: crosshair;
}
.game-paint canvas.wiping { animation: wipe .5s ease-in forwards; }
.pots {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: clamp(8px, 1.6vw, 16px);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 6px 0 rgba(43, 47, 74, 0.15);
  z-index: 10;
  max-width: calc(100% - 130px);
}
.pot {
  width: clamp(50px, 9vmin, 78px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.15), 0 4px 0 rgba(43, 47, 74, 0.2);
  border: 4px solid #fff;
  transition: transform .15s cubic-bezier(.3, 1.8, .5, 1);
  flex: 0 0 auto;
}
.pot.rainbow { background: conic-gradient(#ff4d6d, #ff9f43, #ffd84d, #5ccf6b, #3fb6ff, #a26bff, #ff4d6d); }
.pot.on { transform: translateY(-10px) scale(1.15); border-color: var(--ink); }
.wipe-btn {
  position: absolute;
  right: max(76px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  font-size: 44px;
  box-shadow: 0 6px 0 rgba(43, 47, 74, 0.2);
  z-index: 10;
}
.wipe-btn:active { transform: translateY(5px); }

/* Feed the Monster */
.game-monster {
  background:
    radial-gradient(ellipse 140% 40% at 50% 112%, #ffc2a8 60%, transparent 61%),
    linear-gradient(180deg, #ffe7f0 0%, #fff4e2 100%);
}
.monster {
  position: absolute;
  pointer-events: none;
  animation: bob 2.6s ease-in-out infinite;
}
.monster svg { width: 100%; display: block; overflow: visible; }
.monster .mouth, .monster .pupil, .monster .arm {
  transform-box: fill-box;
  transform-origin: center;
}
.monster .mouth { transform: scale(.75, .3); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.monster.hungry .mouth { transform: scale(1.05, 1.1); }
.monster.chew .mouth { animation: chew .2s ease-in-out 5 alternate; }
.monster.hungry .arm-l { animation: waveL .4s ease-in-out infinite alternate; }
.monster.hungry .arm-r { animation: waveR .4s ease-in-out infinite alternate; }
.monster.happy { animation: jump .5s cubic-bezier(.3, 1.6, .5, 1) 2; }
.fruit {
  position: absolute;
  left: 0;
  top: 0;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  font-size: 96px;
  line-height: 1;
  cursor: grab;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 55%, transparent 56%);
  touch-action: none;
  will-change: transform;
  z-index: 5;
}
.fruit.held { cursor: grabbing; z-index: 8; background: none; filter: drop-shadow(0 16px 8px rgba(43, 47, 74, 0.25)); }
.fruit.back { transition: transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.fruit.eaten { transition: transform .35s ease-in, opacity .35s ease-in; opacity: 0; }
.fruit.new { animation: popIn .45s cubic-bezier(.3, 1.8, .5, 1); }
.fruit span { display: block; pointer-events: none; }
.fruit:not(.held) span { animation: bob 2s ease-in-out infinite; }

/* Keyboard Party */
.game-keyboard {
  background:
    radial-gradient(circle, rgba(255, 159, 67, 0.18) 3px, transparent 4px) 0 0 / 46px 46px,
    linear-gradient(180deg, #fff6c9 0%, #ffe9b0 100%);
}
.kb-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  transition: opacity .4s;
}
.kb-hint svg { width: min(46vmin, 320px); animation: bob 2s ease-in-out infinite; }
.kb-hint p { margin: 8px 0 0; font-size: clamp(26px, 5vmin, 44px); font-weight: 900; }
.kb-hint.faded { opacity: .18; }
.bigkey {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  animation: keyIn .5s cubic-bezier(.3, 1.8, .5, 1) both, keyOut .6s ease-in 2.2s forwards;
}
.bigkey .ch {
  font-size: min(32vmin, 260px);
  font-weight: 900;
  line-height: .9;
  color: var(--kc);
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 10px 0 var(--ink);
}
.bigkey .em { font-size: min(14vmin, 110px); line-height: 1; margin-top: 8px; }
.bigkey .dots { font-size: min(7vmin, 50px); max-width: 60vmin; text-align: center; line-height: 1.1; margin-top: 8px; }
.shape-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: min(20vmin, 150px);
  line-height: 1;
  pointer-events: none;
  animation: keyIn .4s cubic-bezier(.3, 1.8, .5, 1) both, keyOut .5s ease-in 1s forwards;
}
.car {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 90px;
  line-height: 1;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none;
  z-index: 4;
}
.car span { display: inline-block; transition: transform .2s; }
.rainbow-arc {
  position: absolute;
  left: 50%;
  bottom: -40vmin;
  width: 120vmin;
  height: 120vmin;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 44%, #a26bff 44% 48%, #3fb6ff 48% 52%, #5ccf6b 52% 56%, #ffd84d 56% 60%, #ff9f43 60% 64%, #ff4d6d 64% 68%, transparent 68%);
  pointer-events: none;
  animation: rainbow 2s ease-out forwards;
}

/* ---------- keyframes ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px) rotate(-4deg); } }
@keyframes pulse {
  0% { box-shadow: 0 12px 0 #c93a64, 0 0 0 0 rgba(255, 92, 138, 0.5); }
  100% { box-shadow: 0 12px 0 #c93a64, 0 0 0 40px rgba(255, 92, 138, 0); }
}
@keyframes tileIn { from { transform: scale(.4) translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes fly {
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(.3); opacity: 0; }
}
@keyframes reward {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-200deg); }
  28% { transform: translate(-50%, -50%) scale(1.15) rotate(10deg); }
  40% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  70% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(calc(50vw - 110%), calc(-50vh - 20%)) scale(.12) rotate(360deg); opacity: .4; }
}
@keyframes rustle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg) scale(1.03); } 75% { transform: rotate(3deg) scale(1.03); } }
@keyframes wipe { to { opacity: 0; transform: scale(.96) rotate(-1deg); } }
@keyframes chew { from { transform: scale(.9, .25); } to { transform: scale(.95, .6); } }
@keyframes waveL { from { transform: rotate(0); } to { transform: rotate(-25deg); } }
@keyframes waveR { from { transform: rotate(0); } to { transform: rotate(25deg); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }
@keyframes popIn { from { transform: var(--pos) scale(0); } to { transform: var(--pos) scale(1); } }
@keyframes keyIn { from { transform: translate(-50%, -50%) scale(0) rotate(-20deg); } to { transform: translate(-50%, -50%) scale(1) rotate(var(--tilt, 0deg)); } }
@keyframes keyOut { to { transform: translate(-50%, -80%) scale(.7) rotate(var(--tilt, 0deg)); opacity: 0; } }
@keyframes rainbow { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 25% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1.05); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Phones: slightly smaller chrome */
@media (max-width: 520px) {
  .home-btn { width: 62px; height: 62px; }
  .star-count { font-size: 24px; padding: 4px 14px 4px 6px; }
  .star-icon { width: 36px; height: 36px; }
  .tile { border-radius: 26px; }
  .tile-skill { display: none; }
  .wipe-btn { width: 64px; height: 64px; font-size: 32px; right: 14px; bottom: 92px; }
  .pots { gap: 5px; padding: 8px 10px; max-width: calc(100% - 20px); bottom: 14px; }
  .pot { width: 41px; border-width: 3px; }
  body:has(.game-paint) .lock { bottom: 170px; }
}
