/* Garden, kitchen and price screens as comic panels.
   Loads after style.css, v2.css and comic.css, so it can override them.
   Flat colours, thick ink outlines, hard offset shadows: no gradients, no blur. */

:root { --pl-ink: #1B1B1F; }

/* ---------- Shared pieces ---------- */
#stage[data-screen="kitchen"], #stage[data-screen="price"] {
  background-color: #FFF6DC;
  background-image: radial-gradient(circle at 3px 3px, rgba(27, 27, 31, .16) 2.2px, transparent 2.6px);
  background-size: 12px 12px;
}

/* The bowed comic panel border around the whole screen. The cream shadow hides what is outside it. */
.pl-frame {
  position: absolute; inset: 10px; z-index: 15; pointer-events: none;
  border: 7px solid var(--pl-ink);
  border-radius: 255px 14px 225px 14px / 14px 225px 14px 255px;
  box-shadow: 0 0 0 12px #FFF6DC;
}
.pl-caption { position: absolute; left: 30px; top: 22px; z-index: 16; transform: rotate(-1deg); pointer-events: none; }

.pl-btn {
  min-width: 72px; min-height: 72px; padding: 6px 28px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 6px solid var(--pl-ink); border-radius: 18px; background: #FFC93C; color: var(--pl-ink);
  font: 36px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 2px;
  box-shadow: 0 7px 0 var(--pl-ink);
}
.pl-btn:active:not([disabled]) { transform: translateY(5px); box-shadow: 0 2px 0 var(--pl-ink); }
.pl-btn[disabled][disabled] { background: #E4DFD0; color: #8A8478; border-color: #8A8478; box-shadow: 0 7px 0 #8A8478; cursor: default; }
.pl-mint { background: #5ED6B0; }
.pl-pink { background: #FF5E8A; }
.pl-white { background: #fff; }
.pl-round { border-radius: 50%; padding: 0; font-size: 64px; }
.pl-hint { animation: pl-pulse 1.2s ease-in-out infinite; }

@keyframes pl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes pl-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pl-slam { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 60% { transform: scale(.94) rotate(-4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes pl-jump { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-50px) scale(1.04); } 50% { transform: translateY(0) scale(1.03, .95); } 70% { transform: translateY(-16px); } }
@keyframes pl-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-12px) rotate(-2deg); } 40%, 80% { transform: translateX(12px) rotate(2deg); } }
@keyframes pl-dance { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-22px) rotate(3deg); } }
@keyframes pl-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; } 75% { rotate: 6deg; } }
@keyframes pl-bump { 0% { transform: scale(1); } 35% { transform: scale(1.14, .9); } 70% { transform: scale(.96, 1.06); } 100% { transform: scale(1); } }
@keyframes pl-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes pl-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.6) rotate(25deg); opacity: .6; } }
@keyframes pl-fade { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
.pl-pop { animation: pl-pop .3s ease-out; }
.pl-slam { animation: pl-slam .35s ease-out both; }
.pl-jump { animation: pl-jump .6s ease-out; transform-origin: 50% 100%; }
.pl-shake { animation: pl-shake .5s ease-in-out; }
.pl-dance { animation: pl-dance 1.1s ease-in-out 3; transform-origin: 50% 100%; }
.pl-dance.pl-wiggle { animation: pl-dance 1.1s ease-in-out 3, pl-wiggle 1.3s ease-in-out 3; }
.pl-bump { animation: pl-bump .4s ease-out; }
.pr-who.shake { animation: pl-shake .5s ease-in-out; }

/* ---------- Garden ---------- */
.g-task {
  top: 84px; padding: 10px 18px; gap: 8px; z-index: 5;
  background: #fff; border: 6px solid var(--pl-ink); border-radius: 16px; box-shadow: 0 6px 0 var(--pl-ink);
}
.g-row { font-weight: 400; font-size: 30px; letter-spacing: 1px; }
.g-pick { font-family: var(--cm-big, 'Bangers', Impact, sans-serif); }
.g-dot { border: 4px dashed var(--pl-ink); }
.g-dot.full { border-style: solid; background: #FFE066; }
.g-back { top: 26px; right: 32px; z-index: 16; }
.g-item.hint .pic { filter: none; }
.g-item { z-index: 3; }

/* The farm: a calm background and at most five big sources to tap. */
.f-scene { position: absolute; left: 0; top: 0; width: 1024px; height: 768px; }
.f-src {
  position: absolute; width: 220px; height: 177px; padding: 0; z-index: 3;
  border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transform-origin: 50% 100%;
}
.f-pic { position: absolute; inset: 0; pointer-events: none; }
.f-pic svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* A needed source glows: a flat yellow disc breathes behind it (no blur). */
.f-glow { position: absolute; left: 8px; right: 8px; top: 2px; bottom: 0; border-radius: 50%; pointer-events: none; opacity: 0; }
.f-src.is-needed .f-glow { opacity: 1; background: #FFF3B0; box-shadow: 0 0 0 6px #FFE066; animation: pl-glow 1.5s ease-in-out infinite; }
.f-src.is-gold.is-needed .f-glow { background: #FFD23F; box-shadow: 0 0 0 6px var(--pl-ink), 0 0 0 14px #FFF3B0; }
.f-twinkle { position: absolute; width: 56px; height: 56px; right: -6px; top: -14px; pointer-events: none; animation: pl-twinkle 1.3s ease-in-out infinite; }
.f-twinkle2 { right: auto; left: -10px; top: auto; bottom: 6px; animation-delay: .6s; }
@keyframes f-bounce { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.08, .9); } 55% { transform: translateY(-16px) scale(.96, 1.07); } 80% { transform: scale(1.03, .97); } }
.f-src.f-bounce { animation: f-bounce .5s ease-out; }
/* What pops out of a source and hops into the basket. */
.f-out { position: absolute; z-index: 20; width: 76px; height: 76px; pointer-events: none; transform: translate(-50%, -50%); }
.f-out.is-gold { width: 92px; height: 92px; border-radius: 50%; background: #FFD23F; border: 5px solid var(--pl-ink); padding: 8px; box-shadow: 0 0 0 6px #FFF3B0; }
.f-chef { position: absolute; z-index: 4; pointer-events: none; transform-origin: 50% 100%; }
@keyframes f-catch { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.06, .94); } 70% { transform: scale(.97, 1.04); } }
.f-chef.f-catch { animation: f-catch .3s ease-out; }
.f-label { left: 624px; top: 296px; z-index: 5; font-family: var(--cm-hand, 'Patrick Hand', cursive); font-weight: 400; font-size: 22px; border-width: 5px; border-radius: 12px; }
#stage[data-screen="garden"] .g-sparkle { z-index: 6; }
.g-goldword {
  position: absolute; z-index: 30; width: 270px; height: 98px; margin: -49px 0 0 -135px;
  pointer-events: none; animation: pl-fade 1.4s ease-out both;
}
.g-goldword svg { width: 100%; height: 100%; }

/* ---------- Kitchen ---------- */
.k-panel, .k-work, .k-tray {
  background: #fff; border: 6px solid var(--pl-ink); border-radius: 16px; box-shadow: 0 7px 0 var(--pl-ink);
}
.k-work { background: #BFEAF5; }
.k-panel { padding: 16px 18px; }
.k-panel .pl-caption { position: relative; left: auto; top: auto; align-self: flex-start; font-size: 22px; margin: 2px 0 2px -4px; }
.k-title h1 { font: 40px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 2px; }
.k-step { font-family: var(--cm-hand, 'Patrick Hand', cursive); font-weight: 400; font-size: 24px; border-radius: 12px; background: #fff; border: 4px solid var(--pl-ink); }
.k-step.later { border-color: #B9B4A6; color: #6B665B; }
.k-step.done { background: #D8F5E9; }
.k-step.now { background: #FFE066; font-size: 27px; font-weight: 400; }
.k-circle { border-width: 4px; }
.k-cost { border-radius: 12px; font-family: var(--cm-hand, 'Patrick Hand', cursive); font-size: 22px; background: var(--pl-ink); }
/* The chef stands beside the counter, at the foot of the recipe card, and says what the food costs. */
.k-steps { gap: 6px; }
.k-step { padding-top: 7px; padding-bottom: 7px; }
.k-wrap.is-teaching .k-label { top: 72px; } /* below the "1 2 3 4 5" strip */
.k-side { display: flex; align-items: flex-end; gap: 6px; flex: none; }
.k-chef { width: 110px; height: 165px; flex: none; pointer-events: none; transform-origin: 50% 100%; }
.k-side .k-cost { flex: 1; margin-bottom: 70px; padding: 8px; line-height: 1.05; border-radius: 16px 16px 16px 4px; }
.k-counter { border-top: 14px solid var(--pl-ink); background: #F7B267; }
.k-label {
  border: 5px solid var(--pl-ink); border-radius: 10px; background: var(--cm-caption, #FFF3B0);
  font-family: var(--cm-hand, 'Patrick Hand', cursive); font-weight: 400; font-size: 28px; z-index: 4;
}
.k-tray-name { font: 26px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 1px; }
.k-tile { border: 5px solid var(--pl-ink); border-radius: 14px; background: #FFF3B0; width: 96px; height: 96px; }
.k-tile.k-sparkle { background: #EDE6FF; }
.k-count { border: 4px solid var(--pl-ink); font-family: var(--cm-big, 'Bangers', Impact, sans-serif); font-weight: 400; font-size: 24px; letter-spacing: 1px; }
.k-tip { font-family: var(--cm-hand, 'Patrick Hand', cursive); font-size: 20px; color: var(--pl-ink); }
.k-thing.target::after { border: 6px dashed #FF5E8A; border-radius: 16px; }

/* ---------- Price ---------- */
.pr-wrap { position: absolute; inset: 0; display: flex; gap: 28px; padding: 96px 44px 40px; }
.pr-caption { left: 104px; font-size: 20px; } /* leaves room for the sound button */
.pr-plates { position: absolute; right: 36px; top: 18px; z-index: 17; }
.pr-left { position: relative; width: 440px; flex: none; display: flex; align-items: flex-end; }
/* The customer's side: its bubble, its hearts (after a happy plate), then the customer. */
.pr-guest { width: 320px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; }
.pr-bubble { max-width: 336px; text-align: center; font-size: 30px; }
.pr-bubble.is-loud { background: var(--cm-sun, #FFC93C); font-size: 32px; }
.pr-hearts { flex: none; line-height: 0; }
.pr-hearts:empty { display: none; }
.pr-hearts .hud-heart { width: 46px; height: 46px; }
@keyframes pr-heart { 0% { transform: scale(.2) rotate(-20deg); } 55% { transform: scale(1.7) rotate(8deg); } 100% { transform: none; } }
.pr-hearts .hud-heart.pr-newheart { animation: pr-heart .7s cubic-bezier(.3, 1.5, .5, 1) both; position: relative; z-index: 2; }
/* The child's chef, standing at the counter beside the customer. */
.pr-chef { position: absolute; right: -6px; bottom: 0; width: 136px; height: 204px; pointer-events: none; transform-origin: 50% 100%; z-index: 2; }
.pr-who { flex: none; }
.pr-who svg, .pr-word svg, .pr-kaching svg { display: block; width: 100%; height: 100%; }
.pr-word { position: absolute; right: -30px; bottom: 212px; width: 256px; height: 92px; z-index: 6; pointer-events: none; }
.pr-kaching { position: absolute; left: -16px; bottom: 16px; width: 280px; height: 106px; z-index: 6; pointer-events: none; animation: pl-slam .35s ease-out both; }

.pr-card {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 22px 22px;
  background: #fff; border: 6px solid var(--pl-ink); border-radius: 16px; box-shadow: 0 8px 0 var(--pl-ink);
}
.pr-card .cm-title { margin: 0; font-size: 46px; text-align: center; }
.pr-cost, .pr-day, .pr-chip {
  display: flex; align-items: center; gap: 12px; padding: 6px 18px;
  border: 5px solid var(--pl-ink); border-radius: 14px; background: #FFF3B0;
  font: 25px/1.1 var(--cm-hand, 'Patrick Hand', cursive); color: var(--pl-ink);
}
.pr-cost .pic { width: 52px; height: 52px; }
.pr-day { background: #FFE066; font-size: 22px; padding: 4px 14px; }
.pr-day .pic { width: 36px; height: 36px; }
.pr-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pr-chips:empty { display: none; }
.pr-chip { font: 30px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 1px; background: #FFE066; padding: 4px 16px; }
.pr-chip .pic { width: 34px; height: 34px; }
.pr-critic { background: #FFC93C; }
.pr-card.is-sold .pr-cost, .pr-card.is-sold .pr-day { display: none; }

.pr-controls { display: flex; align-items: center; gap: 20px; margin-top: 4px; }
.pr-controls .pl-btn { width: 92px; height: 92px; }
.pr-card.is-teaching:not(.is-sold) .pr-controls { margin-top: 98px; } /* room for the teaching arrow above the price */
.pr-card.is-teaching.is-sold .cm-title { visibility: hidden; } /* the "A happy plate!" arrow points up through here */
.pr-card.is-teaching.is-sold .pr-chips { margin-top: 34px; }
.pr-minus { background: #6EC6FF; }
.pr-plus { background: #FF8A3D; }
.pr-coin {
  position: relative; width: 168px; height: 168px; border: 7px solid var(--pl-ink); border-radius: 50%; background: #FFC93C;
  box-shadow: 0 0 0 9px #FFE066 inset, 0 7px 0 var(--pl-ink); display: flex; align-items: center; justify-content: center;
  font: 78px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 2px;
}
.pr-x3 {
  position: absolute; right: -26px; top: -18px; padding: 2px 14px; transform: rotate(8deg);
  border: 5px solid var(--pl-ink); border-radius: 14px; background: #FF5E8A; color: #fff;
  font: 44px/1.1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 2px; -webkit-text-stroke: 2px var(--pl-ink); paint-order: stroke fill;
}
.pr-times { font: 38px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 2px; }
.pr-piggy {
  width: 100%; padding: 8px 18px; border: 5px solid var(--pl-ink); border-radius: 14px; background: #D8F5E9;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font: 32px/1 var(--cm-big, 'Bangers', Impact, sans-serif); letter-spacing: 1px;
}
.pr-piggy.paid { background: #FFE066; font-size: 40px; }
.pr-piggy .pic { width: 52px; height: 44px; }
/* A crowded order (a big order on a special day): everything gets a little smaller so Sell stays on the card. */
.pr-card:has(.pr-times) .pr-coin { width: 132px; height: 132px; font-size: 62px; }
.pr-card:has(.pr-times) .pr-controls .pl-btn { width: 80px; height: 80px; }
.pr-card:has(.pr-day ~ .pr-day) .cm-title { font-size: 36px; }
.pr-card:has(.pr-day ~ .pr-day) .pr-day { font-size: 20px; padding: 2px 12px; }
.pr-card:has(.pr-day ~ .pr-day) { gap: 7px; }
.pr-action { width: 100%; margin-top: auto; }
.pr-action .pl-btn { width: 100%; height: 88px; font-size: 44px; }

.pr-fly { position: absolute; z-index: 30; width: 72px; height: 72px; pointer-events: none; opacity: 0; }
.pr-coinfly { position: absolute; z-index: 30; width: 34px; height: 34px; border: 5px solid var(--pl-ink); border-radius: 50%; background: #FFC93C; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .pl-hint, .pl-pop, .pl-slam, .pl-jump, .pl-shake, .pl-dance, .pl-dance.pl-wiggle, .pl-bump, .pr-who.shake, .pr-kaching,
  .pr-hearts .hud-heart.pr-newheart, .f-src.is-needed .f-glow, .f-twinkle, .f-src.f-bounce, .f-chef.f-catch { animation: none; }
  .g-goldword { animation: none; }
}
