*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Gossip Harbor–inspired sandy casual merge palette */
  --sky-top: #6ec4ef;
  --sky-mid: #a8daf5;
  --sky-bot: #d4eef9;
  --grass: #78c888;
  --grass-deep: #4fa05a;
  --wood: #d4b48a;
  --wood-dark: #8a6340;
  --wood-mid: #c9a06e;
  --wood-cell: #f0e0c4;
  --wood-cell-alt: #e8d4b0;
  --wood-line: #d0b488;
  --wood-inset: rgba(110, 70, 35, 0.22);
  --sand: #e8d4b0;
  --sand-deep: #c9a878;
  --sand-light: #f6ead4;
  --hud-bg: linear-gradient(180deg, #fffef9 0%, #fff6e6 55%, #ffe9c4 100%);
  --text: #3a2414;
  --text-strong: #2a180c;
  --muted: #8b6b52;
  --good: #43a047;
  --good-bright: #8ef08e;
  --energy: #ffc107;
  --gem: #d500f9;
  --shadow-soft: 0 2px 8px rgba(40, 20, 8, 0.18);
  --shadow-chip: 0 2px 0 rgba(120, 80, 40, 0.2), 0 3px 8px rgba(40, 20, 8, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  --tile-shadow:
    0 3px 0 rgba(120, 80, 40, 0.16),
    0 5px 10px rgba(40, 20, 8, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(160, 110, 50, 0.12);
  --radius-chip: 999px;
  --radius-tile: 14px;
  --press: cubic-bezier(0.2, 0.9, 0.3, 1);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  font-family: Nunito, "Arial Rounded MT Bold", "PingFang TC", "Hiragino Sans CNS", "Noto Sans TC",
    "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  background: #8fd0f2;
  touch-action: manipulation;
}

/* Full-bleed immersive mobile — scenic blur, no device chrome */
#app {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(150px, 20%) minmax(0, 1fr) auto;
  grid-template-areas:
    "hud"
    "customers"
    "board"
    "detail";
  background: transparent;
  position: relative;
  overflow: hidden;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  border-radius: 0;
  box-shadow: none;
}

/* Scenic photo layer — soft blur so board/HUD stay readable */
.app-bg {
  position: absolute;
  inset: -18px;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/bg-home.jpg");
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  filter: blur(7px) saturate(1.18) brightness(1.06);
  transform: scale(1.06);
  transition: opacity 0.55s ease, filter 0.55s ease;
  will-change: filter, opacity;
}
.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(126, 200, 242, 0.42) 0%,
      rgba(168, 216, 245, 0.18) 16%,
      rgba(255, 214, 150, 0.08) 34%,
      rgba(40, 80, 110, 0.06) 62%,
      rgba(30, 70, 90, 0.16) 100%),
    radial-gradient(ellipse 90% 42% at 50% 12%, rgba(255, 255, 255, 0.28), transparent 62%);
}
/* Per-landmark image is set inline via updateAppBackground(); keep soft blur + wash for all */
#app[data-bg] .app-bg {
  filter: blur(7px) saturate(1.18) brightness(1.06);
}

/* Scenic bg stays at z-index 0; existing HUD/board/overlay z-indexes unchanged */

/* ========== HUD ========== */
.hud {
  grid-area: hud;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: calc(4px + var(--safe-t) * 0.35) 8px 2px;
  z-index: 5;
  min-height: 0;
}

.hud-level {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.hud-avatar {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    url("assets/customer1.png") center 12% / 130% no-repeat,
    linear-gradient(145deg, #fff, #ffe0c0);
  border: 3px solid #fff;
  box-shadow:
    0 3px 0 rgba(120, 70, 30, 0.15),
    0 4px 10px rgba(40, 20, 8, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 1px rgba(255, 200, 100, 0.35);
}

.hud-lv {
  position: absolute;
  right: -4px;
  bottom: -3px;
  background: linear-gradient(180deg, #ffe082 0%, #ffb300 55%, #ff8f00 100%);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: var(--radius-chip);
  border: 1.5px solid #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  line-height: 1.25;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.hud-chips {
  flex: 1;
  display: flex;
  gap: 5px;
  min-width: 0;
  align-items: center;
}

.chip {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--hud-bg);
  border-radius: var(--radius-chip);
  padding: 3px 4px 3px 3px;
  box-shadow: var(--shadow-chip);
  border: 2px solid #5d4037;
  outline: 1.5px solid rgba(255, 255, 255, 0.95);
  outline-offset: -3.5px;
  min-height: 32px;
  flex: 1;
  min-width: 0;
  position: relative;
  transition: transform 0.12s var(--press), box-shadow 0.12s ease;
}

.chip::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 48%);
  opacity: 0.9;
}

.chip-ico {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.12),
    0 2px 5px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.chip.energy .chip-ico {
  background: linear-gradient(160deg, #fff59d, #ffc107 55%, #ff8f00);
}
.chip.travel .chip-ico {
  background: linear-gradient(160deg, #ffe082, #ffca28 55%, #ffa000);
}
.chip.gems .chip-ico {
  background: linear-gradient(160deg, #f8bbd0, #e040fb 55%, #aa00ff);
}

.chip-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.chip-val {
  font-weight: 900;
  font-size: 0.78rem;
  color: var(--text-strong);
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.chip-timer {
  font-size: 0.5rem;
  font-weight: 800;
  color: #e65100;
  white-space: nowrap;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.chip.energy .chip-timer.is-full {
  color: var(--muted);
  font-weight: 700;
}

.chip-plus {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #a5d6a7 0%, #66bb6a 45%, #2e7d32 100%);
  color: #fff;
  font-weight: 900;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow:
    0 2px 0 #1b5e20,
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: transform 0.1s var(--press), box-shadow 0.1s ease, filter 0.1s ease;
}

.chip-plus:hover {
  filter: brightness(1.06);
}

.chip-plus:active {
  transform: translateY(1px) scale(0.92);
  box-shadow:
    0 1px 0 #1b5e20,
    0 1px 2px rgba(0, 0, 0, 0.2);
}

.hud-shop,
.hud-mute {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  transition: transform 0.12s var(--press), filter 0.12s ease, box-shadow 0.12s ease;
  box-shadow:
    0 2px 6px rgba(40, 20, 8, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hud-shop {
  background: linear-gradient(160deg, #fff8e1, #ffcc80 60%, #ffb74d);
}

.hud-mute {
  background: linear-gradient(180deg, #fff8e7, #ffd699 60%, #ffb74d);
}

.hud-shop:hover,
.hud-mute:hover {
  filter: brightness(1.05);
  transform: scale(1.04);
}

.hud-shop:active,
.hud-mute:active {
  transform: scale(0.92);
}

.hud-mute[aria-pressed="true"] {
  background: linear-gradient(180deg, #efebe9, #bcaaa4);
  filter: saturate(0.65);
}


/* ========== Landmarks (P6: overlay under HUD) ========== */
.landmarks-slim {
  grid-area: hud;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: clamp(16px, 2.2vh, 22px);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  min-height: 0;
  overflow: visible;
  z-index: 6;
  pointer-events: none;
  align-self: start;
  justify-self: stretch;
  width: 100%;
}
.landmarks-slim .landmark {
  pointer-events: auto;
}

.landmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.35;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.2s var(--press);
}

.landmark.unlocked {
  opacity: 1;
  filter: none;
}

.landmark.current .stamp {
  transform: scale(1.15);
  filter: drop-shadow(0 0 5px rgba(255, 200, 50, 0.85));
}

.landmark .stamp {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.2s var(--press);
}

.landmark .lm-name,
.landmark .lm-cost {
  display: none;
}

/* ========== Customers ========== */
.customers {
  grid-area: customers;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  padding: 12px 6px 0;
  z-index: 4;
}

.customer-row {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  padding-bottom: 10px;
}

.customer {
  flex: 1;
  max-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  min-width: 0;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.15s var(--press);
}

.customer:active {
  transform: scale(0.96);
}

.customer.ready .bubble {
  box-shadow:
    0 0 0 2.5px var(--good-bright),
    0 4px 14px rgba(76, 175, 80, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: bubble-pulse 1.2s ease-in-out infinite;
}

@keyframes bubble-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.bubble {
  position: relative;
  background:
    linear-gradient(180deg, #ffffff 0%, #fffdf8 70%, #fff6e8 100%);
  border-radius: 16px;
  padding: 6px 8px;
  box-shadow:
    0 4px 12px rgba(30, 40, 55, 0.22),
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 2px 0 rgba(160, 110, 60, 0.08);
  border: 2px solid #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  margin-bottom: 4px;
  z-index: 2;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s var(--press);
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-top-color: #fffdf8;
  filter: drop-shadow(0 2px 1px rgba(30, 40, 55, 0.12));
}

.bubble-ready-check {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #a5d6a7, #43a047 50%, #2e7d32);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow:
    0 2px 6px rgba(46, 125, 50, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  z-index: 4;
  animation: check-pop 0.35s var(--press);
}

.customer-face .bubble-ready-check {
  display: flex;
  top: auto;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
}

@keyframes check-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.bubble-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, transparent 45%),
    linear-gradient(160deg, #f8ecd4, #ebdab8);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 0 rgba(140, 100, 55, 0.14),
    0 2px 5px rgba(40, 30, 15, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bubble-item img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.bubble-item.met::after {
  content: "✓";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(160deg, #66bb6a, #2e7d32);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.customer-face {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 40%),
    linear-gradient(180deg, #ffe8d0 0%, #f5c49a 100%);
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 rgba(120, 70, 30, 0.12),
    0 5px 12px rgba(40, 20, 8, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(180, 120, 60, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s var(--press);
}

.customer-face img {
  width: 118%;
  height: 118%;
  object-fit: cover;
  object-position: center 18%;
  pointer-events: none;
}

.customer.ready .customer-face {
  box-shadow:
    0 0 0 3px var(--good-bright),
    0 3px 8px rgba(0, 0, 0, 0.15);
}

.customer-reward {
  margin-top: 3px;
  font-size: 0.58rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #ffe082 0%, #ffb300 50%, #ff8f00 100%);
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  border: 1.5px solid #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  box-shadow:
    0 2px 0 rgba(180, 90, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.customer-diff {
  position: absolute;
  top: 0;
  right: 2px;
  font-size: 0.45rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  z-index: 3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.02em;
}

.customer-diff.easy { color: #2e7d32; }
.customer-diff.mid { color: #ef6c00; }
.customer-diff.hard { color: #c62828; }

.counter-ledge {
  height: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(90,50,20,0.06) 14px 15px),
    linear-gradient(180deg, #f8ecd8, #d4b080 55%, #b88850 100%);
  border-radius: 6px 6px 0 0;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.5),
    0 3px 6px rgba(90, 50, 20, 0.2),
    inset 0 -1px 0 rgba(90, 50, 20, 0.15);
  margin: 0 6px -1px;
  border: 1px solid rgba(255, 230, 180, 0.35);
  border-bottom: none;
}

/* ========== Board ========== */
.board-stage {
  grid-area: board;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 4px 10px 14px;
  z-index: 3;
  position: relative;
}
/* Soft sandy veil under board — keeps scenic blur readable */
.board-stage::before {
  content: "";
  position: absolute;
  inset: 2% 4% 6%;
  border-radius: 22px;
  background: rgba(232, 214, 176, 0.12);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 36px rgba(255, 240, 200, 0.06);
}
.board-stage > .board {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  align-self: stretch;
}
.board-stage > .board-dock {
  position: absolute;
  z-index: 2;
}

.board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 5px;
  padding: 10px;
  /* Warm sandy / stone board — Gossip Harbor casual */
  background:
    radial-gradient(ellipse at 28% 18%, rgba(255, 248, 230, 0.35), transparent 55%),
    radial-gradient(ellipse at 78% 82%, rgba(160, 120, 70, 0.14), transparent 50%),
    linear-gradient(160deg, #e8d2a8 0%, #d9bc8e 42%, #c9a878 100%);
  border-radius: 18px;
  border: 3px solid #a07848;
  box-shadow:
    inset 0 2px 8px rgba(255, 245, 220, 0.45),
    inset 0 -3px 8px rgba(120, 80, 40, 0.18),
    inset 0 0 0 1px rgba(255, 240, 200, 0.35),
    0 8px 20px rgba(20, 40, 55, 0.28),
    0 2px 0 rgba(255, 235, 200, 0.35);
  position: relative;
}

.board::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 13px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 220, 0.4),
    inset 0 0 0 2px rgba(160, 110, 60, 0.1);
  z-index: 0;
}

.board::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.2) 0%, transparent 20%, transparent 82%, rgba(100, 70, 35, 0.1) 100%);
  z-index: 0;
}

.cell {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 48%),
    linear-gradient(165deg, #f8ecd4 0%, #ebdab8 100%);
  border: 1.5px solid rgba(175, 135, 80, 0.42);
  border-radius: 11px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  /* Soft raised glossy pad */
  box-shadow:
    0 2px 0 rgba(140, 100, 55, 0.18),
    0 3px 6px rgba(80, 50, 20, 0.12),
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(160, 120, 60, 0.14);
  z-index: 1;
  transition: background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.cell:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, transparent 48%),
    linear-gradient(165deg, #f0e0c0 0%, #e2ceaa 100%);
}

.cell.drag-over {
  border-color: #ff8a65;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    #fff3e0;
  box-shadow: 0 0 0 2.5px rgba(255, 138, 101, 0.55), inset 0 0 10px rgba(255, 138, 101, 0.2);
  transform: scale(1.03);
}

.cell.selected {
  border-color: #ffc107;
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 193, 7, 0.75),
    0 0 12px rgba(255, 193, 7, 0.45),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
}

/* ========== Merge pieces — transparent so 3D icons sit on sandy pads ========== */
.item {
  width: 94%;
  height: 94%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-tile);
  cursor: grab;
  line-height: 1;
  position: relative;
  border: none;
  box-shadow: none;
  overflow: visible;
  background: transparent;
  transition: transform 0.12s var(--press), filter 0.12s ease;
}

.item::before {
  content: none;
}

.item:hover {
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.03);
}

.item:active {
  cursor: grabbing;
  transform: scale(0.92);
}

.item .ico {
  width: 92%;
  height: 86%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(40, 25, 10, 0.28));
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
}

.item .lv {
  margin-top: -2px;
  font-size: 0.4rem;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(180deg, #66bb6a, #2e7d32);
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(20, 40, 20, 0.35);
  z-index: 2;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.item.merging {
  animation: pop 0.35s var(--press);
}

.item.needed::after {
  content: "✓";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, #81c784, #43a047 55%, #2e7d32);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* Per-level: transparent pads — icons carry the color; soft glow on high tiers */
.item.lv-1,
.item.lv-2,
.item.lv-3,
.item.lv-4,
.item.lv-5,
.item.lv-6,
.item.lv-7,
.item.lv-8,
.item.lv-9 {
  background: transparent;
  box-shadow: none;
}
.item.lv-10 {
  background: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.45));
}

@keyframes pop {
  0% { transform: scale(0.55); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ========== P4: floating dock on board edge ========== */
.board-dock {
  position: absolute;
  left: 14px;
  bottom: 6px;
  display: flex;
  gap: 8px;
  z-index: 6;
  pointer-events: none;
  flex-wrap: wrap;
  max-width: calc(100% - 28px);
}

.dock-btn {
  pointer-events: auto;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  border: 2.5px solid #fff;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(60, 30, 10, 0.22),
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
  transition: transform 0.12s var(--press), box-shadow 0.12s ease, filter 0.12s ease;
}

.dock-btn:hover:not(:disabled):not(.locked) {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.dock-btn:active:not(:disabled):not(.locked) {
  transform: translateY(2px) scale(0.94);
  box-shadow:
    0 1px 0 rgba(60, 30, 10, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dock-btn.gen {
  background: linear-gradient(160deg, #ffe082, #ffb300 55%, #ff8f00);
  flex-direction: column;
  width: 50px;
  height: 54px;
  padding-bottom: 2px;
}

.dock-btn.gen:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.dock-btn.boost {
  background: linear-gradient(160deg, #e1bee7, #ba68c8 55%, #9c27b0);
}

.dock-btn.boost[aria-pressed="true"] {
  box-shadow:
    0 0 0 3px rgba(186, 104, 200, 0.55),
    0 4px 0 rgba(60, 30, 10, 0.2),
    0 5px 12px rgba(0, 0, 0, 0.28);
  background: linear-gradient(160deg, #ce93d8, #ab47bc 55%, #7b1fa2);
}

.dock-ico {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.22));
}

.cost-pill,
.boost-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: var(--radius-chip);
  border: 1.5px solid #fff;
  background: linear-gradient(180deg, #ffe566, #ffb800 60%, #ff8f00);
  color: #5d4037;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.boost-badge {
  background: linear-gradient(180deg, #e1bee7, #9c27b0);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.dock-btn.boost[aria-pressed="true"] .boost-badge {
  background: linear-gradient(180deg, #ea80fc, #7b1fa2);
}

.dock-btn.gen .dock-label {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.4rem;
  font-weight: 900;
  color: #5d4037;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.3;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.dock-btn.gen-garage {
  background: linear-gradient(160deg, #90caf9, #1976d2 55%, #0d47a1);
}

.dock-btn.gen-luggage {
  background: linear-gradient(160deg, #a5d6a7, #43a047 55%, #2e7d32);
}

.dock-btn.gen.locked {
  opacity: 0.5;
  filter: grayscale(0.55);
  cursor: not-allowed;
}

.lock-pill {
  background: linear-gradient(180deg, #bdbdbd, #757575) !important;
  color: #fff !important;
  text-shadow: none !important;
}

.cell.has-gen {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 45%),
    linear-gradient(160deg, #fff6d8, #f0dca0) !important;
  border-color: #e0a84a;
}

.item.generator-tile {
  cursor: pointer;
  background: transparent !important;
  border-radius: 12px;
}

.item.generator-tile.gen-garage,
.item.generator-tile.gen-luggage {
  background: transparent !important;
}

.item.generator-tile .gen-lv {
  font-size: 0.36rem !important;
  max-width: 96%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-thumb.gen-thumb {
  background: linear-gradient(160deg, #ffe082, #ffb300);
}

/* ========== P4+P6: detail strip ========== */
.detail-strip {
  grid-area: detail;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  padding-bottom: max(8px, var(--safe-b));
  min-height: 0;
  box-sizing: border-box;
}

.detail-strip[data-expanded="false"] .detail-thumb {
  display: none !important;
}

.detail-strip[data-expanded="false"] .detail-inner {
  opacity: 0.94;
}

.detail-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  max-height: 100%;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff8ec 55%, #ffe9c8 100%);
  border-radius: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 3px 0 rgba(140, 95, 45, 0.14),
    0 5px 14px rgba(20, 40, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  padding: 6px 14px;
  min-height: 0;
  box-sizing: border-box;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.detail-strip[data-expanded="true"] .detail-inner {
  box-shadow:
    0 4px 14px rgba(40, 20, 8, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(255, 193, 7, 0.25);
}

.detail-thumb {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1.5px solid #fff;
  box-shadow:
    0 2px 0 rgba(140, 100, 55, 0.14),
    0 3px 6px rgba(40, 30, 15, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #f8ecd4, #ebdab8);
}

.detail-thumb img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

#detail-text {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  letter-spacing: 0.01em;
}

#detail-text strong {
  color: var(--text-strong);
  font-weight: 900;
}

.detail-hint {
  text-align: center !important;
  width: 100%;
  font-weight: 700 !important;
  opacity: 0.85;
}

/* ========== Fly layer ========== */
.fly-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
  overflow: hidden;
}

.fly-item {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 40%),
    linear-gradient(160deg, #fffef5, #ffe8c8);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 56;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
  will-change: transform, opacity;
  overflow: hidden;
}

.fly-item img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.fly-item.flying {
  opacity: 0.15;
  transform: scale(0.35);
}

/* ========== Board space governance: merge hints + parking ========== */
.item.merge-hint {
  box-shadow:
    0 0 0 2.5px #66bb6a,
    0 0 14px rgba(76, 175, 80, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  animation: merge-hint-pulse 1.15s ease-in-out infinite;
  z-index: 2;
}

@keyframes merge-hint-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.08); }
}

.dock-btn.park {
  background: linear-gradient(160deg, #bcaaa4, #8d6e63 55%, #6d4c41);
  flex-direction: column;
}

.dock-btn.park.has-items {
  background: linear-gradient(160deg, #ffe082, #ffb74d 55%, #f57c00);
}

.dock-btn.park .park-ico {
  font-size: 1.15rem;
  line-height: 1;
}

.dock-btn.park .park-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #d32f2f;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.dock-btn.park:not(.has-items) .park-badge {
  background: #78909c;
}

/* Toast / Reward / Win */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(14%, calc(12% + var(--safe-b)));
  transform: translateX(-50%) translateY(16px);
  background: rgba(36, 24, 14, 0.92);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-chip);
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--press);
  z-index: 50;
  max-width: min(88vw, 380px);
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reward-pop {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 40%),
    linear-gradient(180deg, #fff59d, #ffd54f 60%, #ffb300);
  color: #5d4037;
  padding: 11px 20px;
  border-radius: 18px;
  font-size: 1.15rem;
  font-weight: 900;
  border: 3px solid #fff;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 58;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(0.2, 1.2, 0.3, 1);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.reward-pop.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 25, 15, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
  padding-bottom: max(16px, var(--safe-b));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.overlay[hidden] {
  display: none !important;
}

.win-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 35%),
    linear-gradient(180deg, #fffaf0, #ffe8c8);
  border: 3px solid #ff9800;
  border-radius: 22px;
  padding: 26px 22px;
  max-width: 340px;
  text-align: center;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.win-emoji {
  font-size: 2.4rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.win-card h2 {
  margin: 0 0 8px;
  color: #e65100;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.win-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.win-sub {
  font-size: 0.75rem !important;
}

.btn-candy {
  margin-top: 12px;
  border: none;
  background: linear-gradient(180deg, #ffcc80 0%, #ffb74d 40%, #ff9800 100%);
  color: #fff;
  font-weight: 900;
  border-radius: var(--radius-chip);
  padding: 11px 24px;
  cursor: pointer;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow:
    0 4px 0 #e65100,
    0 5px 12px rgba(230, 81, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.1s var(--press), box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-candy:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-candy:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #e65100,
    0 2px 6px rgba(230, 81, 0, 0.25);
}

.btn-candy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

@media (min-width: 520px) {
  body {
    background: #8fd0f2;
    display: flex;
    align-items: stretch;
    justify-content: center;
  }
  body::before {
    content: "";
    position: fixed;
    inset: -28px;
    z-index: 0;
    background-image: var(--scenic, url("assets/bg-home.jpg"));
    background-size: cover;
    background-position: center 40%;
    filter: blur(18px) saturate(1.12) brightness(1.02);
    transform: scale(1.08);
    pointer-events: none;
  }
  #app {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    z-index: 1;
  }
}

/* Timed bonus badge on bubble */
.bubble-bonus {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.42rem;
  font-weight: 900;
  white-space: nowrap;
  background: linear-gradient(180deg, #ff8a65, #e64a19 60%, #bf360c);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-chip);
  border: 1.5px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
  z-index: 4;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.bubble-bonus-timer {
  font-variant-numeric: tabular-nums;
}

.customer.has-bonus .bubble {
  box-shadow:
    0 0 0 2px rgba(255, 112, 67, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.customer.has-bonus .customer-reward {
  background: linear-gradient(180deg, #ff8a65, #e64a19 60%, #bf360c);
}

/* Almost-ready pacing hint (60–90%) */
.customer.almost .bubble {
  border-color: #ff9800;
  box-shadow:
    0 0 0 2px rgba(255, 152, 0, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.14);
  animation: almost-pulse 1.4s ease-in-out infinite;
}

.almost-hint {
  margin-top: 2px;
  font-size: 0.42rem;
  font-weight: 900;
  color: #ef6c00;
  background: rgba(255, 243, 224, 0.96);
  padding: 1px 5px;
  border-radius: 5px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
}

@keyframes almost-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ========== Landmark decoration meta ========== */
.landmark-scene {
  position: absolute;
  inset: 0 0 auto 0;
  height: 26%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

.scene-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  transition: opacity 0.55s ease, filter 0.55s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.scene-before {
  opacity: 1;
  filter: grayscale(0.75) brightness(0.88) saturate(0.4);
}

.scene-after {
  opacity: 0;
  filter: saturate(1.08) brightness(1.02);
}

.landmark-scene[data-stage="1"] .scene-before { opacity: 0.18; }
.landmark-scene[data-stage="1"] .scene-after { opacity: 0; }

.landmark-scene[data-stage="2"] .scene-before { opacity: 0; }
.landmark-scene[data-stage="2"] .scene-after { opacity: 0.28; filter: none; }

.landmark-scene.flash-upgrade .scene-glow {
  animation: scene-flash 0.7s ease;
}

.scene-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 65%, rgba(255, 230, 140, 0.7), transparent 55%),
    radial-gradient(ellipse at 50% 90%, rgba(255, 255, 255, 0.35), transparent 50%);
  opacity: 0;
  pointer-events: none;
}

@keyframes scene-flash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

.btn-decorate {
  position: absolute;
  top: calc(7.5% + 2px);
  right: 8px;
  z-index: 7;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-chip);
  border: 1.5px solid #fff;
  background: linear-gradient(180deg, #ffe082, #ffb300 55%, #ff8f00);
  color: #5a3200;
  font-size: 0.62rem;
  font-weight: 900;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  line-height: 1;
  letter-spacing: 0.04em;
  transition: transform 0.12s var(--press), filter 0.12s ease;
}

.btn-decorate:hover {
  filter: brightness(1.06);
}

.btn-decorate:active {
  transform: scale(0.94);
}

.landmarks-slim {
  pointer-events: none;
}
.landmarks-slim .landmark {
  pointer-events: auto;
  cursor: pointer;
}
.landmark.can-unlock .stamp,
.landmark.can-upgrade .stamp {
  animation: stamp-wiggle 1.2s ease-in-out infinite;
}
.landmark .decor-pip {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 2px;
  background: #bbb;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15);
}
.landmark.unlocked .decor-pip { background: #ffc107; }
.landmark.upgraded .decor-pip {
  background: #4caf50;
  box-shadow: 0 0 5px #7dff7d, inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

@keyframes stamp-wiggle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.decorate-overlay {
  z-index: 40;
}

.decorate-card {
  position: relative;
  width: min(92%, 360px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 30%),
    linear-gradient(180deg, #fffaf0, #ffe8c8);
  border-radius: 20px;
  border: 3px solid #fff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.38);
  padding: 18px 16px 16px;
  color: var(--text);
}

.decorate-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease, transform 0.1s var(--press);
}

.decorate-close:hover {
  background: rgba(0, 0, 0, 0.14);
}

.decorate-close:active {
  transform: scale(0.9);
}

.decorate-card h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--text-strong);
}

.decorate-lead {
  margin: 0 0 12px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.decorate-preview {
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: var(--shadow-soft);
  position: relative;
  background: #9ed4f0;
  margin-bottom: 12px;
}

.decorate-preview .scene-layer {
  background-size: cover;
  background-position: center bottom;
}

.decorate-info {
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 2.6em;
}

.decorate-info strong {
  color: #bf360c;
  font-weight: 900;
}

.decorate-actions {
  display: flex;
  gap: 8px;
}

.decorate-actions .btn-candy {
  flex: 1;
  font-size: 0.78rem;
  padding: 11px 8px;
  margin-top: 0;
}

.decorate-hint {
  margin: 10px 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.2em;
  line-height: 1.4;
}

.btn-decorate.pulse {
  animation: stamp-wiggle 1.1s ease-in-out infinite;
  box-shadow:
    0 0 0 2px rgba(255, 193, 7, 0.75),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ========== FX particles ========== */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 57;
  overflow: hidden;
}
.fx-particle {
  position: fixed;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  animation-name: fx-burst;
  animation-timing-function: cubic-bezier(0.15, 0.85, 0.25, 1);
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes fx-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.15);
    opacity: 0;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .customer.ready .bubble,
  .customer.almost .bubble,
  .landmark.can-unlock .stamp,
  .landmark.can-upgrade .stamp,
  .btn-decorate.pulse,
  .item.merging {
    animation: none !important;
  }
  .item,
  .dock-btn,
  .chip-plus,
  .btn-candy,
  .hud-shop,
  .hud-mute {
    transition: none !important;
  }
}


/* Generated art fallbacks */
.emoji-fallback {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.item .ico,
.bubble-item img,
.dock-ico,
.detail-thumb img {
  border-radius: 10px;
}
.customer-face img {
  object-fit: cover;
  object-position: center 18%;
  border-radius: 0;
}
.generator-tile .ico {
  border-radius: 12px;
}

/* ========== Gossip Harbor layout pass ========== */
.hud {
  gap: 6px;
  padding: calc(6px + var(--safe-t) * 0.45) 8px 2px;
  min-height: 54px;
}

.hud-level {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #81d4fa 0%, #1e88e5 46%, #1565c0 100%);
  border: 2.5px solid #fff;
  box-shadow:
    0 2px 0 rgba(13, 71, 161, 0.35),
    0 3px 8px rgba(20, 40, 80, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
}

.hud-avatar { display: none; }

.hud-star {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.28));
  z-index: 2;
}
.hud-star path {
  fill: #ffe082;
  stroke: #f9a825;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.hud-lv {
  position: static;
  right: auto;
  bottom: auto;
  background: none;
  border: none;
  box-shadow: none;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  padding: 7px 0 0;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 40, 90, 0.4);
  letter-spacing: -0.03em;
}

.hud-chips { gap: 6px; }

.chip {
  background: linear-gradient(180deg, #fffefb 0%, #fff7ea 100%);
  border: none;
  outline: none;
  min-height: 32px;
  padding: 2px 3px 2px 6px;
  gap: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 5px rgba(50, 35, 15, 0.18);
}

.chip-ico {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 0;
}
.chip-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}
.chip.energy .chip-ico {
  background: none;
  box-shadow: none;
  border: none;
}
.chip.energy .chip-ico svg path {
  fill: #ffca28;
  stroke: #f9a825;
  stroke-width: 0.4;
  stroke-linejoin: round;
}

.chip.travel .chip-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff8dc 0%, #ffe082 26%, #ffca28 58%, #f9a825 82%, #ef6c00 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 243, 180, 0.9),
    inset 0 -2px 0 rgba(180, 110, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.18);
  border: none;
}
.chip.travel .chip-ico::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.4px rgba(160, 100, 0, 0.55);
}

.chip.gems .chip-ico {
  width: 14px;
  height: 14px;
  margin: 0 3px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fff 0%, #f8bbd0 16%, #ea80fc 42%, #8e24aa 100%);
  transform: rotate(45deg);
  border: none;
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(80, 0, 90, 0.28);
}

.chip-val {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 900;
  color: #4e342e;
  text-align: left;
  letter-spacing: -0.03em;
}

.chip-timer {
  font-size: 0.55rem;
  font-weight: 800;
  color: #ef6c00;
  letter-spacing: 0;
}
.chip-timer.is-full { display: none; }

.chip-plus {
  position: relative;
  width: 22px;
  height: 22px;
  margin-right: 0;
  border: 2px solid #fff;
  background: radial-gradient(circle at 35% 28%, #c8f7c5 0%, #66bb6a 40%, #2e7d32 100%);
  color: transparent;
  font-size: 0;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.chip-plus::before,
.chip-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}
.chip-plus::before { width: 10px; height: 2.2px; }
.chip-plus::after { width: 2.2px; height: 10px; }

.hud-chest {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 2px rgba(40, 20, 10, 0.28));
  display: grid;
  place-items: center;
}
.hud-chest svg { width: 46px; height: 46px; display: block; }
.hud-chest:active { transform: scale(0.94); }
.hud-chest.pulse,
.util-btn.pulse {
  animation: stamp-wiggle 1.1s ease-in-out infinite;
}

.btn-decorate { display: none !important; }

.landmarks-slim {
  height: 16px;
  gap: 5px;
  top: calc(100% - 2px);
}
.landmark .stamp { font-size: 0.72rem; }
.landmark .decor-pip { width: 4px; height: 4px; margin-top: 1px; }

.customers {
  padding: 14px 6px 0;
  justify-content: flex-end;
}
.counter-ledge { display: none; }
.customer-row {
  align-items: flex-end;
  gap: 5px;
  padding-bottom: 4px;
  height: 100%;
}
.customer {
  max-width: none;
  justify-content: flex-end;
  gap: 0;
}

.customer-face {
  width: 68px;
  height: 68px;
  margin-bottom: -18px;
  z-index: 3;
  border: 3px solid #fff;
  box-shadow:
    0 3px 0 rgba(80, 50, 20, 0.08),
    0 5px 12px rgba(20, 30, 40, 0.28);
  background: linear-gradient(180deg, #ffe8d4, #f3c7a2);
}
.customer-face img {
  width: 132%;
  height: 132%;
  object-fit: cover;
  object-position: center 12%;
}

.bubble {
  width: 100%;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 18px 4px 6px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
  box-shadow:
    0 4px 12px rgba(30, 40, 50, 0.16),
    inset 0 1px 0 #fff;
}
.bubble::after { display: none; }

.customer.ready .bubble {
  box-shadow:
    0 0 0 2px #7dff9a,
    0 4px 12px rgba(46, 125, 50, 0.28);
}
.customer.ready .customer-face {
  box-shadow:
    0 0 0 3px #8ef08e,
    0 4px 10px rgba(20, 30, 40, 0.25);
}

.order-rewards {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 16px;
  white-space: nowrap;
}
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.reward-num {
  color: #2e7d32;
  font-weight: 900;
  font-size: 0.74rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.reward-ico {
  width: 13px;
  height: 13px;
  display: block;
  flex-shrink: 0;
}
.reward-chip.coin .reward-ico {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffca28 55%, #f9a825);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}
.reward-chip.bolt .reward-ico {
  background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffb300' stroke='%23f9a825' stroke-width='0.6' d='M13 1 3 14h7l-1 9 11-15h-7z'/></svg>");
}

.order-needs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1px;
  min-height: 28px;
}
.bubble-item {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
.bubble-item img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  filter: drop-shadow(0 2px 1px rgba(40, 30, 10, 0.22));
}

.customer-diff {
  top: 0;
  left: 12px;
  right: 12px;
  width: auto;
  height: 3px;
  padding: 0;
  margin: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  border-radius: 0 0 4px 4px;
  background: #66bb6a;
  box-shadow: none;
  opacity: 1;
}
.customer-diff.easy { background: #66bb6a; color: transparent; }
.customer-diff.mid { background: #ffa726; color: transparent; }
.customer-diff.hard { background: #ef5350; color: transparent; }

.bubble-bonus {
  top: 44px;
  z-index: 6;
  font-size: 0.46rem;
  padding: 1px 5px;
}

.almost-hint {
  margin-top: 0;
  font-size: 0.46rem;
  padding: 0 4px;
}

.customer-reward { display: none; }

.board-stage {
  display: block;
  align-items: stretch;
  justify-content: stretch;
  padding: 0 6px 2px;
}
.board-stage::before { display: none; }

.board {
  width: 100%;
  height: 100%;
  gap: 4px;
  padding: 7px 7px 50px;
  border: none;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 250, 235, 0.45), transparent 55%),
    linear-gradient(180deg, #f0dcb4 0%, #e4cb9a 48%, #d8b888 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 8px rgba(120, 80, 40, 0.12),
    0 8px 18px rgba(40, 30, 10, 0.14);
}
.board::before,
.board::after { display: none; }

.cell {
  border: none;
  border-radius: 7px;
  background: linear-gradient(180deg, #fffaf1 0%, #f6ead2 40%, #ead6b4 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 0 rgba(168, 122, 68, 0.2),
    0 1px 2px rgba(90, 60, 30, 0.12);
}
.cell:nth-child(even) {
  background: linear-gradient(180deg, #f3e6cc 0%, #ead5b0 50%, #e0c89a 100%);
}
.cell.drag-over {
  transform: scale(1.04);
  box-shadow:
    inset 0 0 0 2px rgba(255, 138, 101, 0.8),
    0 0 8px rgba(255, 138, 101, 0.35);
}
.cell.selected {
  box-shadow:
    inset 0 0 0 2.5px #ffca28,
    0 0 0 1px rgba(255, 179, 0, 0.45),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
}
.cell.has-gen {
  background: linear-gradient(180deg, #fff8e4 0%, #ffe7b0 100%) !important;
}

/* Buried sand pads — used if a cell is marked locked/sand */
.cell.sand,
.cell.locked,
.cell.buried,
.cell.sand-locked {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, #f8ebc8 0%, #e8d09a 46%, #c9a56a 100%) !important;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -3px 5px rgba(140, 100, 50, 0.28) !important;
}
.cell.sand::after,
.cell.locked::after,
.cell.buried::after,
.cell.sand-locked::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 22%;
  bottom: 18%;
  border-radius: 48% 52% 46% 50%;
  background: radial-gradient(ellipse at 38% 32%, rgba(255, 250, 236, 0.95), rgba(226, 190, 120, 0.05) 72%);
  box-shadow: 0 3px 0 rgba(150, 110, 50, 0.16);
  pointer-events: none;
  z-index: 2;
}

.item .ico {
  width: 78%;
  height: 78%;
  border-radius: 0;
  filter:
    drop-shadow(0 2px 0 rgba(70, 45, 15, 0.18))
    drop-shadow(0 4px 4px rgba(50, 30, 10, 0.22));
}
.item .lv,
.item .gen-lv { display: none; }
.cell.selected .item .lv,
.cell.selected .item .gen-lv {
  display: inline-block;
  font-size: 0.42rem;
}

.board-dock {
  left: 10px;
  right: auto;
  top: auto;
  bottom: 6px;
  gap: 6px;
  padding: 0;
  max-width: calc(100% - 20px);
}
.dock-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  border-width: 2px;
}
.dock-btn.gen {
  width: 40px;
  height: 42px;
}
.dock-btn .dock-label { display: none; }
.dock-ico { width: 28px; height: 28px; }
.cost-pill,
.boost-badge {
  top: -5px;
  right: -5px;
  font-size: 0.5rem;
  padding: 1px 4px;
}

.detail-strip {
  gap: 8px;
  padding: 4px 10px max(8px, var(--safe-b));
  background: transparent;
  align-items: center;
}
.util-btn {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #fff;
  padding: 0;
  cursor: pointer;
  background: radial-gradient(circle at 34% 28%, #64b5f6 0%, #1e88e5 48%, #1565c0 100%);
  box-shadow:
    0 3px 0 #0d47a1,
    0 4px 8px rgba(13, 71, 161, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: grid;
  place-items: center;
}
.util-btn svg { width: 26px; height: 26px; display: block; }
.util-btn:active { transform: translateY(2px) scale(0.96); }
.util-btn .park-badge {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.util-btn.has-items .park-badge { display: flex; }
.util-btn.has-items {
  box-shadow:
    0 0 0 2px rgba(255, 213, 79, 0.8),
    0 3px 0 #0d47a1,
    0 4px 8px rgba(13, 71, 161, 0.28);
}

.detail-inner {
  position: relative;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.98);
  padding: 4px 36px 4px 12px;
  background: linear-gradient(180deg, #fffefb 0%, #fff6e8 100%);
  box-shadow:
    0 2px 0 rgba(140, 100, 50, 0.06),
    0 4px 10px rgba(40, 30, 10, 0.12),
    inset 0 1px 0 #fff;
}
.detail-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
#detail-text {
  font-size: 0.72rem;
  text-align: center;
}
.detail-hint { text-align: center !important; }

.detail-mute {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 248, 230, 0.9);
  box-shadow: inset 0 0 0 1px rgba(180, 140, 80, 0.18);
  font-size: 0.78rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.detail-mute[aria-pressed="true"] { filter: grayscale(0.8); }

.landmark-scene { height: 20%; }

.item .ico,
.bubble-item img,
.dock-ico,
.detail-thumb img {
  border-radius: 6px;
}
.bubble-item img { border-radius: 4px; }

/* ========== P0 juice: badges, drag, merge, serve, sand ========== */
.chip.energy .chip-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  line-height: 1;
  gap: 0;
  z-index: 1;
}
.chip.energy .chip-val {
  flex: none;
  font-size: 0.84rem;
  line-height: 1.05;
}
.chip.energy:has(.chip-timer:not(.is-full)) {
  min-height: 36px;
}
.chip.energy .chip-timer {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  color: #e65100;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.chip.energy .chip-timer.is-full { display: none; }

.chip.chip-bounce {
  animation: chip-bounce 0.34s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes chip-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.tile-badge {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.tile-badge.bolt {
  top: -4px;
  left: -4px;
  background: linear-gradient(180deg, #fff59d, #ffb300);
  color: #e65100;
}
.tile-badge.check {
  right: -3px;
  bottom: -3px;
  background: linear-gradient(180deg, #9ccc65, #2e7d32);
  color: #fff;
  font-size: 0.58rem;
}
.tile-badge.crown {
  top: -5px;
  right: -3px;
  background: linear-gradient(180deg, #ffe082, #ff8f00);
  color: #fff;
  font-size: 0.55rem;
}
.item.needed::after { content: none; }
.dock-btn .tile-badge.bolt {
  top: auto;
  left: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  font-size: 0.55rem;
}

.cell.merge-target {
  z-index: 4;
  animation: rim-pulse 0.5s ease-in-out infinite;
  transform: scale(1.06);
}
@keyframes rim-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 179, 0, 0.75),
      0 0 0 0 rgba(255, 160, 40, 0);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px #ffb300,
      0 0 12px rgba(255, 160, 40, 0.55);
  }
}

.item.drag-source { opacity: 0.28; }
.drag-ghost {
  position: fixed;
  z-index: 80;
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 8px 6px rgba(40, 25, 10, 0.35));
}
.drag-ghost .lv,
.drag-ghost .tile-badge { display: none; }
.drag-ghost.snap {
  transition: left 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.item.merging,
.item.revealing {
  animation: merge-pop 0.42s cubic-bezier(0.2, 0.9, 0.32, 1.15);
  z-index: 3;
}
@keyframes merge-pop {
  0% { transform: scale(1); filter: brightness(1); }
  32% { transform: scale(1.18); filter: brightness(1.45); }
  62% { transform: scale(0.96); filter: brightness(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}
.sand-puff {
  position: absolute;
  inset: -4%;
  border-radius: 40%;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 248, 230, 0.95), rgba(210, 170, 110, 0.2) 70%, transparent 74%);
  animation: sand-clear 0.4s ease forwards;
  pointer-events: none;
  z-index: 4;
}
@keyframes sand-clear {
  to { opacity: 0; transform: scale(1.25); }
}
.board.nudge { animation: board-nudge 0.16s ease; }
@keyframes board-nudge {
  40% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

.cell.buried .ico {
  opacity: 0.78;
  filter: saturate(0.55) brightness(0.95) drop-shadow(0 2px 1px rgba(70, 45, 15, 0.2));
}
.cell.buried::after { opacity: 0.22; }
.sand-cap {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  bottom: 12%;
  border-radius: 46% 50% 44% 48%;
  background: radial-gradient(ellipse at 40% 32%, rgba(255, 250, 236, 0.72), rgba(214, 176, 112, 0.28) 72%);
  box-shadow: 0 2px 0 rgba(150, 110, 50, 0.18);
  pointer-events: none;
  z-index: 3;
}
.sand-cap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(118deg, transparent 38%, rgba(255, 255, 255, 0.9) 46%, transparent 54%),
    linear-gradient(64deg, transparent 36%, rgba(90, 58, 24, 0.42) 46%, transparent 54%),
    linear-gradient(18deg, transparent 44%, rgba(255, 255, 255, 0.55) 50%, transparent 56%);
}

/* Ready orders use the portrait check (store pattern), not a text pill. */
.customer.leaving {
  animation: cust-out 0.28s ease forwards;
  pointer-events: none;
}
.customer.entering { animation: cust-in 0.32s cubic-bezier(0.2, 0.85, 0.2, 1); }
@keyframes cust-out {
  to { transform: translateX(34px); opacity: 0; }
}
@keyframes cust-in {
  from { transform: translateX(-22px); opacity: 0; }
}

.fly-reward {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e1, #ffd54f);
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.42s ease;
}

.item { touch-action: none; }

@media (prefers-reduced-motion: reduce) {
  .item.merging,
  .item.revealing,
  .customer.leaving,
  .customer.entering,
  .chip.chip-bounce,
  .cell.merge-target,
  .board.nudge,
  .sand-puff {
    animation: none !important;
  }
}
