/* =========================================================
   奶茶店经营模拟 · 移动端竖屏实机界面
   视觉：暖橙卡通 / 奶油卡片 / 木质招牌
   ========================================================= */
:root {
  --orange: #FF8A3D;
  --orange-hi: #FFB43C;
  --orange-deep: #F26A1B;
  --orange-dark: #C4510D;
  --cream: #FFF9ED;
  --cream-2: #FFEFD6;
  --cream-3: #FFE2B9;
  --brown: #55331A;
  --brown-2: #7C4A22;
  --brown-3: #9A6A42;
  --muted: #A98A6E;
  --gold: #FFC53D;
  --gold-deep: #E59A10;
  --purple: #9C6BFF;
  --purple-deep: #6E3FD1;
  --pink: #F06487;
  --green: #7BC96F;
  --ink: #3B2515;
  --shadow-card: 0 4px 0 rgba(150, 92, 42, .20), 0 10px 24px rgba(80, 40, 10, .18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #2A1A10;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 0%, #5A361C 0%, #2A1A10 58%, #1B100A 100%);
}

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

/* ---------- 手机画布 ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #F7DFC0;
  isolation: isolate;
  box-shadow: 0 0 80px rgba(0, 0, 0, .45);
}

/* ---------- 场景 ---------- */
.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.scene-art {
  position: absolute;
  top: -13.2%;
  left: 50%;
  height: 146%;
  width: auto;
  max-width: none;
  transform: translateX(-29.3%);
  animation: sceneDrift 26s ease-in-out infinite alternate;
  transform-origin: 50% 40%;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}
@keyframes sceneDrift {
  from { transform: translateX(-29.3%) scale(1.005); }
  to   { transform: translateX(-30.6%) scale(1.045); }
}
.scene-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(255, 239, 196, .16) 0%, transparent 48%),
    radial-gradient(ellipse at 20% 78%, rgba(255, 160, 70, .10) 0%, transparent 45%);
  pointer-events: none;
}
.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(59, 31, 10, .30) 0%, rgba(59, 31, 10, .10) 18%, transparent 34%, transparent 56%, rgba(70, 38, 14, .30) 78%, rgba(52, 26, 9, .58) 100%),
    linear-gradient(90deg, rgba(56, 30, 10, .16) 0%, transparent 18%, transparent 82%, rgba(56, 30, 10, .14) 100%);
  pointer-events: none;
}
.steam {
  position: absolute;
  width: 14px;
  height: 46px;
  border-radius: 50%;
  filter: blur(5px);
  background: rgba(255, 249, 230, .32);
  opacity: 0;
  pointer-events: none;
}
.steam-a { left: 47%; top: 45%; animation: steamRise 5.2s ease-in-out infinite; }
.steam-b { left: 55%; top: 48%; animation: steamRise 6.4s ease-in-out 1.4s infinite; }
@keyframes steamRise {
  0% { opacity: 0; transform: translateY(12px) scale(.8); }
  25% { opacity: .55; }
  70% { opacity: .22; }
  100% { opacity: 0; transform: translateY(-48px) scale(1.35); }
}
.scene-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #FFF4D2;
  border-radius: 50%;
  box-shadow: 0 0 12px 3px rgba(255, 230, 150, .55);
  opacity: 0;
  animation: sparkle 4.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(.4); }
  50% { opacity: .9; transform: scale(1); }
}

/* ---------- 顶部 HUD ---------- */
.hud {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(10px + var(--safe-top)) 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}
.player-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px 10px 5px 5px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 245, .97), rgba(255, 233, 198, .97));
  border: 2px solid rgba(255, 255, 255, .92);
  box-shadow: 0 3px 0 rgba(150, 88, 34, .22), 0 8px 20px rgba(70, 35, 8, .22);
}
.avatar {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #fff;
  background: #FFD9A6;
  box-shadow: 0 2px 0 rgba(140, 80, 30, .25);
}
.avatar-art {
  position: absolute;
  inset: 0;
  background-image: url("images/gen/shop-scene.jpg");
  background-size: 1530% auto;
  background-position: 29% 46.5%;
  background-repeat: no-repeat;
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-gloss {
  position: absolute;
  left: -12%;
  top: -18%;
  width: 68%;
  height: 40%;
  background: rgba(255, 255, 255, .5);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}
.player-info { min-width: 0; }
.player-name {
  max-width: 82px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  color: #6A3D1C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-row {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.level-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #fff;
  background: linear-gradient(180deg, #FFB43C, #F47A1E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 0 rgba(150, 70, 10, .28);
}
.xp-track {
  display: block;
  width: 46px;
  height: 6px;
  border-radius: 6px;
  background: #E9CFAC;
  box-shadow: inset 0 1px 2px rgba(120, 70, 25, .3);
  overflow: hidden;
}
.xp-track i {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #FFD24D, #FF9B2F);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
  transition: width .45s cubic-bezier(.2, .8, .3, 1);
}
.wallet {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  pointer-events: auto;
}
.coin-chip,
.cup-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 253, 245, .97), rgba(255, 233, 198, .97));
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 3px 0 rgba(150, 88, 34, .20), 0 8px 18px rgba(70, 35, 8, .18);
}
.coin-chip b {
  font-size: 13px;
  font-weight: 900;
  color: #6B3B17;
  font-variant-numeric: tabular-nums;
}
.cup-chip { padding: 0 8px; }
.cup-chip b {
  font-size: 12px;
  font-weight: 900;
  color: #8A5A2D;
  font-variant-numeric: tabular-nums;
}
.coin {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #FFF3B0 0 12%, #FFD54A 38%, #F2A20E 72%, #C97A02 100%);
  border: 1.5px solid #E1A019;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), 0 1px 2px rgba(120, 70, 10, .25);
}
.coin::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  border: 1.5px solid rgba(160, 90, 0, .55);
  background: radial-gradient(circle at 35% 28%, #FFF8CC, #FFC21E 70%);
}
.coin-sm { width: 14px; height: 14px; }
.mini-cup {
  position: relative;
  width: 12px;
  height: 16px;
  flex: none;
  clip-path: polygon(6% 0, 94% 0, 80% 100%, 20% 100%);
  background: linear-gradient(100deg, #FFD5A6, #C9834E 55%, #A9683A);
  border-radius: 2px;
}
.mini-cup::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: repeating-radial-gradient(circle at 50% 85%, #4A2A18 0 1px, transparent 1.6px 4px);
  opacity: .65;
}

/* ---------- 首页底部操作区 ---------- */
.home-foot {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 26px 14px calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(63, 32, 11, .14) 34%, rgba(52, 26, 8, .46) 100%);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}
.home-foot > * { pointer-events: auto; }
.phone.is-shift .home-foot {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}
.phone.is-shift .home-foot * { pointer-events: none; }

.today-strip {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #FFF6E3;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2px;
  background: rgba(67, 34, 12, .52);
  border: 1px solid rgba(255, 233, 194, .28);
  box-shadow: 0 3px 10px rgba(40, 18, 4, .22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.today-strip b { font-weight: 900; color: #FFD777; font-variant-numeric: tabular-nums; }
.strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8BE37B;
  box-shadow: 0 0 7px rgba(139, 227, 123, .9);
}
.strip-sep { width: 1px; height: 10px; background: rgba(255, 239, 210, .3); }

/* 主要开始按钮 */
.start-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 76px;
  padding: 7px 13px 7px 8px;
  border-radius: 24px;
  text-align: left;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, transparent 30%),
    linear-gradient(180deg, #FFB43C 0%, #FF8A3D 52%, #F26A1B 100%);
  border: 2px solid #FFD9A0;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -4px 0 rgba(176, 70, 8, .30),
    0 7px 0 #BF4F0C,
    0 14px 26px rgba(90, 38, 4, .38);
  transition: transform .08s ease, box-shadow .08s ease;
}
.start-btn::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  right: 14px;
  height: 34%;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), transparent);
  pointer-events: none;
}
.start-btn:active {
  transform: translateY(4px) scale(.994);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 0 rgba(176, 70, 8, .3),
    0 3px 0 #BF4F0C,
    0 7px 14px rgba(90, 38, 4, .30);
}
.btn-cup {
  position: relative;
  width: 62px;
  height: 62px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 250, 226, .98), rgba(255, 225, 168, .95));
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 rgba(160, 74, 14, .30);
  z-index: 1;
}
.btn-copy { flex: 1; min-width: 0; position: relative; z-index: 1; }
.btn-copy b {
  display: block;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(159, 62, 5, .5);
}
.btn-copy small {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #FFF1D6;
  opacity: .94;
  text-shadow: 0 1px 0 rgba(159, 62, 5, .35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-arrow {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(125, 45, 0, .18);
  border: 1px solid rgba(255, 240, 205, .35);
  z-index: 1;
}
.btn-arrow .mp-icon { width: 22px; height: 22px; color: #FFF2D5; }

/* 升级按钮 */
.upgrade-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 57px;
  padding: 6px 12px 6px 7px;
  border-radius: 19px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 40%),
    linear-gradient(180deg, #B98BFF 0%, #9C6BFF 52%, #7C48E8 100%);
  border: 2px solid #DCC8FF;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 0 rgba(78, 34, 160, .30),
    0 5px 0 #6134B8,
    0 10px 18px rgba(55, 24, 100, .30);
  transition: transform .08s ease, box-shadow .08s ease;
}
.upgrade-btn:active {
  transform: translateY(3px) scale(.995);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .42),
    inset 0 -2px 0 rgba(78, 34, 160, .3),
    0 2px 0 #6134B8,
    0 6px 10px rgba(55, 24, 100, .26);
}
.upgrade-btn.is-afford { animation: affordGlow 2.4s ease-in-out infinite; }
.upgrade-btn:disabled { opacity: .72; filter: saturate(.6); }
@keyframes affordGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.09); }
}
.upgrade-icon {
  width: 43px;
  height: 43px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .32);
}
.upgrade-icon .mp-icon { width: 25px; height: 25px; color: #FFF4DA; }
.upgrade-copy { flex: 1; min-width: 0; }
.upgrade-copy b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(70, 30, 130, .5);
}
.upgrade-copy small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: #F3E9FF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upgrade-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(58, 24, 112, .28);
  border: 1px solid rgba(255, 255, 255, .22);
}
.upgrade-cost b { font-size: 12px; font-weight: 900; color: #FFE6A3; font-variant-numeric: tabular-nums; }

/* ---------- 杯子（全部纯 CSS 绘制） ---------- */
.cup-art {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 58px;
  flex: none;
  filter: drop-shadow(0 3px 3px rgba(80, 40, 10, .20));
}
.cup-art .straw {
  position: absolute;
  z-index: 5;
  top: -4px;
  right: 30%;
  width: 5px;
  height: 25px;
  border-radius: 4px;
  background: linear-gradient(90deg, #FFB072, #EF6C1C 55%, #D9550F);
  border: 1px solid rgba(130, 60, 15, .35);
  transform: rotate(13deg);
}
.cup-art .lid {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 4px;
  right: 4px;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #FFFDF6, #FFE3B9);
  border: 1.5px solid rgba(120, 75, 35, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.cup-art .body {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  top: 18px;
  bottom: 2px;
  overflow: hidden;
  clip-path: polygon(4% 0, 96% 0, 83% 100%, 17% 100%);
  background: linear-gradient(100deg, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, .18) 46%, rgba(255, 255, 255, .46) 100%);
}
.cup-art .liquid {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 22%;
  bottom: 1px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(180deg, var(--c1, #E2B078) 0%, var(--c2, #A9663A) 100%);
  box-shadow: inset 0 5px 7px rgba(255, 255, 255, .22);
}
.cup-art .pearls {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 3%;
  height: 34%;
  z-index: 2;
}
.cup-art .pearls .p {
  position: absolute;
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #9A6A48 0%, var(--pearl, #3B2418) 48%, #1D0F07 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.cup-art .p1 { left: 4%; bottom: 6%; }
.cup-art .p2 { left: 24%; bottom: 0%; }
.cup-art .p3 { left: 45%; bottom: 8%; }
.cup-art .p4 { left: 65%; bottom: 1%; }
.cup-art .p5 { left: 83%; bottom: 12%; }
.cup-art .p1, .cup-art .p3, .cup-art .p5 { width: 17%; }
.cup-art .shine {
  position: absolute;
  z-index: 3;
  left: 15%;
  top: 7%;
  width: 5px;
  height: 44%;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .15));
  transform: rotate(4deg);
}
.cup-art.cup-lg { width: 50px; height: 60px; }
.cup-art.cup-sm { width: 38px; height: 48px; }
.cup-art.no-pearls .pearls { display: none; }

/* 配色 */
.cup-pearl { --c1: #E8BC85; --c2: #A9663A; --pearl: #3B2418; }
.cup-strawberry { --c1: #FFC2CF; --c2: #EF6388; --pearl: #F8D8DF; }
.cup-matcha { --c1: #D6E8AC; --c2: #7FAE52; --pearl: #496A2C; }
.cup-orange { --c1: #FFD57E; --c2: #FF9636; --pearl: #FFB740; }

/* ---------- 营业中 ---------- */
.shift {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.shift-dim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(44, 23, 8, .20) 0%, rgba(44, 23, 8, .06) 34%, rgba(44, 23, 8, .34) 70%, rgba(44, 23, 8, .52) 100%);
  pointer-events: none;
}
.shift-top {
  position: absolute;
  z-index: 5;
  top: calc(64px + var(--safe-top));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px 0 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 253, 245, .98), rgba(255, 234, 202, .98));
  border: 2px solid #fff;
  box-shadow: 0 3px 0 rgba(150, 88, 34, .22), 0 8px 18px rgba(60, 28, 6, .22);
}
.timer-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(180deg, #FFB43C, #F47A1E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.timer-icon .mp-icon { width: 17px; height: 17px; color: #fff; }
.timer-num { display: flex; align-items: baseline; gap: 1px; }
.timer-num b {
  font-size: 19px;
  line-height: 1;
  font-weight: 900;
  color: #6A3A16;
  font-variant-numeric: tabular-nums;
}
.timer-num small { font-size: 9px; font-weight: 800; color: #A47A52; }
.time-track {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: rgba(160, 110, 60, .22);
  overflow: hidden;
}
.time-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #FFD04D, #FF8A3D);
  transform-origin: left center;
  transition: width .12s linear;
}
.timer-pill.is-low .timer-num b { color: #E23B2E; animation: lowPulse .7s ease-in-out infinite; }
.timer-pill.is-low .time-track i { background: linear-gradient(90deg, #FF8B5E, #E23B2E); }
@keyframes lowPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.combo-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 0 10px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(180deg, #FFB43C, #F26A1B);
  border: 2px solid #FFE1AC;
  box-shadow: 0 3px 0 rgba(160, 66, 8, .35), 0 7px 14px rgba(60, 28, 6, .22);
}
.combo-pill .mp-icon { width: 17px; height: 17px; color: #FFF0C2; }
.combo-pill b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.combo-pill small { font-size: 9px; font-weight: 700; opacity: .9; }
.combo-pill.bump { animation: comboBump .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes comboBump {
  0% { transform: scale(1); }
  55% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.end-shift {
  margin-left: auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #FFF1D6;
  background: rgba(62, 32, 11, .50);
  border: 1px solid rgba(255, 235, 200, .30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.end-shift:active { transform: scale(.96); background: rgba(62, 32, 11, .68); }

/* 顾客与订单 */
.customer-stage {
  position: absolute;
  z-index: 4;
  left: 15px;
  right: 15px;
  bottom: calc(283px + var(--safe-bottom));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
}
.customer {
  position: relative;
  width: 94px;
  height: 142px;
  flex: none;
  filter: drop-shadow(0 10px 10px rgba(55, 28, 8, .30));
  animation: custBob 2.8s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes custBob {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-5px) rotate(.4deg); }
}
.customer.cust-in {
  animation: custIn .32s cubic-bezier(.2, 1.3, .4, 1), custBob 2.8s ease-in-out .32s infinite;
}
@keyframes custIn {
  0% { opacity: 0; transform: translateY(16px) scale(.86); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.customer.is-happy {
  animation: happyHop .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes happyHop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-13px) scale(1.04) rotate(-2deg); }
  70% { transform: translateY(0) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}
.cust-head {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 18px;
  width: 74px;
  height: 72px;
  border-radius: 47% 47% 44% 44%;
  background: linear-gradient(180deg, #FFE7CD 0%, #F7C99F 100%);
  border: 3px solid #7B4A29;
  box-shadow: inset -5px -6px 0 rgba(205, 140, 95, .22), inset 4px 5px 0 rgba(255, 255, 255, .35);
}
.cust-hair {
  position: absolute;
  z-index: 3;
  left: 5px;
  top: 4px;
  width: 84px;
  height: 42px;
  border-radius: 44px 44px 13px 13px;
  background:
    radial-gradient(circle at 26% 86%, transparent 0 10px, var(--hair, #5A3621) 11px),
    radial-gradient(circle at 74% 86%, transparent 0 10px, var(--hair, #5A3621) 11px),
    linear-gradient(180deg, var(--hair, #5A3621), var(--hair2, #3E2415));
  border: 3px solid #522F18;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .16);
}
.cust-hair::before,
.cust-hair::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 28px;
  width: 18px;
  height: 34px;
  border-radius: 10px 10px 12px 12px;
  background: var(--hair, #5A3621);
  border: 3px solid #522F18;
}
.cust-hair::before { left: -5px; transform: rotate(5deg); }
.cust-hair::after { right: -5px; transform: rotate(-5deg); }
.cust-eye {
  position: absolute;
  top: 32px;
  width: 8px;
  height: 10px;
  border-radius: 50%;
  background: #3A2113;
  animation: blink 4.6s infinite;
}
.cust-eye i {
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: .9;
}
.eye-l { left: 17px; }
.eye-r { right: 17px; }
@keyframes blink {
  0%, 44%, 48%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(.12); }
}
.cust-blush {
  position: absolute;
  top: 44px;
  width: 12px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245, 126, 126, .48);
  filter: blur(1px);
}
.blush-l { left: 6px; }
.blush-r { right: 6px; }
.cust-mouth {
  position: absolute;
  left: 31px;
  top: 52px;
  width: 11px;
  height: 7px;
  border-bottom: 2.5px solid #8B4B2A;
  border-radius: 0 0 8px 8px;
}
.cust-body {
  position: absolute;
  z-index: 1;
  left: 9px;
  bottom: 0;
  width: 76px;
  height: 62px;
  border-radius: 26px 26px 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 40%),
    linear-gradient(180deg, var(--shirt, #7FB6E6), var(--shirt2, #4E89C4));
  border: 3px solid #6D4226;
  box-shadow: inset 0 -6px 0 rgba(50, 25, 8, .12);
}
.cust-collar {
  position: absolute;
  left: 50%;
  top: -1px;
  width: 16px;
  height: 12px;
  transform: translateX(-50%);
  background: #FFF9EA;
  border: 2px solid #6D4226;
  border-radius: 0 0 9px 9px;
}
.cust-arm {
  position: absolute;
  top: 24px;
  width: 15px;
  height: 30px;
  border-radius: 9px;
  background: var(--shirt2, #4E89C4);
  border: 3px solid #6D4226;
}
.cust-arm.arm-l { left: -9px; transform: rotate(8deg); }
.cust-arm.arm-r { right: -9px; transform: rotate(-8deg); }
.cust-label {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  color: #FFF6E4;
  background: rgba(76, 40, 14, .72);
  border: 1px solid rgba(255, 236, 203, .25);
  white-space: nowrap;
}

.order-bubble {
  position: relative;
  flex: none;
  width: 100%;
  padding: 9px 11px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFDF6 0%, #FFF0D6 100%);
  border: 3px solid #fff;
  box-shadow:
    0 5px 0 rgba(150, 90, 35, .22),
    0 14px 28px rgba(60, 30, 8, .26),
    inset 0 0 0 1px rgba(240, 200, 150, .35);
  animation: bubblePop .34s cubic-bezier(.2, 1.45, .4, 1);
}
@keyframes bubblePop {
  0% { opacity: 0; transform: translateY(8px) scale(.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.order-bubble.bubble-pop {
  animation: bubblePop2 .34s cubic-bezier(.2, 1.45, .4, 1);
}
@keyframes bubblePop2 {
  0% { opacity: .2; transform: translateY(9px) scale(.9); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.order-kicker {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #B37B45;
}
.kicker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FF8A3D;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, .16);
}
.order-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}
.order-cup { flex: none; width: 42px; height: 52px; display: flex; align-items: center; justify-content: center; }
.order-cup .cup-art { width: 42px; height: 52px; }
.order-copy { flex: 1; min-width: 0; }
.order-copy b {
  display: block;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 900;
  color: #5B3317;
  white-space: nowrap;
}
.order-copy small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 600;
  color: #A98663;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-price {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  color: #B24A08;
  background: #FFE3B0;
  border: 1px solid #FFD08A;
  white-space: nowrap;
}
.order-tail {
  position: absolute;
  left: 38px;
  bottom: -10px;
  width: 17px;
  height: 17px;
  background: #FFF3DD;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  border-radius: 0 0 5px 0;
}

/* 调饮台 */
.sheet {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 15px calc(12px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .8), transparent 38%),
    repeating-linear-gradient(92deg, rgba(203, 152, 98, .055) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, #FFFBF2 0%, #FFF0D6 58%, #FFE6C2 100%);
  border-top: 3px solid #fff;
  box-shadow:
    0 -5px 0 rgba(170, 100, 40, .16),
    0 -16px 38px rgba(55, 28, 8, .30);
  animation: sheetUp .38s cubic-bezier(.18, .9, .32, 1);
}
@keyframes sheetUp {
  0% { transform: translateY(46%); opacity: .4; }
  100% { transform: translateY(0); opacity: 1; }
}
.sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 7px;
  border-radius: 5px;
  background: #E7C9A0;
  box-shadow: inset 0 1px 1px rgba(140, 90, 40, .22);
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sheet-title b {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 900;
  color: #593216;
  letter-spacing: .5px;
}
.sheet-title small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: #A7845F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-earn {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 4px 9px;
  border-radius: 10px;
  background: #FFE2B0;
  border: 1px solid #FFD08A;
}
.session-earn span { font-size: 9px; font-weight: 700; color: #A76B25; }
.session-earn b { font-size: 15px; font-weight: 900; color: #C24F05; font-variant-numeric: tabular-nums; }

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.recipe {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 80px;
  padding: 7px 8px 7px 7px;
  border-radius: 17px;
  text-align: left;
  background: linear-gradient(180deg, #FFFFFF, #FFF8EC);
  border: 2px solid #EFDDC4;
  box-shadow:
    0 4px 0 #E5C9A4,
    0 8px 14px rgba(140, 80, 30, .10),
    inset 0 1px 0 #fff;
  transition: transform .08s ease, box-shadow .08s ease, border-color .15s ease;
  overflow: hidden;
}
.recipe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 14% 50%, var(--tint, rgba(255, 180, 90, .16)), transparent 55%);
  pointer-events: none;
}
.recipe:active {
  transform: translateY(3px) scale(.99);
  box-shadow: 0 1px 0 #E5C9A4, 0 3px 8px rgba(140, 80, 30, .10);
  border-color: #FFCD8C;
}
.recipe .recipe-cup { flex: none; width: 40px; height: 50px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.recipe .recipe-cup .cup-art { width: 40px; height: 50px; }
.recipe-copy { flex: 1; min-width: 0; position: relative; z-index: 1; }
.recipe-copy b {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
  color: #573116;
  white-space: nowrap;
}
.recipe-copy small {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: #B08C68;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipe-price {
  position: absolute;
  right: 7px;
  bottom: 5px;
  z-index: 2;
  font-size: 9px;
  font-weight: 900;
  color: #D16716;
  background: #FFF0D2;
  border-radius: 6px;
  padding: 1px 5px;
}
.recipe.is-right { animation: rightFlash .35s ease; border-color: #8FD37E; }
.recipe.is-wrong { animation: wrongFlash .35s ease; border-color: #F19696; }
@keyframes rightFlash {
  0% { background: #E7FADF; transform: scale(1); }
  50% { background: #CFF5C1; transform: scale(1.03); }
  100% { background: #FFFFFF; transform: scale(1); }
}
@keyframes wrongFlash {
  0% { background: #FFE2E2; transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { background: #FFFFFF; transform: translateX(0); }
}
.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: #9B7752;
}
.combo-hint { display: flex; align-items: center; gap: 3px; }
.combo-hint .mp-icon { width: 13px; height: 13px; color: #F4802C; }
.sold-hint b { color: #C05A12; font-size: 11px; font-weight: 900; }

/* ---------- 结算 ---------- */
.result-mask {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(46, 24, 9, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.result-card {
  width: 100%;
  max-width: 330px;
  padding: 20px 18px 17px;
  border-radius: 27px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, #FFFDF4 0%, transparent 42%),
    linear-gradient(180deg, #FFFDF7 0%, #FFF0D8 72%, #FFE5BE 100%);
  border: 3px solid #fff;
  box-shadow:
    0 8px 0 rgba(150, 88, 34, .24),
    0 24px 54px rgba(35, 16, 4, .45),
    inset 0 0 0 1px rgba(240, 200, 150, .4);
  animation: resultPop .38s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes resultPop {
  0% { opacity: 0; transform: scale(.86) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.result-badge {
  width: 62px;
  height: 62px;
  margin: -4px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #FFD35E, #FF9A26);
  border: 2px solid #FFF0C4;
  box-shadow: 0 4px 0 #D87910, 0 8px 16px rgba(170, 90, 10, .32);
  transform: rotate(-3deg);
}
.result-badge .mp-icon { width: 36px; height: 36px; color: #FFF8DF; filter: drop-shadow(0 2px 0 rgba(150, 70, 0, .35)); }
.result-card h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 900;
  color: #5A3216;
  letter-spacing: 1px;
}
.result-sub {
  margin: 4px 0 14px;
  font-size: 11px;
  font-weight: 600;
  color: #A47D56;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(238, 209, 170, .8);
}
.result-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.result-stats b {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
  color: #C4590B;
  font-variant-numeric: tabular-nums;
}
.result-stats span { font-size: 9px; font-weight: 700; color: #A98663; }
.again-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border-radius: 17px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(180deg, #FFB43C, #FF8A3D 55%, #F26A1B);
  border: 2px solid #FFDCA6;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 5px 0 #C4510D, 0 10px 18px rgba(150, 60, 0, .28);
  text-shadow: 0 1.5px 0 rgba(160, 62, 5, .45);
}
.again-btn .mp-icon { width: 21px; height: 21px; }
.again-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 2px 0 #C4510D; }
.back-btn {
  width: 100%;
  height: 39px;
  margin-top: 7px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 800;
  color: #8F6642;
  background: rgba(255, 255, 255, .52);
  border: 1.5px solid #EBD3B4;
}
.back-btn:active { background: rgba(255, 240, 214, .9); }

/* ---------- 提示与漂浮数字 ---------- */
.toast {
  position: absolute;
  z-index: 90;
  left: 50%;
  bottom: 27%;
  transform: translate(-50%, 10px);
  max-width: 84%;
  padding: 9px 16px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  color: #FFF8E8;
  text-align: center;
  background: rgba(55, 29, 10, .88);
  border: 1px solid rgba(255, 230, 190, .3);
  box-shadow: 0 8px 20px rgba(30, 12, 2, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.float-layer {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}
.float-gain {
  position: absolute;
  font-size: 22px;
  font-weight: 900;
  color: #FFD45A;
  text-shadow: 0 2px 0 #A9500B, 0 0 12px rgba(255, 180, 60, .55);
  animation: floatUp 1s ease-out forwards;
  white-space: nowrap;
}
.float-gain.penalty { color: #FF7B6B; font-size: 17px; text-shadow: 0 2px 0 #7A1E12; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(1); }
}
.phone.shake { animation: screenShake .32s ease; }
@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-6px); }
  36% { transform: translateX(6px); }
  54% { transform: translateX(-4px); }
  72% { transform: translateX(4px); }
}
.phone.is-shift .hud .player-card { transform: scale(.94); transform-origin: top left; transition: transform .25s ease; }
.phone.is-shift .hud .wallet { transform: scale(.94); transform-origin: top right; transition: transform .25s ease; }

/* ---------- 响应式 ---------- */
@media (max-height: 700px) {
  .start-btn { min-height: 68px; border-radius: 21px; }
  .btn-cup { width: 54px; height: 54px; }
  .btn-copy b { font-size: 19px; }
  .upgrade-btn { min-height: 51px; }
  .upgrade-icon { width: 38px; height: 38px; }
  .recipe { min-height: 70px; }
  .recipe .recipe-cup { width: 34px; height: 44px; }
  .recipe .recipe-cup .cup-art { width: 34px; height: 44px; }
  .recipe-copy b { font-size: 12.5px; }
  .sheet { padding-top: 6px; }
  .customer { width: 82px; height: 124px; transform: scale(.92); transform-origin: 50% 100%; }
  .cust-head { left: 8px; width: 66px; height: 64px; }
  .cust-hair { width: 76px; height: 38px; }
  .cust-eye { top: 28px; }
  .eye-l { left: 14px; }
  .eye-r { right: 14px; }
  .cust-body { width: 68px; height: 54px; }
  .cust-mouth { left: 27px; top: 45px; }
  .order-bubble { padding: 8px 10px; }
  .order-copy b { font-size: 14px; }
  .order-cup, .order-cup .cup-art { width: 36px; height: 46px; }
  .shift-top { top: calc(60px + var(--safe-top)); }
  .customer-stage { bottom: calc(258px + var(--safe-bottom)); }
}
@media (max-width: 350px) {
  .player-name { max-width: 58px; }
  .xp-track { width: 34px; }
  .coin-chip { padding: 0 7px; }
  .coin-chip b { font-size: 12px; }
  .cup-chip { display: none; }
  .btn-copy small { font-size: 9.5px; }
  .order-copy b { font-size: 14px; }
  .recipe-copy b { font-size: 12.5px; }
  .recipe-copy small { display: none; }
}
@media (min-width: 520px) {
  body { padding: 0; }
  .phone { border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
