/* Nature Detectives (K-ESS2-2). Shared look with the other Kindergarten labs; lab-specific rules are at the end. */
:root {
  --soft: #2f9df4; --med: #f5a623; --hard: #8e5cf7;
  --ink: #1f2b3a; --good: #2fbf71; --good-dark: #1f8f53; --ui: #2a4a6b;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #13202e; color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 5px solid #ffcc33; outline-offset: 4px; }

#stage {
  position: fixed; left: 50%; top: 50%; width: 1280px; height: 720px; overflow: hidden;
  transform: translate(-50%, -50%); transform-origin: 50% 50%; background: #b8d4e8;
}

/* ------------------------------------------------------------ scenes */
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; }
.scene.show { opacity: 1; visibility: visible; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bg-side { background-image: url(../assets/img/bg_side.jpg), linear-gradient(#c9e0ef 0 42%, #d9ad73 42%); }
.bg-top { background-image: url(../assets/img/bg_top.jpg), linear-gradient(#d8ad74, #cf9f62); }

.spr { position: absolute; left: 0; top: 0; background-repeat: no-repeat; pointer-events: none; }
.spr.missing { background: rgba(255, 255, 255, .55); border-radius: 12px; }

.ball { position: absolute; left: 0; top: 0; will-change: transform; z-index: 5; }
.ball canvas { position: relative; display: block; transition: transform .09s ease-out; transform-origin: 50% 100%; }
#top-ball canvas { transform-origin: 50% 50%; }
#side-ball .shadow {
  position: absolute; left: -16%; width: 132%; height: 22px; bottom: -9px;
  background: radial-gradient(closest-side, rgba(60, 30, 0, .5), rgba(60, 30, 0, 0));
}
#top-ball .shadow {
  position: absolute; left: 7px; top: 11px; width: 100%; height: 100%; border-radius: 50%;
  background: rgba(60, 30, 0, .34); filter: blur(6px);
}

#startline {
  position: absolute; width: 14px; height: 46px; border-radius: 3px; transform: skewX(-38deg);
  background: linear-gradient(90deg, #1b6fd1, #4aa3ff); box-shadow: 0 1px 0 rgba(0, 0, 0, .15); opacity: .92;
}
#side-props .hand { z-index: 6; }
.spr.tap { pointer-events: auto; cursor: pointer; }
#tap-ring {
  position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  border: 7px solid #ffcc33; opacity: 0; pointer-events: none; z-index: 7;
}
#tap-ring.show { animation: ring 1.3s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }

/* stop flags: pennants on poles, one per push */
.flag { position: absolute; width: 0; height: 0; z-index: 3; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; transform: translateY(-50px); opacity: 0; }
.flag.in { transform: none; opacity: 1; }
.flag i { position: absolute; display: block; }
.flag .base { left: -13px; bottom: -6px; width: 26px; height: 11px; border-radius: 50%; background: rgba(40, 20, 0, .3); }
.flag .pole { left: -3px; bottom: 0; width: 6px; height: 108px; border-radius: 3px; background: linear-gradient(90deg, #8f98a2, #f6f7f9 45%, #848d97); }
.flag .pen {
  left: 3px; bottom: 62px; width: 72px; height: 46px; background: var(--c);
  clip-path: polygon(0 0, 100% 50%, 0 100%); transform-origin: 0 50%;
}
.flag .pen b { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; }
.flag .pen s { display: block; width: 7px; height: 20px; border-radius: 3px; background: rgba(255, 255, 255, .9); transform: skewX(-18deg); }
.flag.soft { --c: var(--soft); } .flag.med { --c: var(--med); } .flag.hard { --c: var(--hard); }
.flag.glow .pen { animation: wave .5s ease-in-out 6 alternate; }
@keyframes wave { to { transform: scaleX(.8) skewY(8deg); } }

.block { will-change: transform; z-index: 4; }

/* top view */
#top-hands .thand { z-index: 8; transition: opacity .3s; }
#top-hands .thand.off { opacity: 0; pointer-events: none; }
#top-hands .thand.tap { pointer-events: auto; cursor: pointer; animation: handglow 1.4s ease-in-out infinite; }
@keyframes handglow { 50% { filter: drop-shadow(0 0 12px rgba(255, 214, 51, 1)); } }
#star-wrap .star { transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; transform: scale(.3); opacity: 0; z-index: 2; }
#star-wrap .star.show { transform: none; opacity: 1; }
#star-wrap .star.hit { animation: hop .45s ease-in-out 3; }
@keyframes hop { 50% { transform: scale(1.18) rotate(12deg); } }

/* ------------------------------------------------------------ top bar */
#hud { position: absolute; left: 0; right: 0; top: 0; height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 16px; z-index: 80; }
.hbtn {
  width: 54px; height: 54px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95); box-shadow: 0 3px 0 rgba(0, 0, 0, .18);
}
.hbtn svg { width: 28px; height: 28px; fill: var(--ui); }
.hbtn.grown { width: auto; border-radius: 27px; padding: 0 18px; font-weight: 800; font-size: 16px; color: var(--ui); }
#b-sound .off, #b-sound.muted .on { display: none; }
#b-sound.muted .off { display: block; }
#steps { flex: 1; display: flex; justify-content: center; gap: 12px; }
#steps i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .45); border: 3px solid #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, .2); transition: .3s; }
#steps i.done { background: var(--good); }
#steps i.now { background: #ffcc33; transform: scale(1.35); }

/* ------------------------------------------------------------ narration caption */
#caption {
  position: absolute; left: 50%; top: 84px; transform: translateX(-50%); width: max-content; max-width: 880px;
  min-height: 62px; padding: 14px 26px 14px 70px; border-radius: 24px; background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 26px; line-height: 1.3; font-weight: 700;
  z-index: 75; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
#caption.show { opacity: 1; visibility: visible; }
#stage.no-cap #caption { opacity: 0; visibility: hidden; } /* the end card already says it */
#caption p { margin: 0; }
#caption .spk { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; align-items: center; height: 28px; }
#caption .spk i { display: block; width: 6px; height: 10px; border-radius: 3px; background: #ffb020; }
#caption.talking .spk i { animation: eq .7s ease-in-out infinite; }
#caption.talking .spk i:nth-child(2) { animation-delay: .15s; }
#caption.talking .spk i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 50% { height: 28px; } }
#stage.cap-side #caption { left: 22px; top: 86px; transform: none; max-width: 340px; font-size: 22px; padding-left: 62px; }

/* ------------------------------------------------------------ push buttons + tally */
#pushpad {
  position: absolute; left: 36px; top: 196px; display: flex; gap: 28px; z-index: 50;
  opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .3s, visibility .3s, transform .3s;
}
#pushpad.show { opacity: 1; visibility: visible; transform: none; }
.pbtn {
  position: relative; width: 132px; height: 132px; padding: 0; border-radius: 50%; border: 6px solid #fff;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .38), transparent 55%), var(--c);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .22), 0 12px 24px rgba(0, 0, 0, .18); transition: transform .12s, filter .2s;
}
.pbtn:active { transform: translateY(4px) scale(.97); }
.pbtn.soft { --c: var(--soft); } .pbtn.med { --c: var(--med); } .pbtn.hard { --c: var(--hard); }
.pbtn .ico { left: 50%; top: 50%; transform: translate(-38%, -50%); }
.pbtn .lines { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.pbtn .lines i { display: block; width: 20px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .95); }
.pbtn .lbl {
  position: absolute; left: 50%; bottom: -42px; transform: translateX(-50%); white-space: nowrap;
  font-weight: 800; font-size: 23px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}
.pbtn.tried::after {
  content: "✓"; position: absolute; right: -8px; top: -8px; width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid #fff; background: var(--good); color: #fff; font-weight: 900; font-size: 22px; line-height: 32px;
}
#pushpad.busy .pbtn { filter: saturate(.45) brightness(.92); }
#pushpad.answer .pbtn { animation: pulse 1.5s ease-in-out infinite; }
#pushpad.answer .pbtn.med { animation-delay: .2s; } #pushpad.answer .pbtn.hard { animation-delay: .4s; }
.pbtn.wrong { animation: shake .4s !important; }
.pbtn.right { box-shadow: 0 0 0 10px rgba(47, 191, 113, .75), 0 7px 0 rgba(0, 0, 0, .22); }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

#tally {
  position: absolute; right: 26px; top: 196px; width: 420px; padding: 12px 18px; border-radius: 22px;
  background: rgba(255, 255, 255, .93); box-shadow: 0 8px 20px rgba(0, 0, 0, .16); z-index: 50;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
#tally.show { opacity: 1; visibility: visible; }
.trow { display: flex; align-items: center; gap: 12px; height: 44px; }
.trow .tl { width: 92px; font-weight: 800; font-size: 20px; color: var(--c); }
.trow.soft { --c: var(--soft); } .trow.med { --c: var(--med); } .trow.hard { --c: var(--hard); }
.trow .track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: #eadfcc; }
.trow .tick { position: absolute; bottom: 3px; width: 0; height: 0; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 16px solid #ff7a1a; border-top: 0; }
.trow .dot {
  position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; background: var(--c);
  border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}
.trow.todo .tl { opacity: .45; }

#next {
  position: absolute; right: 28px; bottom: 28px; width: 104px; height: 104px; padding: 0; border-radius: 50%;
  border: 6px solid #fff; background: var(--good); box-shadow: 0 7px 0 var(--good-dark), 0 12px 24px rgba(0, 0, 0, .2);
  display: grid; place-items: center; z-index: 65; opacity: 0; visibility: hidden; transform: scale(.5);
  transition: opacity .3s, visibility .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
#next.show { opacity: 1; visibility: visible; transform: none; animation: nudge 1.6s ease-in-out .8s infinite; }
#next svg { width: 62px; height: 62px; fill: #fff; }
@keyframes nudge { 50% { transform: translateX(6px) scale(1.04); } }

/* ------------------------------------------------------------ panels */
.panel {
  position: absolute; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(15, 30, 45, .38); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.panel.show { opacity: 1; visibility: visible; }
.card { background: #fffdf7; border-radius: 32px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); padding: 36px 48px; text-align: center; max-width: 900px; }
.title-card h1 { font-size: 88px; margin: 4px 0 10px; color: #e23c3c; letter-spacing: 1px; text-shadow: 0 5px 0 #ffd23f; line-height: 1; }
.kicker { margin: 0; font-weight: 800; color: #2a7bd4; text-transform: uppercase; letter-spacing: 2px; }
.sub { margin: 0 0 26px; font-size: 24px; }
.big-btn {
  width: 144px; height: 144px; padding: 0; border-radius: 50%; border: 8px solid #fff; background: var(--good);
  box-shadow: 0 8px 0 var(--good-dark), 0 14px 30px rgba(0, 0, 0, .25); display: inline-grid; place-items: center;
  animation: pulse 1.6s ease-in-out infinite;
}
.big-btn svg { width: 84px; height: 84px; fill: #fff; margin-left: 10px; }

#p-guess { background: rgba(15, 30, 45, .22); backdrop-filter: none; padding-top: 120px; }
.guess-row { display: flex; gap: 70px; }
.guess {
  position: relative; width: 360px; height: 300px; padding: 0; border-radius: 32px; border: 8px solid #fff; background: #fffdf7;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .18), 0 20px 40px rgba(0, 0, 0, .25); transition: transform .2s, opacity .3s, border-color .2s;
}
.guess:hover { transform: translateY(-5px); }
.guess.picked { border-color: #ffcc33; transform: scale(1.06); }
.guess.dim { opacity: .4; transform: scale(.93); }
.g-art { position: absolute; left: 0; right: 0; top: 24px; height: 190px; }
.g-art .lines { position: absolute; display: flex; flex-direction: column; gap: 7px; }
.g-art .lines i { display: block; width: 26px; height: 7px; border-radius: 4px; background: var(--c); opacity: .8; }
.g-art .arrow { position: absolute; height: 10px; border-radius: 5px; background: var(--c); }
.g-art .arrow::after { content: ""; position: absolute; right: -16px; top: -9px; border: 14px solid transparent; border-left: 18px solid var(--c); border-right: 0; }
.g-art canvas { position: absolute; }
.g-art.soft { --c: var(--soft); } .g-art.hard { --c: var(--hard); }
.g-lbl { position: absolute; left: 0; right: 0; bottom: 22px; font-size: 36px; font-weight: 900; }
.guess[data-guess="soft"] .g-lbl { color: var(--soft); }
.guess[data-guess="hard"] .g-lbl { color: var(--hard); }

.done-card { position: relative; margin-top: 70px; padding-top: 104px; max-width: 1000px; }
.badge { position: absolute; left: 50%; top: -78px; transform: translateX(-50%); width: 150px; height: 170px; }
.medal {
  position: relative; z-index: 2; width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; border: 6px solid #fff;
  background: radial-gradient(circle at 35% 30%, #fff7c7, #ffcc33 45%, #dc9c00); box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  display: grid; place-items: center; font-weight: 900; font-size: 22px; line-height: 1.05; color: #7a4b00;
  animation: pop-in .8s cubic-bezier(.3, 1.5, .5, 1);
}
.rib { position: absolute; top: 110px; width: 36px; height: 64px; z-index: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.rib.l { left: 34px; transform: rotate(16deg); background: var(--hard); }
.rib.r { right: 34px; transform: rotate(-16deg); background: var(--soft); }
@keyframes pop-in { from { transform: scale(0) rotate(-120deg); } }
.done-card h2 { margin: 0 0 14px; font-size: 38px; color: var(--ui); }
.ideas { display: flex; gap: 26px; margin-bottom: 26px; }
.idea { flex: 1; background: #fff; border-radius: 24px; padding: 18px 20px; box-shadow: inset 0 0 0 3px #f0e6d2; }
.idea p { margin: 10px 0 0; font-size: 25px; line-height: 1.3; }
.idea-art { position: relative; height: 128px; }
.idea-art.strength i { position: absolute; left: 30px; height: 12px; border-radius: 6px; }
.idea-art.strength i::after { content: ""; position: absolute; right: -18px; top: -10px; border: 16px solid transparent; border-left: 20px solid currentColor; border-right: 0; }
.idea-art.strength .a1 { top: 34px; width: 90px; background: var(--soft); color: var(--soft); }
.idea-art.strength .a2 { top: 82px; width: 330px; background: var(--hard); color: var(--hard); }
.idea-art.way::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, #d42a2a 55%, #8c1515);
}
.idea-art.way i { position: absolute; left: 50%; top: 50%; width: 70px; height: 10px; margin-top: -5px; border-radius: 5px; background: var(--med); transform-origin: 0 50%; }
.idea-art.way i::after { content: ""; position: absolute; right: -14px; top: -8px; border: 13px solid transparent; border-left: 16px solid var(--med); border-right: 0; }
.idea-art.way i:nth-child(1) { transform: rotate(0deg) translateX(34px); }
.idea-art.way i:nth-child(2) { transform: rotate(90deg) translateX(30px); width: 16px; }
.idea-art.way i:nth-child(3) { transform: rotate(180deg) translateX(34px); }
.idea-art.way i:nth-child(4) { transform: rotate(270deg) translateX(30px); width: 16px; }
.pill { border: 0; border-radius: 32px; padding: 16px 30px; margin: 0 8px; font-size: 22px; font-weight: 800; color: #fff; background: var(--good); box-shadow: 0 5px 0 var(--good-dark); }
.pill.ghost { color: var(--ui); background: #fff; box-shadow: 0 5px 0 #c9d3dd, inset 0 0 0 3px #c9d3dd; }

#p-parents { z-index: 90; }
.parents-card { position: relative; max-width: 860px; text-align: left; font-size: 19px; line-height: 1.45; padding: 30px 40px; }
.parents-card h2 { margin: 0 0 10px; color: var(--ui); }
.parents-card p { margin: 0 0 12px; }
.parents-card .fine { font-size: 13px; color: #5b6b7b; margin-top: 18px; }
.parents-card .x { position: absolute; right: 16px; top: 12px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #eef2f6; font-size: 30px; line-height: 1; }

/* ------------------------------------------------------------ print: the lab record only */
#print-sheet { display: none; }
@media print {
  html, body { background: #fff; overflow: visible; height: auto; }
  #stage { display: none; }
  #print-sheet { display: block; color: #000; font-family: Georgia, "Times New Roman", serif; font-size: 14pt; padding: 10mm; }
  #print-sheet h1 { font-size: 24pt; margin: 0 0 4pt; }
  #print-sheet h2 { font-size: 15pt; margin: 16pt 0 4pt; }
  #print-sheet .meta { color: #444; margin: 0 0 14pt; }
  #print-sheet table { border-collapse: collapse; min-width: 60%; }
  #print-sheet td, #print-sheet th { border: 1px solid #888; padding: 5pt 10pt; text-align: left; }
  #print-sheet .fine { font-size: 8pt; color: #555; margin-top: 24pt; }
}

/* ============================================================ K-PS3-1 additions */
:root { --cool: #2f8ff0; --warm: #f59a12; --hot: #ee3b2a; }
.bg-yard { background-image: url(../assets/img/bg_yard.jpg), linear-gradient(#9fd0ff 0 48%, #6fae4a 48%); }
/* the light of the day: soft orange in the morning, clear at noon */
#light { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 170, 90, .22), rgba(255, 210, 150, .06) 60%); opacity: 0; }

#sun { position: absolute; left: 0; top: 0; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle, #fffef4 0 24%, #fff3a8 33%, #ffd84d 45%, rgba(255, 216, 77, .35) 57%, rgba(255, 216, 77, 0) 70%); }
#sun::after { content: ""; position: absolute; inset: -70px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 244, 190, .5), rgba(255, 244, 190, 0) 62%); }
#sun .rays { position: absolute; inset: -34px; border-radius: 50%; pointer-events: none; animation: spin 24s linear infinite;
  background: repeating-conic-gradient(rgba(255, 224, 110, .55) 0 7deg, transparent 7deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 43%, #000 58%, transparent 71%);
          mask: radial-gradient(circle, transparent 40%, #000 43%, #000 58%, transparent 71%); }
#sun.tap { cursor: pointer; animation: sunpulse 1.3s ease-in-out infinite; }
@keyframes sunpulse { 50% { transform: scale(1.12); filter: brightness(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }

#clock { position: absolute; left: 26px; top: 92px; width: 84px; height: 84px; border-radius: 50%; z-index: 30; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle, #fff 0 60%, #f3f3f3 61%); border: 5px solid #2a4a6b; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
#clock.show { opacity: 1; }
#clock::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #2a4a6b; z-index: 2; }
#clock i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 3px; background: #2a4a6b; }
#clock .h { width: 6px; height: 22px; margin-left: -3px; }
#clock .m { width: 4px; height: 32px; margin-left: -2px; background: #e2553b; }

/* trays, with heat haze rising off them when they're warm */
.tray { position: absolute; z-index: 4; transition: opacity .3s; }
.tray.tap { cursor: pointer; }
.tray.tap .spr { animation: trayhint 1.6s ease-in-out infinite; }
@keyframes trayhint { 50% { filter: brightness(1.12) drop-shadow(0 0 10px rgba(255, 214, 51, .95)); } }
.tray .spr { position: relative; display: block; filter: drop-shadow(4px 6px 5px rgba(30, 40, 10, .35)); }
.tray .heat { position: absolute; left: 8%; right: 8%; bottom: 66%; height: 110px; pointer-events: none; opacity: 0; transition: opacity .6s; }
.tray .heat i {
  position: absolute; bottom: 0; width: 18px; height: 78px; opacity: 0; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .8));
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 14 60%22%3E%3Cpath d=%22M7 60 C0 50 14 40 7 30 S0 10 7 0%22 fill=%22none%22 stroke=%22white%22 stroke-width=%224%22 stroke-linecap=%22round%22 opacity=%22.85%22/%3E%3C/svg%3E") no-repeat center / contain;
  animation: haze 1.8s ease-in infinite;
}
.tray .heat i:nth-child(1) { left: 10%; } .tray .heat i:nth-child(2) { left: 45%; animation-delay: .6s; } .tray .heat i:nth-child(3) { left: 78%; animation-delay: 1.2s; }
@keyframes haze { 0% { transform: translateY(10px) scaleX(1); opacity: 0; } 30% { opacity: 1; } 60% { transform: translateY(-22px) scaleX(-1); } 100% { transform: translateY(-50px) scaleX(1); opacity: 0; } }

/* the hand that feels a tray reaches down from above */
#hand-wrap .hand { z-index: 9; }

/* cool / warm / hot stickers, each with a little no-numbers thermometer */
.stk { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 22px; border: 3px solid #fff;
  background: var(--k); color: #fff; font-weight: 900; font-size: 20px; box-shadow: 0 3px 6px rgba(0, 0, 0, .2); white-space: nowrap; }
.stk.cool { --k: var(--cool); --f: 22%; } .stk.warm { --k: var(--warm); --f: 55%; } .stk.hot { --k: var(--hot); --f: 88%; }
.thermo { position: relative; width: 12px; height: 30px; border-radius: 6px 6px 0 0; background: #fff; margin-bottom: 6px; }
.thermo::after { content: ""; position: absolute; left: -4px; bottom: -9px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.thermo b { position: absolute; left: 3px; right: 3px; bottom: 0; height: var(--f); background: var(--k); border-radius: 3px 3px 0 0; z-index: 1; }
.thermo b::after { content: ""; position: absolute; left: -7px; bottom: -14px; width: 14px; height: 14px; border-radius: 50%; background: var(--k); }

#bubbles .feel { position: absolute; z-index: 20; transform: translate(-50%, -100%) scale(.4); opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .25s; }
#bubbles .feel.in { transform: translate(-50%, -100%) scale(1.35); opacity: 1; }

#chart { position: absolute; right: 24px; top: 190px; z-index: 50; padding: 12px 16px; border-radius: 22px; background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  display: grid; grid-template-columns: 74px repeat(3, 112px); align-items: center; justify-items: center; row-gap: 6px; }
#chart.show { opacity: 1; visibility: visible; }
#chart .hd { height: 58px; display: grid; place-items: center; position: relative; width: 104px; }
#chart .rh { width: 62px; height: 62px; display: grid; place-items: center; }
#chart .cell { width: 104px; height: 62px; border-radius: 14px; background: #f1ece2; display: grid; place-items: center; }
#chart .cell .stk { transform: scale(.8); animation: stickin .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stickin { from { transform: scale(0) rotate(-30deg); } }
#chart .cell.flash { animation: cellflash .5s ease-in-out 4 alternate; }
@keyframes cellflash { to { background: #fff2b3; } }
#chart.mid { right: auto; left: 50%; transform: translateX(-50%); top: 384px; }

/* small sun and tree icons (chart rows, buttons, cards) */
.ico-sun { position: relative; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle, #fff6b0 0 30%, #ffcf2e 32% 54%, transparent 56%),
              repeating-conic-gradient(#ffcf2e 0 12deg, transparent 12deg 45deg);
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 71%); mask: radial-gradient(circle, #000 70%, transparent 71%); }
.ico-tree { position: relative; width: 50px; height: 52px; }
.ico-tree::before { content: ""; position: absolute; left: 21px; bottom: 0; width: 8px; height: 20px; border-radius: 3px; background: #7a4f2a; }
.ico-tree::after { content: ""; position: absolute; left: 3px; top: 0; width: 44px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6fcf5a, #2f8f3a 70%); box-shadow: -6px 6px 0 -2px #3a9a43, 8px 8px 0 -3px #2e8237; }

#choices { position: absolute; left: 50%; top: 228px; transform: translateX(-50%); z-index: 52; display: flex; gap: 26px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
#choices.show { opacity: 1; visibility: visible; }
.cbtn { position: relative; min-width: 170px; height: 150px; padding: 10px 18px 40px; border-radius: 26px; border: 6px solid #fff;
  background: #fffdf7; box-shadow: 0 7px 0 rgba(0, 0, 0, .2), 0 12px 24px rgba(0, 0, 0, .18); display: grid; place-items: center; transition: transform .12s; }
.cbtn:active { transform: translateY(4px); }
.cbtn .lbl { position: absolute; left: 0; right: 0; bottom: 8px; font-weight: 900; font-size: 22px; color: var(--ui); }
.cbtn .ico-sun, .cbtn .ico-tree { transform: scale(1.5); }
.cbtn.sun { background: #fff6d6; } .cbtn.shade { background: #e3f4e0; }
.cbtn.wrong { animation: shake .4s; }
.cbtn.right { box-shadow: 0 0 0 10px rgba(47, 191, 113, .75), 0 7px 0 rgba(0, 0, 0, .2); }
#choices.sort { top: 330px; width: 1200px; justify-content: space-between; }
.cbtn .spr { position: relative; }
#choices.sort .cbtn { min-width: 250px; }

.item { position: absolute; z-index: 7; filter: drop-shadow(4px 7px 5px rgba(30, 40, 10, .35)); transform-origin: 50% 100%; }
.item.melt { animation: melt 1.4s ease-in forwards; }
@keyframes melt { to { transform: scaleY(.55); filter: saturate(1.4) brightness(1.1) drop-shadow(4px 7px 5px rgba(30, 40, 10, .35)); } }
.item.wobble { animation: shake .5s 2; }

/* guess cards and end card */
.tray-pic { position: absolute; }
.g-art .ico-sun, .idea-art .ico-sun { position: absolute; transform: scale(1.7); }
.g-art .ico-tree, .idea-art .ico-tree { position: absolute; transform: scale(2.2); }
.g-art .stk, .idea-art .stk { position: absolute; }
.guess[data-guess="sun"] .g-lbl { color: #d68a00; font-size: 30px; }
.guess[data-guess="shade"] .g-lbl { color: #2f8f3a; font-size: 30px; }
.idea-art.i-sun, .idea-art.i-shade { height: 128px; }
.medal span { font-size: 18px; }

/* ============================================================ K-PS3-2 additions */
.bg-patio { background-image: url(../assets/img/bg_patio.jpg), linear-gradient(#9fd0ff 0 46%, #c9c7c0 46%); }

/* an ice cube drawn in CSS: glossy, see-through blue, with a top highlight and a shine */
.ice { position: absolute; width: 60px; height: 54px; margin-left: -30px; transform-origin: 50% 100%; z-index: 6; pointer-events: none; }
.ice .cube {
  position: absolute; inset: 0; border-radius: 11px 13px 9px 12px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .96) 0%, rgba(214, 240, 255, .86) 30%, rgba(160, 212, 245, .78) 70%, rgba(126, 192, 234, .84) 100%);
  box-shadow: inset -8px -10px 13px rgba(60, 130, 195, .5), inset 7px 7px 10px rgba(255, 255, 255, .95), 0 3px 6px rgba(40, 80, 120, .28);
}
.ice .cube::before { content: ""; position: absolute; left: 7px; right: 9px; top: 4px; height: 13px; border-radius: 7px; background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); }
.ice .cube::after { content: ""; position: absolute; left: 11px; top: 16px; width: 7px; height: 24px; border-radius: 4px; background: rgba(255, 255, 255, .85); transform: rotate(12deg); }
.ice .drip { position: absolute; left: 70%; top: 40%; width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: rgba(170, 215, 245, .9); opacity: 0; }
.ice.melting .drip { animation: drip 1.1s ease-in infinite; }
.ice.melting .drip.d2 { left: 22%; animation-delay: .55s; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
.puddle { position: absolute; z-index: 5; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 40% 35%, rgba(255, 255, 255, .8), rgba(175, 218, 246, .62) 32%, rgba(118, 182, 228, .5) 68%, rgba(118, 182, 228, 0) 71%); }
.plate { z-index: 4; }

/* stick frames and roofs */
.leg { position: absolute; width: 9px; border-radius: 4px; z-index: 7; background: linear-gradient(90deg, #8a5a2e, #c48b55 45%, #7b4e26); pointer-events: none; }
.leg.back { width: 7px; z-index: 3; filter: brightness(.8); }
.roof { position: absolute; height: 26px; z-index: 8; transform: skewX(-32deg); border-radius: 3px; pointer-events: none; transition: opacity .3s; }
.roof.empty { border: 3px dashed rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .15); }
.roof.m-clear { background: linear-gradient(100deg, rgba(255, 255, 255, .6), rgba(220, 240, 255, .16) 38%, rgba(255, 255, 255, .5) 52%, rgba(220, 240, 255, .14) 70%, rgba(255, 255, 255, .4));
  border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 5px 0 -1px rgba(210, 235, 255, .55); }
.roof.m-paper { background: linear-gradient(180deg, #ffffff, #f1f1ea); border: 1px solid #ddd8cc; box-shadow: 0 4px 0 -1px #e2ddd0, 0 3px 6px rgba(0, 0, 0, .08); }
.roof.m-card { background: repeating-linear-gradient(90deg, #c58f57 0 7px, #b47d48 7px 13px); border: 1px solid #8e6033; box-shadow: 0 6px 0 -1px #94643a; }
/* shadows on the patio: darker under roofs that block more light */
.shade { position: absolute; z-index: 2; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(25, 35, 45, 1), rgba(25, 35, 45, .85) 60%, rgba(25, 35, 45, 0)); opacity: 0; transition: opacity .4s; }
.hit { position: absolute; z-index: 12; border-radius: 20px; }
.hit.tap { cursor: pointer; animation: hitglow 1.6s ease-in-out infinite; }
@keyframes hitglow { 50% { box-shadow: 0 0 0 6px rgba(255, 214, 51, .9), inset 0 0 30px rgba(255, 236, 150, .5); } }
.tag { position: absolute; z-index: 9; transform: translateX(-50%); padding: 3px 12px; border-radius: 12px; background: rgba(255, 255, 255, .92);
  font-weight: 800; font-size: 17px; color: var(--ui); white-space: nowrap; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }

#umbrella-wrap .umb { z-index: 9; transform-origin: 50% 100%; }
#umbrella-wrap .umb.tap { cursor: pointer; pointer-events: auto; }

/* material swatches (buttons, guess cards, chart) */
.swatch { display: block; width: 110px; height: 34px; transform: skewX(-24deg); border-radius: 4px; }
.swatch.m-clear { background: linear-gradient(100deg, rgba(255, 255, 255, .9), rgba(200, 228, 250, .45) 40%, rgba(255, 255, 255, .8) 55%, rgba(200, 228, 250, .4)); border: 2px solid #b9d9f2; }
.swatch.m-paper { background: #fff; border: 2px solid #ddd8cc; }
.swatch.m-card { background: repeating-linear-gradient(90deg, #c58f57 0 7px, #b47d48 7px 13px); border: 2px solid #8e6033; }
.swatch.m-none { transform: none; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, #fff6b0 0 30%, #ffcf2e 32% 54%, transparent 56%), repeating-conic-gradient(#ffcf2e 0 12deg, transparent 12deg 45deg); }
.swatch.small { width: 60px; } .swatch.big { width: 150px; }
.cbtn .swatch { margin-bottom: 4px; }
/* the material classes are m-clear / m-paper / m-card: plain "card" would pick up the panel style */
.cbtn.used { opacity: .35; pointer-events: none; }
.guess-row.three { gap: 36px; }
.guess-row.three .guess { width: 300px; height: 280px; }
.guess .g-art .swatch { position: absolute; left: 50%; top: 70px; width: 170px; height: 54px; margin-left: -85px; }
.guess .g-lbl { font-size: 30px; color: var(--ui); }

/* ice-size stickers */
.isz { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 22px; border: 3px solid #fff;
  background: var(--k); color: #fff; font-weight: 900; font-size: 19px; box-shadow: 0 3px 6px rgba(0, 0, 0, .2); white-space: nowrap; }
.isz.big { --k: #1f7fe0; } .isz.medium { --k: #3aa9d8; } .isz.small { --k: #f59a12; } .isz.melted { --k: #ee3b2a; }
.isz .mini { position: relative; width: 26px; height: 24px; }
.isz .mini .ice { position: absolute; left: 50%; bottom: 0; margin-left: 0; transform: translateX(-50%) scale(var(--sc)); transform-origin: 50% 100%; }
.isz .mini .ice .cube { box-shadow: inset -4px -5px 6px rgba(60, 130, 195, .5), inset 3px 3px 5px rgba(255, 255, 255, .95); }
.isz .mini .pud { position: absolute; left: -2px; right: -2px; bottom: 2px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse, #e6f4ff, #9fd0f2 70%); }
#chart.k32 { grid-template-columns: 74px repeat(4, 118px); }
#chart.k32 .hd { width: 112px; }
#chart.k32 .cell { width: 112px; }
#chart .cell .isz { transform: scale(.82); animation: stickin .4s cubic-bezier(.3, 1.6, .5, 1); }
.idea-art.i-block, .idea-art.i-best { height: 128px; }
.medal span { font-size: 19px; }

/* ============================================================ K-LS1-1 additions */
.bg-class { background-image: url(../assets/img/bg_class.jpg), linear-gradient(#d9ecf7 0 55%, #e4c79c 55%); }
.title-card h1 { font-size: 64px; }

#plants canvas { position: absolute; z-index: 3; pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(40, 50, 20, .55)) drop-shadow(1px 2px 2px rgba(40, 30, 10, .3)); } /* stands out against the bright window */
.pot { z-index: 4; }
.potag { position: absolute; z-index: 5; transform: translateX(-50%); display: flex; gap: 6px; padding: 4px 10px; border-radius: 16px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.phit { position: absolute; z-index: 11; border-radius: 22px; }
.phit.tap { cursor: pointer; animation: hitglow 1.6s ease-in-out infinite; }
@keyframes hitglow { 50% { box-shadow: 0 0 0 6px rgba(255, 214, 51, .9), inset 0 0 40px rgba(255, 236, 150, .35); } }
.box { z-index: 9; filter: drop-shadow(5px 8px 6px rgba(40, 30, 10, .35)); }
.box.tap, .can.tap { pointer-events: auto; cursor: pointer; }
.can { z-index: 10; transform-origin: 70% 60%; filter: drop-shadow(4px 6px 5px rgba(40, 30, 10, .3)); }

/* water drops falling from the can */
#drops i { position: absolute; z-index: 9; width: 7px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(#bfe3ff, #3b9cf0); opacity: 0; animation: fall .7s ease-in forwards; }
@keyframes fall { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(110px); opacity: 0; } }

/* day and night during the two weeks */
#night { position: absolute; inset: 0; z-index: 20; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 30% 10%, rgba(20, 30, 70, .55), rgba(5, 10, 35, .78)); }
#calendar { position: absolute; left: 28px; top: 200px; z-index: 30; width: 130px; height: 140px; border-radius: 18px; overflow: hidden;
  background: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); text-align: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
#calendar.show { opacity: 1; visibility: visible; }
#calendar b { display: block; height: 40px; line-height: 40px; background: #e2553b; color: #fff; font-size: 22px; letter-spacing: 1px; }
#calendar span { display: block; font-size: 66px; font-weight: 900; line-height: 96px; color: var(--ui); }
#calendar.tap { cursor: pointer; animation: pulse 1.3s ease-in-out infinite; }

/* need icons: a water drop and a sun, crossed out when the plant doesn't get it */
.ic { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; }
.ic.water::before { content: ""; width: 20px; height: 20px; border-radius: 0 50% 50% 50%; transform: rotate(45deg) translate(3px, 3px); background: linear-gradient(135deg, #a8dbff, #2e8ff0); }
.ic.sun::before { content: ""; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle, #fff6b0 0 28%, #ffcf2e 30% 52%, transparent 54%), repeating-conic-gradient(#ffcf2e 0 12deg, transparent 12deg 45deg); }
.ic.no::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 5px; margin-top: -2px; border-radius: 3px;
  background: #e2332a; transform: rotate(-45deg); box-shadow: 0 0 0 2px #fff; }

/* what a plant looks like after two weeks */
.obs { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 22px; border: 3px solid #fff;
  background: var(--k); color: #fff; font-weight: 900; font-size: 19px; box-shadow: 0 3px 6px rgba(0, 0, 0, .2); white-space: nowrap; }
.obs.healthy { --k: #2f9e47; } .obs.dried { --k: #8f5d31; } .obs.pale { --k: #d9ad1c; color: #4a3a00; }
.obs i { width: 16px; height: 16px; border-radius: 0 70% 0 70%; background: rgba(255, 255, 255, .85); }
#chart.kls { grid-template-columns: 60px repeat(3, 170px); top: 578px; right: auto; left: 50%; transform: translateX(-50%); } /* on the counter front, below the pots, clear of the Next button */
#chart.kls.mid { top: 578px; }
#chart.kls .hd { width: 160px; height: 46px; display: flex; gap: 4px; justify-content: center; }
#chart.kls .cell { width: 160px; }
#chart.kls .cell .obs { transform: scale(.85); animation: stickin .4s cubic-bezier(.3, 1.6, .5, 1); }
#chart.kls .rh::before { content: ""; width: 26px; height: 26px; border-radius: 0 70% 0 70%; background: linear-gradient(135deg, #7fd36a, #2f9e47); }

.cbtn .ics { display: flex; gap: 2px; }
.cbtn .spr { position: relative; }
.guess-row.three { gap: 36px; }
.guess-row.three .guess { width: 300px; height: 290px; }
.guess .g-art .spr { position: absolute; }
.guess .g-art .ics { position: absolute; left: 0; right: 0; top: 4px; display: flex; justify-content: center; gap: 6px; transform: scale(1.3); }
.guess .g-art canvas { position: absolute; }
.guess .g-lbl { font-size: 28px; color: var(--ui); }

/* class pets */
.pet { z-index: 6; transform-origin: 50% 100%; filter: drop-shadow(4px 7px 5px rgba(40, 30, 10, .3)); transition: filter .3s; }
.pet.now { animation: petglow 1.5s ease-in-out infinite; }
@keyframes petglow { 50% { filter: drop-shadow(0 0 14px rgba(255, 214, 51, 1)) drop-shadow(4px 7px 5px rgba(40, 30, 10, .3)); } }
.pet.hop { animation: pethop .5s ease-in-out 2; }
@keyframes pethop { 50% { transform: translateY(-16px) scaleY(1.04); } }
.pet.sip { animation: petsip .7s ease-in-out 3; }
@keyframes petsip { 50% { transform: rotate(6deg) translateY(4px); } }
.bowl { position: absolute; z-index: 6; width: 190px; height: 170px; border-radius: 48% 48% 44% 44%;
  background: radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 30%),
              linear-gradient(rgba(220, 240, 255, .25) 0 26%, rgba(120, 190, 240, .55) 26%, rgba(70, 150, 220, .6));
  border: 3px solid rgba(255, 255, 255, .75); box-shadow: inset 0 -10px 20px rgba(30, 90, 160, .35), 0 6px 10px rgba(0, 0, 0, .18); overflow: hidden; }
.bowl::before { content: ""; position: absolute; left: 22%; right: 22%; top: -6px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); }
.bowl::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 6px; height: 18px; border-radius: 50%; background: linear-gradient(#e6d1a0, #c9a86a); }
.bowl.now { animation: petglow 1.5s ease-in-out infinite; }
.bowl .fish { position: absolute; left: 50px; top: 70px; animation: swim 4s ease-in-out infinite; }
@keyframes swim { 0%, 100% { transform: translateX(-26px); } 50% { transform: translateX(30px); } }
.bowl .fish.up { animation: none; transform: translate(10px, -26px) rotate(-14deg); transition: transform .5s; }
.dish { position: absolute; z-index: 7; width: 64px; height: 20px; border-radius: 0 0 32px 32px / 0 0 20px 20px;
  background: linear-gradient(#bfe3ff 0 30%, #e6e6ea 32%, #b9bcc4); box-shadow: 0 3px 4px rgba(0, 0, 0, .2); transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.dish.in { transform: scale(1); }
.food-fly { position: absolute; z-index: 25; pointer-events: none; }
.cbtn.water-btn .ic { transform: scale(1.8); }
.idea-art.i-plant, .idea-art.i-animal { height: 128px; }
.idea-art .ics { position: absolute; display: flex; gap: 6px; }
.idea-art .spr { position: absolute; }
.medal span { font-size: 17px; }


/* ============================================================ K-ESS2-2 additions */
.st-before { background-image: url(../assets/img/stream_before.jpg); }
.st-mid { background-image: url(../assets/img/stream_mid.jpg); opacity: 0; }
.st-after { background-image: url(../assets/img/stream_after.jpg); opacity: 0; }
.st, #cmp-after { background-color: #6f9a55; }

/* before / after slider: the "after" photo is clipped to the left of the handle */
#cmp-after { z-index: 2; opacity: 0; pointer-events: none; clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
#cmp-after.show { opacity: 1; }
#cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 0; z-index: 30; display: none; }
#cmp-handle.show { display: block; }
#cmp-handle i { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); }
#cmp-handle::after { content: "⟷"; position: absolute; left: -38px; top: 50%; width: 76px; height: 76px; margin-top: -38px; border-radius: 50%;
  background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); display: grid; place-items: center; font-size: 36px; font-weight: 900; color: var(--ui); cursor: grab; }
#cmp-handle.hint::after { animation: nudgex 1.4s ease-in-out infinite; }
@keyframes nudgex { 50% { transform: translateX(18px); } }
#cmp-handle b { position: absolute; top: 150px; padding: 6px 14px; border-radius: 16px; background: rgba(255, 255, 255, .92); color: var(--ui); font-size: 20px; white-space: nowrap; }
#cmp-handle b:nth-of-type(1) { left: 24px; } #cmp-handle b:nth-of-type(2) { right: 24px; }
#cmp-hit { position: absolute; inset: 0; z-index: 29; }

/* the beaver, its sticks and the pile */
#actors { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#actors .spr { filter: drop-shadow(4px 6px 5px rgba(20, 30, 10, .35)); }
.beaver { z-index: 7; transform-origin: 50% 100%; transition: clip-path .3s; }
.beaver.swim { clip-path: inset(0 0 42% 0); }
.beaver.flip { transform: scaleX(-1); }
.ripple { position: absolute; z-index: 6; width: 180px; height: 26px; margin-left: -90px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .6); opacity: 0; }
.ripple.on { opacity: 1; animation: ripple 1.2s ease-out infinite; }
@keyframes ripple { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }
.pile { z-index: 8; pointer-events: auto; cursor: pointer; }
.pile.tap { animation: pilehint 1.4s ease-in-out infinite; }
@keyframes pilehint { 50% { filter: brightness(1.15) drop-shadow(0 0 12px rgba(255, 214, 51, 1)); transform: scale(1.06); } }
.carry { z-index: 8; }

/* the evidence photo */
#photo { position: absolute; left: 40px; top: 196px; z-index: 40; width: 760px; height: 428px; padding: 10px; border-radius: 18px; background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35); display: none; transform: rotate(-1deg); }
#photo.show { display: block; animation: stickin .45s cubic-bezier(.3, 1.4, .5, 1); }
#photo .pic { width: 100%; height: 100%; border-radius: 10px; background-size: cover; background-position: center; }
#scene.dim .st { filter: blur(3px) brightness(.75); }

/* choices on the right, stacked (detective step) */
#choices.side { left: auto; right: 34px; top: 190px; transform: none; flex-direction: column; gap: 14px; }
#choices.side .cbtn { min-width: 300px; height: 150px; grid-template-columns: 130px 1fr; padding: 10px 18px; }
#choices.side .cbtn .lbl { position: static; font-size: 26px; text-align: left; }
#choices.side .cbtn .spr { position: relative; }
.need { width: 90px; height: 90px; display: block; }
.need svg { width: 100%; height: 100%; }
.thumb { display: block; width: 200px; height: 112px; border-radius: 12px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .8); }
#choices .cbtn .thumb { margin-bottom: 4px; }
#choices.thumbs .cbtn { height: 170px; }

/* guess cards */
.g-art.yes, .g-art.no { display: grid; place-items: center; font-size: 120px; }
.g-art.yes::before { content: "👍"; } .g-art.no::before { content: "👎"; }
.guess[data-guess="yes"] .g-lbl { color: #2f9e47; } .guess[data-guess="no"] .g-lbl { color: #c0392b; }
.idea-art.i-animals, .idea-art.i-people { height: 128px; position: relative; }
.idea-art .spr { position: absolute; }
.medal span { font-size: 18px; }
#stage.cap-right #caption { left: auto; right: 22px; top: 86px; transform: none; max-width: 360px; font-size: 22px; padding-left: 62px; }
