  :root {
      --color-cream: #fce6c2;
      /* page background — warm paper */
      --color-paper: #FFFDF7;
      /* card surface */
      --color-plum: #2E2A4D;
      /* ink / primary text */
      --color-plum-60: rgba(46, 42, 77, 0.6);
      --color-coral: #FF6B6B;
      /* primary accent (Tiger) */
      --color-sky: #4D96FF;
      /* secondary accent (Elephant) */
      --color-green: #2ED573;
      /* correct feedback (Frog) */
      --color-orange: #FF9F1C;
      /* wrong feedback (Lion) */
      --color-gold: #FFD93D;
      /* stars / highlights (Monkey) */
      --color-lilac: #A66CFF;
      /* tertiary accent (Rabbit) */
      --radius-lg: 32px;
      --radius-md: 20px;
      --radius-sm: 12px;
      --shadow-card: 0 14px 0 rgba(46, 42, 77, 0.10), 0 24px 40px rgba(46, 42, 77, 0.14);
      --font-display: 'Baloo 2', system-ui, sans-serif;
      --font-body: 'Nunito', system-ui, sans-serif;
  }
  * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
  }
  html,
  body {
      height: 100%;
      margin: 0;
      overscroll-behavior: none;
  }

  body {
      font-family: var(--font-body);
      color: var(--color-plum);
      background:
          radial-gradient(circle at 8% 12%, rgba(255, 107, 107, 0.10) 0, transparent 40%),
          radial-gradient(circle at 92% 18%, rgba(77, 150, 255, 0.12) 0, transparent 42%),
          radial-gradient(circle at 50% 100%, rgba(166, 108, 255, 0.10) 0, transparent 45%),
          var(--color-cream);
      background-attachment: fixed;
      overflow: hidden;
      position: fixed;
      inset: 0;
      -webkit-user-select: none;
      user-select: none;
  }

  /* subtle paper dot texture */
  body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      background-image: radial-gradient(rgba(46, 42, 77, 0.06) 1.6px, transparent 1.6px);
      background-size: 26px 26px;
      opacity: 0.5;
  }

  #bg-canvas {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
  }

  #fx-canvas {
      position: fixed;
      inset: 0;
      z-index: 40;
      pointer-events: none;
  }

  h1,
  h2,
  h3,
  .display {
      font-family: var(--font-display);
      margin: 0;
  }

  button {
      font-family: var(--font-body);
      border: none;
      cursor: pointer;
      -webkit-appearance: none;
      background: none;
  }

  button:focus-visible,
  .option-card:focus-visible {
      outline: 3px solid var(--color-sky);
      outline-offset: 3px;
  }

  /* ---------- Pressable "toy" button ---------- */
  .btn {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-family: var(--font-display);
      font-weight: 700;
      letter-spacing: 0.2px;
      font-size: clamp(1rem, 2.4vw, 1.2rem);
      color: #fff;
      padding: 16px 34px;
      border-radius: 999px;
      background: var(--btn-color, var(--color-coral));
      box-shadow:
          0 6px 0 var(--btn-shadow, #D94F4F),
          0 14px 24px rgba(46, 42, 77, 0.20);
      transition: transform .08s ease, box-shadow .08s ease;
  }

  .btn:active {
      transform: translateY(6px);
      box-shadow: 0 0 0 var(--btn-shadow, #D94F4F), 0 6px 12px rgba(46, 42, 77, 0.18);
  }

  .btn.sky {
      --btn-color: var(--color-sky);
      --btn-shadow: #2F6FDB;
  }

  .btn.green {
      --btn-color: var(--color-green);
      --btn-shadow: #20A85C;
  }

  .btn.lilac {
      --btn-color: var(--color-lilac);
      --btn-shadow: #7C46E0;
  }

  .btn.ghost {
      color: var(--color-plum);
      background: var(--color-paper);
      box-shadow: 0 6px 0 #E4DCC9, 0 14px 24px rgba(46, 42, 77, 0.10);
  }

  .btn.ghost:active {
      box-shadow: 0 0 0 #E4DCC9, 0 6px 12px rgba(46, 42, 77, 0.08);
  }

  .btn:disabled {
      opacity: 0.45;
      pointer-events: none;
  }

  .icon-btn {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.35rem;
      background: var(--color-paper);
      box-shadow: 0 5px 0 #fdd67e, 0 10px 18px rgba(46, 42, 77, 0.14);
      color: var(--color-plum);
      transition: transform .08s ease;
  }

  .icon-btn:active {
      transform: translateY(4px);
      box-shadow: 0 1px 0 #E4DCC9;
  }

  /* ---------- Screens ---------- */
  .screen {
      display: none;
  }

  .screen.active {
      display: flex;
  }

  .screen {
      position: fixed;
      inset: 0;
      z-index: 10;
      flex-direction: column;
      align-items: center;
      padding: 22px 20px 28px;
      overflow-y: auto;
  }

  .topbar {
      width: 100%;
      max-width: 760px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
  }

  .brand-mini {
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font-display);
      font-weight: 700;
      color: var(--color-plum-60);
      font-size: 0.95rem;
  }

  /* ---------- Preloader ---------- */
  #preloader-screen {
      justify-content: center;
      align-items: center;
      text-align: center;
      z-index: 60;
  }

  .loader-wheel {
      width: 104px;
      height: 104px;
      border-radius: 50%;
      background: conic-gradient(var(--color-coral) 0 25%, var(--color-gold) 25% 50%, var(--color-sky) 50% 75%, var(--color-green) 75% 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 0 rgba(46, 42, 77, 0.19), 0 20px 34px rgba(46, 42, 77, 0.19);
      animation: loaderSpin 1.1s linear infinite;
      margin-bottom: 22px;
  }

  .loader-wheel span {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: var(--color-paper);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
  }

  @keyframes loaderSpin {
      to {
          transform: rotate(360deg);
      }
  }

  .loader-title {
      font-size: clamp(1.6rem, 5vw, 2.2rem);
      color: var(--color-plum);
      margin-bottom: 6px;
  }

  .loader-sub {
      color: var(--color-plum-60);
      font-weight: 700;
      margin-bottom: 22px;
  }

  .load-track {
      width: 220px;
      height: 16px;
      border-radius: 999px;
      background: #EDE4CF;
      box-shadow: inset 0 2px 4px rgba(46, 42, 77, 0.15);
      overflow: hidden;
      margin: 0 auto;
  }

  #load-progress {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--color-coral), var(--color-gold));
      transition: width .25s ease;
  }

  #loading-status-text {
      margin-top: 12px;
      font-weight: 800;
      color: var(--color-plum-60);
      font-size: 0.9rem;
      letter-spacing: 0.4px;
  }

  #btn-start-loading {
      display: none;
      margin-top: 18px;
  }

  /* ---------- Home screen ---------- */
  #home-screen {
      justify-content: center;
      align-items: center;
      text-align: center;
      gap: 0;
  }

  .home-audio {
      position: absolute;
      top: 22px;
      right: 22px;
  }

  .home-badge {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 0.85rem;
      color: var(--color-plum);
      background: var(--color-gold);
      padding: 6px 16px;
      border-radius: 999px;
      margin-bottom: 16px;
      box-shadow: 0 4px 0 #E0B92E;
  }

  .home-title {
      font-size: clamp(2.1rem, 7vw, 3.1rem);
      line-height: 1.05;
      color: var(--color-plum);
  }

  .home-title em {
      font-style: normal;
      color: var(--color-coral);
  }

  .home-sub {
      margin-top: 10px;
      color: var(--color-plum-60);
      font-weight: 700;
      max-width: 360px;
  }

  .home-mascots {
      font-size: 2.4rem;
      margin: 22px 0 26px;
      display: flex;
      gap: 6px;
  }

  .home-mascots span {
      display: inline-block;
      animation: bob 2.4s ease-in-out infinite;
  }

  .home-mascots span:nth-child(2) {
      animation-delay: .2s;
  }

  .home-mascots span:nth-child(3) {
      animation-delay: .4s;
  }

  .home-mascots span:nth-child(4) {
      animation-delay: .6s;
  }

  @keyframes bob {

      0%,
      100% {
          transform: translateY(0) rotate(0deg);
      }

      50% {
          transform: translateY(-10px) rotate(-4deg);
      }
  }

  .home-actions {
      display: flex;
      flex-direction: column;
      gap: 14px;
      width: min(320px, 80vw);
  }

  /* ---------- Learn screen ---------- */
  #learn-screen {
      justify-content: flex-start;
      align-items: center;
  }

  .learn-stage {
      margin-top: 8px;
      width: min(320px, 78vw);
      aspect-ratio: 1/1;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 25%, #fff, var(--color-paper) 60%);
      box-shadow: var(--shadow-card);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
  }

  .learn-stage::before {
      content: '';
      position: absolute;
      inset: -14px;
      border-radius: 50%;
      border: 4px dashed rgba(46, 42, 77, 0.16);
  }

  #learn-animal-spot {
      font-size: clamp(5rem, 22vw, 7.5rem);
      filter: drop-shadow(0 10px 14px rgba(46, 42, 77, 0.18));
      animation: pop .35s ease;
  }

  @keyframes pop {
      from {
          transform: scale(0.6);
          opacity: 0;
      }

      to {
          transform: scale(1);
          opacity: 1;
      }
  }

  #learn-animal-name {
      margin-top: 22px;
      font-size: clamp(1.6rem, 5.5vw, 2.2rem);
      color: var(--color-plum);
      background: var(--color-paper);
      padding: 8px 26px;
      border-radius: 999px;
      box-shadow: 0 5px 0 #E4DCC9;
  }

  .learn-nav {
      display: flex;
      align-items: center;
      gap: 22px;
      margin-top: 26px;
  }

  .learn-hint {
      margin-top: 18px;
      color: var(--color-plum-60);
      font-weight: 700;
      font-size: 0.85rem;
      text-align: center;
  }

  /* ---------- Game screen ---------- */
  #game-screen {
      justify-content: flex-start;
      align-items: center;
  }

  .hud {
      width: 100%;
      max-width: 420px;
      display: flex;
      justify-content: space-between;
      gap: 10px;
      margin-top: 2px;
  }

  .hud-pill {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--color-plum);
      background: var(--color-paper);
      padding: 9px 18px;
      border-radius: 999px;
      box-shadow: 0 4px 0 #fdd67e;
      display: flex;
      align-items: center;
      gap: 6px;
  }

  #question-text {
      margin-top: 16px;
      font-family: var(--font-display);
      font-weight: 600;
      text-align: center;
      font-size: clamp(1.05rem, 3.6vw, 1.35rem);
      color: var(--color-plum);
      min-height: 1.6em;
  }

  .wheel-stage {
      position: relative;
      width: min(300px, 72vw);
      aspect-ratio: 1/1;
      margin: 14px auto 4px;
  }

  .wheel-ring {
      position: absolute;
      inset: -16px;
      border-radius: 50%;
      background: repeating-conic-gradient(var(--color-plum) 0deg 6deg, transparent 6deg 18deg);
      opacity: 0.10;
  }

  .wheel-bulbs {
      position: absolute;
      inset: -10px;
      border-radius: 50%;
      pointer-events: none;
  }

  .wheel-bulbs i {
      position: absolute;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--color-gold);
      box-shadow: 0 0 8px 2px rgba(255, 217, 61, 0.85);
      top: 50%;
      left: 50%;
      transform-origin: 0 0;
      animation: bulbGlow 1.6s ease-in-out infinite;
  }

  @keyframes bulbGlow {

      0%,
      100% {
          opacity: 0.35;
      }

      50% {
          opacity: 1;
      }
  }

  #wheel-canvas {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      box-shadow: 0 10px 0 rgba(46, 42, 77, 0.12), 0 20px 30px rgba(46, 42, 77, 0.18);
      background: #fff;
  }

  .wheel-pointer {
      position: absolute;
      top: -14px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      z-index: 5;
      border-left: 16px solid transparent;
      border-right: 16px solid transparent;
      border-top: 26px solid var(--color-coral);
      filter: drop-shadow(0 4px 4px rgba(46, 42, 77, 0.3));
  }

  #options-box {
      width: 100%;
      max-width: 420px;
      display: flex;
      gap: 14px;
      margin-top: 18px;
  }

  .option-card {
      flex: 1;
      background: var(--color-paper);
      border-radius: var(--radius-md);
      padding: 20px 10px;
      text-align: center;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(1rem, 3.6vw, 1.2rem);
      color: var(--color-plum);
      box-shadow: 0 6px 0 #fdd67e, 0 12px 20px rgba(46, 42, 77, 0.12);
      border: 3px solid transparent;
      transition: transform .12s ease, border-color .12s ease;
      position: relative;
  }

  .option-card::before {
      content: '🐾';
      position: absolute;
      top: -10px;
      right: -6px;
      font-size: 1.1rem;
      filter: drop-shadow(0 2px 2px rgba(46, 42, 77, 0.25));
  }

  .option-card:active {
      transform: translateY(4px) scale(0.98);
  }

  .option-card:hover {
      border-color: var(--color-gold);
  }

  .option-card.celebrate {
      animation: celebrate .55s ease;
      border-color: var(--color-green);
  }

  .option-card.shake {
      animation: shakeCard .5s ease;
      border-color: var(--color-orange);
  }

  @keyframes celebrate {
      0% {
          transform: scale(1);
      }

      30% {
          transform: scale(1.14) rotate(-2deg);
      }

      55% {
          transform: scale(0.96) rotate(2deg);
      }

      100% {
          transform: scale(1);
      }
  }

  @keyframes shakeCard {

      0%,
      100% {
          transform: translateX(0);
      }

      20% {
          transform: translateX(-9px);
      }

      40% {
          transform: translateX(9px);
      }

      60% {
          transform: translateX(-6px);
      }

      80% {
          transform: translateX(6px);
      }
  }

  /* ---------- Result screen ---------- */
  #result-screen {
      justify-content: center;
      align-items: center;
      text-align: center;
  }

  .result-card {
      background: var(--color-paper);
      border-radius: var(--radius-lg);
      padding: 36px 30px;
      box-shadow: var(--shadow-card);
      width: min(360px, 84vw);
  }

  .result-badge {
      font-size: 3.4rem;
      margin-bottom: 6px;
  }

  .result-title {
      font-size: clamp(1.5rem, 5vw, 1.9rem);
      color: var(--color-plum);
  }

  .stars-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin: 18px 0 8px;
  }

  .star {
      font-size: 2.4rem;
      color: #E4DCC9;
      transition: transform .3s ease, color .3s ease;
      display: inline-block;
  }

  .star.earned {
      color: var(--color-gold);
      transform: scale(1.18) rotate(-6deg);
      filter: drop-shadow(0 4px 6px rgba(255, 217, 61, 0.5));
  }

  #result-score-text {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.15rem;
      color: var(--color-plum-60);
      margin-bottom: 22px;
  }

  .result-actions {
      display: flex;
      flex-direction: column;
      gap: 12px;
  }

  @media (max-width:400px) {
      .btn {
          padding: 14px 26px;
      }

      .icon-btn {
          width: 46px;
          height: 46px;
      }
  }