:root {
  --bg: #fff3e4;
  --card: #ffffff;
  --ink: #3a2a1f;
  --accent: #ff6b6b;
  --accent-dark: #e8544f;
  --paw: #d98a63;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,217,61,0.35) 0, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(107,203,119,0.3) 0, transparent 40%);
  color: var(--ink);
  padding: 2.5rem 1rem 2rem;
}
main { text-align: center; max-width: 420px; }
h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 2.1rem;
  margin: 0 0 0.3rem;
  color: var(--accent-dark);
  text-shadow: 2px 3px 0 rgba(0,0,0,0.08);
}
p.sub { margin: 0 0 1.6rem; font-weight: 600; opacity: 0.75; }

#wheel-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 46px auto 1.6rem;
}
.ear {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 48px solid var(--accent);
  top: -32px;
  z-index: 1;
}
.ear.left { left: 12px; transform: rotate(-20deg); transform-origin: 50% 100%; }
.ear.right { right: 12px; transform: rotate(20deg); transform-origin: 50% 100%; }
.ear-inner {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 24px solid #ffd2c2;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
}
#wheel-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  z-index: 2;
}
canvas { display: block; border-radius: 50%; }

#pointer-wrap {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 0%;
  z-index: 6;
}
.toe {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paw);
  top: -8px;
}
.toe.t1 { left: -13px; }
.toe.t2 { left: 1px; top: -13px; }
.toe.t3 { left: 15px; }
#pointer {
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 42px solid var(--paw);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,0.3));
  transform-origin: 50% 0%;
}
@keyframes tickFlick {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-22deg); }
  100% { transform: rotate(0deg); }
}
#pointer.tick { animation: tickFlick 140ms ease-out; }

button {
  font-family: 'Baloo 2', cursive;
  font-size: 1.15rem;
  padding: 0.7rem 2.2rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--accent-dark);
  transition: transform 0.1s;
}
button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-dark); }
button:disabled { opacity: 0.6; cursor: default; }

#result[hidden] { display: none; }
#result {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem;
  text-align: center;
  z-index: 7;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.6), 0 8px 20px rgba(0,0,0,0.12);
}
#result p {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--accent-dark);
  margin: 0;
}

.about {
  margin-top: 2rem;
  text-align: left;
  padding: 0 0.4rem;
}
.why-btn {
  display: block;
  margin: 0 auto;
  background: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  box-shadow: none;
  opacity: 0.6;
  text-decoration: underline;
  text-decoration-style: dotted;
}
.why-btn:active { transform: none; box-shadow: none; }
.why-btn:hover { opacity: 0.9; }
#why-text[hidden] { display: none; }
#why-text { margin-top: 1rem; opacity: 0.85; }
.about h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.about p {
  margin: 0 0 0.8rem;
  line-height: 1.55;
  font-size: 0.88rem;
  color: var(--ink);
}
.about p:last-child { margin-bottom: 0; }

#mute-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: white;
  color: var(--ink);
  font-size: 1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.paws { position: fixed; font-size: 1.4rem; opacity: 0.25; }
.p1 { top: 8%; left: 6%; transform: rotate(-15deg); }
.p2 { bottom: 10%; right: 8%; transform: rotate(20deg); }
