/* SHOP WITH NALA — bright, playful, kid-friendly */
:root {
  --cream: #fff7ec;
  --peach: #ffe8cf;
  --coral: #ff6f61;
  --coral-dark: #e8574a;
  --teal: #2ec4b6;
  --teal-dark: #1fa89b;
  --ink: #2d2d34;
  --gold: #f7c948;
  --pink: #ff9db0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: "Trebuchet MS", "Comic Sans MS", "Chalkboard SE", sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}
.screen { display: none; width: 100%; max-width: 520px; padding: 24px 18px 40px; flex-direction: column; align-items: center; min-height: 100vh; }
.screen.active { display: flex; animation: pop-in .35s ease; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: none;} }

/* ---- buttons ---- */
.btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  margin: 8px 4px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--coral-dark);
  transition: transform .08s ease;
  min-width: 200px;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-dark); }
.btn-big { font-size: 1.25rem; padding: 18px 36px; }
.btn-teal { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); }
.btn-teal:active { box-shadow: 0 1px 0 var(--teal-dark); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: 0 4px 0 #e0d5c3; border: 2px solid var(--peach); }
.bounce { animation: bounce 1.6s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-8px);} }
.linklike { background: none; border: none; color: var(--teal-dark); font-weight: 700; font-size: .95rem; text-decoration: underline; cursor: pointer; font-family: inherit; }

/* ---- title ---- */
#screen-title { justify-content: center; position: relative; }
.title-card { text-align: center; z-index: 1; background: #fff; border-radius: 28px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(255,111,97,.18); border: 3px solid var(--peach); width: 100%; }
.nala-logo { width: 120px; height: 120px; animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%,100% { transform: rotate(-4deg);} 50% { transform: rotate(4deg);} }
.game-title { font-size: 2.4rem; margin: 12px 0 4px; letter-spacing: 1px; color: var(--coral-dark); text-shadow: 2px 2px 0 var(--peach); }
.tagline { font-size: 1.15rem; margin: 6px 0; }
.subtitle { color: #8a7a63; margin: 0 0 18px; font-style: italic; }
.hint { color: #8a7a63; margin-top: 10px; }
.paw-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.paw { position: absolute; width: 34px; height: 34px; opacity: .12; animation: drift 9s linear infinite; }
.paw::before, .paw::after { content: ""; position: absolute; background: var(--coral); border-radius: 50%; }
.paw::before { width: 22px; height: 18px; left: 6px; top: 12px; }
.paw::after { width: 8px; height: 8px; left: 2px; top: 4px; box-shadow: 11px -2px 0 var(--coral), 20px 2px 0 var(--coral), 8px -8px 0 var(--coral); }
.p1 { left: 8%; top: 100%; animation-delay: 0s; } .p2 { left: 30%; top: 100%; animation-delay: 2s; }
.p3 { left: 55%; top: 100%; animation-delay: 4s; } .p4 { left: 75%; top: 100%; animation-delay: 1s; }
.p5 { left: 15%; top: 100%; animation-delay: 6s; } .p6 { left: 88%; top: 100%; animation-delay: 3s; }
@keyframes drift { to { transform: translateY(-110vh) rotate(30deg); } }

/* ---- story cards ---- */
.story-card { background: #fff; border-radius: 24px; padding: 28px 24px; border: 3px solid var(--peach); box-shadow: 0 8px 24px rgba(46,196,182,.15); width: 100%; text-align: center; margin-top: 30px; }
.story-text { font-size: 1.12rem; line-height: 1.65; }
.story-page h2 { color: var(--coral-dark); margin-top: 0; }
.mischief-title { color: var(--coral-dark); font-size: 2rem; margin: 8px 0; }
.shoe { width: 150px; margin: 6px auto; display: block; animation: wiggle 1.8s ease-in-out infinite; }
.choice-row { display: flex; flex-direction: column; align-items: center; margin-top: 12px; }

/* ---- store ---- */
.store-head { text-align: center; width: 100%; }
.store-head h2 { color: var(--coral-dark); font-size: 1.8rem; margin: 6px 0; text-shadow: 2px 2px 0 var(--peach); }
.store-sub { margin: 0 0 10px; color: #6d5f4b; }
.progress { display: flex; justify-content: center; gap: 18px; background: #fff; border-radius: 999px; padding: 10px 20px; border: 2px solid var(--peach); font-size: 1rem; margin-bottom: 6px; }
.shelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; width: 100%; margin: 14px 0 20px; }
.item-card {
  background: #fff; border: 3px solid var(--peach); border-radius: 20px; padding: 14px 8px 12px;
  text-align: center; cursor: pointer; position: relative; transition: transform .1s ease;
  min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.item-card:active { transform: scale(.96); }
.item-card svg { width: 64px; height: 64px; }
.item-name { font-weight: 800; margin-top: 8px; font-size: .95rem; }
.item-card.sniffed { border-color: var(--teal); background: #f2fcfa; }
.item-card.sniffed::after { content: "Sniffed!"; position: absolute; top: 6px; right: 8px; font-size: .68rem; font-weight: 800; color: var(--teal-dark); background: #dff7f4; padding: 2px 8px; border-radius: 999px; }
.golden-paw { position: absolute; top: 4px; left: 6px; width: 30px; height: 30px; display: none; }
.item-card.is-pick.found .golden-paw { display: block; animation: pop-in .3s ease; }
.sniff-box { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: calc(100% - 36px); max-width: 480px; background: var(--ink); color: #fff; border-radius: 20px; padding: 18px 20px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: pop-in .25s ease; text-align: center; }
.sniff-box p { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.5; }
.sniff-box .btn { min-width: 0; padding: 10px 22px; font-size: .9rem; }

/* ---- win ---- */
.win-card { background: #fff; border-radius: 28px; padding: 30px 24px; border: 3px solid var(--gold); text-align: center; width: 100%; margin-top: 24px; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(247,201,72,.25); }
.win-card h2 { color: var(--coral-dark); font-size: 1.9rem; margin: 6px 0; }
.win-sub { color: #6d5f4b; margin-top: 0; }
.win-stats { display: flex; justify-content: center; gap: 28px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 900; color: var(--teal-dark); }
.stat-label { font-size: .85rem; color: #8a7a63; }
.unlock-box { background: var(--peach); border-radius: 18px; padding: 16px; margin: 14px 0; }
.unlock-head { font-weight: 900; font-size: 1.15rem; margin: 0 0 4px; }
.unlock-sub { margin: 0 0 10px; color: #6d5f4b; }
.confetti span { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall 2.6s ease-in infinite; }
.confetti span:nth-child(1){left:10%;background:var(--coral);animation-delay:0s;}
.confetti span:nth-child(2){left:25%;background:var(--teal);animation-delay:.4s;}
.confetti span:nth-child(3){left:40%;background:var(--gold);animation-delay:.8s;}
.confetti span:nth-child(4){left:55%;background:var(--pink);animation-delay:.2s;}
.confetti span:nth-child(5){left:70%;background:var(--coral);animation-delay:1s;}
.confetti span:nth-child(6){left:85%;background:var(--teal);animation-delay:.6s;}
.confetti span:nth-child(7){left:32%;background:var(--pink);animation-delay:1.3s;}
.confetti span:nth-child(8){left:63%;background:var(--gold);animation-delay:1.6s;}
@keyframes fall { to { transform: translateY(420px) rotate(340deg); } }

/* ---- locked / trip2 ---- */
.locked-card { background: #fff; border-radius: 28px; padding: 30px 24px; border: 3px dashed var(--coral); text-align: center; width: 100%; margin-top: 30px; }
.locked-card h2 { color: var(--coral-dark); }
.lock-icon { width: 60px; margin: 0 auto; }

/* ---- fund strip + footer ---- */
.fund-strip { width: 100%; max-width: 520px; background: #fff; border: 2px solid var(--peach); border-radius: 16px; padding: 10px 14px; margin-top: 18px; text-align: center; font-size: .92rem; }
.fund-strip p { margin: 4px 0; }
.meter { display: inline-block; width: 120px; height: 12px; background: #f0e6d2; border-radius: 999px; overflow: hidden; vertical-align: middle; margin: 0 6px; }
.meter-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 999px; }
.foot { text-align: center; margin-top: 18px; width: 100%; }
.coppa { font-size: .78rem; color: #a89a83; margin: 8px 0 0; }

/* ---- modals ---- */
.modal { position: fixed; inset: 0; background: rgba(45,45,52,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--cream); border-radius: 24px; padding: 24px 20px; max-width: 440px; width: 100%; text-align: center; border: 3px solid var(--peach); max-height: 88vh; overflow-y: auto; animation: pop-in .25s ease; }
.modal-card h3 { color: var(--coral-dark); margin-top: 0; }
.video-wrap { position: relative; width: 100%; padding-top: 177%; border-radius: 14px; overflow: hidden; background: #000; margin: 12px 0; }
.video-wrap iframe { position: absolute; inset: 0; }
.parent-card { text-align: left; }
.parent-card h3 { text-align: center; }
.product-list { list-style: none; padding: 0; margin: 0 0 12px; }
.product-list li { background: #fff; border: 2px solid var(--peach); border-radius: 14px; padding: 12px 14px; margin: 10px 0; font-size: .95rem; line-height: 1.5; }
.product-list a { color: var(--teal-dark); font-weight: 800; }
.disclosure { font-size: .8rem; color: #8a7a63; background: #fff8ee; border-radius: 10px; padding: 10px 12px; }
.parent-card .btn { display: block; margin: 14px auto 0; }

/* ================= REFINEMENT PASS 2026-11-28 ================= */

/* warmer page wash + gentler screen transitions */
body { background: linear-gradient(180deg, #fff3df 0%, var(--cream) 45%, #ffe9d2 100%); background-attachment: fixed; }
.screen.active { animation: screen-in .45s cubic-bezier(.22,.9,.32,1); }
@keyframes screen-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- title best score ---- */
.best-score { display: inline-block; margin: 12px 0 0; background: linear-gradient(90deg, #fff3cf, #ffe9a8); border: 2px solid var(--gold); color: #8a6a12; font-weight: 800; font-size: .92rem; padding: 7px 16px; border-radius: 999px; box-shadow: 0 3px 10px rgba(247,201,72,.35); }

/* ---- intro progress + skip ---- */
.story-dots { display: flex; justify-content: center; gap: 9px; margin: 18px 0 6px; }
.story-dot { width: 12px; height: 12px; border-radius: 50%; background: #f0e0c8; border: 2px solid var(--peach); transition: all .25s ease; }
.story-dot.done { background: var(--teal); border-color: var(--teal); }
.story-dot.on { background: var(--coral); border-color: var(--coral-dark); transform: scale(1.35); box-shadow: 0 0 0 4px rgba(255,111,97,.18); }
.skip-link { display: block; margin: 10px auto 0; font-size: .9rem; }
.story-page { animation: story-in .35s ease; }
@keyframes story-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---- store scene: gradient / parallax backdrop ---- */
#screen-store { position: relative; }
.store-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; border-radius: 0 0 32px 32px;
  background:
    radial-gradient(ellipse 90% 300px at 50% -60px, rgba(255,217,120,.75), rgba(255,217,120,0) 70%),
    linear-gradient(180deg, #ffe3b3 0%, #ffd9a0 34%, #ffcf99 62%, #ffc98f 100%);
}
.scene-glow { position: absolute; left: 50%; top: -90px; transform: translateX(-50%); width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,200,.95) 0%, rgba(255,246,200,0) 65%); animation: glow-pulse 4.5s ease-in-out infinite; }
@keyframes glow-pulse { 0%,100% { opacity: .75; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }
.scene-awning { position: absolute; top: 0; left: 0; right: 0; height: 26px; display: flex; filter: drop-shadow(0 4px 5px rgba(160,90,30,.25)); }
.scene-awning span { flex: 1; border-radius: 0 0 14px 14px; }
.scene-awning span:nth-child(odd) { background: linear-gradient(180deg, #ff8577, var(--coral)); }
.scene-awning span:nth-child(even) { background: linear-gradient(180deg, #ffffff, #ffe8cf); }
.scene-shelfline { position: absolute; left: 4%; right: 4%; height: 10px; border-radius: 6px;
  background: linear-gradient(180deg, #c98a4b, #a96f36); box-shadow: 0 5px 8px rgba(120,70,20,.28); opacity: .5; }
.scene-shelfline.sl1 { top: 300px; } .scene-shelfline.sl2 { top: 470px; } .scene-shelfline.sl3 { top: 640px; }
#screen-store > *:not(.store-scene) { position: relative; z-index: 1; }

/* ---- big animated Nala on the store screen ---- */
.nala-stage { display: flex; align-items: flex-end; gap: 10px; width: 100%; margin-top: 4px; }
.nala-char { width: 118px; height: 126px; flex: 0 0 auto; filter: drop-shadow(0 8px 10px rgba(120,70,20,.3)); animation: nala-idle 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.nala-svg { width: 100%; height: 100%; overflow: visible; }
.nala-tail { transform-origin: 122px 112px; animation: tail-wag 0.9s ease-in-out infinite; }
@keyframes tail-wag { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(13deg); } }
@keyframes nala-idle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.nala-bubble { position: relative; flex: 1; background: #fff; border: 3px solid var(--peach); border-radius: 16px; padding: 10px 14px;
  font-weight: 700; font-size: .98rem; line-height: 1.4; color: var(--ink); box-shadow: 0 6px 14px rgba(255,150,80,.22); margin-bottom: 22px; animation: bubble-in .3s ease; }
.nala-bubble::before { content: ""; position: absolute; left: -13px; bottom: 16px; border: 7px solid transparent; border-right-color: var(--peach); border-left: 0; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(5px) scale(.96); } to { opacity: 1; transform: none; } }
.nala-char.react-happy { animation: nala-bounce .8s ease; }
.nala-char.react-sniff { animation: nala-sniff .8s ease; }
.nala-char.react-yuck { animation: nala-shake .7s ease; }
.nala-char.react-party { animation: nala-party .95s ease; }
.nala-char.react-sniff .nala-nose { animation: nose-wiggle .4s ease-in-out 2; }
@keyframes nala-bounce { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-16px) scale(1.04); } 55% { transform: translateY(0); } 75% { transform: translateY(-7px); } }
@keyframes nala-sniff { 0%,100% { transform: rotate(0) translateY(0); } 35% { transform: rotate(7deg) translateY(4px); } 70% { transform: rotate(5deg) translateY(2px); } }
@keyframes nose-wiggle { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2.5px); } }
.nala-nose { transform-origin: 80px 88px; }
@keyframes nala-shake { 0%,100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-7px) rotate(-4deg); } 40% { transform: translateX(7px) rotate(4deg); } 60% { transform: translateX(-5px) rotate(-3deg); } 80% { transform: translateX(5px) rotate(3deg); } }
@keyframes nala-party { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-20px) rotate(-6deg) scale(1.06); } 50% { transform: translateY(0) rotate(5deg); } 70% { transform: translateY(-13px) rotate(-4deg); } 100% { transform: translateY(0) rotate(0); } }

/* ---- store hint + first-item glow ---- */
.store-hint { margin: 10px 0 0; font-weight: 800; color: var(--coral-dark); font-size: 1rem; text-align: center; animation: hint-bob 1.1s ease-in-out infinite; }
@keyframes hint-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.item-card.hint-glow { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(247,201,72,.45), 0 10px 20px rgba(247,201,72,.35); animation: hint-pulse 1.1s ease-in-out infinite; }
@keyframes hint-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }

/* ---- glossy item cards + tap pop ---- */
.item-card { background: linear-gradient(180deg, #ffffff 0%, #fff6e8 100%); box-shadow: 0 6px 0 #f3ddba, 0 12px 20px rgba(190,120,50,.16); transition: transform .12s ease, box-shadow .12s ease; }
.item-card svg { filter: drop-shadow(0 4px 5px rgba(90,60,20,.22)); }
.item-card.tap-pop { animation: tap-pop .38s cubic-bezier(.3,1.6,.5,1); }
@keyframes tap-pop { 0% { transform: scale(1); } 40% { transform: scale(1.1) rotate(-1.5deg); } 100% { transform: scale(1); } }
.item-card.found { border-color: var(--gold); background: linear-gradient(180deg, #fffdf4, #ffedb8); box-shadow: 0 6px 0 #e8c96a, 0 0 22px rgba(247,201,72,.55); }
.item-card.found .golden-paw { filter: drop-shadow(0 2px 4px rgba(217,169,46,.6)); animation: paw-spin-in .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes paw-spin-in { from { transform: scale(0) rotate(-120deg); } to { transform: scale(1) rotate(0); } }

/* ---- animated counters + streak chip ---- */
.progress { box-shadow: 0 4px 12px rgba(255,150,80,.2); flex-wrap: wrap; }
#treat-count { display: inline-block; }
#treat-count.count-pop { animation: count-pop .45s cubic-bezier(.3,1.8,.5,1); color: var(--coral-dark); }
@keyframes count-pop { 0% { transform: scale(1); } 45% { transform: scale(1.7) rotate(-8deg); } 100% { transform: scale(1); } }
.streak { background: linear-gradient(90deg, var(--coral), #ff9a3d); color: #fff; font-weight: 800; font-size: .85rem; padding: 3px 12px; border-radius: 999px; box-shadow: 0 3px 8px rgba(255,111,97,.4); }
.streak.streak-pop { animation: streak-pop .4s cubic-bezier(.3,1.7,.5,1); }
@keyframes streak-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

/* ---- particle layer ---- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.fx-p { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; animation: fx-fly .9s ease-out forwards; }
.fx-p svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(120,80,10,.35)); }
.fx-dot { border-radius: 50%; width: 11px; height: 11px; margin: -5px 0 0 -5px; }
@keyframes fx-fly { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(.5); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.15); } }

/* ---- win stars + upgraded confetti ---- */
.stars { display: flex; justify-content: center; gap: 8px; min-height: 52px; margin: 2px 0 4px; }
.star { font-size: 2.6rem; line-height: 1; color: #eadfc8; text-shadow: 0 2px 0 #e0d0ac; opacity: 0; transform: scale(.3) rotate(-30deg); animation: star-in .5s cubic-bezier(.3,1.8,.5,1) forwards; }
.star.lit { color: var(--gold); text-shadow: 0 2px 0 #d9a92e, 0 0 18px rgba(247,201,72,.75); }
@keyframes star-in { to { opacity: 1; transform: scale(1) rotate(0); } }
.best-line { font-weight: 800; color: #8a6a12; background: #fff6d8; border: 2px dashed var(--gold); border-radius: 12px; padding: 8px 12px; margin: 10px auto 2px; max-width: 340px; }
.best-line:empty { display: none; }
.confetti span { animation-duration: 3.2s; }
.confetti span:nth-child(3n) { border-radius: 50%; width: 11px; height: 11px; }
.confetti span:nth-child(4n) { width: 14px; height: 8px; }
.confetti span:nth-child(9){left:5%;background:var(--gold);animation-delay:.3s;}
.confetti span:nth-child(10){left:15%;background:var(--pink);animation-delay:1.1s;}
.confetti span:nth-child(11){left:22%;background:var(--teal);animation-delay:.7s;}
.confetti span:nth-child(12){left:30%;background:var(--coral);animation-delay:1.5s;}
.confetti span:nth-child(13){left:38%;background:var(--gold);animation-delay:.1s;}
.confetti span:nth-child(14){left:46%;background:var(--pink);animation-delay:.9s;}
.confetti span:nth-child(15){left:52%;background:var(--teal);animation-delay:1.8s;}
.confetti span:nth-child(16){left:60%;background:var(--coral);animation-delay:.5s;}
.confetti span:nth-child(17){left:68%;background:var(--gold);animation-delay:1.2s;}
.confetti span:nth-child(18){left:74%;background:var(--pink);animation-delay:.2s;}
.confetti span:nth-child(19){left:80%;background:var(--teal);animation-delay:1.4s;}
.confetti span:nth-child(20){left:88%;background:var(--coral);animation-delay:.8s;}
.confetti span:nth-child(21){left:12%;background:var(--teal);animation-delay:2s;}
.confetti span:nth-child(22){left:44%;background:var(--coral);animation-delay:2.2s;}
.confetti span:nth-child(23){left:66%;background:var(--pink);animation-delay:1.9s;}
.confetti span:nth-child(24){left:93%;background:var(--gold);animation-delay:2.4s;}

@media (prefers-reduced-motion: reduce) {
  .nala-char, .nala-tail, .paw, .bounce, .store-hint { animation: none !important; }
}

@media (min-width: 480px) {
  .choice-row { flex-direction: row; justify-content: center; }
  .game-title { font-size: 2.8rem; }
}
