/* ============================================================
   奶茶店物语 · 移动端经营小游戏
   ============================================================ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #EF6A17;
  --orange-soft: #FFB45F;
  --cream: #FFF6E8;
  --cream-deep: #FFEBD1;
  --ink: #4A2C16;
  --ink-2: #6B4628;
  --muted: #A98460;
  --line: #F1D3AC;
  --shadow-card: 0 12px 30px rgba(58, 31, 12, .22);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #150d08;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 60% at 50% 40%, #342014 0%, #150d08 70%);
}

button {
  font-family: inherit;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #2a190e;
  isolation: isolate;
  box-shadow: 0 0 80px rgba(0, 0, 0, .55);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   首页
   ============================================================ */
.home-screen { background: #2a190e; }

.home-art {
  position: absolute;
  inset: -2%;
  background: url("images/gen/gptimg_1795249285_look.png") 50% 50% / cover no-repeat;
  transform: scale(1.03);
  animation: artDrift 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes artDrift {
  from { transform: scale(1.03) translateX(0); }
  to   { transform: scale(1.09) translateX(-1.1%); }
}

.home-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(43, 24, 12, .97) 0%,
      rgba(43, 24, 12, .93) 7%,
      rgba(43, 24, 12, .55) 11%,
      rgba(43, 24, 12, .18) 16%,
      rgba(43, 24, 12, .02) 30%,
      rgba(43, 24, 12, 0) 48%,
      rgba(43, 24, 12, .10) 62%,
      rgba(43, 24, 12, .48) 84%,
      rgba(43, 24, 12, .28) 100%),
    radial-gradient(120% 72% at 50% 44%, transparent 52%, rgba(40, 22, 10, .38) 100%);
}

.home-vignette::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 150px;
  background: linear-gradient(102deg,
    rgba(43, 24, 12, .97) 0%,
    rgba(43, 24, 12, .82) 34%,
    rgba(43, 24, 12, .32) 68%,
    rgba(43, 24, 12, 0) 100%);
  pointer-events: none;
}

.home-ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 0;
}

/* ---------- 顶部资料 ---------- */
.hud {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
  animation: dropIn .55s cubic-bezier(.2, .9, .3, 1.1) both;
}

.player-pill {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 7px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 251, 243, .97), rgba(255, 238, 216, .95));
  border: 1.5px solid rgba(255, 255, 255, .75);
  box-shadow: 0 7px 18px rgba(44, 24, 10, .32), inset 0 1px 0 #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.player-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFE5BD, #F5B875);
  border: 2px solid #fff;
  box-shadow: 0 3px 7px rgba(120, 70, 30, .18);
}

.player-photo {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.player-avatar.has-photo .player-photo { opacity: 1; }
.player-avatar.has-photo .pa-face,
.player-avatar.has-photo .pa-cap { opacity: 0; }

.pa-face {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 31px;
  height: 31px;
  transform: translateX(-50%);
  border-radius: 46% 46% 48% 48%;
  background: linear-gradient(180deg, #FFDFB6, #F6BE88);
  box-shadow: inset 0 -3px 0 rgba(168, 99, 50, .12);
}

.pa-eye {
  position: absolute;
  top: 13px;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: #4A2C16;
}
.pa-eye-l { left: 7px; }
.pa-eye-r { right: 7px; }

.pa-mouth {
  position: absolute;
  left: 50%;
  top: 21px;
  width: 7px;
  height: 4px;
  transform: translateX(-50%);
  border-bottom: 2px solid #A35B30;
  border-radius: 0 0 8px 8px;
}

.pa-cap {
  position: absolute;
  left: 50%;
  top: 0;
  width: 38px;
  height: 17px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(180deg, #D09150, #955928);
  border-radius: 52% 52% 24% 24%;
  box-shadow: inset 0 2px 0 rgba(255, 228, 190, .35);
}

.pa-cap::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 10px;
  width: 11px;
  height: 6px;
  border-radius: 4px;
  background: #83491F;
  transform: rotate(7deg);
}

.player-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name {
  display: block;
  font-size: 15px;
  line-height: 1.12;
  font-weight: 900;
  color: #4A2C16;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.level-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.level-tag {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 800;
  color: #90511D;
  background: #FFE1B9;
  border-radius: 6px;
  padding: 1px 5px;
  letter-spacing: .2px;
}
.level-tag b { font-size: 10px; }

.xp-track {
  flex: 1 1 auto;
  min-width: 24px;
  height: 5px;
  border-radius: 99px;
  background: #EAD0AC;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(120, 70, 30, .18);
}
.xp-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFC55C, #FF8A3D);
  transition: width .45s ease;
}

.xp-text {
  flex: 0 0 auto;
  font-size: 8.5px;
  font-weight: 800;
  color: #A98460;
  font-variant-numeric: tabular-nums;
}

.coin-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFEAAD, #FFC85C);
  border: 1.5px solid #FFF7DC;
  color: #613708;
  box-shadow: 0 7px 18px rgba(44, 24, 10, .3), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.coin-pill .mp-icon {
  width: 20px;
  height: 20px;
  color: #B96A00;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6));
}
.coin-pill b {
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
}

.hud-gear {
  align-self: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8A5A33;
  background: linear-gradient(180deg, rgba(255, 251, 243, .97), rgba(255, 237, 215, .94));
  border: 1.5px solid rgba(255, 255, 255, .8);
  box-shadow: 0 6px 15px rgba(44, 24, 10, .3), inset 0 1px 0 #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .1s ease;
}
.hud-gear:active { transform: scale(.9); }
.hud-gear .mp-icon { width: 21px; height: 21px; }
.hud-gear.muted { color: #BB9A78; }

/* ---------- 今日目标 ---------- */
.goal-card {
  position: relative;
  flex: 0 0 auto;
  width: 84%;
  max-width: 322px;
  margin-top: 10px;
  padding: 11px 14px 12px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 252, 245, .98), rgba(255, 237, 213, .95));
  border: 1.5px solid #FFE3BE;
  box-shadow: 0 9px 22px rgba(55, 30, 12, .26), inset 0 1px 0 #fff;
  animation: dropIn .6s .08s cubic-bezier(.2, .9, .3, 1.1) both;
}

.goal-card::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 100, .22), transparent 70%);
  pointer-events: none;
}

.goal-gift {
  position: absolute;
  right: 13px;
  top: 50px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #FFF4E2;
  background: linear-gradient(155deg, #FFB55B, #FF7C2A);
  border: 1.5px solid rgba(255, 232, 198, .9);
  box-shadow: 0 5px 12px rgba(219, 89, 10, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
  transform: rotate(-5deg);
  animation: giftBob 2.6s ease-in-out infinite;
  pointer-events: none;
}
.goal-gift .mp-icon {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 1px 1px rgba(150, 60, 0, .3));
}
@keyframes giftBob {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-2px); }
}

.goal-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.goal-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #FFB45F, #FF7A1F);
  box-shadow: 0 3px 7px rgba(224, 105, 23, .36);
}
.goal-icon .mp-icon { width: 16px; height: 16px; }

.goal-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #7A4A23;
  letter-spacing: .8px;
}

.goal-count {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 900;
  color: #EF6A17;
  background: #FFE7C9;
  border-radius: 99px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}

.goal-line {
  margin: 7px 0 7px;
  padding-right: 50px;
  font-size: 12.5px;
  color: #5A3A22;
  font-weight: 600;
  white-space: nowrap;
}
.goal-line b {
  font-size: 16px;
  font-weight: 900;
  color: #E9631A;
  padding: 0 1px;
  font-variant-numeric: tabular-nums;
}

.goal-track {
  height: 8px;
  border-radius: 99px;
  background: #F2D8B6;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(120, 70, 30, .18);
}
.goal-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFB347, #FF7A1F);
  box-shadow: 0 0 9px rgba(255, 138, 61, .55);
  transition: width .5s cubic-bezier(.2, .8, .3, 1);
}

.goal-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 10.5px;
  color: #9B6B42;
  font-weight: 700;
}
.goal-foot .mp-icon { width: 14px; height: 14px; color: #E9A22B; }
.goal-foot b {
  margin-left: auto;
  font-size: 11.5px;
  color: #D9791A;
  font-weight: 900;
}

.goal-card.done .goal-track i { background: linear-gradient(90deg, #8FD05F, #56AE3A); }
.goal-card.done .goal-count { color: #3E8B27; background: #E2F4D8; }
.goal-card.done .goal-foot b { color: #4D9A33; }

.home-spacer {
  flex: 1 1 auto;
  min-height: 10px;
}

/* ---------- 底部操作区 ---------- */
.home-bottom {
  position: relative;
  flex: 0 0 auto;
  margin: 0 -16px;
  padding: 18px 18px calc(14px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg,
    rgba(255, 246, 232, .55) 0%,
    rgba(255, 244, 226, .98) 9%,
    #FFF2DF 26%,
    #FFEDD7 100%);
  box-shadow: 0 -16px 42px rgba(48, 25, 8, .30);
  animation: riseIn .6s .14s cubic-bezier(.2, .9, .3, 1.1) both;
}

.home-bottom::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 6px;
  height: 1.5px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  pointer-events: none;
}

.best-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 9px;
  color: #8A5A33;
  font-size: 11.5px;
  font-weight: 700;
}
.best-line .mp-icon {
  width: 16px;
  height: 16px;
  color: #F5A623;
  filter: drop-shadow(0 1px 0 #fff);
}
.best-line b {
  font-size: 14px;
  font-weight: 900;
  color: #E9631A;
  font-variant-numeric: tabular-nums;
}
.best-unit {
  margin-left: -1px;
  font-size: 9.5px;
  font-weight: 700;
  color: #B28A61;
  letter-spacing: .3px;
}

.sheet-sound {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #B07A47;
  background: rgba(255, 255, 255, .72);
  border: 1.5px solid #F1D6B3;
  box-shadow: 0 2px 5px rgba(120, 70, 30, .1);
}
.sheet-sound:active { transform: scale(.92); }
.sheet-sound .mp-icon { width: 17px; height: 17px; }
.sheet-sound.muted { color: #C4A37F; }

.start-btn {
  position: relative;
  width: 100%;
  height: 62px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 22px;
  border: 2px solid #FFD9AE;
  background: linear-gradient(180deg, #FFB45C 0%, #FF8A3D 52%, #F4741B 100%);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(150, 60, 0, .28);
  box-shadow:
    0 7px 0 #C9560C,
    0 15px 26px rgba(219, 89, 10, .38),
    inset 0 2px 0 rgba(255, 255, 255, .55);
  transition: transform .08s ease, box-shadow .08s ease;
}

.start-btn::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -55%;
  width: 38%;
  height: 190%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(11deg);
  animation: shine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.start-btn:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #C9560C,
    0 6px 12px rgba(219, 89, 10, .3),
    inset 0 2px 0 rgba(255, 255, 255, .45);
}

.start-btn .mp-icon {
  width: 26px;
  height: 26px;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(150, 60, 0, .35));
}
.start-btn .cup-mark {
  position: absolute;
  right: 17px;
  width: 30px;
  height: 30px;
  opacity: .9;
  transform: rotate(-8deg);
  animation: cupSway 2.6s ease-in-out infinite;
}

.home-hint {
  margin: 9px 0 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .4px;
  color: #A98460;
}

@keyframes shine {
  0%, 20% { left: -55%; }
  55%, 100% { left: 130%; }
}
@keyframes cupSway {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-2px); }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   营业中
   ============================================================ */
.game-screen { background: #2a190e; }

.game-art {
  position: absolute;
  inset: -2%;
  background: url("images/gen/gptimg_1795249285_look.png") 50% 46% / cover no-repeat;
  filter: brightness(.63) saturate(.98) blur(1.1px);
  transform: scale(1.045);
}

.game-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(30, 16, 8, .78) 0%,
      rgba(30, 16, 8, .44) 26%,
      rgba(30, 16, 8, .22) 46%,
      rgba(30, 16, 8, .62) 70%,
      rgba(30, 16, 8, .88) 100%),
    radial-gradient(100% 70% at 50% 45%, transparent 45%, rgba(25, 12, 5, .45) 100%);
}

.game-ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: calc(env(safe-area-inset-top) + 8px);
}

.game-hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px 8px;
  animation: dropIn .45s cubic-bezier(.2, .9, .3, 1.1) both;
}

.round-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #FFF4E4;
  background: rgba(58, 32, 15, .58);
  border: 1.5px solid rgba(255, 255, 255, .42);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.round-btn:active { transform: scale(.9); }
.round-btn .mp-icon { width: 20px; height: 20px; }

.score-box {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px 6px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 249, 237, .97), rgba(255, 235, 208, .94));
  border: 1.5px solid rgba(255, 255, 255, .68);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .22), inset 0 1px 0 #fff;
}
.score-box span {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #9B6B42;
}
.score-box b {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 900;
  color: #E9631A;
  font-variant-numeric: tabular-nums;
}

.hearts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 6px 7px;
  border-radius: 15px;
  background: rgba(58, 32, 15, .48);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}
.hearts .mp-icon {
  width: 15px;
  height: 15px;
  color: #FF6B6B;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28));
}
.hearts .mp-icon.heart-off { color: rgba(255, 255, 255, .24); filter: none; }
.hearts.shake { animation: heartsShake .4s; }

.timer-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 14px;
  color: #FFF4E4;
  background: rgba(58, 32, 15, .58);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}
.timer-box .mp-icon { width: 15px; height: 15px; color: #FFC46B; }
.timer-box b {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.timer-box.low {
  background: linear-gradient(180deg, #E4503A, #C33020);
  border-color: #FFB3A8;
  animation: timerPulse .9s ease-in-out infinite;
}

.game-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 14px 10px;
}

.combo-badge {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 12px;
  border-radius: 99px;
  background: linear-gradient(180deg, #FFC65C, #FF8A3D);
  border: 1.5px solid #FFE5BF;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .5px;
  box-shadow: 0 5px 14px rgba(240, 105, 27, .4);
  text-shadow: 0 1px 1px rgba(150, 60, 0, .3);
}
.combo-badge .mp-icon { width: 13px; height: 13px; color: #FFF4C7; }
.combo-badge b { font-size: 13px; }
.combo-badge.pop { animation: comboPop .35s cubic-bezier(.2, .9, .3, 1.4); }

.queue {
  flex: 0 0 auto;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 2px 8px;
}

.queue-label {
  margin-right: 1px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255, 244, 228, .66);
}
.queue-empty {
  font-size: 10px;
  color: rgba(255, 244, 228, .42);
  letter-spacing: .5px;
}
.queue-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 3px;
  border-radius: 99px;
  background: rgba(255, 248, 235, .92);
  border: 1.5px solid rgba(255, 255, 255, .72);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
}
.q-avatar {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: #6B3B16;
  background: linear-gradient(160deg, #FFD9A8, #F7A96B);
}
.q-avatar.tint-1 { background: linear-gradient(160deg, #FFD9E3, #F59BAE); color: #7A2A3D; }
.q-avatar.tint-2 { background: linear-gradient(160deg, #D8EDC8, #9BCB7A); color: #3C5B25; }
.q-avatar.tint-3 { background: linear-gradient(160deg, #D6E9FF, #93BFEA); color: #284B73; }

.mini-cup {
  position: relative;
  width: 13px;
  height: 17px;
  border-radius: 2px 2px 5px 5px;
  clip-path: polygon(2% 0, 98% 0, 82% 100%, 18% 100%);
  background: linear-gradient(180deg, #EBCB9E, #B77B44);
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, .25);
}
.mini-cup::before {
  content: "";
  position: absolute;
  left: 55%;
  top: -5px;
  width: 2px;
  height: 7px;
  background: #E9C9A2;
  transform: translateX(-50%) rotate(10deg);
}
.mini-berry { background: linear-gradient(180deg, #FFD6DF, #F26D8A); }
.mini-mango { background: linear-gradient(180deg, #FFE7A6, #F18A16); }
.mini-matcha { background: linear-gradient(180deg, #E3F2C4, #7FB253); }

.order-wrap {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-card {
  width: 100%;
  max-width: 370px;
  padding: 26px 18px;
  border-radius: 24px;
  text-align: center;
  color: #FFF4E4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  background: rgba(58, 32, 15, .55);
  border: 1.5px dashed rgba(255, 228, 195, .38);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

/* ---------- 订单卡 ---------- */
.order-card {
  position: relative;
  width: 100%;
  max-width: 372px;
  padding: 14px 14px 12px;
  border-radius: 24px;
  background: linear-gradient(160deg, #FFFDF8 0%, #FFF4E2 58%, #FFEBD2 100%);
  border: 2px solid rgba(255, 255, 255, .88);
  box-shadow:
    0 18px 38px rgba(38, 20, 8, .40),
    inset 0 1px 0 #fff;
  animation: orderIn .42s cubic-bezier(.2, .9, .3, 1.15);
  will-change: transform;
}
.order-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 19px;
  border: 1px solid rgba(240, 199, 146, .48);
  pointer-events: none;
}
.order-card.served { animation: cardServed .42s ease-in forwards; }
.order-card.wrong-shake { animation: wrongShake .34s; }

.order-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.customer-badge {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 900;
  color: #6B3B16;
  background: linear-gradient(160deg, #FFD9A8, #F7A96B);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(120, 70, 30, .22);
}
.customer-badge.tint-1 { background: linear-gradient(160deg, #FFD9E3, #F59BAE); color: #7A2A3D; }
.customer-badge.tint-2 { background: linear-gradient(160deg, #D8EDC8, #9BCB7A); color: #3C5B25; }
.customer-badge.tint-3 { background: linear-gradient(160deg, #D6E9FF, #93BFEA); color: #284B73; }

.customer-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.customer-copy small {
  display: block;
  margin-bottom: 1px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .8px;
  color: #B08A63;
}
.speech {
  font-size: 14px;
  line-height: 1.32;
  font-weight: 600;
  color: #4A2C16;
}
.speech b {
  font-size: 16px;
  font-weight: 900;
  color: #E9631A;
  white-space: nowrap;
}

.recipe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  margin-top: 12px;
  padding: 9px 7px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .68);
  border: 1px dashed #EFCB9E;
}

.recipe-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: .52;
  transition: opacity .2s ease;
}
.recipe-step.active { opacity: 1; }
.recipe-step.done { opacity: 1; }

.step-num {
  font-size: 8.5px;
  font-weight: 900;
  color: #B08A63;
  letter-spacing: .5px;
}

.step-ing {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .95);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .16);
  box-shadow: 0 4px 8px rgba(120, 70, 30, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.recipe-step.active .step-ing {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, .35), 0 4px 10px rgba(120, 70, 30, .22);
  animation: stepPulse 1.5s ease-in-out infinite;
}
.recipe-step.done .step-ing::after {
  content: "✓";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: #61B84A;
  font-size: 9px;
  line-height: 1;
  color: #fff;
  text-shadow: none;
}
.recipe-step.done .step-ing { animation: none; }

.step-label {
  font-size: 10px;
  font-weight: 800;
  color: #7A5533;
  letter-spacing: .3px;
}
.step-arrow {
  flex: 0 0 auto;
  padding-bottom: 12px;
  font-size: 13px;
  font-weight: 900;
  color: #D9B58B;
}

.patience {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}
.patience-label {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #A98460;
}
.patience-track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: #F0D9BC;
  box-shadow: inset 0 1px 2px rgba(120, 70, 30, .15);
}
.patience-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7CC96A, #B8D95C);
  transition: width .12s linear;
}
.patience-track i.warn { background: linear-gradient(90deg, #FFC24B, #FF9A2E); }
.patience-track i.danger {
  background: linear-gradient(90deg, #FF6A5A, #E23B2A);
  animation: dangerPulse .6s ease-in-out infinite;
}
.patience-text {
  flex: 0 0 auto;
  min-width: 27px;
  text-align: right;
  font-size: 11px;
  font-weight: 900;
  color: #8A5A33;
  font-variant-numeric: tabular-nums;
}

/* ---------- 加料台 ---------- */
.station {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 11px 14px calc(9px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #FFF9EF 0%, #FFF1DC 55%, #FFEAD1 100%);
  border-top: 2px solid #FFE3BE;
  box-shadow:
    0 -16px 36px rgba(30, 15, 6, .38),
    inset 0 1px 0 #fff;
  animation: riseIn .45s .05s cubic-bezier(.2, .9, .3, 1.05) both;
}

.station-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.station-title {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .8px;
  color: #6B3B16;
}
.station-title .mp-icon { width: 18px; height: 18px; color: #E9631A; }
.station-tip {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #A98460;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}
.station-tip.alert { color: #D63B2A; }
.mini-sound {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #B07A47;
  background: #FFF8EC;
  border: 1px solid #F0D0A8;
}
.mini-sound:active { transform: scale(.9); }
.mini-sound .mp-icon { width: 15px; height: 15px; }
.mini-sound.muted { color: #C4A37F; }

.ingredients {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.ing-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px 5px;
  border-radius: 15px;
  border: 1.5px solid #F3D8B4;
  background: linear-gradient(180deg, #FFFDF8, #FFF4E4);
  box-shadow: 0 3px 0 #EBCDA6, 0 5px 10px rgba(120, 70, 30, .07);
  color: #6B3B16;
  transition: transform .08s ease, box-shadow .08s ease;
}
.ing-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #EBCDA6;
}
.ing-dot {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
  box-shadow: 0 3px 6px rgba(120, 70, 30, .2);
}
.ing-name {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .5px;
}

.ing-tea { background: linear-gradient(160deg, #B96B36, #7C3D1A); }
.ing-milk { background: linear-gradient(160deg, #FFFDF6, #EADDC6); color: #8A6642; text-shadow: none; }
.ing-pearl { background: linear-gradient(160deg, #6C432A, #3A2114); }
.ing-berry { background: linear-gradient(160deg, #FF7D96, #D8365B); }
.ing-mango { background: linear-gradient(160deg, #FFD05A, #FF9418); }
.ing-matcha { background: linear-gradient(160deg, #A9D77B, #5C9B38); }
.ing-cheese { background: linear-gradient(160deg, #FFE58A, #F3B51F); color: #7A4A00; text-shadow: none; }
.ing-ice { background: linear-gradient(160deg, #B8E6FA, #5CB7DF); color: #20536E; text-shadow: none; }

.ing-btn.hit { animation: ingHit .3s ease-out; }
.ing-btn.wrong { animation: ingWrong .36s ease; }

/* ---------- 杯子 ---------- */
.cup {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 74px;
  filter: drop-shadow(0 6px 8px rgba(90, 50, 20, .18));
}
.order-cup { margin-left: auto; }

.cup-straw {
  position: absolute;
  z-index: 1;
  left: 60%;
  top: -13px;
  width: 7px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(90deg, #FFF8E8, #FFD9AC 55%, #E7B275);
  transform: rotate(9deg);
  box-shadow: 1px 1px 2px rgba(90, 50, 20, .15);
}

.cup-lid {
  position: absolute;
  z-index: 4;
  left: 2px;
  right: 2px;
  top: 0;
  height: 11px;
  border-radius: 7px;
  background: linear-gradient(180deg, #FFFDF8, #F4E3C9);
  border: 1px solid #E2C39B;
  box-shadow: 0 2px 2px rgba(90, 50, 20, .1);
}

.cup-body {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 7px;
  bottom: 0;
  overflow: hidden;
  clip-path: polygon(3% 0, 97% 0, 84% 100%, 16% 100%);
  background: linear-gradient(180deg, #EBCB9E 0%, #D3A268 45%, #B77B44 100%);
}

.cup-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 24% 80%, #3A2114 0 2.6px, transparent 3.1px),
    radial-gradient(circle at 48% 88%, #3A2114 0 2.6px, transparent 3.1px),
    radial-gradient(circle at 72% 78%, #3A2114 0 2.6px, transparent 3.1px),
    radial-gradient(circle at 35% 68%, #3A2114 0 2.4px, transparent 2.9px),
    radial-gradient(circle at 62% 63%, #3A2114 0 2.4px, transparent 2.9px),
    radial-gradient(circle at 80% 90%, #3A2114 0 2.4px, transparent 2.9px),
    radial-gradient(circle at 20% 92%, #3A2114 0 2px, transparent 2.5px);
}

.cup-body::after {
  content: "";
  position: absolute;
  left: 9%;
  top: 4%;
  width: 17%;
  height: 86%;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, 0));
}

.cup-sleeve {
  position: absolute;
  z-index: 3;
  left: 29%;
  right: 29%;
  top: 43%;
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 252, 244, .92);
  border: 1px solid rgba(220, 190, 150, .7);
  box-shadow: 0 1px 2px rgba(90, 50, 20, .12);
}
.cup-sleeve::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF8A3D;
  transform: translate(-50%, -50%);
}

.cup-pearl .cup-body { background: linear-gradient(180deg, #EBCB9E 0%, #D3A268 45%, #B77B44 100%); }

.cup-berry .cup-body { background: linear-gradient(180deg, #FFE3E9 0%, #FFA7B8 42%, #F26D8A 100%); }
.cup-berry .cup-body::before {
  background-image:
    radial-gradient(circle at 30% 76%, #E33E62 0 3px, transparent 3.6px),
    radial-gradient(circle at 52% 88%, #E33E62 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 72% 70%, #E33E62 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 42% 62%, #E33E62 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 66% 90%, #E33E62 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, .55) 0 7px, transparent 8px),
    radial-gradient(circle at 62% 22%, rgba(255, 255, 255, .4) 0 4px, transparent 5px);
}

.cup-mango .cup-body { background: linear-gradient(180deg, #FFE7A6 0%, #FFB63C 52%, #F18A16 100%); }
.cup-mango .cup-body::before {
  background-image:
    radial-gradient(circle at 28% 74%, #FF8A1F 0 3px, transparent 3.6px),
    radial-gradient(circle at 52% 86%, #FF8A1F 0 2.4px, transparent 3px),
    radial-gradient(circle at 70% 68%, #FF8A1F 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 40% 58%, #FF8A1F 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 64% 44%, rgba(255, 255, 255, .55) 0 6px, transparent 7px);
}

.cup-matcha .cup-body { background: linear-gradient(180deg, #E3F2C4 0%, #B7DA86 46%, #7FB253 100%); }
.cup-matcha .cup-body::before {
  background-image:
    radial-gradient(circle at 24% 80%, #3A2114 0 2.5px, transparent 3px),
    radial-gradient(circle at 48% 89%, #3A2114 0 2.5px, transparent 3px),
    radial-gradient(circle at 72% 78%, #3A2114 0 2.5px, transparent 3px),
    radial-gradient(circle at 36% 66%, #3A2114 0 2.2px, transparent 2.7px),
    radial-gradient(circle at 62% 62%, #3A2114 0 2.2px, transparent 2.7px),
    radial-gradient(circle at 80% 92%, #3A2114 0 2.2px, transparent 2.7px);
}

/* ============================================================
   弹层 / 结算
   ============================================================ */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(32, 17, 8, .64);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .24s ease both;
}

.result-card,
.dialog-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  padding: 22px 20px 18px;
  border-radius: 28px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(165deg, #FFFDF8, #FFF1DC);
  border: 2px solid #FFE1B8;
  box-shadow: 0 26px 60px rgba(20, 10, 4, .5), inset 0 1px 0 #fff;
  animation: cardIn .42s cubic-bezier(.2, .9, .3, 1.16) both;
}

.result-card::before {
  content: "";
  position: absolute;
  left: -30px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 181, 95, .26), transparent 68%);
  pointer-events: none;
}
.result-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, .16), transparent 68%);
  pointer-events: none;
}

.result-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #FFE6C4;
  color: #fff;
  background: linear-gradient(180deg, #FFC65C, #FF8A3D);
  box-shadow: 0 7px 16px rgba(240, 105, 27, .36), inset 0 2px 0 rgba(255, 255, 255, .4);
}
.result-icon .mp-icon { width: 27px; height: 27px; }

.result-kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #A98460;
}
.result-title {
  position: relative;
  z-index: 1;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #7A5533;
}
.result-score {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin: 1px 0 4px;
  color: #E9631A;
}
.result-score span { font-size: 19px; font-weight: 900; }
.result-score b {
  font-size: 48px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #FFD9AE;
}

.new-record {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid #FFF1C9;
  background: linear-gradient(180deg, #FFE08A, #FFC24B);
  color: #7A4A00;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .5px;
  box-shadow: 0 3px 8px rgba(240, 170, 20, .3);
}
.new-record .mp-icon { width: 14px; height: 14px; }

.result-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 12px 0 15px;
  padding: 10px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #F5DCC0;
}
.rs-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rs-item em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #A98460;
}
.rs-item b {
  font-size: 15px;
  font-weight: 900;
  color: #5A3A22;
  font-variant-numeric: tabular-nums;
}
.rs-item b span { font-size: 15px; }

.result-card .start-btn {
  height: 52px;
  font-size: 18px;
  letter-spacing: 1.2px;
  border-radius: 18px;
}
.result-card .start-btn .mp-icon { width: 21px; height: 21px; }

.ghost-btn {
  width: 100%;
  height: 42px;
  margin-top: 9px;
  border-radius: 14px;
  border: 1.5px solid #EAC9A0;
  background: rgba(255, 255, 255, .6);
  color: #8A5A33;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .5px;
}
.ghost-btn:active { transform: translateY(2px); background: #FFF6E8; }

.dialog-card {
  max-width: 310px;
  padding: 24px 20px 18px;
}
.dialog-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE0B0, #FFB86B);
  color: #fff;
  border: 2px solid #FFF3E0;
  box-shadow: 0 6px 14px rgba(240, 130, 40, .28);
}
.dialog-icon .mp-icon { width: 25px; height: 25px; }
.dialog-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  color: #4A2C16;
}
.dialog-card p {
  margin: 6px 0 17px;
  font-size: 12px;
  color: #A98460;
  font-weight: 600;
}
.dialog-card .start-btn {
  height: 48px;
  font-size: 17px;
  letter-spacing: 1px;
  border-radius: 17px;
}
.dialog-card .ghost-btn { margin-top: 8px; }

/* ---------- 提示 / 飘字 ---------- */
.toast {
  position: absolute;
  z-index: 45;
  top: calc(env(safe-area-inset-top) + 78px);
  left: 50%;
  max-width: 88%;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(56, 30, 13, .92);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #FFF4E4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.gold { background: linear-gradient(180deg, #C98818, #8A5407); }

.float-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  pointer-events: none;
}
.float-text {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, 0);
  white-space: nowrap;
  font-size: 23px;
  font-weight: 900;
  color: #FFD36B;
  text-shadow: 0 2px 0 #8A4A0A, 0 5px 14px rgba(0, 0, 0, .45);
  animation: floatUp 1s cubic-bezier(.2, .8, .4, 1) forwards;
}
.float-text.bad {
  font-size: 15px;
  color: #FF9A88;
  text-shadow: 0 2px 0 #7A1A0A, 0 4px 10px rgba(0, 0, 0, .4);
}
.float-text.good {
  color: #D8F79B;
  text-shadow: 0 2px 0 #4E7A1D, 0 5px 14px rgba(0, 0, 0, .4);
}
.float-text.gold {
  font-size: 16px;
  color: #FFE08A;
  text-shadow: 0 2px 0 #8A5A07, 0 4px 12px rgba(0, 0, 0, .4);
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(1); }
}
@keyframes orderIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardServed {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(.92); }
}
@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-.6deg); }
  45% { transform: translateX(5px) rotate(.5deg); }
  70% { transform: translateX(-3px); }
}
@keyframes heartsShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  55% { transform: translateX(3px); }
  80% { transform: translateX(-2px); }
}
@keyframes comboPop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes ingHit {
  0% { transform: scale(1); }
  45% { transform: scale(.9); background: #FFF0DC; }
  100% { transform: scale(1); }
}
@keyframes ingWrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); background: #FFE3DC; }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 138, 61, .30), 0 4px 10px rgba(120, 70, 30, .22); }
  50% { box-shadow: 0 0 0 5px rgba(255, 138, 61, .16), 0 4px 12px rgba(120, 70, 30, .25); }
}
@keyframes dangerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .62; }
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   自适应
   ============================================================ */
@media (max-width: 360px) {
  .home-ui { padding-left: 13px; padding-right: 13px; }
  .home-bottom { margin: 0 -13px; padding-left: 15px; padding-right: 15px; }
  .player-name { font-size: 13.5px; }
  .player-avatar { width: 40px; height: 40px; border-radius: 13px; }
  .pa-face { width: 28px; height: 28px; }
  .pa-cap { width: 34px; height: 15px; }
  .coin-pill { padding: 0 9px; }
  .coin-pill b { font-size: 13px; }
  .hud { gap: 6px; }
  .hud-gear { width: 36px; height: 36px; }
  .hud-gear .mp-icon { width: 19px; height: 19px; }
  .goal-card { width: 88%; }
  .goal-gift { right: 10px; width: 36px; height: 36px; }
  .goal-gift .mp-icon { width: 19px; height: 19px; }
  .start-btn { height: 58px; font-size: 19px; }
  .game-hud { gap: 5px; padding-left: 11px; padding-right: 11px; }
  .round-btn { width: 34px; height: 34px; }
  .score-box { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .score-box span { font-size: 8.5px; letter-spacing: 0; }
  .score-box b { font-size: 17px; }
  .hearts { padding: 6px 5px; }
  .hearts .mp-icon { width: 13px; height: 13px; }
  .timer-box { padding: 7px 7px; }
  .timer-box b { font-size: 11px; }
  .order-card { padding: 12px 12px 10px; }
  .order-cup { width: 50px; height: 65px; }
  .speech { font-size: 13px; }
  .speech b { font-size: 14.5px; }
  .step-ing { width: 31px; height: 31px; font-size: 13px; }
  .ing-btn { padding-top: 5px; padding-bottom: 4px; }
  .ing-dot { width: 32px; height: 32px; font-size: 14px; }
  .ing-name { font-size: 10px; }
}

@media (max-height: 720px) {
  .goal-card { padding: 9px 12px 10px; margin-top: 8px; }
  .goal-line { margin: 5px 0 6px; }
  .goal-foot { margin-top: 6px; }
  .home-bottom { padding-top: 14px; }
  .start-btn { height: 56px; font-size: 19px; }
  .home-hint { margin-top: 7px; }
  .order-card { padding: 11px 12px 10px; }
  .recipe-row { margin-top: 9px; padding-top: 7px; padding-bottom: 6px; }
  .patience { margin-top: 8px; }
  .station { padding-top: 9px; }
  .ingredients { gap: 6px; }
  .ing-btn { padding-top: 5px; padding-bottom: 4px; }
  .ing-dot { width: 32px; height: 32px; font-size: 14px; }
}

@media (max-height: 620px) {
  .goal-card { display: none; }
  .order-cup { display: none; }
  .home-hint { display: none; }
  .order-card { max-width: 350px; }
}

@media (min-width: 520px) {
  .app-shell { max-width: 440px; }
  .stage { border-radius: 0; }
}

/* 桌面端预览时给竖屏画面一个干净的展示容器 */
@media (min-width: 700px) and (min-height: 700px) {
  body { padding: 22px; }
  .app-shell {
    max-width: 430px;
    height: calc(100dvh - 44px);
  }
  .stage {
    border-radius: 28px;
    box-shadow:
      0 0 0 1px rgba(255, 214, 160, .14),
      0 34px 100px rgba(0, 0, 0, .68);
  }
}

@media (max-height: 520px) {
  .queue { display: none; }
  .order-cup { display: none; }
  .home-hint { display: none; }
  .goal-card { display: none; }
  .station { padding-top: 8px; }
  .station-head { margin-bottom: 5px; }
  .ing-btn { padding: 4px 1px; }
  .ing-dot { width: 29px; height: 29px; font-size: 13px; }
  .ing-name { font-size: 9.5px; }
  .order-card { padding: 10px 11px 9px; }
  .recipe-row { margin-top: 7px; padding: 6px; }
  .patience { margin-top: 7px; }
}

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