:root {
  --bg-paper: #f3e5cc;
  --card-bg: #fffdf8;
  --ink: #4a3525;
  --ink-soft: #8a6d55;
  --orange: #f48c25;
  --orange-deep: #d9630a;
  --orange-light: #ffe3b8;
  --festive-red: #d43f33;
  --festive-red-soft: #fff0ed;
  --festive-gold: #e6a825;
  --leaf: #5e9c49;
  --border: #dec6a4;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(rgba(168, 118, 62, 0.16) 1.2px, transparent 1.2px),
    radial-gradient(rgba(217, 130, 48, 0.08) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 35%, rgba(255, 250, 238, 0.55) 0%, rgba(226, 200, 162, 0.25) 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  background-position: 0 0, 13px 13px, 0 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  overflow-x: hidden;
}

body.cg-mode {
  height: 100dvh;
  overflow: hidden !important;
}
body.cg-mode .seo-section {
  display: none !important;
}

.game-viewport {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: max(8px, env(safe-area-inset-top)) 10px 16px;
  touch-action: none;
}

.header {
  touch-action: pan-y;
}

body.cg-mode .game-viewport {
  height: 100dvh;
  min-height: 100dvh;
  align-items: flex-start;
  padding: 6px 8px 8px;
}

.app-shell {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

/* 擂台挑战横幅（有 URL 挑战参数时显示） */
.arena-banner {
  display: none;
  background: linear-gradient(90deg, #d94336, #eb6b2b);
  color: #fff9ec;
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(217, 67, 54, 0.25);
}

.arena-banner.show {
  display: flex;
}

.arena-banner.won {
  background: linear-gradient(90deg, #4b9c3e, #6eb544);
  box-shadow: 0 3px 10px rgba(75, 156, 62, 0.25);
}

.arena-close {
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
}

/* 顶部标题与状态栏（手机竖屏双行防溢出，桌面横屏自动变左栏卡片） */
.header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 2px 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.brand-title {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
}

.festive-tag {
  font-size: 10px;
  color: #fff;
  font-weight: 800;
  background: var(--festive-red);
  padding: 2px 6px;
  border-radius: 6px;
}

.brand-sub {
  font-size: 10.5px;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

.stats {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.stats .pill {
  flex: 0 0 auto;
}
.stats .icon-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
}

.pill {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 13px;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 46px;
  box-shadow: 0 2px 0 rgba(160, 120, 75, 0.12);
}
.pill.is-best {
  background: #fff8e6;
  border-color: #eab044;
}
.pill.is-best .pill-value {
  color: var(--festive-red);
}

.pill-label {
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.pill-value {
  font-size: 15px;
  font-weight: 900;
  color: var(--orange-deep);
  line-height: 1.15;
}

.icon-btn {
  min-width: 34px;
  width: auto;
  height: 34px;
  padding: 0 7px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: transform 0.1s;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* 订单卡片（手机竖屏收纳到底部双态信息条与三键栏，桌面横屏显示在右栏顶部） */
.order-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 9px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 0 rgba(160, 120, 75, 0.12);
  transition: border-color 0.25s, background-color 0.25s;
}
.order-card.prep {
  background: #faf4e8;
  border-color: #dfd0b8;
}
.order-card.prep .seal-mini {
  background: #e88b2e;
  color: #fffaf0;
}
.order-card.prep .rush-bar {
  display: none;
}
.prep-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.3;
}
.order-skip-btn {
  display: none;
  border: 1.4px solid #e2c5aa;
  background: #fff8ef;
  color: #9c6e4b;
  border-radius: 7px;
  width: 21px;
  height: 20px;
  padding: 0;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s, background 0.15s;
}
.order-skip-btn:hover { background: #ffe9d6; color: var(--festive-red); }
.order-skip-btn:active { transform: scale(0.92); }
.order-card.rush .order-skip-btn { display: inline-flex; }
.order-card.rush {
  border-color: #e35546;
  background: #fff6f2;
}
.rush-badge {
  display: none;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(90deg, #e04234, #f07b1c);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.order-card.rush .rush-badge { display: inline-block; }
.rush-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3.5px;
  width: 100%;
  background: rgba(227, 85, 70, 0.14);
  display: none;
}
.order-card.rush .rush-bar { display: block; }
.rush-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #e35546, #ff9f24);
  transition: width 0.1s linear;
}

.order-card.ready {
  border-color: var(--festive-red);
  background: var(--festive-red-soft);
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.order-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
}

.order-name {
  color: var(--ink);
  font-size: 13px;
}

.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 5px;
  border-radius: 99px;
  background: #f8efe1;
  border: 1.5px solid #e6d3ba;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
}

.order-chip.done {
  background: #e2f5da;
  border-color: var(--leaf);
  color: #2f6b20;
}

.order-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid rgba(74, 53, 37, 0.35);
  display: inline-block;
}

.pack-btn {
  border: none;
  border-radius: 13px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  background: #e9dfd1;
  color: #a89684;
  pointer-events: none;
}

.pack-btn.ready {
  pointer-events: auto;
  background: linear-gradient(180deg, #ee5b46, #cf3428);
  color: #fff9e6;
  box-shadow: 0 4px 0 #961e15, 0 6px 14px rgba(207, 52, 40, 0.35);
  animation: pulseBtn 1.05s infinite ease-in-out;
}

.pack-btn.ready:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #961e15;
}

@keyframes pulseBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 主画布区域（严格锁定 420:508 原始比例，仅由单侧宽度驱动，绝不拉伸变形） */
.stage-wrap {
  position: relative;
  width: min(100%, calc((100dvh - 204px) * 420 / 508));
  height: auto;
  margin: 0 auto;
  aspect-ratio: 420 / 508;
  background: var(--card-bg);
  border: 2.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(138, 100, 56, 0.12);
  touch-action: none;
}

canvas#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.stage-sound-btn {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 6;
  background: rgba(255, 252, 245, 0.95);
  border: 1.8px solid var(--border);
  border-radius: 12px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(138, 100, 56, 0.12);
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
}
.stage-sound-btn:hover { border-color: var(--orange); }
.stage-sound-btn:active { transform: scale(0.94); }
.stage-sound-btn.muted {
  background: #f3ece0;
  color: var(--ink-soft);
  border-color: #d6c5ae;
}
.stage-sound-btn svg, .icon-btn svg, .ui-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.next-badge {
  position: absolute;
  top: 6px;
  left: 7px;
  background: rgba(255, 249, 236, 0.96);
  border: 1.8px solid #e2c599;
  border-radius: 12px;
  padding: 3px 8px 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(138, 100, 56, 0.1);
  pointer-events: none;
}
.next-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0px;
  line-height: 1.12;
}
.next-badge-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
}
.next-badge-name {
  color: var(--ink);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.next-preview-dot {
  width: 28px !important;
  height: 28px !important;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.toast-banner {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: linear-gradient(90deg, rgba(74, 53, 37, 0.92), rgba(122, 72, 34, 0.92));
  color: #fff9eb;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  white-space: nowrap;
  z-index: 60;
  box-shadow: 0 4px 12px rgba(74, 53, 37, 0.24);
}

.share-row {
  width: 100%;
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.share-chip {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  background: #faf3e6;
  color: var(--ink);
  border-radius: 9px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, opacity 0.15s;
}
.share-chip:hover { opacity: 0.9; }
.share-chip:active { transform: scale(0.95); }
.share-chip.x-btn { background: #1f1a17; color: #fff8eb; border-color: #1f1a17; }
.share-chip.fb-btn { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-chip.rd-btn { background: #ff4500; color: #fff; border-color: #ff4500; }
.share-chip.wa-btn { background: #25a55b; color: #fff; border-color: #25a55b; }
.share-chip.card-btn { background: #fff3de; color: #b85d08; border-color: #e2b878; }

.toast-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 底部操作栏（手机竖屏：打包 · 万能 · 摇一摇 三键等宽同排，零上下误触） */
.footer-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  padding: 0;
}

.evo-chain {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-soft);
  overflow-x: auto;
}

.evo-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(74, 53, 37, 0.45);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #4a3525;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.seal-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--festive-red);
  color: #fff3d1;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
}

.shake-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px solid #e6c69c;
  background: #fff4df;
  color: var(--orange-deep);
  border-radius: 14px;
  height: 46px;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(160, 120, 75, 0.12);
  transition: transform 0.1s, background 0.18s, border-color 0.18s;
}

.wild-action-btn {
  border-color: #e6c26c;
  background: #fff8dc;
  color: #b86800;
}
.wild-action-btn.is-active {
  border-color: #c97a00;
  background: #ffd43b;
  color: #5c3c24;
}

.mobile-pack-btn {
  border-color: #dfd0b8;
  background: #f2e8d8;
  color: #9c8670;
}
.mobile-pack-btn:disabled {
  opacity: 1;
}
.mobile-pack-btn.active-order {
  border-color: #e6b8a8;
  background: #fff3ee;
  color: #b86852;
}
.mobile-pack-btn.ready {
  border-color: #961e15;
  background: linear-gradient(180deg, #ee5b46, #cf3428);
  color: #fff9e6;
  box-shadow: 0 3px 0 #961e15, 0 5px 12px rgba(207, 52, 40, 0.3);
  animation: pulseBtn 1.05s infinite ease-in-out;
}

.shake-btn:disabled:not(.mobile-pack-btn),
.shake-btn.is-empty {
  opacity: 0.48;
}
.shake-btn:disabled:not(.mobile-pack-btn) {
  cursor: not-allowed;
}

.shake-btn:not(:disabled):active {
  transform: scale(0.95);
}


.kbd-hints {
  display: none;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  opacity: 0.85;
  padding: 2px 4px;
}
.kbd-hints kbd {
  background: #fffcf5;
  border: 1.4px solid var(--border);
  border-bottom-width: 2.4px;
  border-radius: 6px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  color: var(--ink);
}
.evo-card {
  display: none;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(138, 100, 56, 0.08);
}
.evo-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.evo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.evo-item {
  position: relative;
  background: #faf3e6;
  border: 1.5px solid #ebdac0;
  border-radius: 12px;
  padding: 5px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.evo-item canvas {
  width: 34px;
  height: 34px;
  display: block;
}
.evo-item span {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  text-align: center;
}

/* 桌布主题皮肤 */
body.theme-kotatsu {
  background-color: #7c261d;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 205, 130, 0.09) 0 12px, transparent 12px 24px),
    repeating-linear-gradient(-45deg, rgba(40, 10, 5, 0.12) 0 12px, transparent 12px 24px);
}
body.theme-cafe {
  background-color: #dfe9d5;
  background-image:
    linear-gradient(90deg, rgba(114, 148, 92, 0.12) 50%, transparent 50%),
    linear-gradient(rgba(114, 148, 92, 0.12) 50%, transparent 50%);
  background-size: 32px 32px;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff6d6;
  border: 1.5px solid #e6c26c;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  color: #9c5600;
}
.icon-btn.daily-cleared {
  border-color: #6db34f;
  background: #eef9e6;
  color: #3b6b28;
}

.evo-shiny-dot {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 10px;
  color: #e6a825;
  text-shadow: 0 0 4px rgba(255, 212, 59, 0.9);
}


.daily-banner {
  display: none;
  background: linear-gradient(90deg, #d86b14, #ee9428);
  color: #fffef5;
  border-radius: 14px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(216, 107, 20, 0.24);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.daily-banner.is-won {
  background: linear-gradient(90deg, #3f8c33, #64b043);
  box-shadow: 0 3px 10px rgba(63, 140, 51, 0.26);
}
.daily-banner.is-failed {
  background: linear-gradient(90deg, #c43e30, #df5b48);
  box-shadow: 0 3px 10px rgba(196, 62, 48, 0.26);
}
.daily-banner.show { display: flex; }

.auto-drop-row {
  width: 100%;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1.5px dashed #ebdac0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auto-drop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink);
}
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1.8px solid var(--border);
  background: #ece2d2;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s, border-color 0.18s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fffcf5;
  border: 1.5px solid #8a6d55;
  transition: transform 0.18s;
}
.toggle-switch.on {
  background: #f49b25;
  border-color: #c9640c;
}
.toggle-switch.on::after {
  transform: translateX(15px);
  border-color: #8c4506;
}
.auto-drop-slider-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-soft);
}
.auto-drop-slider-row.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.auto-drop-slider {
  flex: 1;
  accent-color: #e67e17;
  height: 4px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .kbd-hints { display: flex; }
}

@media (max-height: 700px) and (max-width: 779px) {
  .game-viewport { padding: 4px; }
  .app-shell { gap: 5px; }
  .mobile-guide-bar { display: none !important; }
}

/* 桌面横屏三栏响应式布局（独立站 meowkan.com 贴顶放大，CrazyGames iframe 紧凑居中，主舞台比例 100% 锁死） */
@media (min-width: 780px) and (min-aspect-ratio: 11/10) {
  .game-viewport {
    min-height: 100vh;
    height: auto;
    align-items: flex-start;
    padding: clamp(14px, 2.4vh, 26px) 20px 24px;
  }
  .app-shell {
    --desk-shell-h: clamp(560px, 88vh, 760px);
    max-width: 1240px;
    width: 100%;
    height: var(--desk-shell-h);
    display: grid;
    grid-template-columns: minmax(215px, 250px) minmax(0, 1fr) minmax(220px, 254px);
    grid-template-rows: auto auto 1fr;
    gap: 12px 18px;
    align-items: start;
  }
  body.cg-mode .game-viewport {
    height: 100vh;
    align-items: center;
    padding: 10px 16px;
  }
  body.cg-mode .app-shell {
    --desk-shell-h: min(94vh, 630px);
    max-width: 1080px;
    height: var(--desk-shell-h);
    gap: 12px 16px;
  }
  .arena-banner.show, .daily-banner.show {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    min-width: 340px;
    max-width: 520px;
  }
  .header {
    grid-column: 1;
    grid-row: 1;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(138, 100, 56, 0.08);
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
  .stats .pill {
    grid-column: span 2;
    min-width: 0;
    padding: 3px 4px;
  }
  .stats .icon-btn {
    grid-column: span 2;
    width: 100%;
    height: 34px;
    font-size: 11px;
    font-weight: 900;
    gap: 4px;
  }
  .evo-card {
    display: flex;
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: stretch;
    justify-content: flex-start;
  }
  .stage-wrap {
    grid-column: 2;
    grid-row: 1 / 4;
    width: min(100%, calc(var(--desk-shell-h) * 420 / 508));
    height: auto;
    max-height: none;
    aspect-ratio: 420 / 508;
    margin: 0 auto;
    align-self: center;
    justify-self: center;
  }
  .order-card {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .pack-btn {
    width: 100%;
    padding: 11px 12px;
    font-size: 14px;
  }
  .mobile-pack-btn {
    display: none !important;
  }
  .footer-bar {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .footer-bar .shake-btn {
    width: 100%;
    height: auto;
    justify-content: center;
    padding: 11px 12px;
    font-size: 13px;
  }
  .kbd-hints {
    grid-column: 3;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    font-size: 11.5px;
    opacity: 1;
    box-shadow: 0 3px 10px rgba(138, 100, 56, 0.06);
  }
  .mobile-evo-bar,
  .mobile-guide-bar {
    display: none !important;
  }
}

.mobile-evo-bar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 38px;
  background: var(--card-bg);
  border: 1.8px solid var(--border);
  border-radius: 14px;
  padding: 0 8px;
  box-shadow: 0 2px 0 rgba(160, 120, 75, 0.08);
  transition: background-color 0.2s, border-color 0.2s;
}
.mobile-evo-pane {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}
.mobile-order-pane {
  display: none;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
}
.mobile-evo-bar.has-order {
  background: #fff6f2;
  border-color: #e35546;
}
.mobile-evo-bar.has-order.ready {
  background: var(--festive-red-soft);
  border-color: var(--festive-red);
}
.mobile-evo-bar.has-order .mobile-evo-pane {
  display: none;
}
.mobile-evo-bar.has-order .mobile-order-pane {
  display: flex;
}
.mobile-order-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mobile-order-items::-webkit-scrollbar { display: none; }
.mobile-order-items .order-chip {
  padding: 1px 7px 1px 4px;
  font-size: 10.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mobile-rush-badge {
  display: inline-block;
  margin-left: 0;
  flex-shrink: 0;
}
.mobile-skip-btn {
  display: inline-flex;
  width: 22px;
  height: 22px;
}
.mobile-rush-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(227, 85, 70, 0.14);
}
.mobile-evo-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.mobile-evo-strip::-webkit-scrollbar { display: none; }
.mobile-evo-cell {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #faf3e6;
  border: 1.2px solid #ebdac0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-evo-cell canvas {
  width: 22px;
  height: 22px;
  display: block;
}
.mobile-evo-cell.locked {
  background: #f2ece1;
  border-style: dashed;
  color: #a89782;
  font-size: 10px;
  font-weight: 900;
}
.mobile-evo-cell .evo-shiny-dot {
  top: -2px;
  right: 1px;
  font-size: 8px;
}


.lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 0 5px;
  color: var(--ink-soft);
  background: #faf3e6;
  border: 1.6px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 1px 0 rgba(160, 120, 75, 0.12);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.lang-wrap:hover {
  border-color: #d9a066;
  background: #fff9ee;
  color: var(--ink);
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 22px;
  padding: 0;
  font-size: 10.5px;
  font-weight: 900;
  color: inherit;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.lang-select:focus {
  outline: none;
  box-shadow: none;
}
@keyframes orderArrivePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.035); box-shadow: 0 0 0 4px rgba(227, 85, 70, 0.22); }
  100% { transform: scale(1); }
}
.order-card.arrive-pop,
.mobile-evo-bar.arrive-pop {
  animation: orderArrivePop 0.52s ease;
}
.shiny-stat-btn {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.shiny-stat-btn:hover {
  background: #fff4d2;
  color: #b86800;
}

/* 手机竖屏底部微教学与情境小窍门条 */
.mobile-guide-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 2px;
  padding: 5px 12px;
  border-radius: 12px;
  background: rgba(255, 251, 242, 0.86);
  border: 1.5px dashed #e2caa8;
  color: #6b4e35;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.25s, border-color 0.25s, opacity 0.25s;
}
.mobile-guide-bar.is-onboarding {
  background: #fff8ea;
  border-style: solid;
  border-color: #e5be86;
  color: #4a3525;
  box-shadow: 0 2px 8px rgba(180, 120, 48, 0.08);
}
.mobile-guide-bar.is-tip {
  opacity: 0.88;
  font-size: 11px;
  color: #7c5e44;
}
.guide-gesture-svg {
  width: 36px;
  height: 21px;
  flex-shrink: 0;
  display: none;
}
.guide-spark-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: none;
}
.mobile-guide-bar.is-onboarding .guide-gesture-svg {
  display: block;
}
.mobile-guide-bar.is-tip .guide-spark-svg {
  display: block;
}
@keyframes guideHandSlide {
  0%, 100% { transform: translateX(-3.2px); }
  50% { transform: translateX(3.2px); }
}
.guide-hand-group {
  animation: guideHandSlide 1.45s ease-in-out infinite;
}
.mobile-guide-text {
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
