:root {
  --bg: #1A0F2E;
  --bg-2: #2E1A47;
  --accent: #FF2E63;
  --accent-2: #FF9F1C;
  --gold: #FFD700;
  --green: #2ECC71;
  --blue: #08D9D6;
  --text: #FFFFFF;
  --muted: #B8B8D1;
  --glass: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: 'Nunito', sans-serif;
  --display: 'Fredoka', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font);
  background: linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  overscroll-behavior: none;
  user-select: none;
}

#app {
  height: 100%;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

[hidden] { display: none !important; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.brand {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  flex: 1;
  text-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.icon-btn {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  border-radius: 12px;
  width: 36px; height: 36px;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.hud-stat {
  display: flex; align-items: center; gap: 4px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
}

.coin-icon { color: var(--gold); }
.star-icon { color: var(--gold); }
.time { color: var(--accent-2); }

/* Menu */
.menu-card {
  margin: auto;
  text-align: center;
  padding: 24px;
  width: min(92%, 360px);
}

.logo {
  font-family: var(--display);
  font-size: 56px;
  margin: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.2));
  line-height: 1.05;
}

.tagline { color: var(--muted); margin: 8px 0 32px; font-size: 16px; }

.btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin: 12px 0;
  border: none;
  border-radius: 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  background: var(--glass);
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
}

.btn:active { transform: scale(0.96); }
.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  box-shadow: 0 8px 20px rgba(255, 46, 99, 0.35);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Map */
.map-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.location-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  border: 3px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: transform 0.1s;
}
.location-card:active { transform: scale(0.98); }
.location-card.locked { opacity: 0.6; cursor: not-allowed; filter: grayscale(0.7); }

.location-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.location-info h3 { margin: 0; font-family: var(--display); font-size: 22px; }
.location-info p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.location-stars {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.45);
  border-radius: 14px;
  padding: 4px 10px;
  font-weight: 700;
  color: var(--gold);
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: rgba(0,0,0,0.4);
}

/* Day screen */
#dayScreen { background-size: cover; background-position: center; }
#dayScreen::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
}
#dayScreen > * { position: relative; z-index: 1; }

.customers {
  display: flex;
  gap: 8px;
  padding: 10px 12px 22px;
  min-height: 140px;
  overflow-x: auto;
  position: relative;
}

/* counter ledge the customers stand behind */
.customers::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #b07a45 0%, #7c5230 60%, #5d3a1a 100%);
  box-shadow: 0 8px 14px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.3);
  z-index: 3;
  pointer-events: none;
}

.customer-card {
  flex: 0 0 110px;
  background: var(--glass);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  transition: border-color 0.15s, background 0.15s, transform 0.28s ease, opacity 0.28s ease;
}
/* slide in over the counter on arrival */
.customer-card.entering { animation: custIn 0.45s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes custIn {
  from { transform: translateY(-46px) scale(0.5); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
/* served or stormed off — sink and fade */
.customer-card.leaving { transform: translateY(30px) scale(0.55); opacity: 0; pointer-events: none; }
/* gentle idle sway so they feel alive */
.customer-card .customer-avatar { animation: custSway 2.6s ease-in-out infinite; }
.customer-card.angry .customer-avatar { animation: custShake 0.45s ease-in-out infinite; }
@keyframes custSway {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-3px) rotate(1.5deg); }
}
@keyframes custShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-3deg); }
  75% { transform: translateX(3px) rotate(3deg); }
}
.customer-card.selected {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.12);
}
.customer-card.angry { border-color: var(--accent); }

/* reaction pops above the counter (served / walked out) */
.react-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 30px;
  z-index: 40;
  pointer-events: none;
  animation: reactPop 0.9s ease-out forwards;
}
@keyframes reactPop {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  30% { transform: translate(-50%, -70%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -140%) scale(1); opacity: 0; }
}

.customer-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  background: var(--glass);
}

.customer-dish {
  font-family: var(--display);
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  font-weight: 700;
}

.customer-patience {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  overflow: hidden;
}
.patience-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--accent));
  transition: width 0.2s linear;
}

.ingredients-needed {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
}
.ingredient-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.ingredient-dot.done { background: var(--green); }

.day-goal {
  padding: 6px 16px 12px;
}
.goal-bar {
  height: 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 5px;
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.3s;
}
.goal-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* The kitchen: a steel worktop the appliances sit embedded in. */
.kitchen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 12px 16px;
  overflow-y: auto;
  margin: 0 10px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(180deg, #aab4c4 0%, #8590a5 55%, #66707f 100%);
  border: 2px solid #525c6d;
  border-bottom: 10px solid #3d4453;
  box-shadow: 0 12px 24px rgba(0,0,0,0.5), inset 0 4px 8px rgba(0,0,0,0.25);
  position: relative;
}

.station {
  background: linear-gradient(180deg, #d7deeb 0%, #a6b0c4 50%, #7c879c 100%);
  border: 2px solid #4a5260;
  border-bottom: 8px solid #333a47;
  border-radius: 14px;
  box-shadow: 0 10px 16px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.55);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  position: relative;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.08s, box-shadow 0.08s;
}
.station:active { transform: translateY(4px); box-shadow: 0 6px 10px rgba(0,0,0,0.4), inset 0 2px 0 rgba(255,255,255,0.8); }

.station-output {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.station-name {
  font-size: 12px;
  font-weight: 700;
  color: #3a4250;
  z-index: 1;
}
.station-icon {
  font-size: 32px;
  z-index: 1;
}

.station-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: rgba(0,0,0,0.25);
}
.station-progress-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
}

.station-ready {
  position: absolute;
  inset: 0;
  background: rgba(46, 204, 113, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
  animation: pulse 1s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }

.rack-label {
  padding: 6px 16px 0;
  font-size: 12px;
  color: var(--muted);
}

.plates-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px;
}
.plates {
  flex: 1;
  display: flex;
  gap: 18px;
  padding: 12px 16px 14px;
  justify-content: center;
  min-height: 104px;
  background: linear-gradient(180deg, #b07a45 0%, #7c5230 60%, #5d3a1a 100%);
  border: 2px solid #4a2e15;
  border-radius: 12px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.4), 0 6px 12px rgba(0,0,0,0.35);
}
.bin {
  width: 56px;
  height: 76px;
  border-radius: 12px;
  border: 2px solid #4a2e15;
  background: linear-gradient(180deg, #6b7280, #374151);
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.25);
}
.bin:active { transform: translateY(3px); }
.plate.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(255,46,99,0.6), inset 0 3px 5px #fff;
}

.plate {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e3e8f0 65%, #b9c2cf);
  border: 3px solid #9aa3b0;
  box-shadow: 0 10px 16px rgba(0,0,0,0.45), inset 0 3px 5px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  padding: 10px;
}
.plate.empty { opacity: 0.55; cursor: default; }
.plate-empty { font-size: 28px; opacity: 0.6; }
.plate.complete {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 0 0 26px var(--gold), inset 0 3px 5px #fff;
  animation: pulse 1s infinite;
}
.plate-for {
  position: absolute;
  top: -8px; right: -8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.plate-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  align-items: center;
}
.plate-items img { width: 24px; height: 24px; object-fit: contain; }
.plate-missing {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Appliance internals */
.station-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -10px -6px 4px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(0,0,0,0.22)), var(--sc, #8f99a8);
  border-radius: 11px 11px 4px 4px;
}
.station-top .station-icon { font-size: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }
.station-top .station-name { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.45); }
.cooker-slots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 6px 0;
}
.cook-slot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 40% 35%, #4a5263, #232833);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.55);
  cursor: pointer;
  font-size: 22px;
}
.cook-slot::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p, 0) * 1%), rgba(0,0,0,0.12) 0);
  opacity: 0;
}
.cook-slot.cooking::before { opacity: 1; }
.cook-slot.done::before {
  opacity: 1;
  background: var(--gold);
}
.cook-slot.done {
  box-shadow: 0 0 16px var(--gold), inset 0 3px 6px rgba(0,0,0,0.55);
}
/* Steam wisps off finished food */
.cook-slot.done::after {
  content: "♨";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  animation: steamRise 1.1s ease-in-out infinite;
  pointer-events: none;
}
/* Flame flicker under food that is cooking */
.cook-slot.cooking::after {
  content: "🔥";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  animation: flameFlick 0.35s ease-in-out infinite alternate;
  pointer-events: none;
}
/* Nearly burnt — urgent red pulse */
.cook-slot.about-to-burn {
  animation: burnWarn 0.4s ease-in-out infinite;
}
.cook-slot.about-to-burn::before {
  background: conic-gradient(#ff4646 calc(var(--p, 0) * 1%), rgba(0,0,0,0.12) 0);
}
/* Burnt — blackened food, needs binning */
.cook-slot.burnt {
  background: radial-gradient(circle at 40% 35%, #3a3a3a, #141414);
}
.cook-slot.burnt::before { opacity: 0; }
.cook-slot.burnt::after {
  content: "💨";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  animation: steamRise 1s ease-in-out infinite;
  pointer-events: none;
}
.cook-slot.burnt img { filter: grayscale(1) brightness(0.35); }
.cook-slot img {
  width: 38px; height: 38px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
@keyframes steamRise {
  0% { transform: translateX(-50%) translateY(2px); opacity: 0; }
  40% { opacity: 0.95; }
  100% { transform: translateX(-50%) translateY(-7px); opacity: 0; }
}
@keyframes flameFlick {
  from { transform: translateX(-50%) scale(1) rotate(-4deg); }
  to { transform: translateX(-50%) scale(1.18) rotate(4deg); }
}
@keyframes burnWarn {
  0%, 100% { box-shadow: 0 0 8px #ff4646, inset 0 3px 6px rgba(0,0,0,0.55); }
  50% { box-shadow: 0 0 22px #ff2020, inset 0 3px 6px rgba(0,0,0,0.55); }
}
.src-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: auto;
  background: rgba(0,0,0,0.28);
  border-radius: 9px;
  padding: 4px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.45);
}
.src-chip {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f2f5fa;
  border: 1px solid #9aa3b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  font-size: 18px;
}
.src-chip img { width: 24px; height: 24px; object-fit: contain; }
.src-chip:active { transform: scale(0.9); }
/* a waiting customer needs this — light the chip up */
.src-chip.needed {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold), 0 2px 4px rgba(0,0,0,0.25);
  background: #fff8d6;
}

/* Plates beckon while the chef is carrying food */
.plates.holding .plate {
  animation: platePulse 0.9s ease-in-out infinite;
}
@keyframes platePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(46,204,113,0.7), 0 0 10px rgba(46,204,113,0.4), 0 10px 16px rgba(0,0,0,0.45), inset 0 3px 5px #ffffff; }
  50% { box-shadow: 0 0 0 4px rgba(46,204,113,0.95), 0 0 22px rgba(46,204,113,0.7), 0 10px 16px rgba(0,0,0,0.45), inset 0 3px 5px #ffffff; }
}
.rack-item.selected { border-color: var(--gold); background: rgba(255,215,0,0.15); }
.rack-item:active { transform: scale(0.92); }

.hint {
  padding: 8px 16px 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* Result */
#resultScreen { align-items: center; justify-content: center; }
.result-card {
  width: min(92%, 360px);
  background: var(--glass);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.result-card h2 { margin: 0 0 8px; font-family: var(--display); font-size: 30px; }
.stars { font-size: 40px; margin: 12px 0; color: var(--gold); }
.result-coins { font-size: 18px; margin: 8px 0; }
.result-target { color: var(--muted); font-size: 14px; }
.btnrow { display: flex; gap: 10px; margin-top: 24px; }
.btnrow .btn { flex: 1; margin: 0; font-size: 14px; padding: 14px 8px; }

/* Leaderboard */
.leaderboard { padding: 16px; overflow-y: auto; }
.lb-row {
  display: flex; align-items: center;
  background: var(--glass);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-weight: 700;
}
.lb-rank { width: 36px; color: var(--gold); font-size: 18px; }
.lb-name { flex: 1; }
.lb-score { color: var(--accent-2); }

/* Feedback */
.feedback-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feedback-form label { font-size: 14px; color: var(--muted); }
.feedback-form select, .feedback-form textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
}

/* Europe tour button on map */
.europe-btn {
  margin: 0 16px 16px;
  background: linear-gradient(90deg, #003399, #0055ff);
  border: none;
}
.europe-btn:disabled { opacity: 0.5; }

/* Level grid */
.level-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-content: start;
}

.level-cell {
  aspect-ratio: 1;
  background: var(--glass);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  position: relative;
  transition: transform 0.08s;
}
.level-cell:active { transform: scale(0.95); }
.level-cell.locked { opacity: 0.4; cursor: not-allowed; }
.level-cell .stars { font-size: 12px; color: var(--gold); margin-top: 4px; }

/* Europe map */
.europe-map {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.europe-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.europe-pin {
  position: absolute;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--glass);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.europe-pin.locked { opacity: 0.5; border-color: #888; }
.europe-pin .pin-stars {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--gold);
  white-space: nowrap;
}

.scran-van {
  position: absolute;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  transition: top 0.8s ease, left 0.8s ease;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

#dayScreen > .chef {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 60px;
  transform: translate(-50%, -50%) scaleX(var(--flip, 1));
  z-index: 8;
  pointer-events: none;
  transition: left 0.35s ease, top 0.35s ease;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5));
}
#dayScreen > .chef.walking {
  animation: chefBob 0.16s ease-in-out infinite alternate;
}
@keyframes chefBob {
  from { transform: translate(-50%, -50%) scaleX(var(--flip, 1)) translateY(0) rotate(-3deg); }
  to   { transform: translate(-50%, -50%) scaleX(var(--flip, 1)) translateY(-8px) rotate(3deg); }
}
.station.ready {
  box-shadow: 0 0 0 2px var(--gold), 0 0 18px var(--gold);
}

/* ------------------------------------------------------- juice & floats */

.float-text {
  position: absolute;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 2px 6px rgba(0,0,0,0.55);
  transform: translate(-50%, -50%);
  animation: floatUp 1.1s ease-out forwards;
  z-index: 60;
  pointer-events: none;
  white-space: nowrap;
}
.float-text.combo { color: #ff9f1c; font-size: 27px; }
.float-text.burn { color: #ff5555; }
@keyframes floatUp {
  to { transform: translate(-50%, -170%); opacity: 0; }
}

.coin-fly {
  position: absolute;
  font-size: 22px;
  z-index: 70;
  pointer-events: none;
  transition: transform 0.75s cubic-bezier(0.3, -0.2, 0.5, 1), opacity 0.75s;
}

/* Level intro splash */
.day-intro {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  animation: introFade 1.6s forwards;
  pointer-events: none;
}
.day-intro-card {
  background: var(--glass);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 24px 36px;
  text-align: center;
  animation: introPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.day-intro-loc { font-family: var(--display); font-size: 18px; color: var(--accent-2); }
.day-intro-day { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--gold); }
.day-intro-target { color: var(--muted); margin-top: 6px; font-size: 14px; }
@keyframes introPop { from { transform: scale(0.6); opacity: 0; } }
@keyframes introFade { 0%, 72% { opacity: 1; } 100% { opacity: 0; } }

/* Tutorial bubble */
.tut-bubble {
  position: absolute;
  bottom: 158px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  background: #fff;
  color: #222;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  max-width: 82%;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
  animation: tutBob 1.4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes tutBob { to { transform: translateX(-50%) translateY(-5px); } }

/* Result ceremony */
.result-card { position: relative; overflow: hidden; }
.result-star {
  display: inline-block;
  opacity: 0;
  transform: scale(0);
  animation: starPop 0.45s cubic-bezier(0.2, 2, 0.4, 1) forwards;
}
.result-star.dim { filter: grayscale(1); }
@keyframes starPop { to { opacity: 1; transform: scale(1); } }
.result-stats { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.confetti {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  background: hsl(var(--hue), 90%, 60%);
  border-radius: 2px;
  animation: confettiFall 1.9s ease-in forwards;
  pointer-events: none;
}
@keyframes confettiFall {
  to { transform: translateY(430px) rotate(720deg); opacity: 0; }
}

/* Pause overlay */
.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
}
.pause-card {
  background: var(--glass);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  width: min(80%, 300px);
}
.pause-card h2 { margin: 0 0 12px; font-family: var(--display); }

/* Menu toggles + daily bonus */
.menu-card { position: relative; }
.menu-toggles {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.menu-toggles .icon-btn.off { opacity: 0.35; filter: grayscale(1); }
.btn.daily {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  border: none;
}
.btn.daily:disabled { filter: grayscale(0.6); }

/* Upgrade shop */
.shop-blurb { padding: 10px 18px 0; color: var(--muted); font-size: 13px; text-align: center; }
.shop-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
}
.shop-item.owned { opacity: 0.75; border-color: var(--green); }
.shop-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.shop-item-name { font-weight: 700; font-family: var(--display); }
.shop-item-desc { font-size: 12px; color: var(--muted); }
.shop-buy {
  width: auto;
  flex: 0 0 auto;
  padding: 10px 16px;
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}
.shop-buy:disabled { opacity: 0.5; }

/* Mobile tweaks */
@media (max-width: 380px) {
  .logo { font-size: 46px; }
  .kitchen { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .customer-card { flex: 0 0 96px; }
  .level-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
