/* Petal Percent — chunky picture-book UI to match the ChatGPT art (dark-brown outlines, cream panels). */

@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/fredoka-latin.woff2?v=a79f057b3d') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #4a2a14;
  --cream: #fff7e3;
  --cream-2: #ffeec4;
  --leaf: #7ed957;
  --leaf-dark: #2e8f1c;
  --sky: #bfe9ff;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
}
body {
  font-family: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  color: var(--ink);
  background: var(--sky);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
#app {
  position: fixed;
  inset: 0;
}
.screen {
  position: absolute;
  inset: 0;
}
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
.grid:focus-visible {
  outline: 4px solid #3d9bff;
  outline-offset: 3px;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.btn.primary {
  background: linear-gradient(#9be86f, #6cc944);
}
.btn.big {
  font-size: clamp(26px, 5vmin, 38px);
  padding: 12px 44px;
  box-shadow: 0 6px 0 var(--ink);
}
.btn:active,
.icon-btn:active,
.lvl:active,
.can-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.link-btn {
  background: none;
  border: 0;
  text-decoration: underline;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.7;
  padding: 8px;
}

.icon-btn {
  flex: none;
  width: clamp(44px, 11vw, 54px);
  height: clamp(44px, 11vw, 54px);
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.2s;
}
.icon-btn img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.icon-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
}
.topbar h1 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 5vmin, 34px);
}

/* ── title screen ────────────────────────────────────────────────────────── */

.title-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.hero {
  position: absolute;
  inset: 0;
  background: 36% 72% / cover no-repeat;
  z-index: -1;
}
.title-top {
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 0;
}
.title-main {
  text-align: center;
  padding: 0 12px;
}
.logo {
  margin: 0;
  font-size: clamp(46px, 11.5vmin, 120px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.logo .w {
  display: inline-block;
  white-space: nowrap;
}
.logo .w span {
  display: inline-block;
  color: var(--c);
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--ink);
  animation: bob 2.6s ease-in-out infinite;
}
.logo .w span:nth-child(2n) {
  animation-delay: -1.3s;
}
.logo .w span:nth-child(3n) {
  animation-delay: -0.6s;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-0.06em) rotate(2deg);
  }
}
.tagline {
  margin: 8px auto 16px;
  display: inline-block;
  font-size: clamp(17px, 3.2vmin, 26px);
  font-weight: 600;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 16px;
  box-shadow: 0 3px 0 var(--ink);
}
.title-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.collection {
  margin-top: auto;
  margin-bottom: 14px;
  background: rgba(255, 247, 227, 0.94);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 6px 12px 8px;
  text-align: center;
  max-width: calc(100% - 20px);
}
.collection h2 {
  margin: 0 0 2px;
  font-size: 16px;
}
.collection-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}
.collection-row img {
  width: clamp(26px, 7.6vw, 54px);
}
img.locked {
  filter: brightness(0) opacity(0.22);
}

/* ── gardens map ─────────────────────────────────────────────────────────── */

.map-screen {
  display: flex;
  flex-direction: column;
  background: linear-gradient(#bfe9ff, #dff6c8);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.star-total {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 18px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  box-shadow: 0 3px 0 var(--ink);
}
.star-total img {
  width: 28px;
}
.gardens {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.garden-card {
  position: relative;
  flex: none;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 5px 0 var(--ink);
  background: var(--bg) center 60% / cover no-repeat, #9fd77f;
  padding: 10px 12px 18px;
  overflow: hidden;
}
.garden-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.28));
  pointer-events: none;
}
.garden-card > * {
  position: relative;
}
.gc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.gc-head h2 {
  margin: 0;
  font-size: clamp(22px, 4.6vmin, 30px);
  color: #fff;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.gc-new {
  display: flex;
  gap: 2px;
  background: rgba(255, 247, 227, 0.85);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 8px;
}
.gc-new img {
  width: 30px;
}
.gc-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 12px;
  max-width: 520px;
  margin: 0 auto;
}
@media (min-width: 700px) {
  .gc-levels {
    grid-template-columns: repeat(8, 1fr);
    max-width: none;
  }
}
.lvl {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 82px;
  justify-self: center;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--ink);
  font-size: clamp(22px, 5vmin, 30px);
  font-weight: 700;
}
.lvl.done {
  background: linear-gradient(#fff8d6, #ffe58a);
}
.lvl.next {
  background: linear-gradient(#c9f7ae, #8fe066);
  animation: pulse 1.3s ease-in-out infinite;
}
.lvl.locked {
  background: #d8cbb6;
  cursor: default;
}
.lvl .lock {
  width: 52%;
}
.lvl .mini-stars {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}
.lvl .mini-stars img {
  width: clamp(16px, 4vmin, 22px);
  filter: grayscale(1) brightness(1.4) opacity(0.55);
}
.lvl .mini-stars img.on {
  filter: none;
}
.lvl.locked .mini-stars,
.lvl.open .mini-stars {
  display: none;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.garden-card.locked {
  filter: saturate(0.35) brightness(0.92);
}
.gc-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-weight: 600;
  background: rgba(255, 247, 227, 0.9);
  border-radius: 999px;
  padding: 2px 10px;
}
.gc-lock img {
  width: 24px;
}
.map-foot {
  text-align: center;
  padding: 0 0 calc(4px + env(safe-area-inset-bottom));
}

/* ── play screen ─────────────────────────────────────────────────────────── */

.play-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: 'top' 'order' 'board' 'cans';
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  isolation: isolate;
  overflow: hidden;
}
.play-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
}
.play-screen > .topbar {
  grid-area: top;
}
.lvl-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  color: #fff;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--ink);
}
.lvl-title b {
  font-size: clamp(22px, 4.6vmin, 32px);
}
.lvl-title span {
  font-size: clamp(13px, 2.4vmin, 17px);
  font-weight: 600;
  -webkit-text-stroke-width: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.order {
  grid-area: order;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: 'bee bubble' 'chips chips';
  gap: 6px 6px;
  padding: 0 10px;
  align-items: center;
}
.bee-btn {
  grid-area: bee;
  width: clamp(54px, 15vw, 84px);
  padding: 0;
  background: none;
  border: 0;
  position: relative;
}
.bee-btn img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 3px 0 rgba(74, 42, 20, 0.35));
}
.bee-btn::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234a2a14' d='M4 9v6h4l5 4V5L8 9H4zm12.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.bee-btn.talking img {
  animation: talk 0.5s ease-in-out infinite alternate;
}
@keyframes talk {
  to {
    transform: translateY(-4px) rotate(-4deg);
  }
}
.bubble {
  grid-area: bubble;
  position: relative;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 7px 12px;
  box-shadow: 0 4px 0 var(--ink);
}
.bubble::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 50%;
  width: 18px;
  height: 18px;
  background: #fff;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
}
.say {
  position: relative;
  margin: 0;
  font-size: clamp(15px, 2.5vmin + 5px, 23px);
  font-weight: 600;
  line-height: 1.22;
}
.say b {
  font-weight: 700;
}
.tip {
  position: relative;
  margin: 3px 0 0;
  font-size: clamp(12px, 1.6vmin + 5px, 16px);
  color: #8a6037;
  line-height: 1.2;
}
.cw {
  color: var(--c);
  font-weight: 700;
}
.cw-rainbow {
  background: linear-gradient(90deg, #f2373b, #ff8c1a, #e8b800, #3fb52a, #3d9bff, #9b5bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 92px;
  padding: 3px 10px 9px 4px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--ink);
  transition: background 0.2s;
}
.chip img {
  width: clamp(26px, 6.5vw, 36px);
  flex: none;
}
.chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.chip .goal {
  font-size: clamp(18px, 2.4vmin + 8px, 26px);
  font-weight: 700;
  color: var(--ink);
}
.chip.goal-rest .goal {
  font-size: clamp(14px, 1.6vmin + 8px, 19px);
}
.chip .now {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  margin-top: 2px;
  white-space: nowrap;
}
.chip .bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  height: 5px;
  border-radius: 3px;
  background: rgba(74, 42, 20, 0.15);
  overflow: hidden;
}
.chip .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c);
  transition: width 0.15s;
}
.chip.match {
  background: #e3fbd2;
}
.chip.over {
  background: #ffe0dc;
}
.chip.over .now {
  color: #c81e24;
  opacity: 1;
}
.chip .tick {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3cb521;
  border: 2px solid var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: none;
  place-items: center;
}
.chip.match .tick {
  display: grid;
}
.chip.goal-rest .bar,
.chip.goal-clue .bar {
  display: none;
}
.chip.goal-rest,
.chip.goal-clue {
  padding-bottom: 4px;
}
.chip.extra {
  background: #f1e7d6;
}
/* lots of colours (up to 10): smaller chips so the garden keeps its room on phones */
.chips.many {
  gap: 5px;
}
.chips.many .chip {
  min-width: 0;
  gap: 2px;
  padding: 2px 7px 8px 2px;
  border-radius: 13px;
}
.chips.many .chip img {
  width: clamp(22px, 5.6vw, 32px);
}
.chips.many .chip .goal {
  font-size: clamp(15px, 1.8vmin + 7px, 22px);
}
.chips.many .chip .now {
  font-size: 10px;
}
.chip.seeds {
  min-width: 0;
  padding-bottom: 4px;
  background: #f4ead9;
}
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.62em;
  line-height: 0.95;
  vertical-align: middle;
}
.frac span:first-child {
  border-bottom: 2px solid currentColor;
  padding: 0 2px;
}

/* the garden */
.board-wrap {
  grid-area: board;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px 10px 4px;
}
.board {
  --s: 32px;
  position: relative;
  width: 300px;
  height: 300px;
  padding: 3%;
  background: var(--wood) center / cover, #c9873f;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink), 0 14px 26px rgba(40, 20, 0, 0.3);
}
.soil {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--soil) center / cover, #6b3d1d;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.4);
}
.grid {
  position: absolute;
  inset: 1.5% 1.5% 2% 1.5%;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  touch-action: none;
  outline: none;
}
/* faint centre lines: halves and quarters */
.grid::before,
.grid::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 0 dashed rgba(255, 238, 200, 0.28);
}
.grid::before {
  left: 50%;
  top: 0;
  bottom: 0;
  border-left-width: 2px;
}
.grid::after {
  top: 50%;
  left: 0;
  right: 0;
  border-top-width: 2px;
}
.grid.can-cursor {
  cursor: none;
}
.cell {
  position: relative;
}
.cell::before {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 3%;
  height: 36%;
  background: var(--mound) center bottom / contain no-repeat;
}
.cell.focus::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--ink);
}
.plant {
  position: absolute;
  pointer-events: none;
  transform-origin: 50% 100%;
  max-width: none;
}
/* Each flower stays (almost) inside its own square so no seed is ever hidden: easy counting. */
.plant.seed {
  width: 54%;
  left: 23%;
  bottom: 16%;
}
.plant.sprout {
  width: 52%;
  left: 24%;
  bottom: 22%;
}
.plant.flower {
  width: 82%;
  left: 12.9%; /* puts the stem (45% across the sprite) in the middle */
  bottom: 12%;
}
.banner {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none; /* a swipe goes straight through to the seeds (and hides the banner) */
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
}
.banner-card {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--ink);
  padding: 10px 22px 14px;
  text-align: center;
}
.banner-card p {
  margin: 0;
  font-size: clamp(20px, 4vmin, 30px);
  font-weight: 700;
}
.banner-items {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.banner-pair {
  display: flex;
  align-items: flex-end;
}
.banner-pair img {
  height: clamp(54px, 12vmin, 96px);
}
.banner-card b {
  font-size: clamp(22px, 4.4vmin, 34px);
}

/* cans */
.cans {
  grid-area: cans;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
}
.can-btn {
  position: relative;
  width: clamp(58px, 17vw, 92px);
  aspect-ratio: 1.12;
  padding: 5px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.cans.many {
  gap: 6px 8px;
  padding-top: 4px;
}
.cans.many .can-btn {
  width: clamp(46px, 13.5vw, 80px);
  border-radius: 16px;
  padding: 3px;
}
.can-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.can-btn.selected {
  background: #fff;
  transform: translateY(-7px);
  box-shadow: inset 0 0 0 4px var(--c), 0 9px 0 var(--ink), 0 12px 18px rgba(0, 0, 0, 0.25);
}
.can-btn.selected:active {
  transform: translateY(-4px);
}
.can-btn kbd {
  display: none;
  position: absolute;
  top: -8px;
  left: -8px;
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font: 700 13px/22px 'Fredoka', sans-serif;
}
@media (hover: hover) and (pointer: fine) {
  .can-btn kbd {
    display: block;
  }
}

/* wide screens: garden on the left, order and cans on the right */
@media (min-aspect-ratio: 6/5) {
  .play-screen {
    grid-template-columns: minmax(0, 1fr) clamp(290px, 36vw, 470px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: 'top top' 'board order' 'board cans';
  }
  .order {
    align-self: center;
    padding: 0 14px 0 4px;
  }
  .cans {
    align-content: flex-end;
    padding-right: 14px;
  }
  .board-wrap {
    padding: 20px 10px calc(14px + env(safe-area-inset-bottom)) 14px;
  }
  .can-btn,
  .cans.many .can-btn {
    width: clamp(58px, 7.5vw, 96px);
  }
}

.play-screen.night .lvl-title {
  color: #fff6d5;
}
.play-screen.won .grid {
  pointer-events: none;
}

/* the watering can that follows the finger */
.pour {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none;
}
.pour img {
  display: block;
  transform: rotate(12deg);
  transition: transform 0.12s;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.3));
}
.pour.pouring img {
  animation: pour 0.45s ease-in-out infinite alternate;
}
@keyframes pour {
  from {
    transform: rotate(30deg);
  }
  to {
    transform: rotate(40deg);
  }
}
.pour-pct {
  position: absolute;
  left: 0;
  top: -30px;
  padding: 1px 9px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--c);
  border: 3px solid var(--ink);
  border-radius: 999px;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}

/* effects */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}
.drop {
  position: absolute;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  border: 1.5px solid rgba(74, 42, 20, 0.6);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.6);
}
.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 60;
  pointer-events: none;
}
.tutorial-hand {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 46;
  pointer-events: none;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.3));
}

/* ── modal ───────────────────────────────────────────────────────────────── */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 70px 14px 14px;
  background: rgba(50, 25, 5, 0.45);
  overflow-y: auto;
  animation: fade 0.25s ease-out;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  text-align: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink);
  padding: 4px 16px 18px;
  animation: pop-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
.win-modal .bee-cheer {
  width: 130px;
  margin: -78px auto -6px;
  display: block;
  animation: bob 1.4s ease-in-out infinite;
}
.modal h2 {
  margin: 0;
  font-size: clamp(26px, 5vmin, 36px);
}
.big-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 4px;
}
.big-stars img {
  width: clamp(58px, 15vmin, 84px);
  filter: grayscale(1) brightness(1.45) opacity(0.45);
}
.big-stars img:nth-child(2) {
  transform: translateY(-10px);
}
.big-stars img.on.shown {
  filter: none;
  animation: star-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.big-stars img:nth-child(2).on.shown {
  animation-name: star-pop-mid;
}
@keyframes star-pop {
  from {
    transform: scale(0.2) rotate(-40deg);
  }
}
@keyframes star-pop-mid {
  from {
    transform: translateY(-10px) scale(0.2) rotate(-40deg);
  }
}
.drops-line,
.garden-line,
.finale-line {
  margin: 4px 0 10px;
  font-size: 17px;
  font-weight: 500;
}
.unlock {
  margin: 4px 0 12px;
  padding: 6px 10px 10px;
  border: 3px dashed var(--ink);
  border-radius: 18px;
  background: #fffdf4;
}
.unlock p {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 20px;
}
.unlock-items {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.unlock-item {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-items: center;
}
.unlock-item img {
  height: 64px;
  animation: bob 1.8s ease-in-out infinite;
}
.unlock-item b {
  grid-column: 1 / -1;
  color: var(--c);
  font-size: 22px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.actions .btn {
  font-size: 19px;
  padding: 8px 14px;
}
.actions .next-btn {
  font-size: 24px;
  padding: 8px 26px;
}

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