:root {
  color-scheme: dark;
  --bg: #0f1020;
  --panel: #1a1b28;
  --panel2: #212233;
  --accent: #6842ff;
  --accent2: #8a6bff;
  --text: #fff;
  --muted: #aaadbe;
  --sec: #2a2b3d;
  --gold: #ffd23f;
  --good: #35d08a;
  --bad: #ff4f6d;
  --font:
    "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system,
    "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
body {
  padding: 8px;
  overflow-x: hidden;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(104, 66, 255, 0.7);
}
.art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.br {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ------------------------------------------------ HUD */
.hud {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hud-spacer {
  flex: 1;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #262738, #1a1b28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 #0a0b16;
  font-size: 14px;
  white-space: nowrap;
}
.chip span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}
.chip strong {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.chip-day {
  background: linear-gradient(180deg, #7b5cff, #5433e0);
}
.chip-day span {
  color: #e2dbff;
}
.chip-coins strong {
  color: var(--gold);
}
.chip-goal.met {
  background: linear-gradient(180deg, #2fbf7d, #1c8f5a);
}
.chip-goal.met span {
  color: #d6ffe9;
}
.chip-goal.failed {
  background: linear-gradient(180deg, #7a2b3a, #521a26);
}
.chip.bump {
  animation: bump 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.coin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #fff6b0 0 18%,
    #ffd23f 30%,
    #f0a000 75%
  );
  box-shadow:
    inset 0 -2px 0 rgba(160, 90, 0, 0.6),
    0 1px 2px rgba(0, 0, 0, 0.4);
  vertical-align: -3px;
  flex: none;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #34354b, #2a2b3d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 3px 0 #0a0b16;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.icon-btn:active {
  transform: translateY(2px);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.icon-btn.muted {
  color: var(--muted);
  text-decoration: line-through;
}

/* ------------------------------------------------ stage */
.stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  user-select: none;
  -webkit-user-select: none;
}
.stage:focus {
  outline: none;
}
.stage.stage-shake {
  animation: stage-shake 0.35s ease;
}

/* counter */
.counter {
  position: relative;
  height: 200px;
  background:
    radial-gradient(
      ellipse 60% 70% at 50% 0%,
      rgba(255, 214, 140, 0.35),
      transparent 70%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0 26px,
      transparent 26px 52px
    ),
    linear-gradient(180deg, #ff9a6b 0%, #f0706a 45%, #c24a6e 100%);
  overflow: hidden;
}
.counter::before {
  /* bunting */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  background:
    conic-gradient(from 150deg at 50% 0, #ffd23f 60deg, transparent 0) 0 0 /
      36px 18px repeat-x,
    conic-gradient(from 150deg at 50% 0, #6842ff 60deg, transparent 0) 18px 0 /
      36px 18px repeat-x;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.2));
  opacity: 0.9;
}
.counter.has-bg {
  background:
    var(--bg-img) center / cover no-repeat,
    #c24a6e;
}
.counter.has-bg::before {
  display: none;
}
.counter-top {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  z-index: 2;
  background:
    linear-gradient(180deg, #fff 0 3px, #d7dbe8 3px 7px, transparent 7px),
    repeating-linear-gradient(90deg, #ff5b6b 0 22px, #fff4ec 22px 44px);
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.spots {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.spot {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 16px;
  min-width: 0;
}
.spot:focus-visible {
  outline-offset: -4px;
}
.spot.drop-over .bubble {
  box-shadow:
    0 0 0 4px var(--gold),
    0 8px 18px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%) scale(1.06);
}
.is-dragging.drag-plate .spot:has(.cust) .bubble {
  box-shadow:
    0 0 0 3px rgba(255, 210, 63, 0.7),
    0 8px 18px rgba(0, 0, 0, 0.3);
}
.cust {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 92px;
  height: 104px;
  margin-left: -46px;
  z-index: 1;
  animation: idle 2.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.cust.arrive {
  animation:
    arrive 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2),
    idle 2.4s 0.55s ease-in-out infinite;
}
.cust.mood-angry {
  animation: fidget 0.5s ease-in-out infinite;
}
.cust.leaving {
  position: absolute;
  margin: 0;
  animation: none;
  z-index: 1;
}
.fx .cust.leaving {
  z-index: 1;
}
.mood-badge {
  position: absolute;
  right: -6px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.mb-happy {
  background: radial-gradient(circle at 50% 40%, #6ff0b0, #1fa56a);
}
.mb-neutral {
  background: radial-gradient(circle at 50% 40%, #ffe27a, #e6a100);
}
.mb-angry {
  background: radial-gradient(circle at 50% 40%, #ff8a9b, #d9203f);
}
.bubble {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px 8px;
  border-radius: 16px;
  background: #fff;
  color: #2a2b3d;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  animation: bubble-in 0.4s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
}
.t-burger {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1px;
  width: 50px;
}
.t-layer {
  width: 100%;
  height: calc(var(--h) * 0.3px + 3px);
}
.t-sides {
  display: flex;
  gap: 2px;
  align-items: flex-end;
}
.t-side {
  width: 22px;
  height: 30px;
}
.price {
  position: absolute;
  top: -9px;
  right: -12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 4px;
  border-radius: 999px;
  background: #2a2b3d;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.price .coin {
  width: 12px;
  height: 12px;
  vertical-align: 0;
}
.patience {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: min(92px, 80%);
  height: 11px;
  transform: translateX(-50%);
  z-index: 3;
  border-radius: 99px;
  background: rgba(20, 20, 40, 0.75);
  box-shadow:
    0 0 0 2px #fff,
    0 2px 4px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.patience-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  transform-origin: left center;
  background: linear-gradient(
    180deg,
    hsl(var(--hue, 120) 85% 62%),
    hsl(var(--hue, 120) 80% 45%)
  );
}
.spot.urgent .patience {
  animation: pulse-red 0.8s ease-in-out infinite;
}
.spot .kbd-corner {
  top: auto;
  right: auto;
  bottom: 7px;
  left: calc(50% + 52px);
}
.side-btn:disabled .meter {
  visibility: hidden;
}
@media (min-width: 761px) {
  .counter {
    height: 196px;
  }
  .cust {
    left: 30%;
    width: 112px;
    height: 128px;
    margin-left: -56px;
    bottom: 14px;
  }
  .bubble {
    left: 67%;
    top: 34px;
  }
  .bubble::after {
    left: -5px;
    bottom: 22px;
    transform: rotate(45deg);
  }
  .patience {
    left: 30%;
    width: 100px;
  }
  .spot .kbd-corner {
    left: calc(30% + 58px);
  }
  .t-burger {
    width: 66px;
  }
  .t-layer {
    height: calc(var(--h) * 0.4px + 3px);
  }
  .t-side {
    width: 28px;
    height: 40px;
  }
  .plate {
    min-height: 140px;
  }
  .grill-slot {
    min-height: 96px;
  }
}

/* ------------------------------------------------ kitchen */
.kitchen {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.55fr) minmax(0, 0.95fr);
  gap: 8px;
  padding: 10px 10px 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 22px
      22px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0
      0 / 22px 22px,
    var(--panel);
}
.station {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: var(--panel2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 0 #11121d;
}
.station-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-left: 4px;
}
.kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.kbd-corner {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 4;
}
@media (pointer: coarse) {
  .kbd,
  .help {
    display: none !important;
  }
}

/* grill */
.grill {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  flex: 1;
}
.grill-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.grill-slot {
  position: relative;
  flex: 1;
  min-height: 104px;
  border: 0;
  border-radius: 14px;
  padding: 6px;
  cursor: pointer;
  touch-action: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 9px,
      rgba(0, 0, 0, 0.45) 9px 12px
    ),
    radial-gradient(ellipse at 50% 60%, #4a3a3a, #272233 75%);
  box-shadow:
    inset 0 0 0 3px #3b3d55,
    inset 0 -10px 20px rgba(255, 90, 40, 0.18),
    0 3px 0 #0e0f19;
  transition: transform 0.15s ease;
}
.grill-slot:active {
  transform: scale(0.96);
}
.grill-slot.is-ready {
  box-shadow:
    inset 0 0 0 3px var(--good),
    inset 0 -10px 20px rgba(53, 208, 138, 0.25),
    0 0 18px rgba(53, 208, 138, 0.5);
}
.grill-slot.is-flip {
  box-shadow:
    inset 0 0 0 3px var(--gold),
    0 0 16px rgba(255, 210, 63, 0.45);
}
.grill-slot.is-burnt {
  box-shadow:
    inset 0 0 0 3px var(--bad),
    0 0 16px rgba(255, 79, 109, 0.45);
}
.grill-inner {
  position: absolute;
  inset: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.grill-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.ghost-patty {
  width: 70%;
  height: 22px;
  opacity: 0.25;
  filter: grayscale(1);
}
.grill-cta {
  font-size: 12px;
  font-weight: 900;
  color: #ffb38a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.grill-patty {
  width: 86%;
  height: 28px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.5));
  position: relative;
}
.grill-patty .p-raw {
  opacity: var(--raw, 0);
}
.grill-patty .p-burn {
  opacity: var(--burn, 0);
}
.grill-patty img.spr {
  filter: brightness(calc(1 + var(--raw, 0) * 0.55 - var(--burn, 0) * 0.65))
    saturate(calc(1 - var(--raw, 0) * 0.3))
    hue-rotate(calc(var(--raw, 0) * -18deg));
}
.grill-patty.flipping {
  animation: flip 0.35s cubic-bezier(0.3, 0.7, 0.4, 1);
}
.grill-status {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd9c2;
}
.is-ready .grill-status {
  color: #7dffc0;
}
.is-flip .grill-status {
  color: var(--gold);
  animation: blink 0.7s ease-in-out infinite;
}
.is-burnt .grill-status {
  color: #ff9aac;
}
.grill-slot:not(.is-ready):not(.is-burnt) .grill-patty::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: -14px;
  height: 14px;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.35) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 60% 50%,
      rgba(255, 255, 255, 0.25) 0 3px,
      transparent 4px
    ),
    radial-gradient(
      circle at 85% 90%,
      rgba(255, 255, 255, 0.3) 0 2px,
      transparent 3px
    );
  animation: steam 1.2s linear infinite;
}
.meters {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 92%;
}
.meter {
  position: relative;
  display: block;
  height: 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.meter-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% / 2.2);
  width: calc(100% * 0.75 / 2.2);
  background: rgba(53, 208, 138, 0.35);
}
.m-fry .meter-zone {
  width: calc(100% * 1.2 / 2.2);
}
.m-soda .meter-zone {
  display: none;
}
.meter-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 99px;
  background: linear-gradient(180deg, #ffc27a, #ff8a3d);
}
.meter-fill[data-state="perfect"] {
  background: linear-gradient(180deg, #7dffc0, #1fb573);
}
.meter-fill[data-state="burnt"] {
  background: linear-gradient(180deg, #ff7a8e, #b3122f);
}
.m-down {
  box-shadow: 0 0 0 1.5px rgba(255, 140, 60, 0.7);
}
.grill-take {
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #7b5cff, #5433e0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 3px 0 #2e1a8f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 6px;
}
.grill-take .kbd {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.grill-take.toss {
  background: linear-gradient(180deg, #ff6d84, #d9203f);
  box-shadow: 0 3px 0 #7d1022;
}
.grill-take:disabled {
  opacity: 0.3;
  cursor: default;
  filter: grayscale(0.6);
}
.grill-take:active:not(:disabled) {
  transform: translateY(2px);
}

/* trays */
.plates {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  gap: 6px;
  flex: 1;
}
.plate {
  position: relative;
  min-height: 150px;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(180deg, #2c2d44, #242538);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 3px 0 #0e0f19;
  transition:
    transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1),
    box-shadow 0.18s ease;
}
.plate.active {
  transform: translateY(-3px);
  background: linear-gradient(180deg, #34306a, #26244a);
  box-shadow:
    inset 0 0 0 3px var(--accent2),
    0 0 22px rgba(104, 66, 255, 0.55),
    0 5px 0 #0e0f19;
}
.plate.drop-over {
  box-shadow:
    inset 0 0 0 3px var(--gold),
    0 0 22px rgba(255, 210, 63, 0.55);
}
.is-dragging:not(.drag-plate) .plate {
  box-shadow:
    inset 0 0 0 2px rgba(255, 210, 63, 0.45),
    0 3px 0 #0e0f19;
}
.plate-num {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
  line-height: 22px;
  z-index: 3;
}
.plate.active .plate-num {
  background: var(--accent);
}
.plate-body {
  position: absolute;
  inset: 0;
  display: block;
}
.tray-art {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 8px;
  height: 22px;
}
.stack {
  position: absolute;
  left: 50%;
  bottom: 20px;
  /* Narrow tall stacks so up to MAX_STACK side-view layers stay on the plate. */
  width: min(96px, 70%, calc(125px / (0.2 * var(--n, 1) + 0.25)));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
.layer {
  display: block;
  width: 100%;
  height: calc(var(--h) * 0.6px);
  margin-top: -2px;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.25));
}
.layer.pop {
  animation: drop-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.layer.is-raw .p-raw {
  opacity: 0.8;
}
.layer.is-burnt .p-burn {
  opacity: 0.85;
}
.layer .p-raw,
.layer .p-burn {
  opacity: 0;
}
.layer.is-raw img.spr {
  filter: brightness(1.5) saturate(0.7) hue-rotate(-18deg);
}
.layer.is-burnt img.spr {
  filter: brightness(0.35);
}
/* Sprite layers are side views of equal width: keep their aspect ratio and let
   each layer tuck under the one above it (stacks run bottom-up). */
.layer:has(> img.spr),
.t-layer:has(> img.spr),
.logo-burger .layer:has(> img.spr) {
  height: auto;
  margin-top: -7%;
}
.layer > img.spr,
.t-layer > img.spr {
  height: auto;
}
.drag-ghost .layer:has(> img.spr) {
  margin: 0;
}
.tray-side {
  position: absolute;
  bottom: 18px;
  width: 26%;
  max-width: 34px;
  height: 44px;
  z-index: 2;
  animation: drop-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.ts-fries {
  left: 6%;
}
.ts-soda {
  right: 6%;
}
.ts-fries.is-burnt,
.fry-burnt .art {
  filter: brightness(0.45) saturate(0.6);
}
.plate-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 44%;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 800;
}

/* sides */
.sides {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  flex: 1;
}
.side-btn {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 4px;
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(180deg, #34354b, #2a2b3d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 #0e0f19;
  transition: transform 0.15s ease;
}
.side-btn:active:not(:disabled) {
  transform: scale(0.96);
}
.side-btn:disabled {
  cursor: default;
  opacity: 0.55;
}
.side-btn.is-ready {
  box-shadow:
    inset 0 0 0 3px var(--good),
    0 0 16px rgba(53, 208, 138, 0.45);
}
.side-btn.is-burnt {
  box-shadow:
    inset 0 0 0 3px var(--bad),
    0 0 16px rgba(255, 79, 109, 0.4);
}
.side-art {
  position: relative;
  grid-row: 1 / 3;
  height: 52px;
}
.fry-empty .art,
.soda-empty .art {
  opacity: 0.35;
  filter: grayscale(0.7);
}
.fry-frying .art {
  filter: saturate(0.5) brightness(1.15);
}
.bubbles {
  position: absolute;
  inset: 40% 10% 0;
  background:
    radial-gradient(
      circle at 20% 70%,
      rgba(255, 240, 180, 0.8) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 70% 40%,
      rgba(255, 240, 180, 0.8) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 50% 90%,
      rgba(255, 240, 180, 0.7) 0 2px,
      transparent 3px
    );
  animation: steam 0.8s linear infinite;
}
.side-label {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}
.is-ready .side-label {
  color: #7dffc0;
}
.side-btn .meter {
  align-self: end;
}

/* bins */
.bins {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px 10px;
  background: var(--panel);
}
.bin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 62px;
  border: 0;
  border-radius: 14px;
  padding: 6px 4px 5px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(180deg, #3a3b55, #2a2b3d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 0 #0e0f19;
  transition: transform 0.12s ease;
}
.bin:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0e0f19;
}
.bin-art {
  width: 100%;
  max-width: 64px;
  height: 26px;
}
.bin-bun-top .bin-art {
  height: 30px;
}
.bin-label {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bin.locked {
  opacity: 0.45;
  cursor: default;
}
.bin.locked .bin-art {
  filter: grayscale(1) brightness(0.7);
}
.lock {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 12px;
  height: 10px;
  border-radius: 2px;
  background: var(--muted);
}
.lock::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -6px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--muted);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  box-sizing: border-box;
}
.bin-trash {
  background: linear-gradient(180deg, #4a3040, #33222d);
}
.bin-trash.drop-over,
.is-dragging .bin-trash {
  box-shadow:
    inset 0 0 0 3px var(--bad),
    0 4px 0 #0e0f19;
}
.bin-trash .bin-art {
  height: 30px;
}
.dragging-src {
  opacity: 0.55;
}

/* drag ghost */
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 90px;
  pointer-events: none;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.45));
}
.drag-ghost .layer {
  margin: 0;
}
.dg-fries,
.dg-soda {
  width: 44px;
}
.ghost-side {
  height: 60px;
}
.dg-plate {
  width: 120px;
  height: 150px;
  position: fixed;
}
.dg-plate .tray-art,
.dg-plate .stack,
.dg-plate .tray-side {
  position: absolute;
}
.dg-plate .plate-empty {
  display: none;
}

/* ------------------------------------------------ fx */
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.pop-text {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 0 12px rgba(0, 0, 0, 0.3);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
  animation: float-up 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.pop-text.coins {
  color: var(--gold);
}
.pop-text.tip {
  color: #7dffc0;
  font-size: 18px;
}
.pop-text.perfect {
  color: #fff;
  font-size: 26px;
  background: linear-gradient(180deg, #ff6fa8, #6842ff);
  padding: 2px 12px;
  border-radius: 999px;
  -webkit-text-stroke: 0;
}
.pop-text.good {
  color: #fff;
}
.pop-text.meh {
  color: #ff9aac;
}
.hand {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 52px;
  margin: 2px 0 0 -10px;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.3, 0.8, 0.3, 1),
    opacity 0.25s ease;
}
.hand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 52'%3E%3Cpath d='M14 4a4 4 0 0 1 8 0v18l2-1a4 4 0 0 1 5 2l1 1a4 4 0 0 1 5 2l1 1a4 4 0 0 1 6 3v10c0 7-5 12-12 12h-6c-5 0-8-2-11-6L4 34a4 4 0 0 1 6-5l4 4z' fill='%23fff' stroke='%232a2b3d' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.4));
  animation: tap 1.1s ease-in-out infinite;
  transform-origin: 30% 10%;
}
.hand.show {
  opacity: 1;
}
.rail {
  position: relative;
  z-index: 5;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: linear-gradient(180deg, #e3e6f2, #9fa4bd 55%, #6f748f);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    0 4px 10px rgba(0, 0, 0, 0.35);
}
.coach {
  max-width: 100%;
  padding: 4px 16px;
  border-radius: 999px;
  background: #1a1b28;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition:
    color 0.2s ease,
    box-shadow 0.2s ease;
}
.coach.show {
  color: #fff;
  box-shadow:
    inset 0 0 0 2px var(--accent2),
    0 0 12px rgba(104, 66, 255, 0.6);
  animation: bump 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.coach.bad {
  color: #fff;
  box-shadow:
    inset 0 0 0 2px var(--bad),
    0 0 12px rgba(255, 79, 109, 0.6);
}
.shake {
  animation: shake 0.35s ease;
}
.flash-bad {
  animation: flash-bad 0.4s ease;
}
.bump {
  animation: bump 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

/* ------------------------------------------------ overlays */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(40, 30, 90, 0.72),
    rgba(10, 10, 24, 0.9)
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.overlay[hidden] {
  display: none;
}
.card {
  width: min(420px, 100%);
  max-height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, #262740, #1a1b28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(104, 66, 255, 0.45),
    0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: card-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.card h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.btn {
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}
.btn:active:not(:disabled) {
  transform: translateY(3px);
}
.btn-primary {
  background: linear-gradient(180deg, #8a6bff, #6842ff 55%, #5433e0);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 5px 0 #2e1a8f,
    0 10px 24px rgba(104, 66, 255, 0.45);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
.btn-secondary {
  background: linear-gradient(180deg, #34354b, #2a2b3d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 0 #0e0f19;
}
.btn-big {
  min-height: 56px;
  font-size: 22px;
  animation: breathe 1.8s ease-in-out infinite;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-burger {
  display: flex;
  flex-direction: column-reverse;
  width: 84px;
  animation: wobble 2.6s ease-in-out infinite;
}
.logo-burger .layer {
  height: calc(var(--h) * 0.7px);
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  text-align: left;
}
.logo-text b {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff3b0, #ffd23f 45%, #ff9f1c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #b3401a)
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}
.logo-text b + b {
  background: linear-gradient(180deg, #ffd0e0, #ff6fa8 45%, #e0306e);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 0 #7a1440)
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
  margin-left: 18px;
}
.day-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.day-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 140px;
}
.day-label strong {
  font-size: 18px;
  font-weight: 900;
}
.stars-row {
  display: flex;
  gap: 3px;
}
.star {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #3a3b55;
  clip-path: polygon(
    50% 0,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}
.star.on {
  background: linear-gradient(180deg, #fff3a0, #ffd23f 50%, #ff9f1c);
}
.start-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.goal-line {
  margin: 0;
  font-size: 13px;
  color: #dfe0ee;
  line-height: 1.4;
}
.goal-reward {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 210, 63, 0.18);
  color: var(--gold);
}
.unlock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(104, 66, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(138, 107, 255, 0.5);
  animation: bump 0.6s 0.3s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.unlock[hidden] {
  display: none;
}
.new-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6fa8, #e0306e);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.unlock-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
}
.unlock-art {
  display: inline-flex;
  flex-direction: column;
  width: 48px;
  height: 28px;
}
.unlock-art .art {
  flex: 1;
  min-height: 0;
}

/* shop */
.shop-coins {
  margin: 0;
  font-size: 18px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}
.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.shop-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: #2a2b3d;
  text-align: left;
}
.shop-icon {
  height: 44px;
}
.shop-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shop-info strong {
  font-size: 15px;
  font-weight: 900;
}
.shop-info > span {
  font-size: 12px;
  color: var(--muted);
}
.pips {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.pip {
  width: 16px;
  height: 6px;
  border-radius: 99px;
  background: #44465e;
}
.pip.on {
  background: linear-gradient(90deg, #7dffc0, #1fb573);
}
.btn-buy {
  width: auto;
  min-width: 78px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  font-size: 15px;
  background: linear-gradient(180deg, #ffe06a, #ffb52a);
  color: #4a2a00;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 4px 0 #b36b00;
}
.btn-buy:disabled {
  background: #3a3b55;
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

/* end */
.end-stars {
  display: flex;
  gap: 8px;
}
.end-stars .star {
  width: 52px;
  height: 52px;
  transition: transform 0.4s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.end-stars .star:nth-child(2) {
  transform: translateY(-10px);
}
.end-stars .star.on {
  animation: star-pop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
.end-stars .star:nth-child(2).on {
  transform: translateY(-10px) scale(1.1);
}
.end-stats {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.end-stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  background: #2a2b3d;
  font-size: 14px;
}
.end-stats dt {
  color: var(--muted);
  text-align: left;
}
.end-stats dd {
  margin: 0;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.end-stats .goal-row,
.end-stats .total-row {
  grid-column: 1 / -1;
}
.end-stats .goal-row.met {
  background: rgba(53, 208, 138, 0.18);
}
.end-stats .goal-row.met dt {
  color: #7dffc0;
}
.end-stats .total-row {
  background: rgba(255, 210, 63, 0.15);
  font-size: 18px;
}
.end-stats .total-row dd {
  color: var(--gold);
}
.end-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.end-row .btn[hidden] {
  display: none;
}

.help {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}
.help kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: #2a2b3d;
  color: #fff;
  font-family: inherit;
  font-size: 10.5px;
  line-height: 1.6;
  margin: 0 1px;
}

/* ------------------------------------------------ keyframes */
@keyframes bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}
@keyframes stage-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-5px, 2px);
  }
  50% {
    transform: translate(4px, -3px);
  }
  75% {
    transform: translate(-3px, 1px);
  }
}
@keyframes flash-bad {
  0%,
  100% {
    filter: none;
  }
  50% {
    filter: brightness(1.4) sepia(1) hue-rotate(-40deg) saturate(3);
  }
}
@keyframes idle {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  50% {
    transform: translateY(-3px) scale(1.01, 0.99);
  }
}
@keyframes fidget {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}
@keyframes arrive {
  0% {
    transform: translateX(120px) scale(0.9);
    opacity: 0;
  }
  70% {
    transform: translateX(-6px) scale(1.02, 0.98);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
  }
}
@keyframes bubble-in {
  0% {
    transform: translateX(-50%) scale(0.3);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}
@keyframes drop-in {
  0% {
    transform: translateY(-26px) scale(1.15, 0.8);
    opacity: 0;
  }
  60% {
    transform: translateY(2px) scale(1.08, 0.9);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
@keyframes flip {
  0% {
    transform: scaleY(1) translateY(0);
  }
  50% {
    transform: scaleY(0.1) translateY(-16px);
  }
  100% {
    transform: scaleY(1) translateY(0);
  }
}
@keyframes steam {
  0% {
    transform: translateY(4px);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateY(-8px);
    opacity: 0;
  }
}
@keyframes blink {
  50% {
    opacity: 0.45;
  }
}
@keyframes pulse-red {
  0%,
  100% {
    box-shadow:
      0 0 0 2px #fff,
      0 0 0 rgba(255, 79, 109, 0);
  }
  50% {
    box-shadow:
      0 0 0 2px #ff4f6d,
      0 0 12px rgba(255, 79, 109, 0.9);
  }
}
@keyframes float-up {
  0% {
    transform: translate(-50%, -20%) scale(0.6);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, -60%) scale(1.15);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -70%) scale(1);
  }
  100% {
    transform: translate(-50%, -190%) scale(1);
    opacity: 0;
  }
}
@keyframes tap {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  45% {
    transform: translate(0, 0) scale(1);
  }
  60% {
    transform: translate(-2px, -6px) scale(0.9) rotate(-6deg);
  }
  75% {
    transform: translate(0, 0) scale(1);
  }
}
@keyframes card-in {
  0% {
    transform: scale(0.85) translateY(16px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(4deg) translateY(-4px);
  }
}
@keyframes star-pop {
  0% {
    transform: scale(0.2) rotate(-40deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

/* ------------------------------------------------ responsive */
@media (max-width: 760px) {
  body {
    padding: 6px;
  }
  .kitchen {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-areas:
      "grill sides"
      "plates plates";
    padding: 8px 8px 0;
    gap: 6px;
  }
  .station-grill {
    grid-area: grill;
  }
  .station-sides {
    grid-area: sides;
  }
  .station-plates {
    grid-area: plates;
  }
  .plate {
    min-height: 136px;
  }
  .bins {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 8px 8px;
  }
  .grill-slot {
    min-height: 90px;
  }
  .side-btn {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    text-align: center;
    min-height: 0;
    padding: 5px;
  }
  .side-art {
    grid-row: auto;
    height: 34px;
    width: 34px;
  }
  .side-btn .meter {
    width: 100%;
  }
  .side-label {
    font-size: 11px;
  }
  .station {
    padding: 6px;
    border-radius: 14px;
  }
  .chip {
    height: 30px;
    padding: 0 9px;
    font-size: 13px;
  }
  .chip-goal {
    order: 10;
    flex: 1 1 100%;
    justify-content: center;
  }
  .icon-btn {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 420px) {
  .counter {
    height: 200px;
  }
  .cust {
    width: 76px;
    height: 88px;
    margin-left: -38px;
  }
  .bubble {
    padding: 6px 7px;
    gap: 4px;
  }
  .t-burger {
    width: 40px;
  }
  .t-side {
    width: 16px;
    height: 24px;
  }
  .price {
    right: -8px;
  }
  .grill-take {
    font-size: 11px;
    padding: 0 2px;
  }
  .grill-take .kbd {
    display: none;
  }
  .logo-text b {
    font-size: 34px;
  }
  .logo-burger {
    width: 66px;
  }
  .card {
    padding: 16px 14px 14px;
  }
  .coach {
    font-size: 12px;
  }
}

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