/* ==========================================================
   mixing.css — 调酒页（4 步：选杯 → 选材料 → 调制 → 送饮）
   素材：步骤条 / 槽位五格 / 空牌匾 / 6 酒杯 / 6 基酒 / 6 辅料 / 12 香料装饰
   ========================================================== */

.mx-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mx-fade 0.35s var(--ease);
}

@keyframes mx-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 原始调酒台背景：不模糊、不压暗、不覆盖整块面板 */
.mx-backdrop {
  position: absolute;
  inset: 0;
  background: url('../assets/mix-bg.png') center / cover no-repeat;
}

.mx-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 5, 18, 0.16), transparent 22%, transparent 78%, rgba(12, 5, 18, 0.2));
}

/* 控件直接放在原背景上，布局对齐素材参考图 */
.mx-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: mx-fade 0.35s var(--ease);
}

.mx-panel::before {
  display: none;
}

/* —— 标题栏 —— */
.mx-head {
  position: absolute;
  top: 2.2%;
  left: 2%;
  right: 2%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  pointer-events: none;
}

.mx-head .mx-close {
  pointer-events: auto;
}

.mx-title {
  font-family: var(--f-serif);
  font-size: clamp(16px, 1.5vw, 27px);
  font-weight: 700;
  letter-spacing: 6px;
  color: #F0DEB2;
  text-shadow: 0 0 12px rgba(232, 201, 114, 0.35), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.mx-guest {
  font-size: clamp(11px, 0.95vw, 16px);
  color: #C3ACD2;
  letter-spacing: 2px;
}

.mx-close {
  margin-left: auto;
  width: clamp(26px, 2.3vw, 40px);
  height: clamp(26px, 2.3vw, 40px);
  border-radius: 50%;
  background: linear-gradient(160deg, #3a2450, #22132e);
  border: 1px solid rgba(201, 162, 74, 0.65);
  color: #E8C972;
  font-size: clamp(12px, 1.05vw, 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.mx-close:hover {
  filter: brightness(1.25);
  box-shadow: 0 0 12px rgba(232, 201, 114, 0.45);
}

/* —— 步骤条（真实素材四张切换） —— */
.mx-steps {
  position: absolute;
  left: 50%;
  bottom: 1.6%;
  height: 8.6%;
  aspect-ratio: 1901 / 223;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* 按素材原始比例显示，避免把底部字体压扁 */
.mx-steps img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65));
  transition: opacity 0.25s var(--ease);
}

/* 左侧酒柜与右侧需求卡悬浮在原始背景上 */
.mx-body {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.mx-cabinet {
  position: absolute;
  left: 1.2%;
  top: 37%;
  width: 27.5%;
  height: 29.5%;
  display: grid;
  grid-template-columns: 32% minmax(0, 1fr);
  gap: 1.5%;
  min-height: 0;
  padding: 0.8%;
  border: 2px solid rgba(222, 174, 87, 0.85);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(53, 25, 52, 0.96), rgba(27, 14, 31, 0.96));
  box-shadow: inset 0 0 0 2px rgba(91, 45, 65, 0.8), inset 0 0 24px rgba(0, 0, 0, 0.65), 0 8px 20px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

/* —— 左：分类牌匾 —— */
.mx-tabs {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  min-height: 0;
}

/* 五个分类使用真实 UI 按钮素材，文字已烘焙在图中，保持原始比例 */
.mx-tab {
  position: relative;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent center / contain no-repeat;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.tab-glass { background-image: url('../assets/ui-tab-glass.png'); }
.tab-spirit { background-image: url('../assets/ui-tab-spirit.png'); }
.tab-mixer { background-image: url('../assets/ui-tab-mixer.png'); }
.tab-spice { background-image: url('../assets/ui-tab-spice.png'); }
.tab-garnish { background-image: url('../assets/ui-tab-garnish.png'); }

.mx-tab:hover:not(:disabled) {
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(232, 201, 114, 0.55));
  transform: translateX(3px);
}

.mx-tab.active {
  filter: brightness(1.22) drop-shadow(0 0 12px rgba(232, 201, 114, 0.65));
}

.mx-tab.active::after {
  content: "";
  position: absolute;
  left: 1%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 10px 3px rgba(255, 233, 168, 0.7);
}

.mx-tab:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* —— 中：物品网格 —— */
.mx-main {
  position: relative;
  min-height: 0;
  display: flex;
}

.mx-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2.4%;
  min-height: 0;
}

.mx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 74, 0.3);
  background:
    radial-gradient(ellipse 70% 60% at 50% 32%, rgba(120, 78, 152, 0.32), transparent 72%),
    linear-gradient(180deg, rgba(38, 20, 48, 0.92), rgba(20, 11, 27, 0.95));
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.mx-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 201, 114, 0.75);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 16px rgba(232, 201, 114, 0.25);
}

.mx-card img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  padding: 4% 8% 2%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s var(--ease);
}

.mx-card:hover img {
  transform: scale(1.04);
}

.mx-card-name {
  flex: none;
  padding: 1.6% 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(8px, 0.78vw, 14px);
  letter-spacing: 0;
  color: #40290F;
  background: linear-gradient(180deg, #F2E0B6 0%, #D3B47D 55%, #C0A067 100%);
  border-top: 1px solid rgba(255, 236, 190, 0.55);
}

.mx-card.selected {
  border-color: #F0D48A;
  box-shadow:
    inset 0 0 0 2px rgba(240, 212, 138, 0.9),
    inset 0 0 30px rgba(120, 60, 10, 0.25),
    0 0 22px rgba(232, 201, 114, 0.55);
}

.mx-card.selected::after {
  content: "✓";
  position: absolute;
  top: 6%;
  right: 6%;
  width: 1.55em;
  height: 1.55em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(10px, 0.9vw, 16px);
  font-weight: 700;
  color: #40290F;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFEBB8, #D9B872);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  animation: mx-check-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mx-check-pop {
  0%   { transform: scale(0.2) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.mx-card:active {
  transform: translateY(-1px) scale(0.975);
}

.mx-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* —— 调制 / 送饮 舞台 —— */
.mx-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4% 0;
}

.mx-stage-glow {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 201, 114, 0.22), transparent 66%);
  filter: blur(6px);
  animation: mx-glow 3.2s ease-in-out infinite;
}

@keyframes mx-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

.mx-stage-caption {
  position: absolute;
  bottom: 2%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(11px, 1vw, 17px);
  letter-spacing: 5px;
  color: #D9C6E6;
}

.mx-drink-name {
  position: absolute;
  top: 1%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(15px, 1.45vw, 26px);
  letter-spacing: 6px;
  color: #FBEBC4;
  text-shadow: 0 0 16px rgba(232, 201, 114, 0.55), 0 2px 6px rgba(0, 0, 0, 0.9);
  animation: mx-name-in 0.6s var(--ease);
}

@keyframes mx-name-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— 酒杯（图片 + 杯内酒液） —— */
.mx-glass {
  position: relative;
  height: 100%;
  max-height: 100%;
  aspect-ratio: var(--glass-ar, 0.735);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.7));
}

/* 杯后壁 / 杯前壁（只对这两层做铺满，避免影响量酒器、冰块等道具） */
.mx-glass > .mx-glass-back,
.mx-glass > .mx-glass-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 杯后壁 */
.mx-glass > .mx-glass-back {
  z-index: 1;
}

/* 杯前壁覆盖整个杯体，向下渐淡，让搅拌棒与装饰确实处于玻璃之后 */
.mx-glass > .mx-glass-front {
  z-index: 6;
  opacity: 0.32;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 24%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.38) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 24%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.38) 100%);
}

/* 酒液覆盖在杯身之上（杯内为不透明的深紫填充，液体需压在上面才可见） */
.mx-liquid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.95;
  filter: saturate(1.28) brightness(1.03);
  transition: clip-path 0.9s cubic-bezier(0.34, 0.9, 0.4, 1);
}

/* 液面只保留一条低反差的扁平高光，不再呈现为实心椭圆盖 */
.mx-liquid-surface {
  position: absolute;
  height: 0.7%;
  border-radius: 38% / 70%;
  transform: translateY(-50%);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  filter: blur(0.25px);
  transition: top 0.9s var(--ease), left 0.9s var(--ease), width 0.9s var(--ease), opacity 0.5s var(--ease);
  animation: mx-surface 3.6s ease-in-out infinite;
}

@keyframes mx-surface {
  0%, 100% { transform: translateY(-50%) scaleX(1); }
  50% { transform: translateY(-50%) scaleX(1.012); }
}

.mx-stage .mx-glass {
  height: 88%;
}

.mx-preview .mx-glass {
  height: 94%;
}

/* 液面上升 */
.mx-liquid-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 1s cubic-bezier(0.34, 0.9, 0.4, 1);
}

.mx-liquid-body.rise {
  transform: scaleY(1);
}

/* 倾倒的酒瓶 */
.mx-pour-img {
  position: absolute;
  top: -2%;
  left: 56%;
  height: 38%;
  width: auto;
  opacity: 0;
  transform-origin: 50% 92%;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.7));
  animation: mx-pour 0.9s var(--ease) forwards;
  z-index: 3;
}

@keyframes mx-pour {
  0% { opacity: 0; transform: translate(-50%, -34%) rotate(0deg); }
  28% { opacity: 1; transform: translate(-50%, -12%) rotate(-104deg); }
  58% { opacity: 1; transform: translate(-50%, -12%) rotate(-114deg); }
  100% { opacity: 0; transform: translate(-62%, -30%) rotate(-124deg); }
}

/* 落入杯中的装饰 */
.mx-drop {
  position: absolute;
  left: 50%;
  top: calc(var(--gl-rim) - 12%);
  width: calc(var(--gl-w) * 0.28);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 4;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6));
  animation: mx-drop 1s cubic-bezier(0.5, 0, 0.8, 0.6) forwards;
}

@keyframes mx-drop {
  0% { opacity: 0; top: calc(var(--gl-rim) - 18%); transform: translate(-50%, -50%) rotate(0deg) scale(0.85); }
  18% { opacity: 1; }
  72% { opacity: 1; top: calc(var(--gl-bottom) - var(--gl-depth) * 0.5); transform: translate(-50%, -50%) rotate(200deg) scale(1); }
  100% { opacity: 0; top: calc(var(--gl-bottom) - var(--gl-depth) * 0.45); transform: translate(-50%, -50%) rotate(280deg) scale(0.7); }
}

/* —— 右侧羊皮纸需求卡 —— */
.mx-side {
  position: absolute;
  right: 1.6%;
  top: 26.5%;
  width: 22%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.mx-need {
  flex: none;
  padding: 5% 9% 15%;
  border: 0;
  border-radius: 0;
  background: url('../assets/mix-parchment.png') center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

/* 客人需求牌匾（真实 UI 素材） */
.mx-need-plaque {
  display: block;
  width: 96%;
  height: auto;
  margin: -16% auto 4%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.mx-need-title {
  font-family: var(--f-serif);
  font-size: clamp(13px, 1.2vw, 20px);
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  color: #4A2E12;
  margin-bottom: 6px;
}

.mx-need-text {
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.7;
  text-align: center;
  color: #5A4128;
}

.mx-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.mx-tag {
  flex: none;
  white-space: nowrap;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: clamp(9px, 0.75vw, 12px);
  letter-spacing: 1px;
  color: #5A341C;
  background: rgba(133, 84, 38, 0.1);
  border: 1px solid rgba(105, 65, 29, 0.45);
}

/* 预览区 */
.mx-preview {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2% 0;
}

.mx-preview-empty {
  font-family: var(--f-serif);
  font-size: clamp(11px, 0.95vw, 16px);
  letter-spacing: 4px;
  color: rgba(220, 200, 235, 0.4);
  border: 1px dashed rgba(201, 162, 74, 0.35);
  border-radius: 12px;
  width: 62%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 滑动槽位：底图 + 5 个材料缩略图 */
.mx-slots {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 1208 / 205;
}

.mx-slots > .mx-slots-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mx-slot-row {
  position: absolute;
  left: 10.2%;
  width: 78.2%;
  top: 9%;
  bottom: 23%;
  display: flex;
  gap: 2.6%;
}

.mx-slot {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.mx-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  animation: mx-slot-in 0.28s var(--ease);
}

@keyframes mx-slot-in {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.mx-slot.filled {
  cursor: pointer;
}

.mx-slot.filled::after {
  content: "×";
  position: absolute;
  top: -4%;
  right: 2%;
  font-size: clamp(9px, 0.8vw, 13px);
  color: #FFD9A0;
  opacity: 0;
  transition: opacity 0.2s;
}

.mx-slot.filled:hover::after {
  opacity: 1;
}

/* 主按钮：真实 UI 素材（重新调酒 / 送出饮品） */
.mx-btn {
  flex: none;
  width: 100%;
  aspect-ratio: 355 / 95;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent center / contain no-repeat;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.mx-btn:hover:not(:disabled) {
  filter: brightness(1.2) drop-shadow(0 0 14px rgba(232, 201, 114, 0.6));
  transform: translateY(-1px);
}

.mx-btn:disabled {
  filter: grayscale(0.55) brightness(0.62);
  cursor: not-allowed;
}

.mx-btn-rebrew { background-image: url('../assets/ui-btn-rebrew.png'); }
.mx-btn-serve { background-image: url('../assets/ui-btn-serve.png'); }

.mx-btn-serve {
  filter: drop-shadow(0 0 12px rgba(232, 201, 114, 0.5)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  animation: mx-primary-pulse 2.6s ease-in-out infinite;
}

@keyframes mx-primary-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(232, 201, 114, 0.35)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
  50% { filter: drop-shadow(0 0 18px rgba(246, 219, 140, 0.8)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
}

.mx-btn-line {
  display: flex;
  gap: 8px;
}

.mx-btn-line .mx-btn {
  flex: 1;
  min-width: 0;
}

/* 小提示 */
.mx-hint {
  flex: none;
  text-align: center;
  font-size: clamp(9px, 0.78vw, 13px);
  letter-spacing: 1px;
  color: rgba(214, 196, 232, 0.62);
}

/* 结果描述 */
.mx-desc {
  flex: none;
  font-size: clamp(10px, 0.85vw, 14px);
  line-height: 1.7;
  color: #DCCDE8;
  text-align: center;
  padding: 0 3%;
}

.mx-match {
  flex: none;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(11px, 0.95vw, 16px);
  letter-spacing: 2px;
}

.mx-match.perfect { color: #F7D77E; text-shadow: 0 0 14px rgba(232, 201, 114, 0.55); }
.mx-match.partial { color: #C9B4E4; }
.mx-match.none { color: #A79BAA; }

/* 送饮退出 */
.mx-overlay.mx-overlay-out {
  animation: mx-fade-out 0.6s var(--ease) forwards;
}

@keyframes mx-fade-out {
  to { opacity: 0; }
}

.mx-panel.mx-served {
  animation: mx-serve 0.6s var(--ease) forwards;
}

@keyframes mx-serve {
  to { transform: translateY(-18px) scale(0.96); opacity: 0; }
}

/* ==========================================================
   底部填充栏 + 开始调制
   ========================================================== */

.mx-footer {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

/* 五格栏下移贴近步骤条，同时露出桌面上的圆形展台 */
.mx-tray {
  position: absolute;
  left: 28%;
  bottom: 10.9%;
  width: 44%;
  aspect-ratio: 1208 / 205;
  margin: 0;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  pointer-events: auto;
}

.mx-tray .mx-slots-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.mx-tray .mx-slot-row {
  position: absolute;
  left: 12.2%;
  width: 75.5%;
  top: 9%;
  bottom: 17%;
  display: flex;
  gap: 2.1%;
}

.mx-tray .mx-slot {
  position: relative;
  flex: 1;
  min-width: 0;
  height: auto;
  overflow: hidden;
}

.mx-tray .mx-slot > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 18%;
  object-fit: contain;
  transform: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

/* 直接用免抠 PNG，不加任何底色，避免挡住五格的金色边框 */
.mx-tray .mx-slot.filled::before {
  display: none;
}

.mx-tray .mx-slot .mx-glass {
  z-index: 1;
  height: 72%;
  max-width: 72%;
  animation: mx-slot-in 0.28s var(--ease);
}

.mx-tray .mx-slot .mx-glass > img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  animation: none;
}

/* 槽位里只是缩略图，不需要前壁反光与液面 */
.mx-tray .mx-glass-front,
.mx-tray .mx-liquid-surface {
  display: none;
}

.mx-tray .mx-slot.filled::after {
  z-index: 2;
}

/* 与五格栏同一水平线，靠右侧，不互相遮挡（真实 UI 按钮素材） */
.mx-cta {
  position: absolute;
  right: 2%;
  bottom: 13.5%;
  width: 19%;
  aspect-ratio: 362 / 101;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent center / contain no-repeat;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: auto;
}

.mx-cta.is-brew {
  background-image: url('../assets/ui-btn-brew.png');
}

.mx-cta:hover:not(:disabled) {
  filter: brightness(1.2) drop-shadow(0 0 16px rgba(232, 201, 114, 0.55));
  transform: translateY(-2px);
}

.mx-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================
   调制特写（量酒器 / 冰块 / 花瓣 / 肉桂粉 / 搅拌棒）
   ========================================================== */

.mx-brew {
  position: absolute;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.mx-brew.active {
  opacity: 1;
  pointer-events: auto;
}

.mx-brew-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/mix-bg.png') center / cover no-repeat;
  filter: brightness(0.62) saturate(1.05);
}

.mx-brew-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 62% at 50% 46%, rgba(255, 220, 150, 0.1), transparent 66%),
    radial-gradient(ellipse 78% 92% at 50% 48%, transparent 24%, rgba(6, 3, 10, 0.72) 62%, rgba(4, 2, 8, 0.97) 88%),
    linear-gradient(180deg, rgba(6, 3, 10, 0.85), transparent 22%, transparent 56%, rgba(4, 2, 8, 0.96));
}

.mx-brew-head {
  position: absolute;
  top: 4%;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 7;
}

.mx-brew-title {
  font-family: var(--f-serif);
  font-size: clamp(15px, 1.5vw, 27px);
  letter-spacing: 6px;
  color: #F0DEB2;
  text-shadow: 0 0 18px rgba(232, 201, 114, 0.4), 0 2px 8px rgba(0, 0, 0, 0.9);
}

.mx-brew-tip {
  margin-top: 0.6em;
  font-size: clamp(10px, 0.9vw, 15px);
  letter-spacing: 3px;
  color: #C8B4DC;
  opacity: 0.85;
}

.mx-brew-stage {
  position: absolute;
  inset: 0;
}

.mx-brew-ring {
  position: absolute;
  left: 50%;
  bottom: 21.5%;
  width: 26%;
  aspect-ratio: 3 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(232, 201, 114, 0.3), rgba(160, 110, 220, 0.12) 55%, transparent 72%);
  filter: blur(3px);
  animation: mx-ring 3.4s ease-in-out infinite;
}

@keyframes mx-ring {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.94); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

/* 杯底正落在桌面圆形展台中心（展台中心约在画面 73.7% 高处） */
.mx-brew-glass {
  position: absolute;
  left: 50%;
  top: 51.75%;
  height: 44%;
  transform: translate(-50%, -50%);
  transition: transform 0.8s var(--ease);
  z-index: 3;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.75));
}

/* 浮起发光 → 落回展台中心 */
.mx-brew.landing .mx-brew-glass {
  animation: mx-land 1.65s cubic-bezier(0.32, 0.72, 0.36, 1) forwards;
}

@keyframes mx-land {
  0% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.75));
  }
  30% {
    transform: translate(-50%, -80%) scale(1);
    filter: drop-shadow(0 0 48px rgba(246, 219, 140, 0.9)) drop-shadow(0 26px 42px rgba(0, 0, 0, 0.5));
  }
  58% {
    transform: translate(-50%, -73%) scale(1);
    filter: drop-shadow(0 0 40px rgba(246, 219, 140, 0.75)) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.55));
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 26px rgba(246, 219, 140, 0.6)) drop-shadow(0 22px 34px rgba(0, 0, 0, 0.75));
  }
}

/* 杯内装饰：位于杯后壁之前、杯前壁之后 */
.mx-garnish {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.mx-garnish-item {
  position: absolute;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)) saturate(0.96) brightness(0.97);
}

/* 肉桂粉：落在液面后向外扩散，逐渐融入酒液 */
.mx-powder-settled {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(168, 96, 44, 0.8) 0%,
    rgba(146, 82, 38, 0.42) 48%,
    rgba(120, 66, 32, 0.16) 70%,
    transparent 78%
  );
  filter: blur(0.8px);
  animation: mx-powder-in 1.9s var(--ease) both;
}

@keyframes mx-powder-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to   { opacity: var(--powder-o, 0.5); transform: translate(-50%, -50%) scale(1); }
}

.mx-brew-glass .mx-glass {
  height: 100%;
}

/* —— 量酒器：杯口朝下，从杯口上方倒入（锚点在开口处）
   高度 / 悬停位置 / 倾倒角度由 JS 按杯型写入变量 —— */
.mx-jigger {
  position: absolute;
  left: calc(50% + var(--jg-x, 6%));
  top: var(--jg-top, calc(var(--gl-rim) - var(--gl-depth) * 0.55));
  height: var(--jg-h, min(64%, calc(var(--gl-depth) * 1.5)));
  width: auto;
  z-index: 7;
  opacity: 0;
  transform-origin: 50% 9%;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.65));
  animation: mx-jigger 1.45s cubic-bezier(0.42, 0, 0.3, 1) forwards;
}

/* 量酒器停在杯口右上方，壶嘴朝左下倒入杯中心 */
@keyframes mx-jigger {
  0%   { opacity: 0; transform: translate(calc(-50% + 26%), -16%) rotate(0deg) scale(0.94); }
  16%  { opacity: 1; transform: translate(-50%, 0) rotate(0deg) scale(1); }
  32%  { opacity: 1; transform: translate(calc(-50% - 2%), 0) rotate(calc(-148deg - var(--jg-extra, 0deg))); }
  50%, 70% { opacity: 1; transform: translate(calc(-50% - 2%), 0) rotate(calc(-156deg - var(--jg-extra, 0deg))); }
  86%  { opacity: 0.9; transform: translate(calc(-50% + 6%), -4%) rotate(-24deg); }
  100% { opacity: 0; transform: translate(calc(-50% + 24%), -20%) rotate(0deg); }
}

/* —— 酒液细流：从杯口落到液面 —— */
.mx-stream {
  position: absolute;
  left: var(--stream-x, 52%);
  top: var(--stream-top, var(--gl-rim));
  width: 1.6%;
  height: 0;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--c) 22%, var(--c));
  border-radius: 40%;
  box-shadow: 0 0 10px var(--c);
  opacity: 0;
  z-index: 5;
  animation: mx-stream 1.1s ease-in forwards;
}

@keyframes mx-stream {
  0%   { height: 0; opacity: 0; }
  14%  { height: calc(var(--stream-h) * 0.55); opacity: 0.92; }
  72%  { height: var(--stream-h); opacity: 0.95; }
  100% { height: var(--stream-h); opacity: 0; }
}

/* —— 冰块：沉到杯底 —— */
.mx-ice {
  position: absolute;
  left: 50%;
  top: calc(var(--gl-rim) - 10%);
  width: calc(var(--gl-w) * 0.5);
  height: auto;
  z-index: 7;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 4;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
  animation: mx-ice 0.95s cubic-bezier(0.5, 0, 0.8, 0.6) forwards;
}

@keyframes mx-ice {
  0%   { opacity: 0; top: calc(var(--gl-rim) - 14%); }
  22%  { opacity: 1; }
  80%  { top: calc(var(--gl-bottom) - var(--gl-depth) * 0.22); }
  100% { opacity: 0; top: calc(var(--gl-bottom) - var(--gl-depth) * 0.18); }
}

/* —— 花瓣：漂到液面 —— */
.mx-petal {
  position: absolute;
  left: 50%;
  top: calc(var(--gl-rim) - 8%);
  width: calc(var(--gl-w) * 0.4);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 4;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
  animation: mx-petal 1.5s cubic-bezier(0.3, 0.1, 0.6, 0.9) forwards;
}

@keyframes mx-petal {
  0%   { opacity: 0; top: calc(var(--gl-rim) - 14%); transform: translate(-50%, -50%) rotate(0deg); }
  16%  { opacity: 1; }
  72%  { opacity: 1; top: calc(var(--gl-bottom) - var(--gl-depth) * 0.55); transform: translate(-50%, -50%) rotate(var(--rot)); }
  100% { opacity: 0; top: calc(var(--gl-bottom) - var(--gl-depth) * 0.5); transform: translate(-50%, -50%) rotate(calc(var(--rot) * 1.3)); }
}

/* —— 肉桂粉洒落 —— */
.mx-cinnamon {
  position: absolute;
  left: 50%;
  top: calc(var(--gl-rim) - var(--gl-depth) * 0.75);
  width: calc(var(--gl-w) * 0.55);
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 5;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
  animation: mx-cinnamon 1.5s ease-in forwards;
}

@keyframes mx-cinnamon {
  0%   { opacity: 0; transform: translate(-50%, -24%) scale(0.95); }
  22%  { opacity: 0.9; }
  70%  { opacity: 0.85; transform: translate(-50%, 12%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, 30%) scale(1.04); }
}

.mx-dust {
  position: absolute;
  top: 18%;
  left: var(--x);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C0642C;
  box-shadow: 0 0 6px rgba(192, 100, 44, 0.8);
  opacity: 0;
  z-index: 5;
  animation: mx-dust 1.4s linear var(--delay) forwards;
}

@keyframes mx-dust {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
  18%  { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--drift), 150px) scale(1); }
}

/* —— 搅拌棒：wrap 铺满杯体，棒身按杯型缩放居中，玻璃前壁遮挡棒身 —— */
.mx-stir-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  animation: mx-stir-move 2.4s cubic-bezier(0.42, 0, 0.38, 1) forwards;
}

.mx-stir-rod {
  position: absolute;
  left: 50%;
  top: 0;
  height: auto;
  width: auto;
  transform: translateX(-50%);
  transform-origin: 50% 8%;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7));
  animation: mx-stir-tilt 2.4s ease-in-out forwards;
}

/* 小幅椭圆：左右轻摆 + 上下轻抬，不再像雨刷左右大幅扫动 */
@keyframes mx-stir-move {
  0%   { opacity: 0; transform: translate(0, 0); }
  8%   { opacity: 1; }
  25%  { transform: translate(calc(var(--stir-ampx, 1.5%) * 0.85), calc(var(--stir-ampy, 1%) * -0.55)); }
  50%  { transform: translate(0, calc(var(--stir-ampy, 1%) * -1.15)); }
  75%  { transform: translate(calc(var(--stir-ampx, 1.5%) * -0.85), calc(var(--stir-ampy, 1%) * -0.55)); }
  100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes mx-stir-tilt {
  0%, 8%, 92%, 100% { transform: translateX(-50%) rotate(0deg); }
  25% { transform: translateX(-50%) rotate(calc(-1 * var(--stir-tilt, 1.5deg))); }
  50% { transform: translateX(-50%) rotate(calc(var(--stir-tilt, 1.5deg) * 0.9)); }
  75% { transform: translateX(-50%) rotate(calc(-1 * var(--stir-tilt, 1.5deg) * 0.55)); }
}

/* —— 落水涟漪 —— */
.mx-splash {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 20%;
  aspect-ratio: 3 / 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(240, 226, 190, 0.55);
  border-radius: 50%;
  opacity: 0.8;
  z-index: 3;
  pointer-events: none;
  animation: mx-splash 0.7s ease-out forwards;
}

@keyframes mx-splash {
  from { opacity: 0.75; transform: translate(-50%, -50%) scale(0.3); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

/* —— 结果卡 —— */
.mx-brew-result {
  position: absolute;
  right: 4%;
  top: 50%;
  width: 35%;
  transform: translateY(-50%) translateX(26px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  z-index: 8;
}

.mx-brew.finished .mx-brew-result {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.mx-result-card {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 7.5% 9% 8%;
  background: url('../assets/mix-parchment.png') center / 100% 100% no-repeat;
  color: #3A2820;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.6));
}

.mx-result-name {
  font-family: var(--f-serif);
  font-size: clamp(16px, 1.5vw, 28px);
  letter-spacing: 4px;
  text-align: center;
  color: #4A2E12;
  text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6);
}

.mx-result-card .mx-match {
  color: #6B4A1C;
  text-shadow: none;
}

.mx-result-desc {
  font-size: clamp(10px, 0.85vw, 15px);
  line-height: 1.8;
  text-align: center;
  color: #5A4128;
}

/* 只提示缺少的风味方向，不点名材料 */
.mx-result-miss {
  font-size: clamp(10px, 0.82vw, 14px);
  line-height: 1.6;
  text-align: center;
  color: #7A4A1E;
  opacity: 0.9;
}

.mx-result-actions {
  display: flex;
  gap: 6%;
  margin-top: 0.4em;
}

.mx-result-actions .mx-btn {
  flex: 1;
  min-width: 0;
  aspect-ratio: 355 / 95;
}

/* 侧栏里的提示 */
.mx-side .mx-hint {
  margin-top: 0.2em;
  padding: 6px 8px;
  border: 1px solid rgba(222, 174, 87, 0.35);
  border-radius: 7px;
  background: rgba(31, 15, 35, 0.82);
  color: #F0DEB2;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* —— 送出饮品：成品杯飞向客人桌面 —— */
.serve-fly {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform-origin: center center;
}

.served-glass {
  position: absolute;
  left: 50%;
  bottom: 22.8%;
  height: 11%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
  animation: served-settle 0.45s ease-out both;
}

/* 杯底的桌面投影，避免看起来像悬在手边 */
.served-glass::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5%;
  width: 150%;
  height: 14%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%);
  filter: blur(2px);
  z-index: -1;
}

.served-glass .mx-glass {
  height: 100%;
}

@keyframes served-settle {
  from {
    transform: translateX(-50%) translateY(-6%) scale(1.06);
    opacity: 0.7;
  }
  to {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}
