/* 水果店 · 收银台 */
.game-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #F0B478;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.game-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #FFDDBD 0%, #FFF0DA 34%, #FFF8EE 68%, #FFF3E2 100%);
}

.game-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .7;
}
.bg-blob.b1 {
  width: 260px;
  height: 260px;
  right: -120px;
  top: 40px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 170, 100, .38), rgba(255, 170, 100, 0) 68%);
}
.bg-blob.b2 {
  width: 230px;
  height: 230px;
  left: -120px;
  bottom: 60px;
  background: radial-gradient(circle at 60% 40%, rgba(255, 207, 140, .32), rgba(255, 207, 140, 0) 70%);
}
.bg-sun {
  position: absolute;
  right: 22px;
  top: calc(56px + var(--safe-t));
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #FFF3B8, #FFD978 58%, rgba(255, 209, 105, 0) 72%);
  opacity: .8;
}
.bg-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 148, 78, .30);
}
.bg-dot.d1 { left: 12%; top: 24%; }
.bg-dot.d2 { right: 14%; top: 34%; width: 5px; height: 5px; }
.bg-dot.d3 { left: 24%; bottom: 22%; width: 5px; height: 5px; }

/* 顶部 HUD */
.hud {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + var(--safe-t)) 13px 5px;
}
.profile-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 176px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1.5px solid rgba(255, 255, 255, .92);
  box-shadow: 0 5px 14px rgba(140, 80, 30, .13);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.avatar-wrap {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #FFE2C4;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(140, 80, 30, .12);
}
.avatar-wrap .animal-svg { width: 31px; height: 34px; margin-top: 7px; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.who b {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 108px;
}
.who small {
  font-size: 9px;
  font-weight: 700;
  color: #A0785C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 108px;
  margin-top: 1px;
}
.hud-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1.5px solid #fff;
  box-shadow: 0 5px 12px rgba(140, 80, 30, .12);
  font-weight: 900;
}
.coin-pill .mp-icon { width: 17px; height: 17px; color: #F2A400; }
.coin-pill b { font-size: 12.5px; color: #B56706; }
.coin-pill.pop { animation: coinPop .32s ease; }
.heart-pill { padding: 0 7px; gap: 1px; }
.heart { display: block; width: 14px; height: 14px; opacity: .32; }
.heart.on { opacity: 1; }
.heart svg { width: 14px; height: 14px; display: block; }

/* 顾客区 */
.stage {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 156px;
  padding: 6px 13px 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 74%;
  max-width: 300px;
  height: calc(100% - 34px);
  max-height: 250px;
  border-radius: 140px 140px 18px 18px;
  background:
    radial-gradient(circle at 72% 24%, #FFF4B8 0 22px, rgba(255, 244, 184, 0) 24px),
    linear-gradient(180deg, #C4E8F5 0%, #E7F7EE 58%, #FFF4DC 100%);
  border: 7px solid #F3CFA9;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), 0 10px 22px rgba(150, 90, 40, .07);
  opacity: .72;
}
.stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 62px;
  left: 22%;
  width: 52px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 22px -10px 0 -4px rgba(255, 255, 255, .62), 44px 2px 0 -6px rgba(255, 255, 255, .52);
}
.stage-awning {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 17px;
  border-radius: 0 0 12px 12px;
  background: repeating-linear-gradient(90deg, rgba(255, 138, 61, .55) 0 22px, rgba(255, 248, 236, .55) 22px 44px);
  opacity: .55;
}
.help-fab {
  position: absolute;
  z-index: 8;
  top: 22px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  border: 1.5px solid #fff;
  color: #B9895F;
  box-shadow: 0 3px 9px rgba(130, 70, 20, .16);
  transition: transform .12s ease;
}
.help-fab .mp-icon { width: 19px; height: 19px; }
.help-fab:active { transform: scale(.9); }
.customer-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 176px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.speech {
  position: relative;
  align-self: flex-start;
  width: calc(100% - 104px);
  margin-top: 12px;
  padding: 9px 10px 10px;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 10px 22px rgba(140, 75, 25, .14);
}
.speech::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 17px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 3px -3px 6px rgba(140, 75, 25, .05);
}
.speech-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.speech-name {
  font-size: 10.5px;
  font-weight: 800;
  color: #A06B45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.patience-txt {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 900;
  color: #4F9E4A;
  background: #EDF9E8;
  border-radius: 999px;
  padding: 2px 7px;
  min-width: 34px;
  text-align: center;
  transition: color .2s, background .2s;
}
.patience-txt.warn { color: #C98216; background: #FFF2D8; }
.patience-txt.danger { color: #D9463F; background: #FFE4E1; }
.order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.order-item {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 10px;
  background: #FFF7EC;
  border: 1px solid #FFE8CF;
  transition: background .18s, border-color .18s, transform .18s;
}
.order-item.done { background: #EAF8E5; border-color: #CBEAC2; }
.order-fruit { flex: 0 0 21px; width: 21px; height: 21px; }
.order-fruit .fruit-art { width: 100%; height: 100%; }
.order-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.order-txt b {
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-txt small { font-size: 8.5px; color: #B2917A; font-weight: 700; }
.order-got {
  margin-left: auto;
  font-size: 9px;
  font-weight: 900;
  color: #B29A84;
  white-space: nowrap;
}
.order-item.done .order-got { color: #4F9E4A; }
.patience-track {
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: #FFEBD7;
  overflow: hidden;
}
.patience-bar {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7CCB6F, #5FB865);
  transition: width .12s linear, background .25s;
}
.patience-bar.warn { background: linear-gradient(90deg, #FFC94A, #FFA53D); }
.patience-bar.danger { background: linear-gradient(90deg, #FF8A6B, #F25B57); }

.customer-art-wrap {
  position: relative;
  flex: 0 0 100px;
  width: 100px;
  height: 126px;
  align-self: flex-end;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity .2s;
}
.customer-art {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 124px;
  filter: drop-shadow(0 9px 9px rgba(130, 65, 20, .16));
}
.customer-art .animal-svg { width: 100%; height: 100%; display: block; }
.customer-shadow {
  position: absolute;
  z-index: 1;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 13px;
  border-radius: 50%;
  background: rgba(130, 70, 25, .16);
  filter: blur(2px);
}
.combo-badge {
  position: absolute;
  z-index: 4;
  top: -1px;
  right: -1px;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB347, #FF7A2F);
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .3px;
  box-shadow: 0 4px 10px rgba(220, 100, 20, .3);
  transform: scale(0);
  transform-origin: right bottom;
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.3);
}
.combo-badge.show { transform: scale(1); }
.customer-art-wrap.pop { animation: popIn .42s cubic-bezier(.2, .9, .3, 1.15); }
.customer-art-wrap.happy .customer-art { animation: happyBounce .62s ease; }
.customer-art-wrap.sad { animation: sadShake .5s ease; }
.speech.thanks .order-list { opacity: .3; }
.speech.thanks .patience-track { background: #DDF3D6; }
.speech.thanks .patience-bar { width: 100% !important; background: #7CCB6F; }
.speech.upset { animation: upsetShake .5s ease; }
.speech.shake { animation: upsetShake .38s ease; }
.stage-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(180deg, #F8D9B6, #F1C494);
  border-radius: 50% 50% 0 0 / 16px 16px 0 0;
  z-index: 1;
}

/* 货架 */
.shelf {
  position: relative;
  z-index: 4;
  margin: 5px 10px 0;
  padding: 7px 7px 9px;
  border-radius: 20px 20px 15px 15px;
  background: linear-gradient(180deg, #CE8A58 0%, #B96F3F 55%, #A85F32 100%);
  box-shadow: 0 6px 0 #8C4E28, 0 14px 22px rgba(120, 60, 20, .18);
}
.shelf::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 226, 190, .55);
}
.shelf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 6px;
}
.shelf-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #FFF3DF;
}
.shelf-label .mp-icon { width: 14px; height: 14px; color: #FFE1A9; }
.shelf-hint {
  max-width: 62%;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(86, 38, 10, .24);
  color: #FFE9CD;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fruit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.crate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  min-height: 76px;
  padding: 5px 2px 4px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF0DA 100%);
  box-shadow: 0 3px 0 rgba(96, 46, 16, .28);
  transition: transform .1s ease, box-shadow .1s ease;
}
.crate:active:not(:disabled) {
  transform: translateY(2px) scale(.97);
  box-shadow: 0 1px 0 rgba(96, 46, 16, .28);
}
.crate-art {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 3px 4px rgba(140, 60, 20, .16));
}
.crate-art .fruit-art { width: 100%; height: 100%; }
.crate-name {
  font-size: 9.5px;
  font-weight: 900;
  color: #57351F;
  white-space: nowrap;
  letter-spacing: -.2px;
}
.crate-price {
  font-size: 8px;
  font-weight: 800;
  color: #B98144;
}
.crate.locked { background: linear-gradient(180deg, #F7EEE2, #EFE2D2); }
.crate.locked .crate-art { filter: grayscale(1); opacity: .3; }
.crate.locked .crate-name { color: #A08B77; }
.crate.locked .crate-price { color: #B29C85; }
.crate-lock {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(120, 86, 56, .14);
  display: grid;
  place-items: center;
  color: #8D725A;
}
.crate-lock .mp-icon { width: 10px; height: 10px; }
.crate.tap { animation: crateTap .24s ease; }
.crate.wrong { animation: crateWrong .36s ease; }

/* 果篮 + 结账 */
.basket-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 8px 10px 0;
  padding: 7px 8px 7px 11px;
  min-height: 78px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid #fff;
  box-shadow: 0 8px 20px rgba(130, 70, 20, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.basket-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.basket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #937052;
  padding-right: 2px;
}
.basket-top b { color: var(--ink); font-size: 11.5px; }
.clear-btn {
  padding: 3px 9px;
  border-radius: 999px;
  background: #FFF0DF;
  color: #B0764A;
  font-size: 9.5px;
  font-weight: 800;
}
.clear-btn:active { background: #FFE2C8; }
.basket-items {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}
.basket-items::-webkit-scrollbar { display: none; }
.basket-empty { font-size: 10px; color: #B49C88; white-space: nowrap; }
.basket-items.is-empty { justify-content: flex-start; }
.basket-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 2px 6px 2px 2px;
  border-radius: 10px;
  background: #FFF3E3;
  border: 1px solid #FFE1C1;
  font-size: 9.5px;
  font-weight: 900;
  color: #6B4329;
}
.basket-chip .fruit-art { width: 23px; height: 23px; }
.basket-chip em { font-style: normal; color: #C1783A; }
.checkout-btn {
  flex: 0 0 78px;
  width: 78px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: linear-gradient(160deg, #FFA45B 0%, #FF7A2F 62%, #F0671B 100%);
  color: #fff;
  box-shadow: 0 4px 0 #D9611D, 0 8px 16px rgba(230, 110, 30, .28);
  transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease;
}
.checkout-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #D9611D, 0 4px 8px rgba(230, 110, 30, .24);
}
.checkout-btn:disabled {
  background: #F1E6D8;
  color: #B6A18C;
  box-shadow: 0 3px 0 #DCCBB8;
}
.checkout-label { font-size: 15px; font-weight: 900; letter-spacing: 1.5px; }
.checkout-amount { font-size: 9px; font-weight: 800; opacity: .92; letter-spacing: .3px; }
.checkout-btn.bump { animation: checkoutBump .45s ease; }

/* 游戏内导航 */
.game-shell .tabbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  margin-top: 6px;
  box-shadow: 0 -6px 18px rgba(120, 70, 20, .05);
}

/* 遮罩与弹层 */
.overlay {
  position: fixed;
  z-index: 70;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18px + var(--safe-t)) 18px calc(18px + var(--safe-b));
  background: rgba(91, 48, 17, .38);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  overflow-y: auto;
}
.start-overlay { background: rgba(255, 236, 213, .62); }
.start-card {
  position: relative;
  width: 100%;
  max-width: 344px;
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 18px 16px 16px;
  text-align: center;
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF6E8 100%);
  border: 2px solid #fff;
  box-shadow: 0 24px 60px rgba(100, 45, 10, .28);
  animation: cardIn .38s cubic-bezier(.2, .9, .3, 1.1);
}
.start-shop {
  position: relative;
  width: 166px;
  height: 100px;
  margin: 2px auto 8px;
}
.shop-awning {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 10px;
  height: 21px;
  border-radius: 9px 9px 3px 3px;
  background: repeating-linear-gradient(90deg, #FF8A3D 0 16px, #FFF4E3 16px 32px);
  box-shadow: 0 3px 0 rgba(180, 90, 30, .14);
}
.shop-body {
  position: absolute;
  left: 17px;
  right: 17px;
  top: 29px;
  bottom: 0;
  border-radius: 8px 8px 12px 12px;
  background: #FFE3C4;
  border: 3px solid #F6C08C;
}
.shop-window {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 15px;
  height: 42px;
  border-radius: 8px;
  background: #FFFBF2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  box-shadow: inset 0 0 0 2px #FFEFD9;
}
.shop-window .fruit-art { width: 28px; height: 28px; }
.shop-sign {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  padding: 2px 11px;
  border-radius: 999px;
  background: #7A4A2A;
  color: #FFE7B8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(90, 45, 15, .2);
}
.start-kicker {
  margin: 8px 0 2px;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #D98A4A;
}
.start-card h2 {
  margin: 3px 0 6px;
  font-size: 24px;
  letter-spacing: .5px;
  color: #4A2C18;
  text-shadow: 0 2px 0 #FFE6C8;
}
.start-desc {
  margin: 0 2px 12px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8B6A50;
}
.start-steps { display: flex; gap: 5px; }
.start-steps > div {
  flex: 1;
  padding: 7px 2px 6px;
  border-radius: 12px;
  background: #FFF0DD;
  border: 1px solid #FFE6CC;
}
.step-no {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin: 0 auto 3px;
  border-radius: 50%;
  background: linear-gradient(160deg, #FFB168, #FF8A3D);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 2px 0 #E06B22;
}
.start-steps b { display: block; font-size: 10px; color: #5A3922; }
.start-steps small { display: block; font-size: 8px; color: #B0917A; margin-top: 1px; }
.start-btn {
  width: 100%;
  height: 48px;
  margin-top: 13px;
  border-radius: 16px;
  font-size: 16px;
  letter-spacing: 2px;
}
.start-best { margin: 8px 0 0; font-size: 9.5px; color: #AE8F73; }

.over-card { max-width: 330px; }
.over-stars { display: flex; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.over-star { width: 30px; height: 30px; display: block; }
.over-star svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(160, 100, 20, .18)); }
.over-stars .over-star.on svg { animation: starPop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.over-stars .over-star.on:nth-child(2) svg { animation-delay: .1s; }
.over-stars .over-star.on:nth-child(3) svg { animation-delay: .2s; }
.over-stats {
  display: flex;
  gap: 6px;
  margin: 4px 0 0;
}
.over-stats > div {
  flex: 1;
  padding: 8px 2px;
  border-radius: 13px;
  background: #FFF0DD;
  border: 1px solid #FFE6CC;
}
.over-stats b { display: block; font-size: 19px; color: var(--orange-deep); line-height: 1.1; }
.over-stats span { font-size: 8.5px; color: #A88A70; }
.over-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}
.over-links a {
  font-size: 10.5px;
  font-weight: 800;
  color: #B27A4C;
  text-decoration: none;
  border-bottom: 1px dashed #E2C3A5;
  padding-bottom: 1px;
}

/* 飘字 / 提示 */
.toast-wrap {
  position: fixed;
  z-index: 85;
  left: 50%;
  transform: translateX(-50%);
  top: calc(64px + var(--safe-t));
  width: 100%;
  max-width: 520px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}
.toast {
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(67, 40, 23, .93);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 20px rgba(60, 30, 10, .22);
  animation: toastIn .24s ease;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.good { background: rgba(65, 138, 60, .95); }
.toast.warn { background: rgba(184, 76, 50, .95); }
.toast.level { background: linear-gradient(100deg, #FF8A3D, #F2B33D); font-size: 12px; }
.toast.out { opacity: 0; transform: translateY(-6px); }

.float-layer {
  position: fixed;
  z-index: 80;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  pointer-events: none;
  overflow: hidden;
}
.float-coin {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #FFE2AE;
  box-shadow: 0 10px 24px rgba(150, 80, 20, .26);
  color: #B56706;
  font-size: 16px;
  font-weight: 900;
  animation: floatUp 1.05s ease-out forwards;
}
.float-coin .mp-icon { width: 18px; height: 18px; color: #F2A400; }
.confetti {
  position: absolute;
  top: 30%;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 1.15s ease-out forwards;
}

@keyframes coinPop { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes popIn { 0% { transform: translateY(14px) scale(.9); opacity: 0; } 60% { transform: translateY(-2px) scale(1.02); opacity: 1; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes happyBounce { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-9px) scale(1.04); } 55% { transform: translateY(0) scale(.98); } 75% { transform: translateY(-5px) scale(1.02); } 100% { transform: translateY(0) scale(1); } }
@keyframes sadShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes upsetShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); } }
@keyframes crateTap { 0% { transform: scale(1); } 40% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes crateWrong { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); background: #FFE1DC; } 50% { transform: translateX(4px); background: #FFE1DC; } 80% { transform: translateX(-2px); } }
@keyframes checkoutBump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.06); } 70% { transform: scale(.98); } }
@keyframes cardIn { 0% { opacity: 0; transform: translateY(16px) scale(.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes starPop { 0% { transform: scale(.2) rotate(-24deg); opacity: 0; } 70% { transform: scale(1.18) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(-8px) scale(.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.8); } 18% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 100% { opacity: 0; transform: translate(-50%, -74px) scale(1); } }
@keyframes confettiFall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx, 0), 170px) rotate(var(--rot, 180deg)); } }

@media (max-height: 700px) {
  .stage { min-height: 142px; }
  .customer-wrap { height: 162px; }
  .customer-art-wrap { width: 92px; flex-basis: 92px; height: 116px; }
  .customer-art { width: 92px; height: 114px; }
  .speech { width: calc(100% - 96px); }
  .crate { min-height: 70px; }
  .crate-art { width: 34px; height: 34px; }
  .shelf { padding: 6px 6px 8px; }
  .basket-bar { min-height: 72px; }
  .start-shop { height: 88px; width: 150px; }
  .start-card { padding-top: 14px; }
  .start-steps { display: none; }
}
@media (max-width: 350px) {
  .crate-name { font-size: 9px; }
  .crate-art { width: 34px; height: 34px; }
  .order-txt b { font-size: 9px; }
  .hud { padding-left: 9px; padding-right: 9px; }
  .who b, .who small { max-width: 88px; }
}
@media (min-width: 560px) {
  .game-body { background: #E8A868; padding: 14px 0; }
  .game-shell {
    height: calc(100dvh - 28px);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(90, 40, 10, .32);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
