/* 喵茶铺 —— 经营奶茶店 H5 游戏
   上下操作模式（竖屏）：场景在上，订单/原料在下。卡通暖橙主题，主色 #FF8A3D */

:root {
  --orange: #FF8A3D;
  --orange-2: #FFA45B;
  --orange-deep: #E96A1C;
  --cream: #FFF9F2;
  --cream-2: #FFF2E1;
  --ink: #3E2B22;
  --ink-2: #6E5647;
  --muted: #A48B7A;
  --line: #F2E2D2;
  --card: #FFFFFF;
  --green: #63C174;
  --red: #FF6B5E;
  --yellow: #FFC94D;
  --shadow: 0 10px 24px rgba(214, 132, 74, 0.13);
  --shadow-sm: 0 4px 10px rgba(196, 128, 72, 0.10);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 600px at 18% -10%, #FFE2C4 0%, rgba(255, 226, 196, 0) 60%),
    radial-gradient(700px 500px at 100% 110%, #FFE9D6 0%, rgba(255, 233, 214, 0) 65%),
    #F7E7D6;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100vh;
  height: 100dvh;
  padding: calc(8px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    radial-gradient(320px 200px at 90% 0%, rgba(255, 176, 106, 0.18), transparent 70%),
    linear-gradient(175deg, #FFF6EA 0%, #FFF9F3 46%, #FFF4E7 100%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.game {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel {
  flex: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: visible;
}

@media (min-width: 900px) {
  body { padding: 22px 0; }
  .app {
    height: min(calc(100dvh - 44px), 900px);
    padding: 10px 16px 14px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 40px 90px rgba(122, 71, 33, 0.22), 0 6px 20px rgba(122, 71, 33, 0.10);
  }
}

/* ---------------- HUD ---------------- */

.hud {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px;
  min-height: 34px;
}

.player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #FFE6CC, #FFD3A8);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(196, 120, 60, 0.18);
}

.avatar svg, .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.who b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.pill {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  min-width: 0;
}

.pill .mp-icon { width: 14px; height: 14px; }
.pill.coin .mp-icon { color: #F2A11F; }
.pill.coin b { color: #A45A00; }
.pill.rep .mp-icon { color: #FF7C6B; }
.pill.rep b { color: #C4493A; }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: #B07A50;
  transition: transform 0.12s ease;
}

.icon-btn:active { transform: scale(0.9); }
.icon-btn .mp-icon { width: 16px; height: 16px; }

/* ---------------- 店内场景 ---------------- */

.stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 200px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140px 100px at 78% 12%, rgba(255, 255, 255, 0.65), transparent 72%),
    linear-gradient(180deg, #FFE7C9 0%, #FFD9B2 52%, #F9C28B 100%);
}

.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  opacity: 0.75;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 78%);
}

.wall::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  height: 2px;
  background: rgba(190, 120, 60, 0.12);
  box-shadow: 0 -34px 0 rgba(190, 120, 60, 0.08);
}

.wall-dots {
  position: absolute;
  left: 18px;
  bottom: 86px;
  width: 64px;
  height: 22px;
  background:
    radial-gradient(circle at 8px 11px, rgba(255, 255, 255, 0.65) 0 5px, transparent 5.5px),
    radial-gradient(circle at 30px 11px, rgba(255, 255, 255, 0.5) 0 3px, transparent 3.5px),
    radial-gradient(circle at 50px 11px, rgba(255, 255, 255, 0.6) 0 4px, transparent 4.5px);
  opacity: 0.9;
}

.lamp {
  position: absolute;
  top: 0;
  width: 2px;
  height: 26px;
  background: rgba(160, 96, 48, 0.35);
}

.lamp::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 20px;
  height: 14px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #FFF5DF, #FFCE8A);
  border-radius: 4px 4px 10px 10px;
  box-shadow: 0 6px 18px rgba(255, 190, 100, 0.6);
}

.lamp-a { left: 47%; }
.lamp-b { left: 63%; height: 20px; }

.stage-head {
  position: absolute;
  top: 8px;
  left: 9px;
  right: 9px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.goal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  font-size: 9.5px;
  font-weight: 800;
  color: #8C5D33;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.goal-bar {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: #F5E3D0;
  overflow: hidden;
}

.goal-bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFC266, #FF8A3D);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.goal b {
  font-size: 9.5px;
  color: #B06A2C;
  font-variant-numeric: tabular-nums;
}

.combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF9A4A, #FF6F2B);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(255, 120, 45, 0.35);
  animation: comboPop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.combo .mp-icon { width: 13px; height: 13px; }
.combo b { font-size: 11px; }

.sign {
  position: absolute;
  top: 38px;
  left: 12px;
  z-index: 2;
  padding: 3px 8px 4px;
  border-radius: 10px;
  border: 2px solid #E8A768;
  background: linear-gradient(180deg, #FFF8EC, #FFE6C8);
  color: #B26C2E;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-indent: 2.5px;
  box-shadow: 0 4px 0 rgba(202, 132, 66, 0.18);
  transform: rotate(-4deg);
}

.menu-board {
  position: absolute;
  right: 12px;
  top: 120px;
  left: auto;
  z-index: 2;
  width: 92px;
  padding: 5px 6px 6px;
  border-radius: 9px;
  border: 2px solid #DFA161;
  background: linear-gradient(180deg, #FFF9EE, #FFE9CD);
  box-shadow: 0 4px 0 rgba(190, 120, 60, 0.14);
  transform: rotate(2deg);
  display: block;
}

.menu-board b {
  display: block;
  padding-bottom: 2px;
  margin-bottom: 2px;
  border-bottom: 1px dashed #E7BE92;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #9C5A21;
  text-align: center;
}

.menu-board span {
  display: block;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #A5764F;
}

.jar {
  width: 10px;
  height: 15px;
  border-radius: 3px 3px 4px 4px;
  border: 1px solid #E5B078;
  background: linear-gradient(180deg, #FFFDF8, #FFDDAA);
  box-shadow: inset 0 -5px 0 rgba(255, 179, 100, 0.55);
}

.jar.j1 { height: 12px; background: linear-gradient(180deg, #FFFDF8, #FFC9C9); }
.jar.j2 { height: 18px; }
.jar.j3 { height: 13px; background: linear-gradient(180deg, #FFFDF8, #CDE8B4); }
.jar.j4 { height: 16px; background: linear-gradient(180deg, #FFFDF8, #D6C7F2); }

/* 顾客对话气泡 */
.bubble {
  position: absolute;
  top: 44px;
  right: 10px;
  z-index: 6;
  width: max-content;
  max-width: 56%;
  min-width: 116px;
  padding: 7px 10px 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(153, 91, 41, 0.16);
  text-align: center;
  animation: bubblePop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bubble::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: 13px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #fff;
  transform: rotate(45deg);
}

.bubble b {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #4B2F1F;
  line-height: 1.25;
}

.bubble-need {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.bubble-need i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(120, 80, 50, 0.12);
}

/* 短腿猫顾客 */
.cat-wrap {
  position: absolute;
  left: clamp(10px, 5%, 28px);
  bottom: 30px;
  z-index: 3;
  width: clamp(136px, 40vw, 200px);
  filter: drop-shadow(0 10px 12px rgba(137, 74, 30, 0.18));
  transform-origin: 50% 100%;
}

.cat-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: catIdle 3.6s ease-in-out infinite;
}

.cat-wrap.sad svg { animation: catSad 0.7s ease; }
.cat-wrap.happy svg { animation: catHop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1); }

/* 吧台 */
.counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  z-index: 4;
}

.counter-top {
  position: absolute;
  top: 0;
  left: -2px;
  right: -2px;
  height: 13px;
  border-radius: 9px 9px 2px 2px;
  background: linear-gradient(180deg, #FFF3DF 0%, #F0D0A7 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 6px rgba(140, 80, 35, 0.14);
}

.counter-body {
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #DA9155 0%, #C4763D 100%);
  overflow: hidden;
}

.counter-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 34px);
}

.counter-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(90, 45, 15, 0.16);
}

.counter-line.l1 { top: 12px; }
.counter-line.l2 { top: 25px; }

.counter-cups {
  position: absolute;
  right: 72px;
  bottom: 13px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  z-index: 1;
}

.counter-cups i {
  display: block;
  width: 8px;
  height: 12px;
  border-radius: 2px 2px 3px 3px;
  background: linear-gradient(180deg, #FFF8EA 0 38%, #C98A54 38% 100%);
  border: 1px solid rgba(120, 70, 30, 0.2);
}

.counter-cups i:nth-child(2) { height: 9px; }
.counter-cups i:nth-child(3) { height: 14px; }

.counter-plant {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 26px;
  height: 28px;
  z-index: 1;
}

.counter-plant::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 11px;
  border-radius: 3px 3px 5px 5px;
  background: linear-gradient(180deg, #FFD9A9, #D98B4C);
}

.counter-plant i {
  position: absolute;
  width: 10px;
  height: 16px;
  border-radius: 8px 2px 8px 2px;
  background: linear-gradient(150deg, #9BD17D, #5EA45B);
  transform-origin: bottom center;
}

.counter-plant i:nth-child(1) { left: 7px; bottom: 9px; transform: rotate(-24deg); }
.counter-plant i:nth-child(2) { left: 11px; bottom: 10px; transform: rotate(4deg); height: 19px; }
.counter-plant i:nth-child(3) { left: 15px; bottom: 9px; transform: rotate(26deg) scaleX(-1); }

.counter-reg {
  position: absolute;
  left: 14px;
  bottom: 12px;
  width: 26px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, #FFF1DC, #EBC49A);
  box-shadow: inset 0 -5px 0 rgba(180, 120, 60, 0.15);
  z-index: 1;
}

.counter-reg::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 5px;
  border-radius: 2px;
  background: #C7E3C0;
  box-shadow: inset 0 0 0 1px rgba(90, 130, 80, 0.25);
}

/* ---------------- 工作台 ---------------- */

.bench {
  position: relative;
  flex: none;
  display: flex;
  gap: 10px;
  min-height: 120px;
  padding: 10px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF9 100%);
  border: 1px solid #FFF0E1;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bench::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -46px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 214, 0.9), rgba(255, 247, 236, 0) 68%);
  pointer-events: none;
}

.bench.shake { animation: shake 0.34s ease; }

.cup-col {
  position: relative;
  z-index: 1;
  flex: none;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.cup {
  position: relative;
  width: 58px;
  height: 89px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.cup.served { animation: cupServe 0.62s cubic-bezier(0.34, 1.2, 0.5, 1); }

.straw {
  position: absolute;
  top: -6px;
  left: 32px;
  width: 8px;
  height: 35px;
  border-radius: 5px;
  background: linear-gradient(90deg, #FF9848, #FFC48F 60%, #F58A35);
  border: 1px solid #EF8B3E;
  transform: rotate(10deg);
  z-index: 2;
}

.cup-lid {
  position: absolute;
  top: 0;
  left: -2px;
  right: -2px;
  height: 11px;
  border-radius: 7px;
  background: linear-gradient(180deg, #FFD9A8, #F4B474);
  border: 1.5px solid #E8A968;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  z-index: 3;
}

.cup-body {
  position: absolute;
  top: 8px;
  left: 3px;
  right: 3px;
  bottom: 0;
  border-radius: 6px 6px 17px 17px;
  border: 2px solid #E9D5C0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 248, 238, 0.55));
  overflow: hidden;
  box-shadow:
    inset 2px 0 0 rgba(255, 255, 255, 0.8),
    inset -2px 0 0 rgba(210, 175, 140, 0.22),
    0 6px 12px rgba(184, 124, 72, 0.13);
}

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

.layer {
  width: 100%;
  flex: none;
  position: relative;
  animation: layerIn 0.34s cubic-bezier(0.2, 1.35, 0.4, 1);
}

.layer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.cup-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #C6AE99;
  letter-spacing: 1px;
}

.cup-shine {
  position: absolute;
  top: 6px;
  left: 7px;
  width: 6px;
  height: 58%;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.cup-count {
  font-size: 10px;
  font-weight: 800;
  color: #97715A;
  background: #FFF3E4;
  border-radius: 999px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}

.order {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 1px;
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #BC9F89;
}

.price {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF0DE;
  color: #E9741E;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.order-name {
  font-size: 17.5px;
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patience {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: #F5E8D9;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(170, 120, 70, 0.12);
}

.patience i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  transform-origin: left center;
  background: linear-gradient(90deg, #8ADB96, #4FBE6B);
  transition: background 0.25s ease;
}

.patience.warn i { background: linear-gradient(90deg, #FFCB5C, #FFA62B); }
.patience.danger i { background: linear-gradient(90deg, #FF9C86, #FF5C4D); }

.needs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.need {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2.5px 7px 2.5px 4px;
  border-radius: 999px;
  background: #FFF8EF;
  border: 1px solid #F2E2D2;
  color: #7B5B45;
  font-size: 10px;
  font-weight: 800;
  transition: background 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.need .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, #ccc);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.18);
}

.need.done {
  background: #EAF8EC;
  border-color: #C6EACB;
  color: #5E9767;
  opacity: 0.82;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.hint {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #A98B75;
  line-height: 1.2;
  text-align: center;
  min-height: 16px;
}

.hint .mp-icon { width: 14px; height: 14px; color: #FF9A55; }

/* ---------------- 原料 ---------------- */

.ingredients {
  flex: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 56px;
  gap: 5px;
}

.ing {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 13px;
  border: 1px solid #F0DFCE;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F1 100%);
  box-shadow: 0 3px 0 #F1DCC5, 0 6px 10px rgba(200, 140, 80, 0.07);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
  touch-action: manipulation;
  user-select: none;
}

.ing:active,
.ing.pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #F1DCC5, 0 3px 6px rgba(200, 140, 80, 0.08);
  background: #FFF2E2;
}

.ing.used {
  opacity: 0.42;
  pointer-events: none;
}

.ing .blob {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.75), transparent 52%),
    linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(110, 70, 35, 0.12);
}

.ing .blob.boba::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 32%, rgba(35, 18, 8, 0.55) 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 68% 38%, rgba(35, 18, 8, 0.45) 0 2.3px, transparent 2.8px),
    radial-gradient(circle at 46% 70%, rgba(35, 18, 8, 0.5) 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 76% 72%, rgba(35, 18, 8, 0.38) 0 2px, transparent 2.6px);
}

.ing span {
  font-size: 10px;
  font-weight: 800;
  color: #6A4B38;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* ---------------- 底部工具 ---------------- */

.tray {
  flex: none;
  display: flex;
  gap: 5px;
  padding-top: 1px;
  margin-top: 0;
}

.tray button {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 13px;
  border: 1px solid #F0DFCE;
  background: linear-gradient(180deg, #FFFFFF, #FFFBF5);
  box-shadow: 0 3px 8px rgba(196, 132, 70, 0.09);
  color: #7A5742;
  font-size: 11px;
  font-weight: 800;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tray button:active {
  transform: scale(0.96);
  box-shadow: 0 2px 5px rgba(196, 132, 70, 0.08);
}

.tray .mp-icon {
  width: 16px;
  height: 16px;
  color: var(--orange);
}

/* ---------------- 弹层 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(56, 35, 21, 0.44);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.overlay.center {
  align-items: center;
  padding: 20px 16px;
}

.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #FFFCF7 0%, #FFF6EC 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 -10px 50px rgba(80, 45, 20, 0.18);
  overflow: hidden;
  animation: sheetUp 0.34s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sheet.is-center {
  max-width: 356px;
  max-height: 90dvh;
  border-radius: 28px;
  animation: popIn 0.32s cubic-bezier(0.3, 1.35, 0.5, 1);
}

.grip {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #E8D6C4;
  margin: 9px auto 2px;
  flex: none;
}

.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 18px 8px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.sheet-close {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #FFF1E1;
  color: #9B775B;
  transition: transform 0.12s ease;
}

.sheet-close:active { transform: scale(0.9); }
.sheet-close .mp-icon { width: 17px; height: 17px; }

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 16px calc(22px + env(safe-area-inset-bottom));
}

.sheet.is-center .sheet-body {
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFA45B 0%, #FF7F2A 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 0 #E76A1A, 0 12px 20px rgba(255, 122, 40, 0.22);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #E76A1A, 0 6px 12px rgba(255, 122, 40, 0.18);
}

.btn.ghost {
  background: #fff;
  color: #8A5A3A;
  border: 1px solid #EFDCC8;
  box-shadow: 0 5px 0 #F2DFCC, 0 8px 14px rgba(190, 130, 70, 0.09);
}

.btn.ghost:active { box-shadow: 0 2px 0 #F2DFCC; }
.btn:disabled {
  opacity: 0.5;
  box-shadow: 0 4px 0 #E7C9AD;
  transform: none;
  pointer-events: none;
}

.btn + .btn { margin-top: 10px; }

.btn .mp-icon { width: 18px; height: 18px; }

/* ---------------- 图鉴 ---------------- */

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.recipe {
  position: relative;
  padding: 10px 10px 9px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #F1E1D0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.recipe::before {
  content: "";
  position: absolute;
  right: -16px;
  top: -16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 222, 190, 0.75), transparent 70%);
}

.recipe.locked {
  background: #FBF4EC;
  box-shadow: none;
  border-style: dashed;
}

.recipe-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.recipe-head b {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

.recipe-head span {
  flex: none;
  font-size: 10.5px;
  font-weight: 900;
  color: #E9741E;
  background: #FFF0DE;
  border-radius: 999px;
  padding: 2px 6px;
}

.recipe-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.recipe-needs i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  color: #84644E;
  background: #FFF8EF;
  border: 1px solid #F1E2D3;
  border-radius: 999px;
  padding: 1px 5px;
}

.recipe small {
  display: block;
  margin-top: 7px;
  font-size: 9.5px;
  font-weight: 700;
  color: #B79A84;
}

.recipe.locked .recipe-head b { color: #A98D77; }
.recipe.locked .recipe-head span { display: none; }
.recipe.locked .recipe-needs { display: none; }

.recipe-lock {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  font-size: 10px;
  font-weight: 800;
  color: #B08E74;
}

.recipe-lock .mp-icon { width: 13px; height: 13px; }

.recipe-sold {
  position: absolute;
  right: 9px;
  bottom: 8px;
  font-size: 9px;
  font-weight: 800;
  color: #C6A88F;
}

/* ---------------- 升级 ---------------- */

.up-list { display: flex; flex-direction: column; gap: 9px; }

.up {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #F1E1D0;
  box-shadow: var(--shadow-sm);
}

.up-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #FFF0DE, #FFE0C0);
  color: var(--orange-deep);
}

.up-icon .mp-icon { width: 21px; height: 21px; }

.up-main { flex: 1; min-width: 0; }

.up-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.up-top b {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

.lv {
  font-size: 9.5px;
  font-weight: 900;
  color: #A16A3B;
  background: #FFF2E2;
  border-radius: 999px;
  padding: 1px 6px;
}

.up p {
  margin: 3px 0 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: #9B7D66;
  line-height: 1.3;
}

.pips { display: flex; gap: 3px; }

.pips i {
  width: 13px;
  height: 4px;
  border-radius: 99px;
  background: #F0DCC8;
}

.pips i.on { background: linear-gradient(90deg, #FFB05E, #FF8A3D); }

.buy {
  flex: none;
  min-width: 64px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFA45B, #FF7F2A);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  box-shadow: 0 3px 0 #E76A1A;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.buy:active { transform: translateY(2px); box-shadow: 0 1px 0 #E76A1A; }

.buy.cant {
  background: #F4E6D8;
  color: #B99B82;
  box-shadow: 0 3px 0 #EBD8C5;
}

.buy.max {
  background: #EAF6EA;
  color: #6DA973;
  box-shadow: 0 3px 0 #D6EAD7;
  pointer-events: none;
}

.coin-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #A1826A;
}

.coin-note b { color: #A45A00; }
.coin-note .mp-icon { width: 14px; height: 14px; color: #F2A11F; }

/* ---------------- 排行榜 ---------------- */

.rank-list { display: flex; flex-direction: column; gap: 7px; }

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #F3E4D4;
}

.rank-row.me {
  background: linear-gradient(180deg, #FFF5E7, #FFEBD5);
  border-color: #FFD5AC;
}

.rk {
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #F6E9DB;
  color: #A68161;
  font-size: 11px;
  font-weight: 900;
}

.rk.top1 { background: linear-gradient(160deg, #FFD66B, #FFB01F); color: #7A4A00; }
.rk.top2 { background: linear-gradient(160deg, #E4E4E4, #B9B9B9); color: #5F5F5F; }
.rk.top3 { background: linear-gradient(160deg, #F3C49C, #D99A68); color: #6E3D14; }

.rank-who { flex: 1; min-width: 0; }
.rank-who b {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-who small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 600;
  color: #B09580;
}

.rank-score {
  flex: none;
  font-size: 13px;
  font-weight: 900;
  color: #E9741E;
  font-variant-numeric: tabular-nums;
}

.rank-score::after {
  content: " 币";
  font-size: 9px;
  color: #C79B72;
  font-weight: 700;
}

.empty {
  padding: 26px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #B19681;
  line-height: 1.6;
}

.loading {
  padding: 26px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #B19681;
}

.my-rank {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 15px;
  background: #FFF2E2;
  border: 1px dashed #FFD0A2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: #8A5B35;
}

.my-rank b { color: #E9741E; font-size: 13px; }

/* ---------------- 结算 / 引导 ---------------- */

.day-hero {
  position: relative;
  text-align: center;
  padding: 4px 0 14px;
}

.day-badge {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #FFD98A, #FF9F3E);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 150, 50, 0.32), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  transform: rotate(-5deg);
}

.day-badge .mp-icon { width: 38px; height: 38px; }

.day-hero h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.day-hero p {
  margin: 6px auto 0;
  max-width: 250px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #A1846E;
}

.day-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 4px 0 12px;
}

.day-stat {
  padding: 10px 5px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #F3E3D3;
  text-align: center;
}

.day-stat b {
  display: block;
  font-size: 17px;
  font-weight: 900;
  color: #E9741E;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.day-stat span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 700;
  color: #AC907B;
}

.unlock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 15px;
  background: linear-gradient(180deg, #FFF6E8, #FFEEDB);
  border: 1px solid #FFDFC0;
  font-size: 11px;
  font-weight: 700;
  color: #96643C;
  line-height: 1.4;
}

.unlock .mp-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--orange);
}

.unlock b { color: #D9661C; }

.day-actions { display: flex; flex-direction: column; gap: 9px; }

/* 新手引导 */
.intro-art {
  position: relative;
  height: 104px;
  margin: 0 auto 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.intro-cup {
  position: relative;
  width: 62px;
  height: 84px;
  border-radius: 8px 8px 20px 20px;
  border: 2px solid #E9D5C0;
  background: linear-gradient(180deg, #FFF7E9 0 38%, #E6B87B 38% 100%);
  box-shadow: 0 10px 18px rgba(180, 120, 60, 0.2), inset 2px 0 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.intro-cup::before {
  content: "";
  position: absolute;
  inset: 38% 0 0;
  background-image:
    radial-gradient(circle at 26% 38%, rgba(62, 32, 18, 0.55) 0 4px, transparent 4.6px),
    radial-gradient(circle at 64% 62%, rgba(62, 32, 18, 0.5) 0 4.5px, transparent 5px),
    radial-gradient(circle at 44% 84%, rgba(62, 32, 18, 0.45) 0 4px, transparent 4.6px);
}

.intro-cup::after {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  right: -2px;
  height: 12px;
  border-radius: 7px;
  background: linear-gradient(180deg, #FFD9A8, #F4B474);
  border: 1.5px solid #E8A968;
}

.intro-straw {
  position: absolute;
  left: 50%;
  top: 66px;
  width: 9px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(90deg, #FF9848, #FFC48F);
  border: 1px solid #EF8B3E;
  transform: translateX(-6px) rotate(12deg);
  z-index: 2;
}

.intro-leaf {
  position: absolute;
  width: 34px;
  height: 22px;
  border-radius: 50% 50% 50% 4px;
  background: linear-gradient(150deg, #A7D98A, #6DB267);
  opacity: 0.85;
}

.intro-leaf.a { left: calc(50% - 74px); bottom: 24px; transform: rotate(-22deg); }
.intro-leaf.b { right: calc(50% - 82px); bottom: 38px; transform: rotate(196deg); }

.intro-title {
  margin: 0;
  text-align: center;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.intro-sub {
  margin: 7px auto 14px;
  max-width: 268px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: #A1846E;
}

.intro-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.intro-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #F3E3D3;
  font-size: 11.5px;
  font-weight: 700;
  color: #7F604B;
  line-height: 1.35;
}

.step-num {
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #FFD08E, #FF9A4A);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 0 #E9822E;
}

/* 玩法页 */
.help-title {
  margin: 2px 0 7px;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

.help-p {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.65;
  color: #8C6F5A;
}

.help-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-list li {
  position: relative;
  padding-left: 15px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #8C6F5A;
}

.help-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.help-card {
  padding: 11px 12px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #F2E2D2;
  margin-bottom: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #F2E2D2;
  font-size: 12px;
  font-weight: 800;
  color: #7F604B;
  margin-bottom: 12px;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: #EADCCD;
  transition: background 0.2s ease;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}

.switch.on { background: linear-gradient(90deg, #FFB05E, #FF8A3D); }
.switch.on::after { transform: translateX(18px); }

.danger-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  background: #FFF1EF;
  border: 1px solid #FFD8D3;
  color: #D95C4C;
  font-size: 12px;
  font-weight: 800;
}

.confirm {
  padding: 4px 2px;
  text-align: center;
}

.confirm b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}

.confirm p {
  margin: 7px 0 15px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  color: #9C7E68;
}

.confirm .btn + .btn { margin-top: 8px; }

/* ---------------- 浮层反馈 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  top: 13%;
  z-index: 90;
  max-width: 82vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(58, 36, 22, 0.93);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  box-shadow: 0 10px 28px rgba(60, 30, 10, 0.22);
}

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

.coin-pop {
  position: fixed;
  z-index: 85;
  font-size: 17px;
  font-weight: 900;
  color: #FF8A3D;
  text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(255, 140, 60, 0.35);
  pointer-events: none;
  animation: coinUp 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  white-space: nowrap;
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confettiFall 1.9s ease-in forwards;
}

body.locked { overflow: hidden; }

/* ---------------- 动画 ---------------- */

@keyframes catIdle {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  45% { transform: translateY(-3px) scale(0.995, 1.005); }
  70% { transform: translateY(0) scale(1.005, 0.995); }
}

@keyframes catHop {
  0% { transform: translateY(0) scale(1, 1); }
  35% { transform: translateY(-10px) scale(0.96, 1.06); }
  65% { transform: translateY(0) scale(1.05, 0.95); }
  100% { transform: translateY(0) scale(1, 1); }
}

@keyframes catSad {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(2px) rotate(-3deg); }
  75% { transform: translateY(2px) rotate(3deg); }
}

@keyframes bubblePop {
  0% { opacity: 0; transform: scale(0.72) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes comboPop {
  0% { transform: scale(0.72); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes layerIn {
  0% { transform: translateY(14px) scaleY(0.4); opacity: 0.4; }
  100% { transform: translateY(0) scaleY(1); opacity: 1; }
}

@keyframes cupServe {
  0% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-12px) rotate(-7deg); }
  100% { transform: translateY(-46px) rotate(10deg); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes coinUp {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.7); }
  22% { opacity: 1; transform: translate(-50%, -4px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(26px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(620deg); opacity: 0.15; }
}

@media (max-height: 720px) {
  .app { gap: 7px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .game { gap: 7px; }
  .panel { gap: 6px; }
  .stage { min-height: 196px; }
  .bench { min-height: 112px; padding: 8px 10px; }
  .cup-col { width: 60px; }
  .cup { width: 50px; height: 80px; }
  .straw { left: 27px; height: 31px; }
  .cup-count { font-size: 9px; }
  .order-name { font-size: 16.5px; }
  .order { gap: 4px; }
  .ingredients { grid-auto-rows: 48px; }
  .ing .blob { width: 21px; height: 21px; }
  .ing span { font-size: 9.5px; }
  .tray button { height: 38px; }
  .hint { font-size: 10px; min-height: 14px; }
  .menu-board { display: none; }
  .cat-wrap { width: clamp(108px, 30vw, 132px); }
}

@media (max-height: 420px) {
  .intro-art { height: 68px; margin-bottom: 4px; }
  .intro-cup { width: 48px; height: 64px; }
  .intro-straw { top: 47px; height: 26px; }
  .intro-title { font-size: 19px; }
  .intro-sub { margin: 5px auto 10px; font-size: 11px; }
  .intro-steps { gap: 5px; margin-bottom: 12px; }
  .intro-steps li { padding: 6px 9px; font-size: 10.5px; }
  .day-hero { padding: 0 0 8px; }
  .day-badge { width: 50px; height: 50px; margin-bottom: 6px; border-radius: 16px; }
  .day-badge .mp-icon { width: 28px; height: 28px; }
  .day-hero h2 { font-size: 19px; }
  .day-stats { margin: 2px 0 8px; }
  .sheet.is-center { max-height: 92dvh; }
}

@media (max-width: 360px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .avatar { width: 30px; height: 30px; border-radius: 10px; }
  .who b { max-width: 82px; font-size: 12px; }
  .pill { padding: 0 7px; font-size: 11px; }
  .ingredients { gap: 4px; }
  .ing span { font-size: 9px; }
  .order-name { font-size: 16px; }
}

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