/* ============ Kitty Cuisine — styles ============ */
:root {
  --ink: #2a1a2e;
  --cream: #fff6e3;
  --amber: #ffc861;
  --amber-deep: #f0982c;
  --rose: #ff7a9c;
  --teal: #3ddc97;
  --panel: rgba(27, 16, 36, 0.82);
  --panel-solid: #22142f;
  /* Capacitor 8 paints edge-to-edge on Android 15/16 and injects --safe-area-inset-*;
     older Android WebViews (< Chromium 140) leave env() at 0, so read the
     injected variable first and fall back to the platform one. */
  --safe-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-b: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

.tile.shuffling .plate { animation: shuffleFlip 0.32s ease; }
@keyframes shuffleFlip {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(0.85) rotate(9deg); }
  100% { transform: scale(1) rotate(0deg); }
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: #080b22;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

#bg {
  position: fixed;
  inset: 0;
  background: url("assets/backgrounds/night_kitchen.svg") center center / cover no-repeat;
  transform: scale(1.02);
}

#bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(255, 150, 80, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(6, 9, 28, 0.5) 0%, rgba(6, 9, 28, 0.15) 40%, rgba(6, 9, 28, 0.75) 100%);
}

/* ---------------- fireflies ---------------- */
/* A handful of warm specks drifting around the lantern string that hangs in the
   backdrop. Decorative only: the layer ignores pointers and sits under the UI. */
#fireflies { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.fly {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 12%);
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0%, #ffdc8a 42%, rgba(255, 170, 60, 0) 72%);
  box-shadow: 0 0 7px 2px rgba(255, 214, 120, 0.55);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: flyDrift var(--dur, 9s) ease-in-out infinite, flyGlow var(--glow, 3.4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s), var(--glowDelay, 0s);
}

@keyframes flyDrift {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  25% { transform: translate(-50%, -50%) translate(var(--dx1, 0px), var(--dy1, 0px)); }
  50% { transform: translate(-50%, -50%) translate(var(--dx2, 0px), var(--dy2, 0px)); }
  75% { transform: translate(-50%, -50%) translate(var(--dx3, 0px), var(--dy3, 0px)); }
}

@keyframes flyGlow {
  0%, 100% { opacity: 0; }
  18% { opacity: 0.85; }
  42% { opacity: 0.2; }
  63% { opacity: 1; }
  84% { opacity: 0.1; }
}

@media (prefers-reduced-motion: reduce) {
  #fireflies { display: none; }
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}

.screen.active { display: flex; }

.hidden { display: none !important; }
.muted { opacity: 0.7; font-size: 14px; }

/* ---------------- buttons ---------------- */
.btn {
  font: inherit;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.01em;
  border: 0;
  border-radius: 18px;
  padding: 15px 26px;
  color: #3a1f14;
  background: linear-gradient(180deg, #ffe0a4 0%, #ffbe5a 55%, #f7a53a 100%);
  box-shadow: 0 5px 0 #b9741b, 0 14px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.09s ease, box-shadow 0.09s ease, filter 0.15s;
  cursor: pointer;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #b9741b, 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  color: #06261d;
  background: linear-gradient(180deg, #a5f7d8, #46d9a5 60%, #2bbd8b);
  box-shadow: 0 5px 0 #17795b, 0 14px 24px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.09);
  color: #ffeccb;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  font-weight: 700;
  font-size: 16px;
  padding: 12px 22px;
}

.btn-ghost:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18); }
.btn[disabled] { filter: saturate(0.4) brightness(0.75); pointer-events: none; }

.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
  color: #ffeccb;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
}

.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:active { transform: scale(0.94); }

.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.32);
  font-size: 15px;
  font-weight: 800;
  color: #ffe6a8;
}

.coin-chip b { font-size: 15px; }

.coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff3c4, #ffc861 45%, #dd9020 100%);
  box-shadow: 0 0 0 2px #b9741b inset;
  display: inline-block;
}

/* ---------------- title ---------------- */
.title-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 22px 28px;
  text-align: center;
}

.lanterns { position: absolute; top: 6px; left: 0; right: 0; height: 60px; pointer-events: none; }
.lamp {
  position: absolute;
  top: 0;
  width: 12px;
  height: 16px;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 30%, #ffdf9c, #ff8a5c 70%, #e0453f);
  box-shadow: 0 0 22px 8px rgba(255, 145, 80, 0.4);
  animation: sway 4.5s ease-in-out infinite;
}
.lamp::before { content: ""; position: absolute; left: 5px; bottom: 16px; width: 2px; height: 16px; background: rgba(255, 217, 160, 0.45); }
.lamp.l1 { left: 24%; animation-delay: 0s; }
.lamp.l2 { left: 50%; animation-delay: 0.6s; height: 20px; width: 14px; }
.lamp.l3 { left: 76%; animation-delay: 1.2s; }

@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(4px) rotate(3deg); }
}

.logo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 34px 16px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(58, 32, 46, 0.94), rgba(26, 15, 30, 0.95));
  box-shadow: 0 0 0 3px rgba(255, 200, 97, 0.5), 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

.logo-top,
.logo-bot {
  font-size: 58px;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.logo-top {
  color: #ffe9b8;
  text-shadow: 0 3px 0 #c4791c, 0 6px 0 #8a4a10, 0 12px 22px rgba(0, 0, 0, 0.5);
}

.logo-bot {
  color: #ffcad8;
  text-shadow: 0 3px 0 #b53b60, 0 6px 0 #7d2444, 0 12px 22px rgba(0, 0, 0, 0.5);
}

.logo-sub {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #ffd79a;
  opacity: 0.85;
}

.mascot { position: relative; width: 168px; height: 168px; margin: -6px 0 2px; }
.mascot img { width: 100%; height: 100%; object-fit: contain; animation: bob 3.2s ease-in-out infinite; position: relative; }
.mascot-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 185, 110, 0.42), transparent 68%);
  animation: pulseGlow 3.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(-3px) rotate(-1.5deg); }
  50% { transform: translateY(5px) rotate(1.5deg); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.06); }
}

.title-actions { display: flex; flex-direction: column; gap: 10px; width: min(300px, 82vw); margin-top: 4px; }
.title-actions .btn { width: 100%; }

.coin-row { display: flex; align-items: center; gap: 14px; margin-top: 2px; }

/* ---------------- map ---------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 8px;
}

.topbar h2 {
  flex: 1;
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe9b8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.map-wrap { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 28px; }

/* chapter strip + exact-kitchen jump */
.map-jumpbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 16px 8px;
}

.jump-exact { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.jump-input {
  width: 58px;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding: 7px 6px;
  border: 0;
  border-radius: 999px;
  color: #ffe9b8;
  background: rgba(64, 40, 56, 0.85);
  box-shadow: inset 0 0 0 1.5px rgba(255, 200, 97, 0.22), 0 3px 0 rgba(0, 0, 0, 0.3);
  appearance: textfield;
  -moz-appearance: textfield;
}
.jump-input::-webkit-outer-spin-button,
.jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jump-input::placeholder { color: rgba(255, 233, 184, 0.45); }
.jump-input:focus { outline: 0; box-shadow: inset 0 0 0 2px #ffcf6a, 0 3px 0 rgba(0, 0, 0, 0.3); }

.chapter-jumps {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapter-jumps::-webkit-scrollbar { display: none; }

.chapter-chip {
  flex: 0 0 auto;
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffe9b8;
  background: rgba(64, 40, 56, 0.85);
  box-shadow: inset 0 0 0 1.5px rgba(255, 200, 97, 0.18), 0 3px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease, background 0.15s ease;
}
.chapter-chip:active { transform: scale(0.95); }
.chapter-chip.on {
  color: #3a1f14;
  background: linear-gradient(180deg, #ffd27a, #e8a03e);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4), 0 3px 0 rgba(0, 0, 0, 0.3);
}

/* chapter headers inside the level grid */
.chapter-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(22, 13, 28, 0.75), rgba(22, 13, 28, 0.3));
  box-shadow: inset 0 0 0 1px rgba(255, 200, 97, 0.14);
  color: #ffd79a;
  text-transform: uppercase;
  opacity: 0.95;
}
.chapter-head:first-child { margin-top: 2px; }
.chapter-head b { font-size: 13px; font-weight: 900; letter-spacing: 0.12em; }
.chapter-head span { font-size: 10px; letter-spacing: 0.08em; opacity: 0.7; }
.chapter-head.locked { opacity: 0.45; }

/* the kitchen an exact jump landed on */
.level-node.flash { animation: nodeFlash 0.55s ease-out 3; }
@keyframes nodeFlash {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.18), 0 6px 0 rgba(0, 0, 0, 0.35); }
  50% { box-shadow: inset 0 0 0 3px #ffcf6a, 0 0 20px rgba(255, 207, 106, 0.7), 0 6px 0 rgba(0, 0, 0, 0.35); }
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  padding: 8px 16px;
}

.level-node {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(64, 40, 56, 0.95), rgba(34, 20, 40, 0.95));
  box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.18), 0 6px 0 rgba(0, 0, 0, 0.35);
  color: #ffe9b8;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.level-node b { font-size: 27px; line-height: 1; font-weight: 900; }
.level-node small { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.72; max-width: 94%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.level-node:active { transform: scale(0.96); }

.level-node.locked {
  background: linear-gradient(180deg, rgba(38, 30, 50, 0.9), rgba(24, 18, 32, 0.9));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  color: rgba(255, 246, 227, 0.35);
  cursor: not-allowed;
}
.level-node.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.04), transparent 70%);
}

.level-node.current {
  box-shadow: inset 0 0 0 2px #ffc861, 0 0 22px rgba(255, 200, 97, 0.35), 0 6px 0 rgba(0, 0, 0, 0.35);
  animation: nodeGlow 2.4s ease-in-out infinite;
}

@keyframes nodeGlow {
  0%, 100% { box-shadow: inset 0 0 0 2px #ffc861, 0 0 14px rgba(255, 200, 97, 0.22), 0 6px 0 rgba(0, 0, 0, 0.35); }
  50% { box-shadow: inset 0 0 0 2px #ffe1a3, 0 0 26px rgba(255, 200, 97, 0.45), 0 6px 0 rgba(0, 0, 0, 0.35); }
}

.node-stars { display: flex; gap: 2px; height: 12px; }
.node-stars i {
  width: 11px;
  height: 11px;
  background: rgba(255, 255, 255, 0.14);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.node-stars i.on { background: linear-gradient(180deg, #ffe9a8, #ffbe4a); }

/* ---------------- game HUD ---------------- */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 6px;
}

.hud-center { flex: 1; min-width: 0; }

.hud-level {
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffd79a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.hud-level b { color: #fff4dc; font-size: 13px; }
.hud-level .dot { opacity: 0.5; }

.progress {
  position: relative;
  height: 17px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(180deg, #8cf5c0, #34cb92 60%, #21a475);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.45);
  transition: width 0.4s cubic-bezier(0.3, 0.9, 0.4, 1);
}

.progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.combo-bar {
  position: relative;
  height: 15px;
  margin-top: 5px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 97, 0.4), 0 0 14px rgba(255, 150, 80, 0.25);
  opacity: 1;
  transition: opacity 0.18s ease, box-shadow 0.2s ease;
}

.combo-bar.idle { opacity: 0; box-shadow: none; }

.combo-bar i {
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(90deg, #ff6f9c, #ffb04a 55%, #fff3c0);
  transition: width 0.12s linear;
}

.combo-bar span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(40, 12, 0, 0.85), 0 0 8px rgba(40, 12, 0, 0.6);
}

.combo-bar b { font-size: 11px; letter-spacing: 0.02em; }
.combo-bar em { font-style: normal; opacity: 0.8; }
.combo-bar.hot i { background: linear-gradient(90deg, #ff4d87, #ff9a3c 45%, #fff1b8); }
.combo-bar.hot { box-shadow: inset 0 0 0 1px #ff9a3c, 0 0 18px rgba(255, 120, 90, 0.6); }

@keyframes comboPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.hud-right { display: flex; align-items: center; gap: 8px; }

.sound-btn {
  position: absolute;
  top: calc(10px + var(--safe-t));
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  background: rgba(0, 0, 0, 0.38);
}

.sound-btn svg { width: 20px; height: 20px; fill: currentColor; }
.sound-btn.off { color: rgba(255, 236, 203, 0.44); }

.moves-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  padding: 5px 8px 3px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.09);
}
.moves-box b { font-size: 19px; line-height: 1; color: #fff4dc; }
.moves-box small { font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }

.hearts { display: flex; gap: 2px; }
.hearts i {
  width: 13px;
  height: 13px;
  background: #ff6f8f;
  clip-path: path("M6.5 12 L1.2 6.6 C-0.6 4.6 0.6 1 3.4 1 C4.8 1 5.9 1.9 6.5 2.8 C7.1 1.9 8.2 1 9.6 1 C12.4 1 13.6 4.6 11.8 6.6 Z");
  transition: background 0.25s, transform 0.25s;
}
.hearts i.lost { background: rgba(255, 255, 255, 0.16); transform: scale(0.85); }

/* ---------------- customers ---------------- */
.customers {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 10px 8px;
  min-height: 140px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.cust {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  max-width: 164px;
  min-width: 0;
  gap: 6px;
  padding: 9px 8px 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(58, 34, 48, 0.88), rgba(28, 17, 34, 0.9));
  box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.14), 0 8px 18px rgba(0, 0, 0, 0.32);
  animation: custIn 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
  transition: transform 0.2s, box-shadow 0.2s;
}

@keyframes custIn {
  from { transform: translateY(14px) scale(0.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.cust.served { animation: custOut 0.5s ease forwards; }
@keyframes custOut {
  40% { transform: translateY(-6px) scale(1.06); box-shadow: 0 0 0 3px #3ddc97; }
  100% { transform: translateY(-30px) scale(0.7); opacity: 0; }
}

.cust.angry { animation: custAngry 0.5s ease forwards; }
@keyframes custAngry {
  25% { transform: translateX(-6px) rotate(-4deg); box-shadow: 0 0 0 3px #ff5b6e; }
  60% { transform: translateX(6px) rotate(4deg); }
  100% { transform: translateY(-16px) scale(0.8); opacity: 0; }
}

.cust-art { width: 76px; height: 76px; position: relative; }
.cust-art img { width: 100%; height: 100%; object-fit: contain; }
.cust-art::after {
  content: "";
  position: absolute;
  inset: 14% 8% -4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 110, 0.28), transparent 70%);
  z-index: -1;
}

.cust-order {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff8ea;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 200, 97, 0.55);
  color: #3d2110;
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  justify-content: center;
}
.cust-order img { width: 36px; height: 36px; object-fit: contain; }

.meter {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  margin-top: 2px;
}
.meter i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #9df5cf, #35cb93);
  transition: width 0.18s linear, background 0.3s;
}
.meter.warn i { background: linear-gradient(180deg, #ffd989, #f5a623); }
.meter.low i { background: linear-gradient(180deg, #ff9aa6, #f5495f); }

/* ---------------- board ---------------- */
.board-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 12px 6px;
}

/* Wooden counter surround: a 9-slice border-image so the carved corners keep
   their shape while the edge grain stretches to the board's size. Border widths
   are set by fitBoard() in game.js, proportional to the slices below. */
#board {
  position: relative;
  flex: none;
  border-style: solid;
  border-color: transparent;
  border-width: 40px;
  border-image: url("assets/ui/counter_frame.png") 184 143 174 174 stretch;
  background: linear-gradient(165deg, #fffdf7 0%, #fff6e6 55%, #ffe8cc 100%) padding-box;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.55),
    0 3px 0 rgba(90, 54, 30, 0.55);
  transition: box-shadow 0.2s, filter 0.2s;
}

#board.targeting {
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.55),
    0 0 0 3px rgba(255, 122, 156, 0.9),
    0 0 30px rgba(255, 122, 156, 0.6);
}

#grid {
  position: absolute;
  inset: 5px;
  --cols: 6;
  --rows: 7;
}

.tile {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--cols));
  height: calc(100% / var(--rows));
  padding: 1.6%;
  transform: translate(calc(var(--c, 0) * 100% + var(--dx, 0px)), calc(var(--r, 0) * 100% + var(--dy, 0px)));
  transition: transform 0.26s cubic-bezier(0.32, 0.9, 0.35, 1);
  will-change: transform;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* While a finger drags a tile it must track the pointer without easing. */
.tile.dragging {
  z-index: 8;
  transition: none;
  pointer-events: none;
}

.tile.dragging .plate {
  transform: scale(1.12) rotate(-2deg);
  box-shadow:
    0 14px 22px rgba(0, 0, 0, 0.45),
    inset 0 0 0 2px rgba(24, 15, 8, 0.85),
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.tile.drag-over .plate {
  box-shadow:
    0 0 0 3px var(--teal),
    0 0 20px rgba(61, 220, 151, 0.7),
    inset 0 0 0 2px rgba(24, 15, 8, 0.82);
}

.tile .plate {
  width: 100%;
  height: 100%;
  border-radius: 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fffdf7, #fff0d8);
  box-shadow:
    inset 0 0 0 2px rgba(24, 15, 8, 0.82),
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    0 2px 5px rgba(96, 60, 24, 0.22);
  overflow: hidden;
  transition: transform 0.13s ease, box-shadow 0.13s ease;
}

.tile img { width: 96%; height: 96%; object-fit: contain; display: block; pointer-events: none; }

.tile.selected .plate {
  transform: scale(1.07);
  box-shadow: 0 0 0 3px var(--rose), 0 0 16px rgba(255, 122, 156, 0.7), inset 0 2px 0 #fff;
}

.tile.preview .plate { box-shadow: 0 0 0 3px var(--teal), 0 0 14px rgba(61, 220, 151, 0.6); }

/* A native build that lost its ad or billing plugin: the boot check puts this
   over everything, because an empty shop is not an acceptable way to find out. */
.boot-error {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 200;
  padding: 8px 12px;
  background: #7a1020;
  color: #fff;
  border-bottom: 2px solid #ffd7a0;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

/* ---------------- power-up tiles ---------------- */
/* A power-up has to read at a glance on a full board, so it gets a ring, a
   breathing outer glow and a warm halo around the art itself. */
.tile.powerup .plate {
  background: linear-gradient(160deg, #fffdf3, #ffe2a6);
  box-shadow:
    inset 0 0 0 2px rgba(24, 15, 8, 0.82),
    0 0 0 2px rgba(255, 205, 105, 0.95),
    0 0 22px 5px rgba(255, 186, 66, 0.6);
  animation: powerPulse 1.6s ease-in-out infinite, powerGlow 2.4s ease-in-out infinite;
}

@keyframes powerGlow {
  0%, 100% {
    box-shadow:
      inset 0 0 0 2px rgba(24, 15, 8, 0.82),
      0 0 0 2px rgba(255, 205, 105, 0.85),
      0 0 14px 2px rgba(255, 186, 66, 0.45);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px rgba(24, 15, 8, 0.82),
      0 0 0 3px rgba(255, 228, 156, 1),
      0 0 32px 9px rgba(255, 186, 66, 0.9);
  }
}

/* The supplied PNGs carry transparent padding (art fills 58-70% of the canvas), so
   each is scaled up with a transform rather than a width — in the flex plate a
   percentage width just shrinks back to fit. The plate clips the overflow. */
.tile.powerup img {
  flex: none;
  filter: drop-shadow(0 0 3px rgba(255, 214, 130, 0.95)) drop-shadow(0 0 9px rgba(255, 170, 50, 0.6));
}
.tile[data-powerup="chopstick"] img,
.tile[data-powerup="star"] img { transform: scale(1.22); }
.tile[data-powerup="wasabi"] img { transform: scale(1.2); }
.tile[data-powerup="mega"] img { transform: scale(1.28); }
.tile[data-powerup="golden"] img { transform: scale(1.42); }

@keyframes powerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.tile.spawned .plate { animation: powerSpawn 0.44s cubic-bezier(0.2, 1.5, 0.4, 1); }
@media (prefers-reduced-motion: reduce) {
  .tile.powerup .plate {
    animation: none;
    box-shadow:
      inset 0 0 0 2px rgba(24, 15, 8, 0.82),
      0 0 0 2px rgba(255, 205, 105, 0.95),
      0 0 22px 5px rgba(255, 186, 66, 0.6);
  }
}

@keyframes powerSpawn {
  0% { transform: scale(0.35) rotate(-14deg); opacity: 0.4; }
  60% { transform: scale(1.18) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.tile.firing .plate { animation: powerFire 0.36s ease; }
@keyframes powerFire {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.24); filter: brightness(2.1); }
  100% { transform: scale(0.92); filter: brightness(1.15); }
}

.tile.pop .plate { animation: pop 0.26s ease forwards; }
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); box-shadow: 0 0 0 3px var(--amber), 0 0 20px rgba(255, 200, 97, 0.85); }
  100% { transform: scale(0); opacity: 0; }
}

.tile.hint .plate { animation: hintPulse 0.85s ease-in-out infinite; }
@keyframes hintPulse {
  0%, 100% { box-shadow: inset 0 2px 0 #fff, 0 0 0 2px rgba(255, 200, 97, 0.35); transform: scale(1); }
  50% { box-shadow: inset 0 2px 0 #fff, 0 0 0 5px rgba(255, 208, 92, 1), 0 0 24px rgba(255, 190, 70, 0.95); transform: scale(1.1); }
}

.tile.shake .plate { animation: shake 0.3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-3deg); }
  75% { transform: translateX(4px) rotate(3deg); }
}

/* ---------------- powers ---------------- */
.tray {
  display: flex;
  gap: 8px;
  padding: 6px 12px 10px;
  justify-content: center;
}

.power {
  position: relative;
  flex: 1;
  max-width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 4px 6px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(74, 45, 62, 0.92), rgba(38, 22, 42, 0.95));
  box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.16), 0 5px 0 rgba(0, 0, 0, 0.3);
  color: #ffe6b8;
  font: inherit;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.2s;
}

.power:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 200, 97, 0.16), 0 1px 0 rgba(0, 0, 0, 0.3); }

.power .pico { width: 22px; height: 22px; fill: currentColor; opacity: 0.95; }
.power .pico [fill="none"] { fill: none; }

.power .pname { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }

.power .pcount {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe4a8, #ffb03f);
  color: #4a2b10;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.power.empty { opacity: 0.42; }

.power.armed {
  box-shadow: inset 0 0 0 2px var(--rose), 0 0 20px rgba(255, 122, 156, 0.55), 0 5px 0 rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ---------------- floating feedback ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + var(--safe-b));
  transform: translate(-50%, 12px);
  max-width: 82vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 8, 20, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 97, 0.28), 0 10px 24px rgba(0, 0, 0, 0.5);
  color: #ffeccb;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 40;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.combo {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.7);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.05;
  color: #ffe9a8;
  text-shadow: 0 4px 0 #c4661a, 0 0 26px rgba(255, 190, 90, 0.9), 0 10px 30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  z-index: 35;
  white-space: nowrap;
}

.combo small {
  display: block;
  font-size: 15px;
  letter-spacing: 0.28em;
  margin-top: 4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.combo.lv3 { color: #ffd166; }
.combo.lv4 { color: #ff9d5c; text-shadow: 0 4px 0 #b03c1a, 0 0 30px rgba(255, 140, 70, 0.95), 0 10px 30px rgba(0, 0, 0, 0.65); }
.combo.lv5 { color: #ff7a9c; text-shadow: 0 4px 0 #9c1c46, 0 0 34px rgba(255, 110, 150, 0.95), 0 10px 30px rgba(0, 0, 0, 0.65); }

/* sparks, shockwave and screen shake */
.spark {
  position: fixed;
  left: 0;
  top: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, #ffd166);
  box-shadow: 0 0 12px var(--c, #ffd166);
  pointer-events: none;
  z-index: 38;
  will-change: transform, opacity;
  animation: sparkFly 0.62s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

@keyframes sparkFly {
  0% { transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--x) + var(--dx) - 50%), calc(var(--y) + var(--dy) - 50%)) scale(0.2); opacity: 0; }
}

.burst-ring {
  position: fixed;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--c, #ffd166);
  box-shadow: 0 0 18px var(--c, #ffd166);
  pointer-events: none;
  z-index: 38;
  animation: ringOut 0.5s ease-out forwards;
}

@keyframes ringOut {
  0% { transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)) scale(0.4); opacity: 0.95; }
  100% { transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)) scale(4.6); opacity: 0; }
}

#screen-game.shake-1 { animation: shakeS 0.26s ease; }
#screen-game.shake-2 { animation: shakeM 0.32s ease; }
#screen-game.shake-3 { animation: shakeL 0.4s ease; }

@keyframes shakeS {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-2px, 1px); }
  60% { transform: translate(2px, -1px); }
}
@keyframes shakeM {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  45% { transform: translate(4px, -3px); }
  70% { transform: translate(-2px, 2px); }
}
@keyframes shakeL {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-6px, 3px) rotate(-0.5deg); }
  35% { transform: translate(6px, -4px) rotate(0.5deg); }
  55% { transform: translate(-5px, -3px) rotate(-0.3deg); }
  80% { transform: translate(4px, 3px) rotate(0.2deg); }
}
.combo.show { animation: comboPop 0.9s cubic-bezier(0.2, 1.2, 0.4, 1) forwards; }
@keyframes comboPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(-6deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -75%) scale(0.94); }
}

.float {
  position: fixed;
  transform: translate(-50%, 0);
  font-weight: 900;
  font-size: 16px;
  color: #ffe9a8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  animation: floatUp 0.9s ease-out forwards;
  z-index: 36;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.9); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1.05); }
}

/* ---------------- overlays ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card {
  width: min(400px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 22px 22px;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(180deg, #3a2136, #1d1226 70%);
  box-shadow: 0 0 0 3px rgba(255, 200, 97, 0.35), 0 24px 50px rgba(0, 0, 0, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  animation: cardIn 0.28s cubic-bezier(0.2, 1.2, 0.4, 1);
}

@keyframes cardIn {
  from { transform: translateY(16px) scale(0.94); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.card h2 {
  margin: 0 0 6px;
  font-size: 27px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffe9b8;
  text-shadow: 0 2px 0 #a35d12, 0 8px 20px rgba(0, 0, 0, 0.5);
}

.card p { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: rgba(255, 246, 227, 0.82); }

.card .result-cat { width: 120px; height: 120px; margin: 0 auto 4px; }
.card .result-cat img { width: 100%; height: 100%; object-fit: contain; }

.stars { display: flex; justify-content: center; gap: 10px; margin: 8px 0 12px; }
.stars svg { width: 42px; height: 42px; }
.stars svg path { fill: rgba(255, 255, 255, 0.14); stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.5; }
.stars svg.on path { fill: #ffcf6a; stroke: #b9741b; stroke-width: 2; filter: drop-shadow(0 3px 8px rgba(255, 190, 80, 0.6)); }
.stars svg.on { animation: starPop 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
.stars svg.on:nth-child(2) { animation-delay: 0.12s; }
.stars svg.on:nth-child(3) { animation-delay: 0.24s; }

@keyframes starPop {
  from { transform: scale(0.2) rotate(-30deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.card-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.card-actions .btn { width: 100%; }

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
  color: rgba(255, 246, 227, 0.8);
}
.stat-row b { color: #ffe9b8; }

.tip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 200, 97, 0.12);
  font-size: 12.5px;
  line-height: 1.4;
  color: #ffe3b4;
}

/* ---------------- tutorial ---------------- */
.tut { position: fixed; inset: 0; z-index: 60; }
.tut-spot {
  position: absolute;
  border-radius: 20px;
  box-shadow: 0 0 0 9999px rgba(4, 6, 16, 0.74), 0 0 0 3px rgba(255, 200, 97, 0.75);
  transition: top 0.28s ease, left 0.28s ease, width 0.28s ease, height 0.28s ease;
  pointer-events: none;
}
.tut-spot.passive { box-shadow: 0 0 0 9999px rgba(4, 6, 16, 0.74); }

.tut-card.top {
  top: calc(16px + var(--safe-t));
  bottom: auto;
}

.tut-card {
  position: absolute;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  width: min(420px, 92vw);
  padding: 20px 20px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #3d2338, #1e1328 72%);
  box-shadow: 0 0 0 3px rgba(255, 200, 97, 0.4), 0 24px 46px rgba(0, 0, 0, 0.6);
  animation: cardIn 0.26s cubic-bezier(0.2, 1.2, 0.4, 1);
}

.tut-step {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffc861;
  opacity: 0.9;
  margin-bottom: 4px;
}
.tut-card h3 { margin: 0 0 6px; font-size: 21px; color: #ffe9b8; }
.tut-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: rgba(255, 246, 227, 0.85); }

.tut-actions { display: flex; gap: 8px; align-items: center; }
.tut-actions .btn { flex: 1; }
.tut-actions .btn-ghost { flex: 0 0 34%; }

/* ---------------- responsive ---------------- */
@media (max-height: 700px) {
  .logo-top, .logo-bot { font-size: 46px; }
  .mascot { width: 128px; height: 128px; }
  .title-inner { gap: 12px; }
  .customers { min-height: 126px; padding-bottom: 4px; }
  .cust-art { width: 66px; height: 66px; }
  .cust-order { font-size: 20px; min-width: 68px; padding: 3px 10px; }
  .cust-order img { width: 30px; height: 30px; }
  .power .pico { width: 19px; height: 19px; }
  .power .pname { font-size: 9px; }
}

@media (max-height: 620px) {
  .cust-art { width: 54px; height: 54px; }
  .customers { min-height: 112px; }
  .cust-order { font-size: 18px; min-width: 62px; }
  .cust-order img { width: 27px; height: 27px; }
  .hud-level { display: none; }
  .power .pname { display: none; }
  .tray .power { padding: 8px 4px; }
}

/* ============ monetisation, shop & new features ============ */
.title-row { display: flex; gap: 10px; }
.title-row .btn { flex: 1; position: relative; padding-left: 10px; padding-right: 10px; }
.dot-badge { position: absolute; top: 6px; right: 10px; width: 11px; height: 11px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px #2a1a2e, 0 0 10px var(--rose); }
.coin-chip-btn { border: 0; font-family: inherit; cursor: pointer; }
.coin-chip-btn:active { transform: scale(0.96); }
.chip-plus { display: grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; background: var(--teal); color: #06261d; font-size: 14px; font-weight: 900; line-height: 1; }
.settings-btn { right: auto; left: 14px; }

/* coins earned this kitchen */
.hud-center { position: relative; }
.hud-level { padding-right: 62px; }
.hud-coins { position: absolute; top: -2px; right: 0; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.42); font-size: 12px; font-weight: 800; color: #ffe6a8; }
.hud-coins .coin { width: 13px; height: 13px; }

/* VIP cats */
.cust.vip { background: linear-gradient(180deg, rgba(92, 62, 30, 0.95), rgba(40, 24, 30, 0.95)); box-shadow: inset 0 0 0 2px #ffd166, 0 0 18px rgba(255, 209, 102, 0.45), 0 8px 18px rgba(0, 0, 0, 0.32); }
.vip-tag { position: absolute; top: -4px; left: -6px; z-index: 2; padding: 1px 6px; border-radius: 8px; background: linear-gradient(180deg, #ffe9a8, #ffbe4a); color: #4a2b10; font-size: 10px; font-weight: 900; letter-spacing: 0.08em; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }

/* empty booster shows a "+" top-up badge */
.power.empty { opacity: 0.8; }
.power.empty .pcount { background: linear-gradient(180deg, #a5f7d8, #2bbd8b); color: #06261d; font-size: 14px; }

/* modals */
.modal-chip { margin: 0 auto 12px; }
.price { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.price .coin { width: 15px; height: 15px; }
.btn-sm { font-size: 14px; padding: 9px 14px; border-radius: 14px; min-width: 76px; box-shadow: 0 3px 0 #b9741b, 0 8px 14px rgba(0, 0, 0, 0.35); }
.btn-secondary.btn-sm { box-shadow: 0 3px 0 #17795b, 0 8px 14px rgba(0, 0, 0, 0.35); }
.btn-ghost.btn-sm { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18); }
.shop-sec { margin: 14px 0 6px; text-align: left; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #ffc861; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); text-align: left; }
.shop-info { flex: 1; min-width: 0; }
.shop-info b { display: block; font-size: 15px; color: #fff4dc; }
.shop-info small { display: block; font-size: 12px; opacity: 0.72; line-height: 1.3; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.swatch-night { background: #3b4a9e; } .swatch-sakura { background: #ff8fb4; } .swatch-jade { background: #3ddc97; } .swatch-ember { background: #ff9d5c; }
.boost-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.boost { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 14px; font: inherit; color: #ffeccb; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14); cursor: pointer; text-align: left; }
.boost b { flex: 1; font-size: 15px; }
.boost .tick { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3); }
.boost.on { background: rgba(61, 220, 151, 0.16); box-shadow: inset 0 0 0 2px var(--teal); }
.boost.on .tick { background: var(--teal); box-shadow: none; }
.chest-note { margin: 4px 0 10px; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #4a2b10; background: linear-gradient(180deg, #ffe9a8, #ffbe4a); }
.daily-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 14px; }
.day { padding: 6px 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 12px; }
.day small { display: block; opacity: 0.65; font-size: 10px; text-transform: uppercase; }
.day b { display: inline-flex; align-items: center; gap: 3px; }
.day .coin { width: 11px; height: 11px; }
.day.now { background: rgba(255, 200, 97, 0.22); box-shadow: inset 0 0 0 2px var(--amber); }
.day.done { opacity: 0.4; }
.day:last-child { grid-column: span 1; }
.mock-badge { margin: -10px 0 10px; padding: 3px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: #06261d; background: var(--teal); }

/* ---------------- kitchen themes (cosmetic, bought with coins) ---------------- */
body[data-theme="sakura"] #bg { filter: hue-rotate(-62deg) saturate(1.15) brightness(1.08); }
body[data-theme="jade"] #bg   { filter: hue-rotate(95deg) saturate(1.05) brightness(1.02); }
body[data-theme="ember"] #bg  { filter: hue-rotate(155deg) saturate(1.2) brightness(1.04); }
