:root {
  --ink: #6b4450;
  --ink-soft: #a7838c;
  --cream: #fffaf7;
  --pink: #f4a3b8;
  --pink-2: #ec7f9c;
  --pink-deep: #d9577a;
  --pink-pale: #fde8ee;
  --line: #f3c4d0;
  --gold: #f5c84c;
  --mint: #8fd3b8;
  --shadow: 0 6px 18px rgba(214, 120, 148, 0.22);
  --r: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #f7dce3;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
body.dragging, body.dragging * { cursor: grabbing !important; }

#app { position: fixed; inset: 0; overflow: hidden; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: screenIn .35s ease-out; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 246, 248, 0.35), rgba(255, 240, 244, 0.78));
}
.scrim.soft { background: linear-gradient(180deg, rgba(255, 246, 248, 0.05), rgba(255, 236, 242, 0.55)); }
.scrim.light { background: rgba(255, 248, 250, 0.28); }
.scrim.veil { background: rgba(120, 70, 86, 0.38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.content {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  gap: 9px;
}
.content.center { justify-content: center; }

.hidden { display: none !important; }

/* ---------- 通用卡片 / 按钮 ---------- */
.card {
  background: var(--cream);
  border-radius: var(--r);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line), var(--shadow);
  padding: 12px 14px;
}
.card.lace { position: relative; }
.card.lace::before, .card.lace::after {
  content: ""; position: absolute; left: 14px; right: 14px; height: 10px;
  background: radial-gradient(circle at 6px 0, #fff 5px, transparent 5.5px) 0 0 / 12px 10px repeat-x;
  filter: drop-shadow(0 1px 0 var(--line));
}
.card.lace::before { top: -9px; transform: rotate(180deg); }
.card.lace::after { bottom: -9px; }

.btn {
  font: inherit; font-weight: 700; font-size: 17px; letter-spacing: 2px;
  min-height: 50px; padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--pink-deep);
  box-shadow: 0 4px 0 #f1cbd5, 0 8px 16px rgba(214, 120, 148, 0.18);
  cursor: pointer; touch-action: manipulation;
  flex: 1; transition: transform .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #f1cbd5; }
.btn.primary {
  color: #fff; border-color: #fff;
  background: linear-gradient(180deg, #f9b3c4 0%, #ef8ba5 55%, #e7738f 100%);
  box-shadow: 0 0 0 2px #f2a6b9, 0 4px 0 #d9677f, 0 10px 18px rgba(217, 87, 122, 0.3);
  text-shadow: 0 1px 0 rgba(176, 60, 90, 0.35);
}
.btn.primary:active { box-shadow: 0 0 0 2px #f2a6b9, 0 1px 0 #d9677f; }
.btn.ghost { flex: 0.75; }
.btn.gold {
  color: #8a5a1c; border-color: #fff7dc; flex: none; width: min(70%, 260px);
  background: linear-gradient(180deg, #fde8a6, #f3cd6e);
  box-shadow: 0 0 0 2px #e9c46a, 0 4px 0 #c99a3a, 0 10px 18px rgba(0, 0, 0, 0.25);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-link {
  font: inherit; font-size: 13px; color: var(--ink-soft);
  background: none; border: none; text-decoration: underline;
  cursor: pointer; padding: 8px; touch-action: manipulation;
}
.btn-link.light { color: #fff; text-shadow: 0 1px 3px rgba(80, 40, 90, 0.8); }

.footer { display: flex; gap: 10px; margin-top: auto; }

/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.coin-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.92); border-radius: 999px;
  padding: 3px 12px 3px 3px; font-weight: 800; font-size: 16px;
  box-shadow: 0 0 0 2px #fff, 0 3px 10px rgba(214, 120, 148, 0.2);
}
.coin {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6c8 0 18%, #ffd85c 40%, #f0a82a 100%);
  box-shadow: inset 0 -2px 0 #d68a17, 0 1px 2px rgba(0, 0, 0, 0.15);
}
.coin.sm { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.hud-stats {
  margin-left: auto; display: flex; gap: 8px; font-size: 12px;
  background: rgba(255, 255, 255, 0.85); border-radius: 999px; padding: 5px 12px;
  box-shadow: 0 0 0 2px #fff;
  white-space: nowrap;
}
.hud-stats b { color: var(--pink-deep); }
.hearts { color: var(--pink-2); letter-spacing: 1px; }
.hearts i { font-style: normal; color: #e9d3d9; }

/* ---------- 开场 ---------- */
.logo { position: relative; text-align: center; margin-bottom: 26px; }
.logo-cat {
  width: 150px; display: block; margin: 0 auto -18px;
  filter: drop-shadow(0 6px 10px rgba(214, 120, 148, 0.3));
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.logo-title {
  position: relative;
  font-size: 50px; font-weight: 900; letter-spacing: 6px;
  color: #f28aa6;
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #fff, 0 6px 0 #f6bccb, 0 10px 18px rgba(217, 87, 122, 0.35);
}
.logo-sub {
  display: inline-block; margin-top: 6px;
  font-size: 14px; letter-spacing: 3px; color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.85); padding: 4px 16px; border-radius: 999px;
  box-shadow: 0 0 0 2px var(--line);
}
.intro-card { min-height: 190px; display: flex; flex-direction: column; cursor: pointer; padding: 18px 18px 14px; }
.intro-text { font-size: 16px; line-height: 1.9; flex: 1; animation: fadeUp .45s ease-out; }
.intro-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 50px; }
.intro-foot .btn { flex: 0 0 auto; padding: 10px 30px; margin-left: auto; }
.hint { font-size: 13px; color: var(--ink-soft); margin-left: auto; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .4; } }
.dots { display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #f2d3db; }
.dots i.on { background: var(--pink-2); }

/* ---------- 后台订单 ---------- */
.screen-title {
  display: flex; align-items: baseline; gap: 8px; justify-content: center;
  font-size: 24px; font-weight: 900; letter-spacing: 3px; color: #f07f9d;
  -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  text-shadow: 0 3px 8px rgba(217, 87, 122, 0.25);
}
.screen-title small { font-size: 13px; letter-spacing: 1px; color: var(--ink-soft); -webkit-text-stroke: 0; }
.buyer-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.avatar-ring {
  width: 64px; height: 64px; border-radius: 50%; flex: none; padding: 3px;
  background: conic-gradient(from 0deg, #fff 0 8%, #f9cfd9 8% 16%) ;
  box-shadow: 0 0 0 2px var(--line), 0 3px 8px rgba(214, 120, 148, 0.25);
}
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fde8ee; border: 2px solid #fff; }
.avatar-ring.sm { width: 50px; height: 50px; }
.buyer-meta { flex: 1; min-width: 0; }
.buyer-name { font-size: 17px; font-weight: 800; }
.buyer-name small { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-left: 4px; }
.buyer-sum { font-size: 13px; color: var(--ink-soft); margin-top: 3px; border-top: 1px dashed var(--line); padding-top: 3px; }
.price-tag {
  flex: none; display: flex; align-items: center; gap: 4px;
  font-size: 22px; font-weight: 900; color: var(--pink-deep);
}

.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; padding: 2px; justify-content: flex-end; }
.msg {
  align-self: flex-start; max-width: 86%;
  background: #fff; border-radius: 4px 18px 18px 18px;
  padding: 9px 13px; font-size: 15px; line-height: 1.6;
  box-shadow: 0 0 0 2px var(--line), 0 3px 8px rgba(214, 120, 148, 0.15);
  animation: msgIn .3s ease-out;
}
.msg.me { align-self: flex-end; background: #fbd3dd; border-radius: 18px 4px 18px 18px; box-shadow: 0 0 0 2px #fff; }
.msg.typing { color: var(--ink-soft); letter-spacing: 3px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.slip { padding: 10px 12px; }
.slip-title {
  font-weight: 800; font-size: 14px; letter-spacing: 1px; color: var(--pink-deep);
  border-bottom: 2px dotted var(--line); margin-bottom: 6px; padding-bottom: 4px;
}
.slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13px; line-height: 1.5; }
.slip-grid div { display: flex; gap: 6px; min-width: 0; }
.slip-grid span:first-child { color: var(--ink-soft); flex: none; }
.slip-grid span:last-child { font-weight: 700; }
.slip-grid .wide { grid-column: span 2; }

/* ---------- 流程条（图标 + 虚线） ---------- */
.flow { display: flex; align-items: flex-start; justify-content: space-between; position: relative; padding: 0 4px; }
.flow::before {
  content: ""; position: absolute; left: 34px; right: 34px; top: 25px;
  border-top: 3px dotted #fff; filter: drop-shadow(0 0 1px var(--pink));
}
.fs {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; font: inherit; cursor: pointer; touch-action: manipulation;
  width: 68px;
}
.fs .ic {
  width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle, #fff 55%, #fde3ea 100%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.fs .ic img { width: 76%; height: 76%; object-fit: contain; }
.fs .lb {
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85); padding: 1px 8px; border-radius: 999px;
}
.fs.current .ic { transform: scale(1.12); box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pink-2), 0 0 14px rgba(236, 127, 156, 0.6); }
.fs.current .lb { color: #fff; background: var(--pink-2); }
.fs.done .ic::after {
  content: "✓"; position: absolute; right: 6px; top: -2px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--pink-2); color: #fff;
  font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.fs.locked { cursor: default; }

/* ---------- 买家小条 ---------- */
.buyer-strip {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255, 250, 247, 0.94); border-radius: 18px; padding: 7px 10px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line), var(--shadow);
}
.strip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.oc {
  font-size: 11.5px; line-height: 1.3; padding: 3px 8px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink);
  white-space: nowrap;
}
.oc b { color: var(--ink-soft); font-weight: 700; margin-right: 2px; }
.oc.ok { background: #e6f6ef; box-shadow: inset 0 0 0 1.5px #a9dcc5; }
.oc.ok::after { content: " ✓"; color: #3a9e72; font-weight: 900; }
.oc.price { background: var(--pink-pale); color: var(--pink-deep); font-weight: 800; }

.patience { height: 8px; border-radius: 999px; background: #f6e3e8; overflow: hidden; }
.patience-fill {
  height: 100%; width: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f7b6c6, #ef8ba5);
  transition: width .5s linear;
}
.patience-fill.low { background: linear-gradient(90deg, #f6c36a, #ef8b6b); }

/* 买家说话的气泡 */
.say {
  position: relative; align-self: stretch;
  background: #fff; border-radius: 16px;
  padding: 8px 12px 8px 14px; font-size: 14.5px; line-height: 1.55;
  min-height: 44px;
  box-shadow: 0 0 0 2px var(--line), 0 3px 8px rgba(214, 120, 148, 0.15);
}
.say::before {
  content: ""; position: absolute; left: 22px; top: -8px; width: 14px; height: 14px;
  background: #fff; transform: rotate(45deg);
  box-shadow: -2px -2px 0 0 var(--line);
}
.say.pop-in { animation: msgIn .3s ease-out; }

/* ---------- 配货台 ---------- */
.stage { position: relative; flex: 1; min-height: 170px; }
.phone {
  position: absolute; left: 50%; top: 50%;
  height: 92%; aspect-ratio: 504 / 997;
  transform: translate(-50%, -50%);
}
.phone-ghost {
  position: absolute; inset: 0; border-radius: 16% / 8%;
  border: 3px dashed rgba(236, 127, 156, 0.6); background: rgba(255, 255, 255, 0.35);
}
.case-img, .sup-img, .acc-img {
  position: absolute; display: none;
  object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(160, 80, 100, 0.28));
}
.case-img { inset: 0; width: 100%; height: 100%; z-index: 1; }
.case-img.on { display: block; }
.sup-img { width: 62%; left: 19%; top: 46%; z-index: 2; }
.acc-img { height: 58%; right: -34%; top: 8%; z-index: 2; }
.sup-img.on, .acc-img.on { display: block; }

.zone {
  position: absolute; border-radius: 18px;
  border: 2px dashed transparent;
  visibility: hidden; pointer-events: none; z-index: 3;
}
body.dragging .zone { visibility: visible; border-color: rgba(217, 87, 122, 0.55); background: rgba(255, 255, 255, 0.25); }
body.dragging .zone.hot { border-style: solid; border-color: var(--pink-deep); background: rgba(244, 163, 184, 0.45); }
.zone-case { inset: -4%; }
.zone-sup { left: 6%; top: 42%; width: 88%; height: 40%; }
.zone-acc { right: -44%; top: 2%; width: 50%; height: 64%; }

.stage-hint {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; color: var(--pink-deep); font-weight: 700;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 2px var(--line);
}
.stage.shake { animation: shake .5s; }

.burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; z-index: 8; pointer-events: none; }
.spark {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  animation: burst .75s ease-out forwards;
}
.spark.heart { border-radius: 0; clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%); width: 14px; height: 14px; }
@keyframes burst {
  0% { transform: translate(0, 0) scale(.6); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(200deg); opacity: 0; }
}

.float-text {
  position: absolute; left: 50%; top: 40%; z-index: 9;
  transform: translate(-50%, -50%);
  font-size: 28px; font-weight: 900; color: #f07f9d;
  -webkit-text-stroke: 2px #fff; paint-order: stroke fill;
  white-space: nowrap; pointer-events: none;
  animation: floatup 1s ease-out forwards;
}
@keyframes floatup {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -160%); }
}

/* ---------- 托盘 ---------- */
.tray {
  display: flex; gap: 9px;
  overflow-x: auto; overflow-y: hidden;
  padding: 6px 4px 8px;
  min-height: 136px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tray.idle { visibility: hidden; }
.tray::-webkit-scrollbar { display: none; }
.tile {
  position: relative;
  flex: none; width: 92px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 5px 6px;
  background: var(--cream); border-radius: 16px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line), 0 4px 10px rgba(214, 120, 148, 0.16);
  font: inherit; color: var(--ink); text-align: center;
  cursor: grab; touch-action: pan-x;
  -webkit-user-drag: none;
}
.tile img { width: 62px; height: 62px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.tile .tn {
  font-size: 12.5px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: #fff; border-radius: 999px; padding: 1px 8px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.tile .td { font-size: 11px; color: var(--ink-soft); line-height: 1.3; pointer-events: none; }
.tile .tier {
  font-size: 11px; font-weight: 800; color: #fff; background: #f09bb1;
  padding: 1px 10px; border-radius: 6px; pointer-events: none;
}
.tile .cost { font-size: 13px; font-weight: 800; pointer-events: none; display: flex; align-items: center; gap: 3px; }
.tile.picked { background: #fff0f4; box-shadow: 0 0 0 3px var(--pink-2), 0 4px 12px rgba(236, 127, 156, 0.35); }
.tile.picked::after {
  content: "✓"; position: absolute; right: -6px; top: -6px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--pink-2); color: #fff;
  font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.tile.none { justify-content: center; background: #fdf3f5; }
.tile.none .tn { font-size: 14px; }

.drag-ghost {
  position: fixed; z-index: 100;
  width: 86px; height: 86px;
  transform: translate(-50%, -110%);
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(160, 80, 100, 0.35));
}
.drag-ghost img { width: 100%; height: 100%; object-fit: contain; }
.drag-ghost.ghost-text {
  width: auto; height: auto;
  background: #fff; border-radius: 999px; box-shadow: 0 0 0 2px var(--line);
  padding: 6px 12px; font-weight: 700; font-size: 14px;
}

/* ---------- 打包台 ---------- */
.pack-stage { position: relative; flex: 1; min-height: 230px; }
.pack-box {
  position: absolute; left: 50%; top: 50%;
  height: 96%; max-width: 92%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.box-ghost {
  position: absolute; inset: 8%; border-radius: 22px;
  border: 3px dashed rgba(236, 127, 156, 0.6); background: rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--pink-deep);
}
.pack-box.has-box .box-ghost { display: none; }
body.dragging .pack-box.hot .box-ghost, body.dragging .pack-box.hot .pbox { outline: none; }
body.dragging .pack-box.hot { filter: drop-shadow(0 0 14px rgba(236, 127, 156, 0.8)); }
.pack-items { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.in-item {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(160, 80, 100, 0.3));
}
.in-item.slot-case { left: 40%; top: 50%; height: 64%; width: auto; transform: translate(-50%, -50%) rotate(-8deg); }
.in-item.slot-support { left: 70%; top: 36%; height: 26%; width: auto; }
.in-item.slot-acc { left: 70%; top: 66%; height: 30%; width: auto; }
.in-item.drop-in { animation: dropIn .5s cubic-bezier(.3, 1.3, .5, 1); }
.in-item.slot-case.drop-in { animation: dropInR .5s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes dropIn {
  0% { transform: translate(-50%, -300%) scale(.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes dropInR {
  0% { transform: translate(-50%, -200%) rotate(-8deg) scale(.8); opacity: 0; }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
}
.pack-box.closed .pack-items { display: none; }
.pack-box.closing .pbox { animation: lidClose .5s ease-in; }
@keyframes lidClose {
  0% { transform: scale(1); }
  50% { transform: scale(1.04, .92); }
  100% { transform: scale(1); }
}
.pack-box.fly {
  transition: transform .9s cubic-bezier(.5, 0, .9, .6), opacity .9s ease;
  transform: translate(10%, -220%) rotate(14deg) scale(.35);
  opacity: 0;
}
.pbox {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: none;
  filter: drop-shadow(0 8px 10px rgba(160, 80, 100, 0.28));
  pointer-events: none;
}
.pack-box.has-box .pbox { display: block; }
.pack-box.pop-anim .pbox { animation: popScale .45s ease-out; }
.pack-box.tied .pbox { animation: tieBounce .6s ease-out; }
@keyframes tieBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.06, .94); }
  60% { transform: scale(.98, 1.03); }
  100% { transform: scale(1); }
}

.pack-decos { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.deco-slot { position: absolute; width: 27%; pointer-events: none; }
.deco-slot img { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 4px rgba(160, 80, 100, 0.3)); pointer-events: none; }
.deco-slot img.pop { animation: popScale .45s ease-out; }
.pack-stage.step-deco .deco-slot { pointer-events: auto; cursor: grab; touch-action: none; }
.deco-slot.moving { cursor: grabbing; }

/* 系丝带：按顺序划过光点 */
.ribbon-dots { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.ribbon-dots.on { pointer-events: auto; touch-action: none; }
.ribbon-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.ribbon-dots.on .ribbon-path { display: block; }
.tie-dot {
  position: absolute; width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%; background: #fff;
  border: 3px solid var(--pink);
  display: none;
}
.ribbon-dots.on .tie-dot { display: block; }
.tie-dot.next { background: #ffe58f; border-color: #fff; box-shadow: 0 0 0 3px var(--pink-2), 0 0 14px #ffd36e; animation: pulse .8s ease-in-out infinite; }
.tie-dot.hit { background: var(--pink-2); border-color: #fff; box-shadow: 0 0 0 2px var(--pink-2); }

/* 封口：圆圈缩到虚线圈时轻点 */
.seal-target {
  position: absolute; left: 50%; top: 50%;
  width: 34%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 6;
}
.seal-target.on { pointer-events: auto; cursor: pointer; }
.seal-dot { position: absolute; inset: 0; border-radius: 50%; border: 3px dashed #fff; box-shadow: 0 0 0 2px rgba(217, 87, 122, 0.5); display: none; }
.seal-target.on .seal-dot { display: block; }
.seal-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 5px solid var(--pink-2);
  box-shadow: 0 0 10px rgba(236, 127, 156, 0.7);
  transform: scale(2.2);
  opacity: 0;
}
.seal-target.on .seal-ring { opacity: 1; }
.seal-img { position: absolute; inset: -6%; width: 112%; height: 112%; display: none; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(160, 80, 100, 0.35)); }
.seal-img.on { display: block; animation: stamp .4s ease-out; }
@keyframes stamp {
  0% { transform: scale(1.8) rotate(-12deg); opacity: 0; }
  60% { transform: scale(.95) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ---------- 晒单卡 ---------- */
.review-card {
  position: relative;
  background: linear-gradient(180deg, #fff6f8, #fde9ef);
  border-radius: 28px; padding: 26px 16px 14px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #f6b9c9, 0 18px 40px rgba(120, 50, 70, 0.35);
  animation: cardIn .45s cubic-bezier(.3, 1.3, .5, 1);
  display: flex; flex-direction: column; gap: 10px;
}
@keyframes cardIn { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.rv-badge {
  position: absolute; left: 50%; top: -15px; transform: translateX(-50%);
  background: linear-gradient(180deg, #f9b3c4, #ec7f9c); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: 1px; white-space: nowrap;
  padding: 5px 16px; border-radius: 999px; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(217, 87, 122, 0.3);
}
.rv-title {
  text-align: center; font-size: 28px; font-weight: 900; letter-spacing: 3px; color: #ea7895;
  -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
}
.rv-inner {
  background: #fff; border-radius: 18px; padding: 12px;
  box-shadow: inset 0 0 0 2px #f6cbd6;
  display: flex; flex-direction: column; gap: 8px;
}
.rv-head { display: flex; gap: 10px; align-items: center; }
.rv-meta { flex: 1; min-width: 0; }
.rv-name { font-weight: 800; font-size: 15px; }
.stars { font-size: 22px; letter-spacing: 2px; color: #f1dfe4; line-height: 1.2; }
.stars span { display: inline-block; }
.stars span.on { color: #ffc94d; text-shadow: 0 1px 0 #e8a52a; animation: starpop .42s ease-out; }
.rv-score { text-align: center; font-size: 11px; color: var(--ink-soft); }
.rv-score b { display: block; font-size: 26px; color: var(--pink-deep); line-height: 1.1; }
.rv-text { font-size: 14.5px; line-height: 1.65; background: var(--pink-pale); border-radius: 12px; padding: 8px 10px; }
.checklist { list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.checklist li {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: #fff; border-radius: 12px; padding: 5px 2px; font-size: 12px;
  box-shadow: inset 0 0 0 1.5px #f3d3dc;
}
.checklist li span:first-child { color: var(--ink-soft); }
.checklist .ok { color: #3a9e72; font-weight: 800; }
.checklist .part { color: #c48a2a; font-weight: 800; }
.checklist .ng { color: var(--pink-deep); font-weight: 800; }
.rv-money { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); border-top: 2px dotted #f3d3dc; padding-top: 8px; flex-wrap: wrap; }
.rv-money b { color: var(--ink); }
.rv-money .sum { font-size: 22px; font-weight: 900; color: var(--pink-deep); display: flex; align-items: center; gap: 4px; }
.rv-actions { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rv-actions .btn { width: 100%; }

/* ---------- 打烊账本 ---------- */
.content.night { align-items: center; gap: 12px; }
.ledger {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #f8efe1; border-radius: 10px;
  border: 6px solid #e47e98;
  box-shadow: 0 0 0 2px #f8c8d4, 0 22px 40px rgba(20, 20, 60, 0.45);
  padding: 16px 0 54px;
  margin-bottom: 30px;
  animation: cardIn .5s ease-out;
}
.ledger::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.6), rgba(0, 0, 0, 0.08));
}
.ledger::after {
  content: ""; position: absolute; left: 50%; top: -10px; width: 22px; height: 46px; margin-left: -11px;
  background: linear-gradient(180deg, #f6d27a, #e5b04a); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.ledger-page { padding: 6px 12px; font-size: 13px; }
.ledger-page.left { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.lg-day { font-size: 12px; color: #9a7b6e; }
.lg-day b { color: var(--pink-deep); }
.lg-title { font-size: 16px; font-weight: 900; color: #5a4038; padding-bottom: 8px; border-bottom: 1px solid #e3d3c0; }
.lg-lines { font-size: 12.5px; line-height: 1.9; color: #6b5048; }
.lg-lines b { color: var(--pink-deep); }
.lg-rows { display: flex; flex-direction: column; gap: 3px; }
.lg-rows div { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px dotted #e3d3c0; color: #5a4038; }
.lg-rows b { font-weight: 800; }
.lg-total { display: flex; justify-content: space-between; margin-top: 8px; font-size: 15px; font-weight: 900; color: #5a4038; }
.lg-total b { color: var(--pink-deep); }
.ledger-cat {
  position: absolute; left: -10px; bottom: -44px; width: 46%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
  animation: breathe 3.2s ease-in-out infinite; transform-origin: bottom center;
}
@keyframes breathe { 50% { transform: scale(1.02, .985); } }

/* ---------- 提示 ---------- */
#toast {
  position: fixed; left: 50%; top: 18%; z-index: 120; transform: translate(-50%, -10px);
  background: rgba(255, 255, 255, 0.96); color: var(--pink-deep); font-weight: 800;
  padding: 9px 18px; border-radius: 999px; box-shadow: 0 0 0 2px var(--line), var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动效 ---------- */
.pop { animation: popScale .45s ease-out; }
@keyframes popScale {
  0% { transform: scale(.25); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes starpop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px) rotate(-1deg); }
  40% { transform: translate(6px, -2px) rotate(1deg); }
  60% { transform: translate(-4px, 0); }
  80% { transform: translate(3px, 1px); }
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }

/* ---------- 矮屏 ---------- */
@media (max-height: 760px) {
  .content { gap: 7px; }
  .fs { width: 60px; }
  .fs .ic { width: 42px; height: 42px; }
  .flow::before { top: 21px; }
  .avatar-ring.sm { width: 42px; height: 42px; }
  .say { padding: 6px 10px 6px 12px; font-size: 13.5px; min-height: 38px; }
  .tray { min-height: 122px; }
  .tile { width: 84px; }
  .tile img { width: 52px; height: 52px; }
  .btn { min-height: 46px; font-size: 16px; }
  .logo-cat { width: 120px; }
  .logo-title { font-size: 42px; }
}
@media (max-height: 680px) {
  .tray { min-height: 108px; }
  .tile img { width: 44px; height: 44px; }
  .tile .td { display: none; }
  .fs .lb { font-size: 11px; }
  .stage { min-height: 120px; }
  .pack-stage { min-height: 170px; }
  .oc { font-size: 10.5px; padding: 2px 6px; }
  .review-card { padding-top: 22px; gap: 7px; }
  .rv-title { font-size: 23px; }
  .msg { font-size: 14px; padding: 7px 11px; }
}

/* 横屏手机：竖屏游戏，提示转过来 */
#rotate-hint {
  display: none;
  position: fixed; inset: 0; z-index: 150;
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  background: #f7d4de; color: var(--pink-deep); font-size: 18px; font-weight: 700; letter-spacing: 1px;
}
#rotate-hint .phone-icon {
  width: 46px; height: 76px; border: 4px solid var(--pink-deep); border-radius: 10px;
  animation: tilt 1.6s ease-in-out infinite;
}
@keyframes tilt { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(90deg); } }
@media (orientation: landscape) and (max-height: 500px) {
  #rotate-hint { display: flex; }
  #app { visibility: hidden; }
}

/* =====================================================================
   动效与新玩法界面（v2）
   ===================================================================== */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --ease-out: cubic-bezier(.22, 1, .36, 1); }

/* ---------- 屏幕切换：淡入 + 内容依次浮起 ---------- */
.screen.active { z-index: 2; animation: none; }
.screen.leaving { display: flex; z-index: 1; pointer-events: none; animation: screenOut .32s ease-in forwards; }
.screen.entering { animation: screenIn .42s var(--ease-out); }
@keyframes screenIn { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: none; } }
@keyframes screenOut { to { opacity: 0; transform: scale(.97); } }
.screen.entering .content > * { animation: riseIn .55s var(--ease-out) both; }
.screen.entering .content > *:nth-child(2) { animation-delay: .05s; }
.screen.entering .content > *:nth-child(3) { animation-delay: .1s; }
.screen.entering .content > *:nth-child(4) { animation-delay: .15s; }
.screen.entering .content > *:nth-child(5) { animation-delay: .2s; }
.screen.entering .content > *:nth-child(6) { animation-delay: .25s; }
.screen.entering .content > *:nth-child(7) { animation-delay: .3s; }
.screen.entering .content > *:nth-child(8) { animation-delay: .35s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 背景飘落的花瓣与亮片 ---------- */
#ambient { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.amb {
  position: absolute; bottom: -20px; display: block;
  animation: ambFloat linear infinite;
  transform: scale(var(--s, 1));
}
.amb.petal { width: 11px; height: 9px; background: #f9bfd0; border-radius: 80% 0 80% 0; opacity: .75; }
.amb.glint { width: 12px; height: 12px; background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: .9; filter: drop-shadow(0 0 3px #fff); }
.amb.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 6px #fff; }
#app.night .amb.petal { background: #e7d8ff; }
#app.night .amb.glint { background: #fff6c8; filter: drop-shadow(0 0 4px #ffe58f); }
@keyframes ambFloat {
  0% { transform: translate(0, 0) rotate(0) scale(var(--s, 1)); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(var(--sway, 20px), -55vh) rotate(180deg) scale(var(--s, 1)); }
  90% { opacity: .8; }
  100% { transform: translate(0, -112vh) rotate(360deg) scale(var(--s, 1)); opacity: 0; }
}

/* ---------- 特效层 ---------- */
#fx { position: fixed; inset: 0; z-index: 130; pointer-events: none; overflow: hidden; }
.fly-coin {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c8 0 18%, #ffd85c 40%, #f0a82a 100%);
  box-shadow: inset 0 -2px 0 #d68a17, 0 2px 6px rgba(240, 168, 42, .5);
  transition: transform .26s var(--spring);
}
.fly-coin.go { transition: transform .5s cubic-bezier(.55, -0.2, .75, .9); }
.pt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; animation: ptOut .8s var(--ease-out) forwards; }
.pt.heart { background: #ff8fb0; clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%); width: 13px; height: 13px; }
.pt.star { background: #ffe07a; clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); filter: drop-shadow(0 0 3px #fff); }
@keyframes ptOut {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(90deg); opacity: 0; }
}
.mood-heart {
  position: absolute; width: 16px; height: 16px; margin-left: -8px;
  background: #ff7aa2; clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%);
  animation: moodUp 1.1s var(--ease-out) both;
}
@keyframes moodUp {
  0% { transform: translateY(0) scale(.2); opacity: 0; }
  25% { transform: translateY(-14px) scale(1.2); opacity: 1; }
  100% { transform: translate(8px, -54px) scale(.8); opacity: 0; }
}
.mood-sweat {
  position: absolute; width: 11px; height: 15px; background: linear-gradient(180deg, #d9f1ff, #8cc8f2);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; clip-path: polygon(50% 0, 100% 60%, 85% 95%, 50% 100%, 15% 95%, 0 60%);
  animation: sweat 1s ease-in both;
}
@keyframes sweat { 0% { transform: translateY(-6px) scale(.4); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { transform: translateY(14px); opacity: 0; } }
.js-mood.happy { animation: avHappy .55s var(--spring); }
.js-mood.sad { animation: avSad .5s ease-out; }
@keyframes avHappy { 0% { transform: none; } 35% { transform: translateY(-6px) scale(1.12); } 100% { transform: none; } }
@keyframes avSad { 0%, 100% { transform: none; } 25% { transform: translateX(-4px) rotate(-6deg); } 60% { transform: translateX(3px) rotate(4deg); } }

/* ---------- HUD ---------- */
.coin-pill.bump { animation: bump .45s var(--spring); }
@keyframes bump { 0% { transform: none; } 40% { transform: scale(1.18); } 100% { transform: none; } }
.coin-pill .coin { animation: coinSpin 4s ease-in-out infinite; }
@keyframes coinSpin { 0%, 85%, 100% { transform: rotateY(0); } 92% { transform: rotateY(180deg); } }
.hearts .h { font-style: normal; color: #ecd6dc; display: inline-block; }
.hearts .h.on { color: var(--pink-2); }
.hearts .h.lost { animation: heartLost .7s ease-out; }
@keyframes heartLost { 0% { color: var(--pink-2); transform: none; } 40% { transform: scale(1.8) translateY(-4px); color: var(--pink-2); } 100% { transform: none; } }
.hud-combo {
  font-size: 12px; font-weight: 900; color: #fff; white-space: nowrap;
  background: linear-gradient(90deg, #ff9a8b, #ff6a88, #ff99ac); background-size: 200% 100%;
  padding: 4px 10px; border-radius: 999px; box-shadow: 0 0 0 2px #fff, 0 3px 10px rgba(255, 106, 136, .4);
  animation: comboShine 2s linear infinite;
}
@keyframes comboShine { to { background-position: 200% 0; } }

/* ---------- 开场 ---------- */
.logo-title span { display: inline-block; animation: letterIn .7s var(--spring) both, letterFloat 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms), calc(.8s + var(--i) * 160ms); }
@keyframes letterIn { from { transform: translateY(-40px) scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes letterFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px) rotate(-2deg); } }
.logo-cat { cursor: pointer; pointer-events: auto; }
.logo-cat.purr, .pet-cat.purr img { animation: purr .7s var(--spring); }
@keyframes purr {
  0% { transform: none; } 20% { transform: translateY(-14px) scale(1.06, .94); } 40% { transform: translateY(0) scale(.94, 1.06); }
  55% { transform: rotate(-6deg); } 70% { transform: rotate(5deg); } 100% { transform: none; }
}
.dots i.past { background: #f5b4c4; }
.intro-text::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--pink-2); animation: blink 1s steps(1) infinite; }

/* ---------- 按钮手感 ---------- */
.btn { position: relative; overflow: hidden; transition: transform .22s var(--spring), box-shadow .15s, opacity .2s; }
.btn:active:not(:disabled) { transform: translateY(3px) scale(.96); }
.btn.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg); animation: shine 3.2s ease-in-out infinite;
}
.btn.primary:disabled::after { display: none; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn.ready { animation: readyPop .6s var(--spring); }
@keyframes readyPop { 0% { transform: scale(.92); } 50% { transform: scale(1.06); } 100% { transform: none; } }

/* ---------- 后台顶栏：目标 + 进货 ---------- */
.shop-bar { display: flex; gap: 8px; align-items: center; }
.goal-pill, .store-btn {
  font: inherit; border: none; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 6px 12px; min-height: 36px;
  box-shadow: 0 0 0 2px var(--line), 0 3px 10px rgba(214, 120, 148, .18);
  color: var(--ink); transition: transform .2s var(--spring);
}
.goal-pill:active, .store-btn:active { transform: scale(.94); }
.goal-pill { flex: 1; justify-content: space-between; }
.gp-label { font-size: 13px; font-weight: 800; color: var(--pink-deep); }
.gp-dots { display: flex; align-items: center; gap: 4px; }
.gp-dots i { width: 9px; height: 9px; border-radius: 50%; background: #f3dbe2; transition: background .3s; }
.gp-dots i.on { background: var(--pink-2); box-shadow: 0 0 6px rgba(236, 127, 156, .7); animation: pop .45s var(--spring); }
.gp-dots b { font-size: 12px; color: var(--ink-soft); margin-left: 4px; }
.store-btn { position: relative; font-size: 13px; font-weight: 800; color: var(--pink-deep); padding-left: 6px; }
.store-btn img { width: 26px; height: 26px; object-fit: contain; }
.store-btn .badge { position: absolute; right: -2px; top: -2px; width: 11px; height: 11px; border-radius: 50%; background: #ff5f7e; box-shadow: 0 0 0 2px #fff; animation: pulse 1.2s ease-in-out infinite; }

.price-col { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rush-tag {
  font-size: 11px; font-weight: 900; color: #fff; padding: 2px 9px; border-radius: 6px;
  background: linear-gradient(90deg, #ff9966, #ff5e62); animation: rushBlink 1s ease-in-out infinite;
}
@keyframes rushBlink { 50% { transform: scale(1.08); box-shadow: 0 0 10px rgba(255, 94, 98, .6); } }
.buyer-card.rush { box-shadow: 0 0 0 2px #ffb199, 0 0 16px rgba(255, 120, 100, .35); }

.msg.typing { display: flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #f0a7b9; animation: typingDot 1s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.msg { animation: msgIn .42s var(--spring); transform-origin: left top; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
.slip { transition: opacity .35s, filter .35s; }
.slip.veiled { opacity: .35; filter: blur(2px); }
.slip.slip-in .slip-grid > div { animation: riseIn .45s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }

/* ---------- 流程条 ---------- */
.flow-fill {
  position: absolute; left: 34px; top: 24px; height: 5px; border-radius: 3px; z-index: 0;
  width: calc((100% - 68px) * var(--k, 0));
  background: linear-gradient(90deg, #f9b3c4, #ec7f9c); box-shadow: 0 0 6px rgba(236, 127, 156, .6);
  transition: width .7s var(--ease-out);
}
.fs { z-index: 1; }
.fs .ic { transition: transform .35s var(--spring), box-shadow .3s; }
.fs.current .ic { animation: icBob 1.6s ease-in-out infinite; }
@keyframes icBob { 0%, 100% { transform: scale(1.12) translateY(0); } 50% { transform: scale(1.12) translateY(-3px); } }
.fs.done .ic::after { animation: pop .4s var(--spring); }
.fs:active .ic { transform: scale(.92); }

/* ---------- 订单小条 ---------- */
.oc { transition: background .3s, box-shadow .3s; }
.oc.just { animation: chipOk .6s var(--spring); }
@keyframes chipOk { 0% { transform: scale(1); } 40% { transform: scale(1.18); background: #c9f0dd; } 100% { transform: none; } }
.oc.price.rush { background: linear-gradient(90deg, #ffe1d6, #ffd0d8); color: #e0533f; }

.patience { display: flex; align-items: center; gap: 6px; height: auto; background: none; overflow: visible; }
.p-heart {
  width: 14px; height: 14px; flex: none; background: #f07f9d;
  clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%);
  animation: beat 1.4s ease-in-out infinite;
}
.patience.low .p-heart { background: #ff8a5c; animation-duration: .5s; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }
.patience-track { flex: 1; height: 9px; border-radius: 999px; background: #f6e3e8; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); }
.patience-fill {
  background: repeating-linear-gradient(-45deg, #f7b6c6 0 8px, #f29ab1 8px 16px) !important;
  background-size: 22px 22px !important; animation: stripes 1s linear infinite;
}
.patience-fill.low { background: repeating-linear-gradient(-45deg, #ffc58a 0 8px, #ff9a6b 8px 16px) !important; }
@keyframes stripes { to { background-position: 22px 0; } }

/* ---------- 托盘格子 ---------- */
.tray.stagger .tile { animation: tileIn .5s var(--spring) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(26px) scale(.7); } to { opacity: 1; transform: none; } }
.tile { transition: transform .25s var(--spring), opacity .2s, box-shadow .2s; }
.tile:active { transform: scale(.92); }
@media (hover: hover) { .tile:hover { transform: translateY(-4px); } }
.tile.lifting { opacity: .35; transform: scale(.88); }
.tile.picked::after { animation: pop .4s var(--spring); }
.tile.locked { cursor: not-allowed; background: #f7f0f2; }
.tile.locked img { filter: grayscale(.85) brightness(1.08); opacity: .55; }
.tile .lock { font-size: 10.5px; font-weight: 800; color: #fff; background: #c9b3ba; padding: 1px 8px; border-radius: 6px; }

.drag-ghost {
  transform: translate(-50%, -110%) rotate(var(--tilt, 0deg)) scale(1.12);
  transition: transform .12s ease-out;
}
.drag-ghost.over { transform: translate(-50%, -110%) rotate(var(--tilt, 0deg)) scale(1.28); filter: drop-shadow(0 0 12px rgba(236, 127, 156, .9)); }
.drag-ghost.back { transition: left .3s var(--ease-out), top .3s var(--ease-out), transform .3s, opacity .3s; transform: translate(-50%, -110%) scale(.5); opacity: 0; }

/* ---------- 配货台 ---------- */
.phone-ghost { animation: ghostBreath 2s ease-in-out infinite; transition: opacity .3s; }
.phone.has-case .phone-ghost { opacity: 0; }
@keyframes ghostBreath { 50% { border-color: rgba(236, 127, 156, .95); background: rgba(255, 255, 255, .5); } }
.stage-hint { animation: hintBob 1.6s ease-in-out infinite; }
@keyframes hintBob { 50% { transform: translate(-50%, -58%); } }
.case-img.land { animation: landCase .55s var(--spring); }
@keyframes landCase { 0% { transform: translateY(-36px) scale(1.08, .9); opacity: .2; } 55% { transform: translateY(4px) scale(.97, 1.04); opacity: 1; } 100% { transform: none; } }
.sup-img.land { animation: landSmall .5s var(--spring); }
@keyframes landSmall { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.acc-img { transform-origin: 30% 0; animation: swing 2.8s ease-in-out infinite; }
.acc-img.land { animation: landSwing 1.2s var(--ease-out), swing 2.8s ease-in-out 1.2s infinite; }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes landSwing { 0% { transform: translateY(-30px) rotate(-30deg); opacity: 0; } 30% { opacity: 1; transform: rotate(22deg); } 55% { transform: rotate(-12deg); } 80% { transform: rotate(6deg); } 100% { transform: rotate(-5deg); } }

/* 店长棉花糖 */
.pet-cat {
  position: absolute; left: 0; bottom: 0; z-index: 6; width: 62px;
  border: none; background: none; padding: 0; cursor: pointer; touch-action: manipulation;
}
.pet-cat img { width: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(160, 80, 100, .3)); animation: catIdle 3.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes catIdle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .975); } 88% { transform: rotate(0); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
.pet-cat.yawn img { animation: yawn .8s ease-in-out; }
@keyframes yawn { 30% { transform: scale(1.06, .9); } 70% { transform: scale(.97, 1.04); } }
.pet-tip {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; color: var(--pink-deep); white-space: nowrap;
  background: #fff; padding: 2px 8px; border-radius: 999px; box-shadow: 0 0 0 1.5px var(--line);
  animation: tipFloat 2s ease-in-out infinite;
}
.pet-tip.say { animation: pop .4s var(--spring); }
@keyframes tipFloat { 50% { transform: translate(-50%, -3px); } }

/* ---------- 打包台 ---------- */
.pack-box { transform: translate(-50%, -50%); }
.pack-box.box-in .pbox { animation: boxDrop .6s var(--spring); }
@keyframes boxDrop { 0% { transform: translateY(-60%) scale(.8) rotate(-6deg); opacity: 0; } 60% { transform: translateY(3%) scale(1.03, .96); opacity: 1; } 100% { transform: none; } }
.pack-box.thud .pbox { animation: thud .35s ease-out; }
@keyframes thud { 40% { transform: scale(1.04, .95); } 100% { transform: none; } }
.plid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; opacity: 0; z-index: 4; filter: drop-shadow(0 10px 12px rgba(160, 80, 100, .3)); }
.plid.drop { animation: lidDrop .62s cubic-bezier(.5, 0, .4, 1.3) forwards; }
@keyframes lidDrop { 0% { transform: translateY(-75%) scale(1.06); opacity: 0; } 30% { opacity: 1; } 75% { transform: translateY(2%) scale(1.01, .98); opacity: 1; } 100% { transform: none; opacity: 1; } }
.pack-box.fly { transition: none; animation: shipOut 1.05s cubic-bezier(.5, 0, .7, .4) forwards; opacity: 1; }
@keyframes shipOut {
  0% { transform: translate(-50%, -50%); }
  25% { transform: translate(-50%, -60%) scale(1.04, .96); }
  40% { transform: translate(-52%, -50%) scale(.98, 1.03) rotate(-3deg); }
  100% { transform: translate(140%, -60%) rotate(14deg) scale(.7); opacity: 0; }
}
.ship-stamp {
  position: absolute; left: 50%; top: 46%; z-index: 9; pointer-events: none;
  font-size: 34px; font-weight: 900; letter-spacing: 6px; color: #ec6f90;
  border: 4px solid #ec6f90; border-radius: 14px; padding: 4px 18px 4px 24px;
  background: rgba(255, 255, 255, .85);
  transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); opacity: 0;
}
.ship-stamp.on { animation: stampIn .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes stampIn { to { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } }
.pack-stage.impact { animation: impact .3s ease-out; }
@keyframes impact { 20% { transform: translate(2px, 3px); } 45% { transform: translate(-3px, -1px); } 70% { transform: translate(1px, -2px); } }
.ribbon-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.ribbon-dots.live .ribbon-guide { display: block; }
.ribbon-path { filter: drop-shadow(0 0 4px rgba(236, 127, 156, .8)); }
.tie-dot { transition: transform .2s var(--spring), background .2s; }
.ribbon-dots:not(.live) .tie-dot { display: none; }
.tie-dot.hit { animation: pop .35s var(--spring); }
.seal-dot { animation: dashSpin 6s linear infinite; }
@keyframes dashSpin { to { transform: rotate(360deg); } }
.seal-ring.near { border-color: #ffd36e; box-shadow: 0 0 18px #ffd36e; }
.seal-target { top: 66%; }
.deco-slot { transform: translate(-50%, -50%) rotate(var(--r, 0deg)); transition: transform .2s var(--spring), opacity .2s; }
.deco-slot.moving { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.18); z-index: 5; }
.deco-slot.out { opacity: .4; }
.deco-slot img.pop { animation: decoIn .5s var(--spring); }
@keyframes decoIn { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.float-text.perfect { color: #ff6f9a; font-size: 32px; }
.float-text.miss { color: #a99aa0; }
.float-text.small { font-size: 16px; color: var(--ink-soft); -webkit-text-stroke: 3px #fff; top: 12%; }
.spark.star { clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); width: 14px; height: 14px; border-radius: 0; }

/* ---------- 晒单卡 ---------- */
.review-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.review-card.drop { animation: cardDrop .7s var(--spring); }
@keyframes cardDrop { 0% { transform: translateY(-60px) scale(.85) rotate(-3deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.review-card .burst { top: 30%; }
.combo-badge {
  align-self: center; margin-top: -4px;
  font-size: 13px; font-weight: 900; color: #fff; padding: 4px 14px; border-radius: 999px;
  background: linear-gradient(90deg, #ff9a8b, #ff6a88, #ff99ac); background-size: 200% 100%;
  box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(255, 106, 136, .4);
  animation: comboShine 2s linear infinite;
}
.checklist li { animation: riseIn .4s var(--ease-out) both; animation-delay: calc(.35s + var(--i) * 70ms); }
.stars span.on { animation: starpop .5s var(--spring); }
.rv-money .sum { transition: transform .3s; }

/* ---------- 打烊账本 ---------- */
.ledger { perspective: 900px; }
.ledger.open .ledger-page.left { animation: pageL .8s var(--ease-out) both; transform-origin: right center; }
.ledger.open .ledger-page.right { animation: pageR .8s var(--ease-out) .1s both; transform-origin: left center; }
@keyframes pageL { from { transform: rotateY(70deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pageR { from { transform: rotateY(-70deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ledger.open .lg-rows div { animation: riseIn .4s var(--ease-out) both; animation-delay: calc(.5s + var(--i) * 80ms); }
.lg-goals { display: flex; flex-direction: column; gap: 3px; text-align: left; font-size: 11px; color: #9a7b6e; margin-top: 4px; padding-top: 6px; border-top: 1px dashed #e3d3c0; }
.lg-goals div { display: flex; gap: 5px; align-items: center; line-height: 1.35; }
.lg-goals i { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 1.5px solid #d8c3b5; }
.lg-goals .ok { color: #5a4038; }
.lg-goals .ok i { background: var(--pink-2); border-color: var(--pink-2); }
.ledger-cat { position: absolute; left: -10px; bottom: -44px; width: 46%; pointer-events: none; }
.ledger-cat img { width: 100%; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); animation: breathe 3.2s ease-in-out infinite; transform-origin: bottom center; }
.zz { position: absolute; left: 62%; top: 10%; font-weight: 900; color: #fff; text-shadow: 0 0 6px #b9a8ff; opacity: 0; animation: zz 3s ease-out infinite; }
.zz.z1 { font-size: 13px; }
.zz.z2 { font-size: 16px; animation-delay: 1s; }
.zz.z3 { font-size: 20px; animation-delay: 2s; }
@keyframes zz { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(26px, -46px) rotate(12deg); opacity: 0; } }
.night-actions { display: flex; gap: 10px; width: 100%; justify-content: center; }
.night-actions .btn.gold { flex: 1; width: auto; max-width: 240px; }
.btn.ghost-night {
  flex: 0 0 auto; color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ledger-cat ~ * { }
.ledger { margin-bottom: 34px; }
.ledger-page.left { gap: 4px; }

/* ---------- 进货 ---------- */
.store-tip { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-top: -4px; }
.store-grid {
  flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 4px 10px; align-content: start;
}
.store-grid::-webkit-scrollbar { display: none; }
.sc {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: var(--cream); border-radius: 18px; padding: 10px 8px; border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line), 0 5px 14px rgba(214, 120, 148, .16);
  animation: tileIn .5s var(--spring) both; animation-delay: calc(var(--i) * 50ms);
}
.sc-img { width: 100%; height: 78px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: radial-gradient(circle, #fff 40%, #fde6ec 100%); }
.sc-img img { max-width: 80%; max-height: 70px; object-fit: contain; }
.sc:not(.owned) .sc-img img { animation: bob 3s ease-in-out infinite; }
.sc-name { font-size: 14px; font-weight: 800; }
.sc-sub { font-size: 11px; color: var(--ink-soft); line-height: 1.35; min-height: 15px; }
.sc-buy {
  font: inherit; font-size: 15px; font-weight: 900; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
  color: #fff; border: 2px solid #fff; border-radius: 999px; padding: 4px 16px;
  background: linear-gradient(180deg, #f9b3c4, #ec7f9c);
  box-shadow: 0 0 0 2px #f2a6b9, 0 3px 0 #d9677f; transition: transform .2s var(--spring);
}
.sc-buy:active { transform: scale(.92) translateY(2px); }
.sc-buy.poor { background: linear-gradient(180deg, #eee3e6, #d9c8cd); box-shadow: 0 0 0 2px #e3d3d8, 0 3px 0 #c4b0b6; color: #fff; }
.sc-owned { font-size: 12px; font-weight: 800; color: #3a9e72; background: #e6f6ef; padding: 4px 14px; border-radius: 999px; margin-top: 2px; }
.sc.owned { background: #fbfffd; }
.sc.just { animation: unlockFlip .8s var(--spring); }
@keyframes unlockFlip { 0% { transform: rotateY(0) scale(1); } 40% { transform: rotateY(90deg) scale(1.08); } 100% { transform: rotateY(0) scale(1); box-shadow: 0 0 0 3px #ffd36e, 0 0 24px rgba(255, 211, 110, .7); } }
.sc.perk .sc-img { background: radial-gradient(circle, #fff 40%, #efe6ff 100%); }

/* ---------- 今日目标弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 110; background: rgba(90, 40, 60, 0); pointer-events: none;
  transition: background .3s; display: flex; align-items: flex-end; justify-content: center;
}
.sheet-mask.on { background: rgba(90, 40, 60, .38); pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px; background: linear-gradient(180deg, #fff8fa, #fdeef3);
  border-radius: 26px 26px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(120, 50, 70, .25);
  transform: translateY(105%); transition: transform .45s var(--spring);
  display: flex; flex-direction: column; gap: 12px;
}
.sheet-mask.on .sheet { transform: none; }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: #f0c5d1; align-self: center; }
.sheet-title { text-align: center; font-size: 20px; font-weight: 900; color: #ea7895; letter-spacing: 3px; }
.goal-list { display: flex; flex-direction: column; gap: 10px; }
.goal-row { background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 0 0 2px var(--line); }
.sheet-mask.on .goal-row { animation: riseIn .45s var(--ease-out) both; animation-delay: calc(.15s + var(--i) * 80ms); }
.gr-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
.gr-reward { display: flex; align-items: center; gap: 3px; font-weight: 900; color: #c88a1c; }
.gr-bar { height: 8px; border-radius: 999px; background: #f6e3e8; margin-top: 7px; overflow: hidden; }
.gr-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f9b3c4, #ec7f9c); transition: width .8s var(--ease-out); }
.gr-num { font-size: 11px; color: var(--ink-soft); text-align: right; margin-top: 3px; }
.goal-row.done { box-shadow: 0 0 0 2px #a9dcc5; background: #f4fbf7; }
.goal-row.done .gr-bar i { background: linear-gradient(90deg, #a9e3c8, #6cc59d); }
.goal-row.done .gr-num { color: #3a9e72; font-weight: 800; }

/* ---------- 提示条 ---------- */
#toast { transition: opacity .25s, transform .35s var(--spring); max-width: 92vw; white-space: normal; text-align: center; font-size: 14px; }
#toast.goal { color: #8a5a1c; background: linear-gradient(180deg, #fff6d6, #ffe7a6); box-shadow: 0 0 0 2px #f3cd6e, 0 8px 20px rgba(240, 168, 42, .35); }

/* 矮屏下的新元素 */
@media (max-height: 760px) {
  .pet-cat { width: 52px; }
  .goal-pill, .store-btn { min-height: 32px; padding: 4px 10px; }
  .sc-img { height: 64px; }
}
@media (max-height: 680px) {
  .shop-bar { margin-bottom: -2px; }
  .screen-title { font-size: 20px; }
  .buyer-card { padding: 7px 10px; }
  .avatar-ring { width: 54px; height: 54px; }
  .slip { padding: 7px 10px; }
  .slip-grid { font-size: 12px; }
  .pet-cat { width: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #ambient { display: none; }
}
.ledger-cat { animation: none; filter: none; }
.ledger-cat { left: auto; right: -12px; bottom: -40px; width: 44%; }
.ledger-cat img { transform: scaleX(-1); animation: none; }
.ledger-cat .zz { left: 18%; }
.btn.ghost-night { background: rgba(70, 50, 130, .45); border-color: rgba(255, 255, 255, .75); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* =====================================================================
   v3：圆润字体、显眼的等级/天数/粉丝、升级、转盘、福袋、爆单、音乐
   ===================================================================== */
@font-face { font-family: "MiaoRound"; src: url("assets/fonts/zcool-kuaile-subset.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "MiaoRound2"; src: url("assets/fonts/huninn-subset.woff2") format("woff2"); font-display: swap; }
html, body, button, .btn, input { font-family: "MiaoRound", "MiaoRound2", "Yuanti SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { letter-spacing: .3px; }
.btn, .tile .tn, .sc-name, .screen-title, .rv-title, .logo-title, .sheet-title, .lv-title, .wheel-title, .bag-title { font-weight: 400; }
b, strong { font-weight: 400; }

/* ---------- 新 HUD ---------- */
.hud { gap: 6px; align-items: stretch; min-height: 50px; }
.hud-lv {
  flex: 1.4; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .94); border-radius: 18px; padding: 4px 10px 4px 4px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line), 0 4px 12px rgba(214, 120, 148, .2);
}
.hud-lv.bump { animation: bump .5s var(--spring); }
.lv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lv-name { font-size: 12px; color: var(--pink-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.lv-bar { height: 7px; border-radius: 999px; background: #f6dfe6; overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffc0d0, #ec6f90); box-shadow: 0 0 6px rgba(236, 111, 144, .6); transition: width .3s; }
.lv-fans { font-size: 11px; color: var(--ink-soft); line-height: 1.1; white-space: nowrap; }
.lv-fans b { font-size: 16px; color: var(--pink-deep); }
.lv-fans small { font-size: 10px; }

.medal {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 20%, #ffd3df 60%, #f59ab3 100%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f6a9bd, 0 3px 8px rgba(214, 90, 130, .35);
}
.medal .ti { position: absolute; inset: 7px; background: #ef6f92; clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%); }
.medal b { position: relative; z-index: 1; font-size: 15px; color: #fff; text-shadow: 0 1px 2px rgba(150, 40, 70, .6); margin-top: 1px; }
.medal.tier-diamond { background: radial-gradient(circle at 35% 30%, #fff 0 20%, #cfe9ff 60%, #7cb8f2 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #8cc5f5, 0 3px 8px rgba(70, 130, 210, .35); }
.medal.tier-diamond .ti { background: #4b9be6; clip-path: polygon(50% 100%, 0 38%, 22% 6%, 78% 6%, 100% 38%); }
.medal.tier-crown { background: radial-gradient(circle at 35% 30%, #fff 0 20%, #e8dcff 60%, #a98bf0 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #b9a1f5, 0 3px 8px rgba(120, 80, 210, .35); }
.medal.tier-crown .ti { background: #8a63e6; clip-path: polygon(0 30%, 25% 55%, 50% 10%, 75% 55%, 100% 30%, 88% 92%, 12% 92%); }
.medal.tier-gold { background: radial-gradient(circle at 35% 30%, #fff 0 20%, #fff0b8 55%, #f2b73c 100%); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f3c95d, 0 0 14px rgba(255, 200, 60, .7); animation: goldGlow 2s ease-in-out infinite; }
.medal.tier-gold .ti { background: #e09a12; clip-path: polygon(0 30%, 25% 55%, 50% 10%, 75% 55%, 100% 30%, 88% 92%, 12% 92%); }
@keyframes goldGlow { 50% { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f3c95d, 0 0 22px rgba(255, 200, 60, 1); } }
.medal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%); background-size: 250% 100%; animation: medalShine 3.5s ease-in-out infinite; }
@keyframes medalShine { 0%, 70% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.medal.big { width: 120px; height: 120px; }
.medal.big .ti { inset: 20px; }
.medal.big b { font-size: 40px; }

.hud-day {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(180deg, #f9a9bf, #ec7393); border-radius: 16px; padding: 4px 10px;
  box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(217, 87, 122, .35);
}
.day-tag { font-size: 12px; color: #fff; line-height: 1.1; white-space: nowrap; text-shadow: 0 1px 2px rgba(160, 40, 80, .4); }
.day-tag b { font-size: 21px; margin: 0 2px; display: inline-block; }
.day-tag.bump b { animation: bump .6s var(--spring); }
.hud-day .hearts { display: flex; gap: 2px; }
.hud-day .hearts .h {
  width: 9px; height: 9px; background: rgba(255, 255, 255, .4);
  clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%);
}
.hud-day .hearts .h.on { background: #fff; }
.hud-money { position: relative; flex: none; display: flex; align-items: center; }
.hud .coin-pill { font-size: 17px; padding: 4px 12px 4px 4px; height: 38px; align-self: center; }
.hud .coin-pill .coin { width: 28px; height: 28px; }
.hud-combo { display: none; }
.hud-combo.on {
  display: block; position: absolute; right: -2px; bottom: -9px;
  font-size: 10.5px; color: #fff; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(90deg, #ff9a8b, #ff6a88); box-shadow: 0 0 0 2px #fff;
}
.hud.fever .coin-pill { box-shadow: 0 0 0 2px #ffd36e, 0 0 16px rgba(255, 180, 60, .9); animation: feverPill 1s ease-in-out infinite; }
@keyframes feverPill { 50% { transform: scale(1.05); } }
.hud .hud-stats { display: none; }

/* ---------- 爆单 ---------- */
#app.fever::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 0 4px rgba(255, 205, 90, .9), inset 0 0 40px rgba(255, 170, 60, .55);
  animation: feverEdge 1.2s ease-in-out infinite;
}
@keyframes feverEdge { 50% { box-shadow: inset 0 0 0 4px rgba(255, 120, 150, .9), inset 0 0 56px rgba(255, 120, 150, .55); } }
.fever-banner {
  position: fixed; left: 50%; top: 28%; z-index: 125; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transform: translate(-50%, -50%) scale(0); opacity: 0;
}
.fever-banner b {
  font-size: 46px; color: #ffd84d; letter-spacing: 4px;
  -webkit-text-stroke: 3px #e5487a; paint-order: stroke fill;
  text-shadow: 0 5px 0 #fff, 0 10px 24px rgba(229, 72, 122, .55);
}
.fever-banner span { font-size: 16px; color: #fff; background: #ec6f90; padding: 3px 14px; border-radius: 999px; box-shadow: 0 0 0 3px #fff; }
.fever-banner.show { animation: feverIn 2.2s var(--ease-out) forwards; }
@keyframes feverIn {
  0% { transform: translate(-50%, -50%) scale(.2) rotate(-10deg); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; }
  25% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(.9); opacity: 0; }
}

/* ---------- 顶栏按钮 ---------- */
.wheel-btn { position: relative; padding-left: 6px; }
.wheel-btn.has { box-shadow: 0 0 0 2px #ffd36e, 0 0 12px rgba(255, 200, 80, .7); animation: feverPill 1.4s ease-in-out infinite; }
.mini-wheel {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(#ffd9e3 0 45deg, #fff3f6 45deg 90deg, #ffe08a 90deg 135deg, #e9dcff 135deg 180deg, #ffd9e3 180deg 225deg, #fff3f6 225deg 270deg, #ffe8c7 270deg 315deg, #ffd9e3 315deg);
  box-shadow: 0 0 0 2px #ec7f9c; animation: miniSpin 6s linear infinite;
}
@keyframes miniSpin { to { transform: rotate(360deg); } }
.store-btn .count {
  position: absolute; right: -4px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #ff5f7e; color: #fff; font-size: 11px; font-style: normal; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.music-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 2px var(--line);
  display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 10px;
}
.music-btn i { width: 3px; height: 14px; border-radius: 2px; background: var(--pink-2); transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.music-btn i:nth-child(2) { animation-delay: .2s; }
.music-btn i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.music-btn.off i { animation: none; transform: scaleY(.3); background: #d8c3ca; }
.music-btn.off::after { content: ""; position: absolute; width: 24px; height: 2.5px; background: #d8a3b1; transform: rotate(-40deg); margin-bottom: 7px; }
.music-btn { position: relative; }
.music-btn.corner { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top)); z-index: 5; }
.shop-bar .goal-pill { min-width: 0; }
.shop-bar .store-btn span { white-space: nowrap; }

/* ---------- 晒单标签与转盘按钮 ---------- */
.rv-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.rv-tags:empty { display: none; }
.tg { font-size: 12px; padding: 3px 10px; border-radius: 999px; color: #fff; animation: tileIn .5s var(--spring) both; animation-delay: calc(1.4s + var(--i) * 120ms); }
.tg.fever { background: linear-gradient(90deg, #ffb347, #ff6a88); }
.tg.dbl { background: linear-gradient(90deg, #a18cd1, #fbc2eb); }
.tg.fast { background: linear-gradient(90deg, #4facfe, #7ed3f5); }
.tg.rush { background: linear-gradient(90deg, #ff9966, #ff5e62); }
.tg.spin { background: linear-gradient(90deg, #f6d365, #fda085); }
.btn.spin {
  color: #8a4a00; border-color: #fff7dc; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: linear-gradient(180deg, #fff1b8, #ffd36e);
  box-shadow: 0 0 0 2px #f3c95d, 0 4px 0 #d9a53a, 0 0 18px rgba(255, 200, 80, .6);
  animation: spinGlow 1.2s ease-in-out infinite;
}
@keyframes spinGlow { 50% { transform: scale(1.03); box-shadow: 0 0 0 2px #f3c95d, 0 4px 0 #d9a53a, 0 0 28px rgba(255, 200, 80, .95); } }
.rv-actions { gap: 8px; }

/* ---------- 弹层通用 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 115; display: flex; align-items: center; justify-content: center;
  background: rgba(80, 30, 55, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.overlay.on { opacity: 1; pointer-events: auto; }
.overlay .burst { position: absolute; left: 50%; top: 42%; }
.overlay.opening .lv-box, .overlay.opening .wheel-box, .overlay.opening .bag-box { animation: ovPop .6s var(--spring); }
@keyframes ovPop { from { transform: scale(.6) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 升级 */
.ov-rays {
  position: absolute; left: 50%; top: 40%; width: 760px; height: 760px; margin: -380px 0 0 -380px;
  background: repeating-conic-gradient(rgba(255, 236, 170, .32) 0 10deg, transparent 10deg 22deg);
  border-radius: 50%; mask-image: radial-gradient(circle, #000 25%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 65%);
  animation: rays 14s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
.lv-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(86vw, 340px); text-align: center; }
.lv-kicker { font-size: 38px; color: #fff; letter-spacing: 4px; -webkit-text-stroke: 3px #ec6f90; paint-order: stroke fill; text-shadow: 0 6px 18px rgba(236, 111, 144, .6); }
.overlay.on .medal.big { animation: medalIn .9s var(--spring) .1s both, bob 3s ease-in-out 1s infinite; }
@keyframes medalIn { from { transform: scale(0) rotate(-200deg); } to { transform: none; } }
.lv-title { font-size: 18px; color: #fff; }
.lv-title b { display: block; font-size: 30px; color: #ffe58f; -webkit-text-stroke: 2px #d9577a; paint-order: stroke fill; }
.lv-rewards { display: flex; gap: 10px; }
.lv-rewards span { display: flex; align-items: center; gap: 6px; background: #fff; color: var(--pink-deep); font-size: 16px; padding: 6px 14px; border-radius: 999px; box-shadow: 0 0 0 2px #ffd36e; }
.lv-box .btn { width: 70%; flex: none; }

/* 转盘 */
.wheel-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(92vw, 380px); }
.wheel-title { font-size: 36px; color: #ffe58f; letter-spacing: 4px; -webkit-text-stroke: 3px #e5487a; paint-order: stroke fill; text-shadow: 0 5px 0 #fff; }
.wheel-sub { font-size: 14px; color: #fff; }
.wheel-wrap { position: relative; width: min(80vw, 300px); aspect-ratio: 1; margin: 6px 0; }
.wheel {
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 8px #ec7f9c, 0 0 0 12px #fff, 0 0 0 15px #f3c95d, 0 14px 30px rgba(0, 0, 0, .35);
}
.wheel.spinning { transition: transform 4.2s cubic-bezier(.15, .7, .1, 1); }
.wline { position: absolute; left: 50%; top: 0; width: 2px; height: 50%; margin-left: -1px; background: rgba(236, 127, 156, .35); transform-origin: bottom center; }
.wl { position: absolute; left: 50%; top: 0; width: 70px; height: 50%; margin-left: -35px; transform-origin: bottom center; display: flex; justify-content: center; }
.wl span { margin-top: 12%; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.wl em { font-style: normal; font-size: 13px; color: var(--ink); white-space: nowrap; }
.wl .wi { width: 22px; height: 22px; display: block; }
.wl-coin .wi { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8 0 18%, #ffd85c 40%, #f0a82a 100%); box-shadow: inset 0 -2px 0 #d68a17; }
.wl-fans .wi, .wl-energy .wi { background: #ef6f92; clip-path: polygon(50% 100%, 0 40%, 10% 10%, 35% 5%, 50% 25%, 65% 5%, 90% 10%, 100% 40%); }
.wl-energy .wi { background: #ff9a6b; }
.wl-double .wi { background: linear-gradient(135deg, #a18cd1, #fbc2eb); border-radius: 5px; box-shadow: 4px -4px 0 -1px #e3cff5; }
.wl-pet .wi { background: url("assets/cutouts/mascot-cat-sitting.webp") center/contain no-repeat; width: 28px; height: 28px; }
.wl-mystery .wi { background: url("assets/cutouts/box-mailer.webp") center/contain no-repeat; width: 26px; height: 26px; }
.wl.jackpot em { color: #d9577a; font-size: 18px; }
.wl.jackpot .wi { width: 28px; height: 28px; box-shadow: inset 0 -2px 0 #d68a17, 0 0 10px #ffd36e; }
.wheel-pointer {
  position: absolute; left: 50%; top: -22px; z-index: 3; width: 34px; height: 44px; margin-left: -17px;
  background: linear-gradient(180deg, #ff8fb0, #e5487a); clip-path: polygon(50% 100%, 0 30%, 15% 5%, 50% 0, 85% 5%, 100% 30%);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); transform-origin: 50% 20%;
}
.wheel-pointer.flick { animation: flick .12s ease-out; }
@keyframes flick { 50% { transform: rotate(-14deg); } }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  border: 4px solid #fff; cursor: pointer; font-family: inherit; font-size: 24px; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ffb3c8, #e5487a);
  box-shadow: 0 0 0 4px #f3c95d, 0 6px 14px rgba(0, 0, 0, .35); text-shadow: 0 2px 2px rgba(150, 30, 70, .5);
  animation: hubPulse 1.1s ease-in-out infinite; transition: transform .2s var(--spring);
}
.wheel-hub:active { transform: scale(.9); }
.wheel-hub:disabled { animation: none; filter: grayscale(.6); opacity: .8; cursor: default; }
@keyframes hubPulse { 50% { transform: scale(1.08); } }
.wheel-lights { position: absolute; inset: -11px; pointer-events: none; }
.wheel-lights i { position: absolute; left: 50%; top: 0; width: 8px; height: 50%; margin-left: -4px; transform-origin: bottom center; }
.wheel-lights i::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 6px #ffd36e; animation: bulb 1s steps(1) infinite; }
.wheel-lights i:nth-child(odd)::before { animation-delay: .5s; }
.overlay.spinning .wheel-lights i::before { animation-duration: .25s; }
@keyframes bulb { 50% { background: #ff8fb0; box-shadow: 0 0 6px #ff8fb0; } }
.wheel-result { min-height: 30px; font-size: 20px; color: #fff; text-align: center; opacity: 0; transform: scale(.6); }
.wheel-result.show { animation: resultIn .5s var(--spring) forwards; }
.wheel-result.big { font-size: 24px; color: #ffe58f; -webkit-text-stroke: 1.5px #d9577a; paint-order: stroke fill; }
@keyframes resultIn { to { opacity: 1; transform: none; } }
.wheel-box .btn { width: 60%; flex: none; }

/* 福袋 */
.bag-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(86vw, 340px); text-align: center; }
.bag-title { font-size: 30px; color: #fff; letter-spacing: 2px; -webkit-text-stroke: 3px #ec6f90; paint-order: stroke fill; }
.bag-sub { font-size: 14px; color: #fff; }
.bag { border: none; background: none; cursor: pointer; width: 190px; padding: 0; animation: bagWiggle 1.6s ease-in-out infinite; }
.bag img { width: 100%; display: block; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35)); }
@keyframes bagWiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-7deg) scale(1.04); } 80% { transform: rotate(6deg) scale(1.04); } 90% { transform: rotate(-3deg); } }
.bag.open { animation: bagOpen .5s var(--spring) forwards; }
@keyframes bagOpen { 40% { transform: scale(1.25, .8); } 100% { transform: scale(.85) translateY(10px); opacity: .5; } }
.bag-result { min-height: 40px; font-size: 32px; color: #ffe58f; -webkit-text-stroke: 2px #d9577a; paint-order: stroke fill; opacity: 0; }
.bag-result.show { animation: resultIn .5s var(--spring) forwards; }
.bag-box .btn { width: 70%; flex: none; }

@media (max-height: 680px) {
  .hud { min-height: 44px; }
  .medal { width: 36px; height: 36px; }
  .medal b { font-size: 13px; }
  .day-tag b { font-size: 18px; }
  .hud .coin-pill { height: 34px; font-size: 15px; }
  .hud .coin-pill .coin { width: 24px; height: 24px; }
  .music-btn { width: 32px; height: 32px; }
}
@media (max-width: 370px) {
  .hud-lv { padding-right: 6px; }
  .lv-name { font-size: 11px; }
  .shop-bar { gap: 6px; }
  .goal-pill .gp-dots i { width: 7px; height: 7px; }
  .store-btn { padding: 4px 8px; }
}
.hud-combo.on { bottom: auto; top: -9px; right: -4px; z-index: 2; }

/* =====================================================================
   v4：开始界面、订单小票（看图）、九宫格托盘
   ===================================================================== */
/* ---------- 开始界面 ---------- */
.title-scrim { background: linear-gradient(180deg, rgba(255, 240, 246, 0) 0%, rgba(255, 240, 246, 0) 55%, rgba(255, 232, 240, .85) 100%); }
.title-content { justify-content: space-between; padding-top: calc(54px + env(safe-area-inset-top)); padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.title-logo { text-align: center; }
.logo-title.big { font-size: 58px; letter-spacing: 8px; }
.title-logo .logo-sub { margin-top: 10px; font-size: 13px; }
.title-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.title-save {
  display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .92); border-radius: 18px; padding: 8px 16px 8px 8px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line), var(--shadow); min-height: 54px;
}
.title-save > div { display: flex; flex-direction: column; }
.title-save b { font-size: 16px; color: var(--pink-deep); }
.title-save span { font-size: 12px; color: var(--ink-soft); }
.title-save > div:only-child { padding-left: 8px; }
.start-btn { flex: none; width: min(78%, 300px); min-height: 62px; font-size: 24px; letter-spacing: 6px; animation: startPulse 1.8s ease-in-out infinite; }
@keyframes startPulse { 50% { transform: scale(1.05); } }
#s-title .btn-link.light { color: var(--pink-deep); text-shadow: none; }

/* ---------- 订单小票 ---------- */
.ticket {
  position: relative; background: #fffdfb; border-radius: 16px; padding: 10px 12px 12px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line), var(--shadow);
}
.ticket::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: -6px; height: 10px;
  background: radial-gradient(circle at 5px 10px, transparent 5px, #fffdfb 5.5px) 0 0 / 10px 10px repeat-x;
}
.ticket.slip-in { animation: riseIn .5s var(--spring); }
.tk-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px dashed var(--line); padding-bottom: 5px; margin-bottom: 8px; }
.tk-head span { font-size: 17px; color: var(--pink-deep); letter-spacing: 2px; }
.tk-head small { font-size: 12px; color: var(--ink-soft); }
.tk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 6px; }
.tc { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.tc-img {
  position: relative; width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #fff 45%, #fde8ee 100%); box-shadow: inset 0 0 0 2px #f6d3dc;
}
.tc-img img { max-width: 82%; max-height: 82%; object-fit: contain; }
.tc span { font-size: 12px; color: var(--ink); text-align: center; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tc.no .tc-img { background: #f6f0f2; box-shadow: inset 0 0 0 2px #eadde1; }
.tc.no span { color: #b8a5ab; }
.tc-x { width: 40%; height: 40%; position: relative; }
.tc-x::before, .tc-x::after { content: ""; position: absolute; left: 50%; top: 0; width: 4px; height: 100%; margin-left: -2px; border-radius: 2px; background: #d9c3ca; transform: rotate(45deg); }
.tc-x::after { transform: rotate(-45deg); }
.tc.wish .tc-img { background: radial-gradient(circle, #fff 45%, #fff3c9 100%); box-shadow: inset 0 0 0 2px #f3c95d, 0 0 10px rgba(255, 205, 90, .55); animation: wishGlow 1.6s ease-in-out infinite; }
.tc.wish span { color: #c88a1c; }
@keyframes wishGlow { 50% { box-shadow: inset 0 0 0 2px #f3c95d, 0 0 18px rgba(255, 205, 90, .95); } }
.tc.ok .tc-img::after {
  content: "✓"; position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%;
  background: #4cc38a; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff; animation: pop .4s var(--spring);
}
.tc.ok .tc-img { box-shadow: inset 0 0 0 2px #a9dcc5; background: radial-gradient(circle, #fff 45%, #e3f6ec 100%); }
.tc.hint .tc-img { animation: hintFlash .6s ease-out 2; }
@keyframes hintFlash { 50% { transform: scale(1.18); box-shadow: inset 0 0 0 3px #ff6f91, 0 0 16px rgba(255, 111, 145, .8); } }
#s-shop .chat { gap: 6px; }
#s-shop .msg { font-size: 14.5px; padding: 8px 12px; }

/* ---------- 配货 / 打包 顶部订单条 ---------- */
.order-strip {
  display: flex; gap: 8px; align-items: center;
  background: rgba(255, 252, 250, .95); border-radius: 18px; padding: 7px 10px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line), var(--shadow);
}
.order-strip .slots { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.order-strip .oc.price { flex: none; font-size: 12px; padding: 3px 8px; }
.order-strip .tc { width: 50px; flex: none; }
.order-strip .tc-img { max-width: 44px; border-radius: 11px; }
.order-strip .tc span { font-size: 10.5px; }
.order-strip .tc.ok .tc-img::after { width: 16px; height: 16px; font-size: 10px; right: -4px; top: -4px; }
.p-time { flex: none; font-size: 12px; color: #4b9be6; min-width: 46px; text-align: right; }
.p-time.gone { color: var(--ink-soft); }

/* ---------- 九宫格托盘 ---------- */
.grid-tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 2px 2px 4px; }
.grid-tray.idle { display: none; }
#pack-tray { display: flex; justify-content: center; gap: 8px; }
#pack-tray .gt { width: calc((100% - 32px) / 5); max-width: 84px; }
.gt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 3px 5px; border-radius: 16px; border: 2px solid #fff; cursor: pointer; touch-action: manipulation;
  background: var(--cream); color: var(--ink); font-family: inherit;
  box-shadow: 0 0 0 2px var(--line), 0 4px 10px rgba(214, 120, 148, .16);
  transition: transform .2s var(--spring), opacity .25s, filter .25s;
}
.gt:active { transform: scale(.9); }
.gt-img { width: 100%; aspect-ratio: 1; max-height: 64px; display: flex; align-items: center; justify-content: center; }
.gt-img img { max-width: 88%; max-height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(160, 80, 100, .22)); }
.gt-name { font-size: 12px; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gt-extra { font-size: 11px; color: #c88a1c; display: flex; align-items: center; gap: 2px; }
.gt.used { opacity: .3; transform: scale(.86); filter: grayscale(.7); pointer-events: none; }
.gt.nope { animation: nope .45s ease-out; }
@keyframes nope {
  0%, 100% { transform: none; }
  20% { transform: translateX(-7px) rotate(-4deg); box-shadow: 0 0 0 3px #ff7b98, 0 0 14px rgba(255, 90, 120, .6); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.grid-tray.stagger .gt { animation: tileIn .45s var(--spring) both; animation-delay: calc(var(--i) * 40ms); }
.fly-item { position: fixed; z-index: 131; object-fit: contain; pointer-events: none; transition: transform .38s cubic-bezier(.4, .1, .3, 1.2), opacity .38s ease-in; filter: drop-shadow(0 6px 8px rgba(160, 80, 100, .35)); }
.float-mini { position: fixed; z-index: 132; transform: translate(-50%, -50%); font-size: 15px; color: #ff5f7e; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; pointer-events: none; animation: floatup 0.9s ease-out forwards; }

/* 配货台：手机摆在展示台中间，更大 */
#s-work .stage { min-height: 150px; }
#s-work .phone { height: 94%; }
.phone.done { animation: phoneDone .7s var(--spring); }
@keyframes phoneDone { 30% { transform: translate(-50%, -50%) scale(1.08) rotate(-3deg); } 60% { transform: translate(-50%, -50%) scale(.98) rotate(2deg); } 100% { transform: translate(-50%, -50%); } }
.say { font-size: 15px; }

/* 打包台 */
.pack-footer:has(.btn:not(.hidden)) { display: flex; }
.pack-footer { min-height: 0; }
.content.tray-hidden .pack-stage { min-height: 260px; }
.tg.wish { background: linear-gradient(90deg, #f6d365, #ff9a9e); }
.tg.clean { background: linear-gradient(90deg, #84fab0, #8fd3f4); }

@media (max-height: 760px) {
  .tk-grid { gap: 6px 5px; }
  .tc-img { max-width: 54px; }
  .logo-title.big { font-size: 48px; }
  .gt-img { max-height: 54px; }
  .flow .fs .ic { width: 40px; height: 40px; }
  .flow::before, .flow-fill { top: 19px; }
}
@media (max-height: 680px) {
  .tc-img { max-width: 46px; border-radius: 11px; }
  .tc span { font-size: 11px; }
  .tk-head { padding-bottom: 3px; margin-bottom: 5px; }
  .ticket { padding: 8px 10px; }
  .gt-img { max-height: 46px; }
  .gt { padding: 4px 2px; }
  .gt-name { font-size: 11px; }
  .order-strip .tc { width: 42px; }
  .order-strip .tc-img { max-width: 36px; }
  .flow .lb { display: none; }
  .flow .fs .ic { width: 34px; height: 34px; }
  .flow::before, .flow-fill { top: 16px; }
  #s-shop .msg { font-size: 13.5px; padding: 6px 10px; }
  .start-btn { min-height: 54px; font-size: 21px; }
}
