/* ============ 基础 ============ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #E8641E;
  --orange-soft: #FFC79B;
  --cream: #FFF8EC;
  --cream-deep: #FFEFD8;
  --ink: #4B2B18;
  --ink-soft: #7A5238;
  --muted: #A98262;
  --line: #F0D9BC;
  --pink: #FF6F91;
  --wood: #C97A45;
  --wood-dark: #9E5327;
  --green: #67B36B;
  --shadow-warm: rgba(120, 60, 20, .16);
}

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

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  background: #2b1a10;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

[hidden] { display: none !important; }

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

/* ============ 舞台 ============ */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: #FFE3BD;
  box-shadow: 0 0 60px rgba(0, 0, 0, .35);
  isolation: isolate;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

@media (min-width: 520px) {
  body { padding: 0 12px; }
  .stage { border-radius: 22px; margin: 10px 0; height: calc(100dvh - 20px); }
}

/* ============ 场景 ============ */
.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 330px;
  overflow: hidden;
}

.wall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #FFDFAE 0%, rgba(255, 223, 174, 0) 62%),
    linear-gradient(180deg, #FFD9A4 0%, #FFE6C6 46%, #F9D2A5 78%, #F2C08F 100%);
}

.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .38) 1.3px, transparent 1.4px);
  background-size: 19px 19px;
  opacity: .55;
}

.wall::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 104px;
  height: 10px;
  background: linear-gradient(180deg, #C98454, #A96336);
  box-shadow: 0 -3px 0 rgba(255, 255, 255, .22) inset;
}

.sun-beam {
  position: absolute;
  top: -40px;
  width: 150px;
  height: 130%;
  background: linear-gradient(180deg, rgba(255, 250, 225, .5), rgba(255, 250, 225, 0));
  transform: rotate(15deg);
  filter: blur(2px);
  pointer-events: none;
}
.beam-a { left: 4%; }
.beam-b { right: 2%; transform: rotate(-13deg); opacity: .6; }

/* 窗 / 柜 */
.deco { position: absolute; display: block; }
.deco-window {
  top: 52px;
  left: -4px;
  width: 142px;
  height: 182px;
  filter: drop-shadow(0 8px 10px rgba(120, 60, 20, .12));
}
.deco-shelf {
  top: 46px;
  right: 2px;
  width: 122px;
  height: 202px;
  filter: drop-shadow(0 9px 12px rgba(120, 60, 20, .16));
}

/* 店招 */
.shop-sign {
  position: absolute;
  top: 54px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 8px rgba(120, 60, 20, .2));
}
.wall-clock {
  position: absolute;
  top: 36%;
  left: 56%;
  width: 48px;
  height: 54px;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 5px rgba(120, 60, 20, .14));
}

.sign-board {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 138px;
  height: 44px;
  padding: 0 8px;
  border: 2.5px solid #A75A2E;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFBF2, #FFE8C7);
  transform: rotate(-1.2deg);
  box-shadow: inset 0 -3px 0 rgba(200, 140, 80, .18), inset 0 2px 0 #fff;
}
.sign-board::before,
.sign-board::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #B56C3A;
}
.sign-board::before { left: 5px; }
.sign-board::after { right: 5px; }
.sign-cup { width: 28px; height: 34px; flex: 0 0 auto; }
.sign-txt { display: block; line-height: 1; }
.sign-txt b {
  display: block;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .6px;
  color: #6B3A1C;
}
.sign-txt em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 8px;
  letter-spacing: 2.5px;
  color: #A97B55;
}
.sign-cord {
  position: absolute;
  top: -12px;
  width: 2px;
  height: 14px;
  background: #A75A2E;
  border-radius: 2px;
}
.sign-cord-a { left: 20px; transform: rotate(15deg); transform-origin: bottom; }
.sign-cord-b { right: 20px; transform: rotate(-15deg); transform-origin: bottom; }

/* 小闪光 */
.spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFDF2;
  box-shadow: 0 0 0 4px rgba(255, 253, 242, .18), 0 0 12px 4px rgba(255, 246, 190, .55);
  animation: twinkle 3.4s ease-in-out infinite;
}
.spark-a { top: 34%; left: 10%; }
.spark-b { top: 24%; right: 12%; animation-delay: 1.2s; }
.spark-c { top: 48%; right: 5%; width: 5px; height: 5px; animation-delay: 2.1s; }

@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ============ 排队客人 ============ */
.queue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 84px;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  padding: 0 4px;
  pointer-events: none;
}

.slot {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.guest {
  position: relative;
  width: 100%;
  max-width: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  animation: guestIn .46s cubic-bezier(.18, 1.3, .4, 1) both;
}

@keyframes guestIn {
  from { opacity: 0; transform: translateY(22px) scale(.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.bubble {
  position: relative;
  width: 100%;
  padding: 6px 7px 6px;
  border: 2px solid #F2D8B8;
  border-radius: 15px;
  background: #FFFDF8;
  box-shadow: 0 4px 0 rgba(195, 141, 88, .16), 0 7px 14px rgba(120, 60, 20, .12);
  margin-bottom: 9px;
  transition: background .2s, border-color .2s, transform .2s;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #FFFDF8;
  border-right: 2px solid #F2D8B8;
  border-bottom: 2px solid #F2D8B8;
  transform: translateX(-50%) rotate(45deg);
  border-bottom-right-radius: 3px;
  transition: background .2s, border-color .2s;
}

.order-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 30px;
}
.order-cup { width: 22px; height: 28px; flex: 0 0 auto; display: block; }
.order-cup svg { display: block; width: 100%; height: 100%; }
.order-name {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #57321C;
  white-space: nowrap;
}

.patience {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 5px;
  background: #F3E3CF;
  overflow: hidden;
}
.patience-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #8BCC65, #B7DA63);
  transform-origin: left center;
  transition: background .3s;
}
.guest.warn .patience-fill { background: linear-gradient(90deg, #FFB33E, #FFC85E); }
.guest.urgent .patience-fill { background: linear-gradient(90deg, #FF5D57, #FF8A6B); }
.guest.urgent .bubble {
  border-color: #FFC0AE;
  animation: urgentNudge 1.15s ease-in-out infinite;
}
.guest.warn .bubble { border-color: #FFDCA8; }

@keyframes urgentNudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px) rotate(-1deg); }
  40% { transform: translateX(2px) rotate(1deg); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

.guest-body {
  position: relative;
  width: 82px;
  height: 88px;
  transform-origin: 50% 100%;
  animation: guestBob 3.2s ease-in-out infinite;
}
.guest:nth-child(2n) .guest-body { animation-delay: .7s; }
.guest-body svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 4px 0 rgba(120, 60, 20, .08));
}
.guest-body .eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 4.6s infinite;
}
.guest:nth-child(2n) .guest-body .eye { animation-delay: 1.8s; }
.guest:nth-child(3n) .guest-body .eye { animation-delay: 3.1s; }

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.1); }
}

@keyframes guestBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}

/* 客人离场 / 收到饮品 */
.guest.served .bubble {
  border-color: #A7DD83;
  background: #F1FFE7;
  animation: thanksPop .42s cubic-bezier(.2, 1.5, .4, 1);
}
.guest.served .bubble::after { background: #F1FFE7; border-color: #A7DD83; }
.guest.served .bubble .patience { display: none; }
.guest.served .order-line { display: none; }
.thanks {
  display: block;
  padding: 3px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: #4E9B39;
  letter-spacing: 1px;
}
.guest.served .guest-body { animation: happyJump .55s ease-out both; }

@keyframes thanksPop {
  0% { transform: scale(.8); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes happyJump {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-12px) scale(1.05); }
  65% { transform: translateY(2px) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}

.guest.angry .bubble {
  border-color: #F0A5A0;
  background: #FFF2F0;
  animation: angryShake .38s ease-in-out 2;
}
.guest.angry .bubble::after { background: #FFF2F0; border-color: #F0A5A0; }
.guest.angry .bubble .patience { display: none; }
.guest.angry .order-line { display: none; }
.sorry {
  display: block;
  padding: 3px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  color: #D3564E;
  letter-spacing: .5px;
}
.guest.angry .guest-body { animation: leaveAngry .55s ease-in both; }

@keyframes angryShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-1.4deg); }
  75% { transform: translateX(3px) rotate(1.4deg); }
}
@keyframes leaveAngry {
  to { transform: translateY(10px) scale(.8); opacity: 0; }
}

/* ============ 吧台 ============ */
.counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: 104px;
  pointer-events: none;
}
.counter-top {
  height: 15px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #FFE3BC, #E8AC70);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 -5px 14px rgba(120, 60, 20, .14);
}
.counter-front {
  position: relative;
  height: 89px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 40px),
    linear-gradient(180deg, #D0844C 0%, #B96A38 55%, #A85A2C 100%);
  border-top: 3px solid #A65C2F;
  box-shadow: inset 0 -10px 18px rgba(90, 40, 10, .18);
}

.counter-plaque {
  position: absolute;
  left: 50%;
  top: 15px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px 0 6px;
  border: 2px solid #8F4D26;
  border-radius: 10px;
  background: linear-gradient(180deg, #FFF8E9, #FFE8C4);
  box-shadow: 0 2px 0 rgba(80, 35, 10, .22), inset 0 1px 0 #fff;
}
.counter-plaque svg { width: 25px; height: 23px; }
.counter-plaque span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #8A4A24;
}

.counter-cup {
  position: absolute;
  right: 12px;
  top: -44px;
  width: 36px;
  height: 54px;
  transform: rotate(3deg);
}
.counter-cup .straw {
  position: absolute;
  left: 20px;
  top: 0;
  width: 5px;
  height: 26px;
  border-radius: 3px;
  background: #FF8A3D;
  transform: rotate(9deg);
}
.counter-cup .cup-body {
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 32px;
  height: 36px;
  border: 2px solid #A75A2E;
  border-radius: 5px 5px 12px 12px;
  background: linear-gradient(180deg, #FFF9EE, #FFE9CC);
  overflow: hidden;
}
.counter-cup .cup-tea {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  height: 22px;
  background: linear-gradient(180deg, #E2B27F, #C98B5A);
}
.cup-pearl {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5A341B;
}
.cup-pearl.p1 { left: 7px; bottom: 5px; }
.cup-pearl.p2 { left: 15px; bottom: 8px; }
.cup-pearl.p3 { left: 21px; bottom: 4px; }
.counter-cup .cup-lid {
  position: absolute;
  left: 0;
  top: 16px;
  width: 36px;
  height: 7px;
  border-radius: 4px;
  background: #FFF4E1;
  border: 2px solid #A75A2E;
}

.counter-plant {
  position: absolute;
  left: 10px;
  top: -31px;
  width: 46px;
  height: 45px;
}
.counter-plant .pot {
  position: absolute;
  left: 9px;
  bottom: 0;
  width: 28px;
  height: 20px;
  border-radius: 3px 3px 9px 9px;
  background: linear-gradient(180deg, #F39A63, #D96B3C);
  box-shadow: inset 0 -3px 0 rgba(120, 50, 20, .18);
}
.counter-plant .leaf {
  position: absolute;
  width: 20px;
  height: 28px;
  border-radius: 60% 40% 55% 45%;
  background: linear-gradient(150deg, #A7D986, #6DAB55);
}
.counter-plant .leaf-a { left: 4px; top: 0; transform: rotate(-22deg); }
.counter-plant .leaf-b { right: 3px; top: 3px; transform: rotate(20deg); width: 18px; height: 24px; }

.counter-steam {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  filter: blur(2px);
  animation: steam 2.8s ease-out infinite;
}
.counter-steam.s1 { right: 28px; top: -52px; }
.counter-steam.s2 { right: 38px; top: -56px; animation-delay: 1.3s; }

@keyframes steam {
  0% { opacity: 0; transform: translateY(6px) scale(.6); }
  35% { opacity: .7; }
  100% { opacity: 0; transform: translateY(-20px) scale(1.5); }
}

/* ============ 顶部数值 ============ */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 14px 0;
  pointer-events: none;
}

.pill {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px 0 5px;
  border: 2px solid #FFE3C2;
  border-radius: 999px;
  background: rgba(255, 252, 245, .94);
  box-shadow: 0 4px 0 rgba(187, 126, 70, .14), 0 7px 14px rgba(120, 60, 20, .12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.coin-pill { gap: 7px; min-width: 106px; }
.coin-icon { width: 30px; height: 30px; flex: 0 0 auto; display: block; }
.coin-icon svg { display: block; width: 100%; height: 100%; }
.coin-num {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .3px;
  color: #6B3B1B;
  font-variant-numeric: tabular-nums;
  transition: transform .18s;
}
.coin-pill.bump .coin-num { animation: coinBump .38s cubic-bezier(.2, 1.6, .4, 1); }
.coin-pill.bump .coin-icon { animation: coinSpin .48s ease; }

@keyframes coinBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
@keyframes coinSpin {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(-16deg) scale(1.12); }
  100% { transform: rotate(0) scale(1); }
}

.heart-pill {
  gap: 8px;
  padding: 0 12px;
  min-width: 102px;
  justify-content: center;
}
.heart-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #B0805B;
  padding-top: 1px;
}
.hearts { display: flex; gap: 1px; }
.hearts .mp-icon {
  width: 19px;
  height: 19px;
  color: #FF5C7A;
  filter: drop-shadow(0 1px 0 rgba(180, 30, 60, .2));
  transition: color .2s, transform .2s;
}
.hearts .mp-icon.lost { color: #DCC9B6; filter: none; }
.heart-pill.lose { animation: heartShake .5s ease-in-out; }

@keyframes heartShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-2deg); }
  45% { transform: translateX(5px) rotate(2deg); }
  70% { transform: translateX(-3px); }
}

/* ============ 制作台 ============ */
.panel {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  margin-top: -18px;
  padding: 22px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #FFFCF5 0%, rgba(255, 252, 245, 0) 60%),
    linear-gradient(180deg, #FFF8EC 0%, #FFF0DA 100%);
  box-shadow: 0 -10px 30px rgba(120, 60, 20, .18), inset 0 2px 0 #fff;
}

.panel-scallop {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 12px;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 10px 13px, var(--orange) 8px, transparent 8.6px) repeat-x;
  background-size: 20px 14px;
  opacity: .92;
}
.panel-scallop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 6px;
  background: var(--cream);
}

.panel-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.panel-badge {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(150deg, #FFA25C, var(--orange) 55%, #F17322);
  box-shadow: 0 3px 0 #D95C16, inset 0 1px 0 rgba(255, 255, 255, .5);
}
.panel-badge .mp-icon { width: 21px; height: 21px; }
.panel-copy { min-width: 0; flex: 1 1 auto; }
.panel-copy h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .5px;
  color: #4B2A16;
}
.panel-copy p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  color: #A5805F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.sold, .best {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
}
.sold { color: #A4602E; background: #FFE8CB; border: 1px solid #F3D2A8; }
.best { color: #B4916F; background: #FFF8EC; border: 1px solid #F2E4CE; }

.combo {
  position: absolute;
  top: -17px;
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 12px 0 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  color: #FFF8E9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .4px;
  background: linear-gradient(180deg, #FFA45B, #F06A1E);
  border: 2px solid #FFF0D8;
  box-shadow: 0 4px 0 rgba(170, 70, 15, .28), 0 6px 14px rgba(120, 50, 10, .18);
  animation: comboPop .34s cubic-bezier(.2, 1.5, .4, 1);
}
.combo .mp-icon { width: 15px; height: 15px; color: #FFE87A; }

@keyframes comboPop {
  0% { transform: translateX(-50%) scale(.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.drink {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: clamp(132px, 18.5vh, 158px);
  padding: 6px 5px 8px;
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--tint, #F8E8D2) 0%, #FFFAF0 82%);
  box-shadow: 0 3px 0 var(--edge, #E7C8A2), 0 8px 14px rgba(120, 60, 20, .12);
  transition: transform .1s ease, box-shadow .1s ease;
  overflow: hidden;
}
.drink::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .75);
  pointer-events: none;
}
.drink:active,
.drink.pressed {
  transform: translateY(3px) scale(.985);
  box-shadow: 0 0 0 var(--edge, #E7C8A2), 0 3px 6px rgba(120, 60, 20, .12);
}
.drink:focus-visible { outline: 3px solid #FFB25E; outline-offset: 2px; }

.drink-glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.drink-art {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.drink-art svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 3px rgba(120, 60, 20, .16));
}
.drink-name {
  position: relative;
  z-index: 1;
  margin-top: 1px;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .2px;
  color: #55311B;
  white-space: nowrap;
}
.drink-price {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  margin-top: 5px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 1px 2px rgba(120, 60, 20, .08);
  font-size: 11px;
  font-weight: 900;
  color: #8D572B;
  font-variant-numeric: tabular-nums;
}
.drink-price svg { width: 15px; height: 15px; display: block; }

.drink.hint { animation: hintGlow 1.4s ease-in-out infinite; }
@keyframes hintGlow {
  0%, 100% { box-shadow: 0 3px 0 var(--edge, #E7C8A2), 0 8px 14px rgba(120, 60, 20, .12); }
  50% { box-shadow: 0 3px 0 var(--edge, #E7C8A2), 0 0 0 4px rgba(255, 171, 80, .42), 0 8px 14px rgba(120, 60, 20, .12); }
}
.drink.deny { animation: denyShake .32s ease-in-out; }
@keyframes denyShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-1deg); }
  75% { transform: translateX(4px) rotate(1deg); }
}

/* ============ 提示 / 特效 ============ */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(248px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: calc(100% - 60px);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(74, 40, 20, .9);
  color: #FFF6E6;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px) scale(.94);
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  box-shadow: 0 6px 16px rgba(50, 25, 8, .25);
  backdrop-filter: blur(4px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

.float-coin, .float-heart, .float-text {
  position: fixed;
  z-index: 51;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .3px;
  color: #FFB02E;
  text-shadow: 0 2px 0 #8A4A14, 0 0 8px rgba(255, 180, 60, .5);
  pointer-events: none;
  animation: floatUp 1.05s cubic-bezier(.15, .8, .3, 1) both;
}
.float-heart { color: #FF5C7A; text-shadow: 0 2px 0 #8E2440; }
.float-text { color: #4E9B39; text-shadow: 0 2px 0 #fff; }

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -4px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}

.fly-cup {
  position: fixed;
  z-index: 55;
  width: 50px;
  height: 60px;
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(90, 40, 10, .18));
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
.fly-cup svg { display: block; width: 100%; height: 100%; }

.heart-burst {
  position: fixed;
  z-index: 52;
  width: 12px;
  height: 12px;
  color: #FF7A9A;
  animation: heartFly .8s ease-out both;
}
.heart-burst .mp-icon { width: 12px; height: 12px; }

@keyframes heartFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.5); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -40px))) scale(1.1); }
}

/* ============ 结算 ============ */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(58, 29, 12, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.over-card {
  position: relative;
  width: 100%;
  max-width: 336px;
  padding: 18px 20px 20px;
  border: 2px solid #FFF4E2;
  border-radius: 26px;
  background:
    radial-gradient(100% 70% at 50% 0%, #FFFDF7 0%, rgba(255, 253, 247, 0) 65%),
    linear-gradient(180deg, #FFF8EC, #FFEDD5);
  box-shadow: 0 18px 50px rgba(40, 18, 4, .38), inset 0 2px 0 #fff;
  text-align: center;
  animation: cardPop .4s cubic-bezier(.18, 1.35, .4, 1) both;
}
@keyframes cardPop {
  0% { opacity: 0; transform: translateY(18px) scale(.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.over-art {
  display: block;
  width: 108px;
  height: 94px;
  margin: -6px auto 0;
  filter: drop-shadow(0 5px 4px rgba(120, 60, 20, .14));
}
.over-kicker {
  margin: 2px 0 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #B08A66;
}
.over-card h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: .5px;
  color: #4B2A16;
}
.over-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9B7658;
}
.over-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 16px 0 0;
  padding: 11px 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid #F5E2C8;
}
.over-stats div { position: relative; padding: 2px 4px; }
.over-stats div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: #EEDBC2;
}
.over-stats span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #AC8563;
}
.over-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
  color: #D2691E;
  font-variant-numeric: tabular-nums;
}
.over-best {
  margin: 9px 0 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #B4926F;
}
.over-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 15px;
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #FFA55F, var(--orange) 55%, #F07422);
  box-shadow: 0 4px 0 #C95514, 0 10px 18px rgba(200, 90, 20, .3);
  transition: transform .1s, box-shadow .1s;
}
.over-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #C95514, 0 4px 8px rgba(200, 90, 20, .25);
}

/* ============ 小屏适配 ============ */
@media (max-height: 720px) {
  .deco-window { width: 126px; height: 162px; top: 50px; }
  .deco-shelf { width: 110px; height: 182px; top: 44px; }
  .shop-sign { top: 50px; transform: translateX(-50%) scale(.92); transform-origin: top center; }
  .queue { bottom: 78px; }
  .counter { height: 96px; }
  .counter-top { height: 13px; }
  .counter-front { height: 83px; }
  .guest-body { width: 74px; height: 80px; }
  .bubble { padding: 5px 6px; border-radius: 14px; }
  .order-name { font-size: 11.5px; }
  .order-cup { width: 20px; height: 25px; }
  .patience { height: 4px; margin-top: 4px; }
  .panel { padding-top: 19px; }
  .panel-head { margin-bottom: 10px; }
  .panel-copy h2 { font-size: 16px; }
  .panel-copy p { font-size: 10.5px; }
  .panel-badge { width: 35px; height: 35px; border-radius: 11px; }
  .drink { min-height: 132px; }
  .drink-art { width: 64px; height: 78px; }
  .drink-name { font-size: 12px; }
  .toast { bottom: calc(218px + env(safe-area-inset-bottom)); }
}

@media (max-height: 620px) {
  .deco-window { transform: scale(.84); transform-origin: top left; top: 48px; }
  .deco-shelf { transform: scale(.84); transform-origin: top right; top: 42px; }
  .shop-sign { top: 44px; transform: translateX(-50%) scale(.84); }
  .queue { bottom: 70px; }
  .counter { height: 88px; }
  .counter-top { height: 12px; }
  .counter-front { height: 76px; }
  .guest-body { width: 68px; height: 74px; }
  .order-name { font-size: 11px; }
  .panel { padding-top: 17px; }
  .panel-copy p { display: none; }
  .drink { min-height: 124px; }
  .drink-art { width: 58px; height: 70px; }
  .drink-name { font-size: 11.5px; }
  .drink-price { height: 18px; font-size: 10px; }
  .toast { bottom: calc(202px + env(safe-area-inset-bottom)); }
}

@media (max-width: 350px) {
  .panel { padding-left: 10px; padding-right: 10px; }
  .menu { gap: 7px; }
  .drink-name { font-size: 11.5px; }
  .order-name { font-size: 11px; }
  .coin-pill { min-width: 94px; }
  .heart-pill { min-width: 94px; padding: 0 9px; }
}

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