/* ===== 咩咩消消乐 · 清新可爱样式 ===== */
:root {
  /* 品牌背景（柔彩渐变三基色） */
  --bg1: #fdf3ff;
  --bg2: #e8f7ff;
  --bg3: #fff7ec;
  /* 墨色（文字层级） */
  --ink: #5b5470;
  --ink-soft: #8d86a3;
  --card: #ffffff;
  /* 品牌色（可爱马卡龙系） */
  --pink: #ff9ec4;
  --mint: #8fe3c4;
  --sky: #8ed4ff;
  --butter: #ffe08a;
  --grape: #c9a3ff;
  /* 语义色（功能强调 / 状态） */
  --gold: #e8943a;      /* 金币 / 奖励强调 */
  --violet: #b06bd6;    /* 抽卡券 / 稀有强调 */
  --green: #5fb38a;     /* 成功 / 已领取 */
  --green-deep: #3c9a6a;
  --red: #d05a5a;       /* 危险 / 缺失 */
  --cream: #f0e0c0;     /* 暖色面板描边 */
  --cream-deep: #f6e2b8;
  /* 面板 & 描边 */
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.85);
  --line: rgba(150, 130, 180, 0.16);
  /* 圆角刻度 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  /* 间距刻度 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  /* 阴影层级 */
  --shadow-xs: 0 2px 8px rgba(150, 130, 180, 0.12);
  --shadow: 0 10px 30px rgba(150, 130, 180, 0.18);
  --shadow-sm: 0 4px 14px rgba(150, 130, 180, 0.16);
  --shadow-md: 0 14px 36px rgba(150, 130, 180, 0.22);
  --shadow-lg: 0 20px 48px rgba(150, 130, 180, 0.28);
  /* 稀有度 */
  --rar-N: #9ccc65;
  --rar-R: #4fc3f7;
  --rar-SR: #ba68c8;
  --rar-SSR: #ffb300;
}

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

/* 本地 emoji 图片：尺寸跟随所在容器的 font-size（1em），跨平台一致、不依赖系统字体 */
.emoji-img {
  width: 1em; height: 1em;
  vertical-align: -0.12em;
  display: inline-block;
  user-select: none; -webkit-user-drag: none;
}
.btn .emoji-img { width: 1.15em; height: 1.15em; vertical-align: -0.18em; }
.toast .emoji-img { vertical-align: -0.15em; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffe3f3 0%, transparent 55%),
    radial-gradient(1000px 600px at 110% 10%, #d9f3ff 0%, transparent 50%),
    linear-gradient(160deg, var(--bg1), var(--bg2) 45%, var(--bg3));
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部钱包栏 */
.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: 0.5px; color: var(--ink); }
/* 批次35：标题后方版本小字（版本号 · 更新时间，弱化展示不抢主标题） */
.brand-sub {
  display: inline-block; margin-left: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: 0;
  color: var(--ink-soft); vertical-align: 2px;
  white-space: nowrap;
}
.wallet { display: flex; gap: 8px; }
/* 顶部右侧：钱包 + 存档按钮 */
.top-right { display: flex; align-items: center; gap: 10px; }
.save-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb); color: #1e3c72;
}
.save-btn:hover { transform: translateY(-1px); }
.coin-pill, .ticket-pill {
  background: #fff; border-radius: 999px; padding: 6px 14px;
  font-weight: 700; box-shadow: var(--shadow-sm); font-size: 15px;
}
.coin-pill { color: var(--gold); }
.ticket-pill { color: var(--violet); }

/* 导航 */
.navbar {
  flex: 0 0 auto;
  display: flex; gap: 8px; justify-content: center;
  padding: 10px 12px; flex-wrap: wrap;
}
.nav-btn {
  border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  padding: 7px 16px; border-radius: 18px;
  font-size: 12px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.nav-btn:hover { transform: translateY(-2px); }
.nav-icon { font-size: 20px; }
.nav-on {
  background: linear-gradient(135deg, var(--pink), var(--grape));
  color: #fff; box-shadow: 0 8px 20px rgba(200, 140, 220, 0.4);
}

/* 舞台 */
.stage {
  flex: 1 1 auto; position: relative;
  width: 100%; max-width: 880px; margin: 0 auto;
  padding: 12px; overflow: hidden;
}
.view { display: none; width: 100%; height: 100%; overflow: auto; }
.view.active { display: flex; }
/* 移动端核心修复：flex 列布局下子元素默认 flex-shrink:1，
   内容超高时会被压缩进可视区导致「显示不全」且无法滚动找回。
   改为禁止压缩，让内容保持自然高度、由视图自身滚动展示全部内容。 */
.view.active > * { flex-shrink: 0; }
.view-game.active { flex-direction: column; }
.view-gacha, .view-collection, .view-garden, .view-achievements { flex-direction: column; }
.view-garden.active { position: relative; } /* 批次20：花园等级锁定遮罩需绝对定位锚点 */
/* 批次20：花园等级锁定遮罩（仿 pasture-locked） */
.garden-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.92), rgba(232,247,255,0.92));
  border-radius: 22px; box-shadow: var(--shadow);
}
.garden-lock-emoji { font-size: 56px; }
.garden-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.garden-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }

/* ============ 批次17：提示按钮（免费辅助，不影响星级） ============ */
.btn-hint { background: rgba(255, 240, 247, 0.9); color: #d36bd6; }
.btn-hint:hover { background: #ffe9f5; }

/* ============ 批次18：花园菜园区（种子商店 + 田地） ============ */
.farm-box { margin: 4px 0 14px; background: rgba(255, 250, 240, 0.85); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); border: 2px solid #eadfc4; }
.farm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.farm-title { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.farm-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.farm-robot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0; padding: 8px 12px; background: linear-gradient(120deg, #eef7ff, #f4fff0); border: 2px solid #cfe6c0; border-radius: 12px; }
.farm-robot-status { font-weight: 700; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.farm-shop-head { font-weight: 700; font-size: 13px; color: var(--ink); margin: 4px 2px 6px; }
.seed-shop { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.seed-item { flex: 0 0 auto; width: 86px; border-radius: 14px; padding: 8px 4px; text-align: center; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s ease; border: 2px solid transparent; }
.seed-item:hover { transform: translateY(-3px); }
.seed-item.seed-sel { border-color: #8ed4b6; background: #f0fff6; }
.seed-item.seed-poor { opacity: 0.55; }
.seed-item .seed-emoji { font-size: 28px; }
.seed-item .seed-name { font-weight: 700; font-size: 12px; margin: 2px 0 1px; }
.seed-item .seed-rar { font-size: 10px; font-weight: 800; color: var(--violet); }
.seed-item.rar-N .seed-rar { color: #9ccc65; }
.seed-item.rar-R .seed-rar { color: #4fc3f7; }
.seed-item.rar-SR .seed-rar { color: #ba68c8; }
.seed-item.rar-SSR .seed-rar { color: #ffb300; }
.seed-item .seed-cost { font-size: 11px; color: var(--gold); font-weight: 700; }
.seed-item .seed-buy { margin-top: 4px; font-size: 11px; padding: 2px 10px; border: none; cursor: pointer; border-radius: 8px; font-weight: 700; background: linear-gradient(135deg, #8ed4b6, #6fc3a0); color: #fff; box-shadow: var(--shadow-sm); }
.seed-item .seed-buy-row { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.seed-item .seed-buy-row .seed-buy { margin-top: 0; }
.seed-item .seed-buy-more { background: linear-gradient(135deg, #a7c8f7, #8fb7ef); }
/* 批次39：种子批量购买弹窗 */
.seed-batch { display: flex; flex-direction: column; gap: 10px; min-width: 260px; }
.seed-batch-qty { display: flex; align-items: center; gap: 8px; }
.seed-batch-qty input { width: 72px; padding: 6px 8px; border-radius: 10px; border: 2px solid #dcc9f5; font-size: 14px; font-weight: 700; text-align: center; }
.seed-batch-total { font-size: 13px; color: var(--gold); font-weight: 700; }
.seed-batch-shortcuts { display: flex; gap: 8px; }
.farm-grid { display: grid; gap: 8px; background: #f1e3c3; border-radius: 16px; padding: 10px; box-shadow: inset 0 2px 6px rgba(120, 90, 40, 0.12); }
.farm-cell { position: relative; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .1s ease; border: 2px dashed rgba(150, 120, 70, 0.45); background: rgba(255, 248, 230, 0.85); }
.farm-cell:hover { transform: translateY(-2px); }
.farm-cell.farm-ready { border-color: #8ed4b6; background: #f0fff6; }
.farm-cell.farm-empty .farm-empty-icon { font-size: 22px; }
.farm-cell.farm-empty .farm-empty-tip { font-size: 10px; color: #a8987a; font-weight: 700; margin-top: 1px; line-height: 1; }
.farm-cell.farm-growing { border-style: solid; border-color: rgba(150, 120, 70, 0.3); }
.farm-cell.farm-growing .farm-emoji { font-size: 28px; line-height: 1; }
.farm-progress { width: 80%; height: 6px; border-radius: 999px; background: rgba(120, 90, 40, 0.15); overflow: hidden; margin: 2px 0 1px; }
.farm-progress i { display: block; height: 100%; background: linear-gradient(90deg, #8ed4b6, #6fc3a0); border-radius: 999px; }
.farm-remain { font-size: 10px; color: #8a7a5c; font-weight: 700; line-height: 1; }
.farm-cell.farm-mature { border: 3px solid #ffb300; background: linear-gradient(150deg, #fff7e0, #ffe9c4); box-shadow: 0 0 12px rgba(255, 179, 0, 0.45); animation: farm-pulse 1.2s ease-in-out infinite; }
.farm-cell.farm-mature .farm-emoji-big { font-size: 34px; line-height: 1; }
.farm-cell.farm-mature .farm-tag { font-size: 10px; font-weight: 800; color: var(--gold); margin-top: 1px; line-height: 1; }
@keyframes farm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ============ 批次18：仓库视图 ============ */
.view-inventory.active { flex-direction: column; }
.inv-box { margin-bottom: 12px; background: rgba(255, 255, 255, 0.72); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.inv-box-head { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.inv-item { border-radius: 12px; padding: 8px 6px; text-align: center; background: #fff; box-shadow: var(--shadow-sm); border: 2px solid transparent; }
.inv-item.inv-empty { opacity: 0.45; filter: grayscale(0.4); }
.inv-item .inv-emoji { font-size: 26px; }
.inv-item .inv-name { font-weight: 700; font-size: 12px; margin: 2px 0 1px; }
.inv-item .inv-count { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.inv-item .inv-sub { font-size: 10px; color: var(--violet); font-weight: 600; }
.inv-btns { display: flex; gap: 4px; justify-content: center; margin-top: 5px; flex-wrap: wrap; }
.inv-btns .btn-sm { font-size: 11px; padding: 3px 7px; }
.inv-empty-tip { grid-column: 1 / -1; color: var(--ink-soft); font-size: 13px; padding: 8px; text-align: center; }
.inv-feed-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-feed-count { font-weight: 700; font-size: 14px; }
.inv-tip { margin-top: 8px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.inv-overview { display: flex; gap: 12px; flex-wrap: wrap; }
.inv-ov-item { background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-sm); }
/* 批次29：战斗装备箱（arsenal） */
.inv-arsenal { display: flex; gap: 10px; flex-wrap: wrap; }
.inv-ars-item { background: linear-gradient(135deg, #f3e8ff, #fff); border: 2px solid #dcc9f5; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--ink); }
.inv-ars-item .emoji-img { width: 18px; height: 18px; vertical-align: -3px; }
.inv-targets { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ============ 玩法场景 ============ */
.game-top {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.7); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
}
.game-level { font-weight: 800; font-size: 16px; }
.game-stats { color: var(--ink-soft); font-weight: 600; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.game-stats span { white-space: nowrap; }
#game-score { color: var(--gold); }
#game-combo { color: #d36bd6; }
.game-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  box-shadow: var(--shadow); touch-action: none; /* F6：画布接管指针，禁用滚动/缩放手势 */
}
.game-controls {
  flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding-top: 8px;
}

/* 按钮 */
.btn {
  border: none; cursor: pointer; font-weight: 700;
  background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: 14px; font-size: 14px;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--grape));
  color: #fff; box-shadow: 0 8px 18px rgba(200, 140, 220, 0.4);
}
.btn-ghost { background: rgba(255, 255, 255, 0.5); }
.btn-danger { background: linear-gradient(135deg, #ffb3a7, #ff8a80); color: #7a1f16; }
.btn-danger:hover { box-shadow: 0 6px 14px rgba(255, 138, 128, 0.45); }
.btn:disabled, .btn-disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }
.btn:disabled:hover, .btn-disabled:hover { transform: none; }

/* ============ 抽卡 ============ */
.gacha-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.7); border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow); margin: 0 auto; max-width: 460px; width: 100%;
}
.gacha-stage {
  width: 200px; height: 280px; perspective: 800px;
  display: flex; align-items: center; justify-content: center;
}
.gacha-back {
  width: 180px; height: 260px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 64px;
  background: linear-gradient(150deg, var(--grape), var(--sky));
  color: #fff; box-shadow: 0 12px 30px rgba(160, 130, 220, 0.45);
  animation: floaty 3s ease-in-out infinite;
}
.gacha-back-tip { font-size: 14px; font-weight: 700; opacity: .9; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

.card-face {
  width: 180px; height: 260px; border-radius: 18px;
  background: linear-gradient(160deg, #ffffff, #fff6fb);
  border: 3px solid var(--rar-N);
  box-shadow: 0 14px 34px rgba(150,130,180,0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; padding: 12px; text-align: center;
}
.card-face.rar-N { border-color: var(--rar-N); }
.card-face.rar-R { border-color: var(--rar-R); box-shadow: 0 14px 34px rgba(79,195,247,0.4); }
.card-face.rar-SR { border-color: var(--rar-SR); box-shadow: 0 14px 34px rgba(186,104,200,0.45); }
.card-face.rar-SSR {
  border-color: var(--rar-SSR);
  box-shadow: 0 0 0 4px rgba(255,179,0,0.25), 0 14px 40px rgba(255,179,0,0.5);
}
.card-rar {
  position: absolute; top: 10px; left: 10px;
  font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--rar-N); color: #fff;
}
.card-face.rar-R .card-rar { background: var(--rar-R); }
.card-face.rar-SR .card-rar { background: var(--rar-SR); }
.card-face.rar-SSR .card-rar { background: var(--rar-SSR); }
.card-emoji { font-size: 92px; line-height: 1; margin: 6px 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12)); }
.card-name { font-weight: 800; font-size: 18px; color: var(--ink); }
.card-small { width: 120px; height: 172px; }
.card-small .card-emoji { font-size: 60px; }
.card-small .card-name { font-size: 14px; }

.reveal-anim { opacity: 0; transform: scale(0.6) rotate(-12deg); }
.reveal-show { animation: pop 0.45s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes pop { to { opacity: 1; transform: scale(1) rotate(0); } }

.gacha-info { text-align: center; }
.gacha-tickets { font-size: 16px; margin-bottom: 10px; }
.gacha-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gacha-recent {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  margin-top: 6px; min-height: 36px;
}
.recent-chip {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: #fff; box-shadow: var(--shadow-sm);
}

/* 抽卡页：每日免费抽 + 兑换 */
.gacha-daily { margin-top: 2px; width: 100%; }
.daily-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.daily-row .btn { font-size: 13px; padding: 8px 12px; }

/* ============ 图鉴 ============ */
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 6px 12px; }
.panel-head h2 { margin: 0; font-size: 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.coll-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px;
}
.coll-card {
  border-radius: 16px; padding: 12px 8px; text-align: center;
  background: linear-gradient(160deg, #fff, #fff6fb);
  border: 3px solid var(--rar-N); box-shadow: var(--shadow-sm);
}
.coll-card.rar-R { border-color: var(--rar-R); }
.coll-card.rar-SR { border-color: var(--rar-SR); }
.coll-card.rar-SSR { border-color: var(--rar-SSR); box-shadow: 0 0 0 3px rgba(255,179,0,0.2), var(--shadow-sm); }
.coll-locked { border-color: #e3def0; background: #f3f0f8; color: #bbb3c9; }
.coll-lock { font-size: 48px; }
.coll-card .card-emoji { font-size: 52px; }
.coll-card .card-name { font-weight: 800; font-size: 14px; margin-top: 4px; }
.coll-count { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
/* 批次35：图鉴卡 buff —— 汇总行 + 卡片标签 */
.coll-buffs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  background: linear-gradient(135deg, #fffdf3, #fff6e8);
  border: 1px solid #ffe6b8; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px;
  font-size: 13px;
}
.coll-buff-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #8a5a00; }
.coll-buff {
  display: inline-block; margin-top: 4px;
  font-size: 11px; font-weight: 700; color: #7a4d00;
  background: #fff2d0; border: 1px solid #ffd98a; border-radius: 8px; padding: 1px 7px;
}
.coll-buff:empty { display: none; }

/* ============ 花园 ============ */
.garden-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,0.7); border-radius: 16px; padding: 12px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.garden-title { font-weight: 800; font-size: 18px; }
.garden-rate { color: var(--ink-soft); font-weight: 600; font-size: 14px; flex: 1; }
.shop-head { font-weight: 700; margin: 4px 4px 8px; color: var(--ink); }
.shop-list { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.shop-item {
  flex: 0 0 auto; width: 92px; border-radius: 14px; padding: 10px 6px; text-align: center;
  background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s ease;
  border: 2px solid transparent;
}
.shop-item:hover { transform: translateY(-3px); }
.shop-sel { border-color: var(--pink); background: #fff0f7; }
.shop-poor { opacity: 0.5; }
.shop-emoji { font-size: 34px; }
.shop-name { font-weight: 700; font-size: 13px; margin: 2px 0; }
.shop-cost { font-size: 12px; color: var(--gold); font-weight: 700; }
.sel-tip { padding: 6px 10px; margin: 4px 0 10px; font-size: 13px; }
.garden-grid {
  display: grid; gap: 6px; background: rgba(255,255,255,0.55);
  border-radius: 18px; padding: 10px; box-shadow: var(--shadow); margin-top: 4px;
}
.garden-cell {
  position: relative;
  aspect-ratio: 1 / 1; border-radius: 12px; background: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  cursor: pointer; transition: background .15s ease, transform .1s ease;
  border: 1px dashed rgba(180,160,210,0.4);
}
.garden-cell:hover { background: rgba(255,255,255,0.95); }
.cell-filled { border-style: solid; border-color: transparent; background: #fff; box-shadow: var(--shadow-sm); }

/* ============ 成就 ============ */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ach-card {
  display: flex; gap: 12px; align-items: center;
  border-radius: 16px; padding: 12px; background: #fff; box-shadow: var(--shadow-sm);
}
.ach-off { filter: grayscale(0.6); opacity: 0.7; }
.ach-on { background: linear-gradient(135deg, #fff, #fde9f5); border: 2px solid #ffd6ec; }
.ach-icon { font-size: 34px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: #f6f2fb; border-radius: 12px; }
.ach-on .ach-icon { background: #ffe3f1; }
.ach-name { font-weight: 800; font-size: 15px; }
.ach-desc { font-size: 12px; color: var(--ink-soft); margin: 2px 0; }
.ach-reward { font-size: 12px; color: var(--violet); font-weight: 700; }

/* ============ Toast / Modal / Confetti ============ */
#toast-box {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: rgba(60, 50, 80, 0.92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-12px); transition: all .35s ease; max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-good { background: linear-gradient(135deg, #5fd0a0, #4fc3f7); }
.toast-warn { background: linear-gradient(135deg, #ffb168, #ff8a80); }
.toast-ach { background: linear-gradient(135deg, #c9a3ff, #ff9ec4); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(60, 50, 80, 0.35); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 22px; padding: 22px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow); text-align: center; animation: pop .3s cubic-bezier(.2,1.4,.4,1);
}
.modal-box.modal-wide { max-width: 720px; }
.modal-title { margin: 0 0 12px; font-size: 20px; }
.modal-body { font-size: 15px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
/* ============ 批次25：存档管理 ============ */
.saveui { text-align: left; }
.saveui-tip { margin: 0 0 14px; line-height: 1.6; }
.saveui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.saveui-panel {
  background: #faf7ff; border: 1px solid #efe8fb; border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.saveui-head { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.saveui-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.saveui-btns-left { justify-content: flex-start; }
.saveui-text {
  width: 100%; min-height: 130px; resize: vertical; box-sizing: border-box;
  border: 1px solid #e3daf2; border-radius: 10px; padding: 8px 10px;
  font-size: 11px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #4a3f66; background: #fff; line-height: 1.5; word-break: break-all;
}
.saveui-file { font-size: 12px; color: var(--ink-soft); }
.saveui-status { margin-top: 12px; min-height: 20px; font-size: 13px; font-weight: 600; text-align: center; }
.saveui-status-ok { color: #2e9e6b; }
.saveui-status-err { color: #d9534f; }
.saveui-status-info { color: var(--ink-soft); font-weight: 500; }
@media (max-width: 640px) {
  .saveui-grid { grid-template-columns: 1fr; }
}

.result-body { padding: 8px; }
.result-emoji { font-size: 64px; }
.result-title { font-size: 22px; font-weight: 800; margin: 4px 0; }
.result-stars { font-size: 30px; margin: 2px 0 6px; letter-spacing: 4px; line-height: 1; }
.result-stars .emoji-img { width: 30px; height: 30px; vertical-align: -0.05em; }
.result-stars .star-empty { color: #d9d2e6; font-size: 30px; }
.result-reward { color: var(--ink-soft); font-weight: 600; }
.help-body { text-align: left; }
.help-body ul { padding-left: 20px; line-height: 1.7; }
.ten-result { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ten-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; justify-items: center; }

#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti-piece {
  position: absolute; width: 10px; height: 14px; border-radius: 3px;
  animation-name: fall; animation-timing-function: linear; animation-iteration-count: 1;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0.9; }
}

/* ============ 批次2：模式切换栏 ============ */
.game-modes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 6px 0 4px; }
.btn-mode { background: rgba(255,255,255,0.72); color: var(--ink); font-size: 13px; padding: 6px 12px; }
.btn-mode.mode-on { background: linear-gradient(135deg, #ff9a9e, #fad0c4); color: #fff; box-shadow: 0 4px 12px rgba(255,140,150,0.4); }

/* 限时计时器 */
.game-timer { color: #ff6b6b; font-weight: 700; }

/* 花园装饰等级徽标与选中 */
.cell-tier { position: absolute; right: 3px; bottom: 3px; background: rgba(120,90,200,0.92); color: #fff; font-size: 10px; line-height: 1; padding: 1px 5px; border-radius: 8px; }
.garden-cell.cell-sel { outline: 3px solid #ff9a9e; outline-offset: -2px; }
.garden-actions { margin-top: 12px; min-height: 8px; }
/* 防止内容区块在 flex 列布局中被压缩导致后续面板（访客/皮肤）重叠：保持自然高度、由视图滚动 */
.view-garden > *, .view-season > * { flex-shrink: 0; }
.act-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(255,255,255,0.72); border-radius: 16px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(120,110,150,0.15); }
.act-emoji .emoji-img { width: 40px; height: 40px; }
.act-meta { font-size: 14px; }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.act-btns .btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 花园头部按钮组（收取 + 扩建） */
.garden-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.garden-head-btns .btn { font-size: 13px; padding: 8px 12px; }

/* ============ 批次3：访客互动 ============ */
.visitor-box { margin-top: 12px; }
.visitor-empty { background: rgba(255,255,255,0.55); border-radius: 14px; padding: 12px; text-align: center; font-size: 13px; }
.visitor-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,232,255,0.85));
  border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm);
  border: 2px solid #e6dcff;
}
.visitor-emoji { font-size: 34px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #f3ecff; border-radius: 12px; }
.visitor-meta { font-size: 14px; flex: 1; }
.visitor-reward { font-size: 12px; color: var(--violet); font-weight: 700; margin-top: 2px; }
.visitor-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 批次3：皮肤选择器 ============ */
.skin-box { margin-top: 14px; background: rgba(255,255,255,0.55); border-radius: 16px; padding: 12px; }
.skin-head { font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.skin-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.skin-item {
  flex: 0 0 auto; width: 84px; border-radius: 14px; padding: 8px 4px; text-align: center;
  background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s ease; border: 2px solid transparent;
}
.skin-item:hover { transform: translateY(-3px); }
.skin-item.skin-locked { opacity: 0.5; filter: grayscale(0.5); cursor: default; }
.skin-item.skin-on { border-color: var(--grape); background: #fff0f7; }
.skin-emoji { font-size: 30px; }
.skin-name { font-weight: 700; font-size: 11px; margin-top: 2px; }

/* ============ 批次10：幸运转盘（独立可视化页面 view-lucky） ============ */
.view-lucky.active { flex-direction: column; align-items: center; }
.lucky-head { width: 100%; text-align: center; margin-bottom: 6px; }
.lucky-title { font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lucky-title .emoji-img { width: 22px; height: 22px; }
.lucky-meta { font-weight: 500; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.lucky-wheel-wrap { position: relative; width: 252px; height: 252px; margin: 10px 0 4px; display: flex; align-items: center; justify-content: center; }
.lucky-wheel { width: 240px; height: 240px; filter: drop-shadow(0 6px 14px rgba(180,140,90,0.28)); transform: rotate(0deg); }
.lucky-wheel svg { display: block; width: 240px; height: 240px; border-radius: 50%; }
/* 顶部指针（指向转盘中心，顺时针从正东起算的 12 点钟位置） */
.lucky-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 22px solid #ff7043; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.18)); z-index: 2;
}
.lucky-result {
  min-height: 22px; margin: 8px 0 4px; font-weight: 700; font-size: 14px; text-align: center;
  color: var(--ink); background: rgba(255,255,255,0.7); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow-sm);
}
.lucky-result .emoji-img { width: 18px; height: 18px; vertical-align: -3px; }
.view-lucky #btn-wheel { width: 240px; max-width: 80%; font-size: 15px; padding: 11px 12px; margin-top: 4px; }
/* 批次32：奖品一览（转盘扇区标签简化后，完整奖品在此列出） */
.lucky-legend { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-width: 330px; margin-top: 8px; }
.legend-chip { display: inline-flex; align-items: center; gap: 4px; background: #fffdf6; border: 1px solid #f0e4cf; border-left: 4px solid var(--lc, #f0c987); border-radius: 12px; padding: 3px 9px; font-size: 11px; color: var(--ink); }
.legend-chip .emoji-img { width: 15px; height: 15px; }


/* ============ 批次3：赛季通行证 ============ */
.view-season.active { flex-direction: column; }
.season-head { background: rgba(255,255,255,0.72); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.season-title { font-weight: 800; font-size: 18px; }
.season-sub { font-size: 13px; margin: 4px 0 8px; }
.season-bar { height: 12px; border-radius: 999px; background: #ece6f6; overflow: hidden; }
.season-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--grape)); transition: width .4s ease; }
.season-prem-row { margin-top: 10px; }
.season-prem-on { color: var(--violet); font-weight: 700; font-size: 14px; }
.season-track { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.season-node { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.7); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); border-left: 5px solid #d9d2e6; }
.season-node.reached { border-left-color: var(--mint); }
.season-node.milestone { border-left-color: var(--butter); background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,247,224,0.85)); }
.season-node.locked { opacity: 0.7; }
.season-lv { font-weight: 800; font-size: 15px; min-width: 44px; }
.season-free, .season-prem { flex: 1; font-size: 12px; padding: 6px 8px; border-radius: 10px; }
.season-free { background: #f1f8ff; }
.season-prem { background: #fbeefc; }
.season-prem.locked { background: #f3f0f8; color: #b3a9c9; }
.season-free.claimed, .season-prem.claimed { opacity: 0.6; }
.season-tag { font-weight: 800; font-size: 10px; opacity: 0.7; margin-bottom: 2px; }
.season-done { color: var(--green); font-weight: 700; margin-top: 2px; }
.season-lock { color: #b3a9c9; margin-top: 2px; }
.season-claim { display: flex; gap: 6px; }
.season-claimall { display: flex; justify-content: flex-end; margin-top: 8px; }
.season-claimall .btn { font-size: 13px; padding: 8px 14px; }
.btn-small { font-size: 12px; padding: 6px 10px; border-radius: 10px; }

/* ───── 批次5：每日任务视图 ───── */
.quest-claimall { display: flex; justify-content: flex-end; margin: 4px 0 10px; }
.quest-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.quest-card { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.78); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm); border-left: 5px solid #d9d2e6; }
.quest-card.quest-ready { border-left-color: var(--mint); background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(225,255,244,0.85)); }
.quest-card.quest-done { opacity: 0.7; border-left-color: #cdd6cf; }
.quest-icon { font-size: 30px; width: 44px; text-align: center; flex: 0 0 auto; }
.quest-icon .emoji-img { width: 34px; height: 34px; }
.quest-meta { flex: 1; min-width: 0; }
.quest-name { font-weight: 800; font-size: 15px; margin-bottom: 5px; }
.quest-progress { position: relative; height: 16px; background: rgba(180,170,200,0.18); border-radius: 9px; overflow: hidden; }
.quest-bar { height: 100%; background: linear-gradient(90deg, #8ed4b6, #6fc3a0); border-radius: 9px; transition: width 0.35s ease; }
.quest-count { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: #4a4263; }
.quest-reward { font-size: 12px; color: #8a819f; margin-top: 4px; }
.quest-act { flex: 0 0 auto; }
.quest-claimed { font-size: 13px; color: var(--green); font-weight: 700; }

/* ============ 批次9：可视化羊圈（养羊剪毛游戏） ============ */
.view-pasture.active { flex-direction: column; position: relative; }
.pasture-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.7); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
}
.pasture-title { font-weight: 800; font-size: 16px; }
.pasture-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-align: right; }
.pasture-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  box-shadow: var(--shadow); touch-action: none; /* 画布接管指针，禁用滚动/缩放手势 */
  position: relative;
  /* 批次21：场景差异化描边——羊圈=牧场绿 */
  border: 3px solid rgba(122, 186, 96, 0.55);
}
.pasture-controls {
  flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding-top: 8px;
}
/* 等级锁定遮罩 */
.pasture-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.92), rgba(232,247,255,0.92));
  border-radius: 22px; box-shadow: var(--shadow);
}
.pasture-lock-emoji { font-size: 56px; }
.pasture-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.pasture-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }

/* ============ 批次11：可视化鱼塘（养鱼卖鱼游戏，切片 A） ============ */
.view-fish.active { flex-direction: column; position: relative; }
.fish-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.7); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
}
.fish-title { font-weight: 800; font-size: 16px; }
.fish-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-align: right; }
.fish-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  box-shadow: var(--shadow); touch-action: none; /* 画布接管指针，禁用滚动/缩放手势 */
  position: relative;
  /* 批次21：场景差异化描边——鱼塘=水色蓝 */
  border: 3px solid rgba(84, 160, 214, 0.55);
}
.fish-controls {
  flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding-top: 8px;
}
/* 等级锁定遮罩 */
.fish-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.92), rgba(232,247,255,0.92));
  border-radius: 22px; box-shadow: var(--shadow);
}
.fish-lock-emoji { font-size: 56px; }
.fish-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.fish-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }
/* 切片 B：渔具店 / 库存大鱼 / 展览柜 */
.fish-shop { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,0.6); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow-sm); margin-top: 6px; }
.fish-shop-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fish-shop-tag { font-weight: 700; color: var(--ink-soft); font-size: 13px; padding: 6px 10px; }
.fish-panel-title { font-weight: 800; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.fish-panels { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.fish-pond, .fish-inv, .fish-exhibit { flex: 1 1 140px; background: rgba(255,255,255,0.6); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow-sm); }
.fish-pond-item, .fish-inv-item { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 3px 0; }
.fish-pond-empty { color: var(--ink-soft); font-size: 12px; }
.fish-tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.fish-ready { background: #e3f6e3; color: #3a9a4a; }
.fish-growing { background: #fff3d6; color: #c9921f; }
.fish-empty { color: var(--ink-soft); font-size: 12px; }
.fish-exhibit-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fish-ex-item { min-width: 56px; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: rgba(255,255,255,0.7); border-radius: 10px; box-shadow: var(--shadow-sm); }
.fish-ex-item .btn { padding: 1px 5px; font-size: 10px; }
.fish-ex-empty { color: var(--ink-soft); font-size: 18px; background: rgba(255,255,255,0.4); }
.btn-sm { font-size: 12px; padding: 4px 9px; border-radius: 9px; }

/* ============ 批次16：道具商店（金币购买 · 持久库存） ============ */
.powerup-shop { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.powerup-shop-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 10px 12px;
  box-shadow: var(--shadow-sm); border: 2px solid transparent;
}
.powerup-shop-emoji { font-size: 30px; width: 42px; text-align: center; flex: 0 0 auto; }
.powerup-shop-meta { flex: 1; min-width: 0; }
.powerup-shop-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.powerup-shop-desc { font-size: 12px; color: var(--ink-soft); margin: 1px 0 2px; }
.powerup-shop-stock { font-size: 12px; color: var(--gold); font-weight: 700; }
.powerup-shop-cost { font-weight: 700; font-size: 14px; color: var(--gold); white-space: nowrap; }
.powerup-buy { flex: 0 0 auto; }
.powerup-shop-foot { text-align: center; font-size: 12px; color: var(--ink-soft); padding-top: 6px; }

/* ============ 批次19：可视化养鸡场（买蛋→孵鸡→产蛋/羽毛→卖鸡） ============ */
.view-coop.active { flex-direction: column; position: relative; }
.coop-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.7); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
}
.coop-title { font-weight: 800; font-size: 16px; }
.coop-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-align: right; }
.coop-controls {
  flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding-bottom: 10px;
}
/* 批次20：鸡院画布（动画舞台）+ 玩法提示条 */
.coop-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  box-shadow: var(--shadow); touch-action: none; /* 画布接管指针，禁用滚动/缩放手势 */
  position: relative;
  /* 批次21：场景差异化描边——养鸡场=麦穗暖黄 */
  border: 3px solid rgba(214, 148, 66, 0.6);
}
.coop-tip {
  flex: 0 0 auto; text-align: center; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); padding: 4px 8px 8px; line-height: 1.6;
}
.coop-tip .emoji-img { width: 16px; height: 16px; vertical-align: -3px; }
.coop-box { flex: 0 0 auto; margin-bottom: 12px; background: rgba(255, 250, 240, 0.85); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); border: 2px solid var(--cream); }
.coop-box-head { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.coop-empty { color: var(--ink-soft); font-size: 13px; padding: 6px 2px; }
.coop-hatch-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.coop-hatch {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow-sm); border: 2px solid transparent;
}
.coop-hatch.coop-hatch-ready { border-color: #ffb300; background: linear-gradient(150deg, #fff7e0, #ffe9c4); }
.coop-hatch-emoji { font-size: 28px; }
.coop-hatch-emoji .emoji-img { width: 28px; height: 28px; }
.coop-hatch-info { font-weight: 700; font-size: 13px; min-width: 60px; }
.coop-hatch-timer { color: var(--gold); }
.coop-hatch-done { color: var(--green); }
.coop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.coop-cell {
  border-radius: 16px; padding: 10px 12px; background: #fff; box-shadow: var(--shadow-sm);
  border: 2px solid #f3d9a4; display: flex; flex-direction: column; gap: 6px;
}
.coop-cell-empty { border-style: dashed; border-color: rgba(150, 120, 70, 0.4); background: rgba(255, 250, 240, 0.5); align-items: center; justify-content: center; }
.coop-empty-slot { color: #b3a476; font-weight: 700; font-size: 13px; }
.coop-cell-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.coop-kind { font-weight: 800; font-size: 15px; }
.coop-born { font-size: 11px; color: var(--ink-soft); }
.coop-pending { font-size: 14px; font-weight: 700; }
.coop-pending .emoji-img { width: 18px; height: 18px; vertical-align: -3px; }
.coop-next { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.coop-full { color: #ff8a80; font-weight: 800; }
.coop-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.coop-btns .btn-sm { font-size: 11px; padding: 3px 8px; }
/* 喂养弹窗选项（金币 / 饲料 / 果实） */
.coop-feed-options { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.coop-feed-options .btn { width: 100%; }
/* 等级锁定遮罩 */
.coop-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.92), rgba(232,247,255,0.92));
  border-radius: 22px; box-shadow: var(--shadow);
}
.coop-lock-emoji { font-size: 56px; }
.coop-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }

/* ============ 批次22：小镇厨房（订单烹饪 + 限时营业 · 生产链消费侧） ============ */
.view-kitchen.active { flex-direction: column; position: relative; }
.kitchen-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: linear-gradient(150deg, rgba(255,247,236,0.9), rgba(255,236,214,0.9));
  border-radius: 16px; padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
  border: 2px solid #f3d9b0;
}
.kitchen-title { font-weight: 800; font-size: 16px; color: var(--ink); }
.kitchen-title .emoji-img { width: 20px; height: 20px; vertical-align: -3px; }
.kitchen-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-align: right; line-height: 1.5; }
.kitchen-controls {
  flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center;
  padding-bottom: 10px;
}
.kitchen-tab { background: rgba(255,255,255,0.75); color: var(--ink-soft); font-weight: 700; }
.kitchen-tab.btn-primary { color: #fff; }
/* 仓库食材一览（各玩法产物 → 厨房食材联动入口） */
.kitchen-pantry {
  flex: 0 0 auto; background: rgba(255, 250, 240, 0.85); border-radius: 16px;
  padding: 10px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  border: 2px solid var(--cream);
}
.kitchen-pantry-title { font-weight: 800; font-size: 13px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.kitchen-pantry-title .emoji-img { width: 17px; height: 17px; vertical-align: -2px; }
.kitchen-pantry-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kitchen-pantry-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.7); border-radius: 20px; padding: 4px 10px;
  font-weight: 700; font-size: 12px; box-shadow: var(--shadow-sm);
  border: 2px solid #f3e3c0;
}
.kitchen-pantry-emoji { font-size: 20px; }
.kitchen-pantry-emoji .emoji-img { width: 20px; height: 20px; vertical-align: -4px; }
.kitchen-pantry-name { font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; }
.kitchen-pantry-from { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
/* 订单 / 限时营业共用面板 */
.kitchen-box {
  flex: 0 0 auto; background: rgba(255, 250, 240, 0.9); border-radius: 18px;
  padding: 12px 14px; box-shadow: var(--shadow-sm); border: 2px solid var(--cream);
}
.kitchen-box-head { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kitchen-box-head .kitchen-refresh-wrap { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.kitchen-refresh-wrap .btn { font-size: 12px; padding: 3px 10px; }
.btn-kitchen-refresh { background: linear-gradient(135deg, #a5d6a7, #81c784); color: #1b5e20; border-color: #66bb6a; font-weight: 800; }
.btn-kitchen-refresh:hover:not(:disabled) { background: linear-gradient(135deg, #81c784, #66bb6a); }
.kitchen-empty { color: var(--ink-soft); font-size: 13px; padding: 6px 2px; }
.kitchen-order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.kitchen-order {
  background: rgba(255,255,255,0.85); border-radius: 14px; padding: 10px 12px;
  border: 2px solid var(--cream); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm);
}
.kitchen-order-served { opacity: 0.62; border-color: #cde8d5; }
.kitchen-order-top { display: flex; align-items: center; gap: 8px; }
.kitchen-dish { font-size: 26px; line-height: 1; }
.kitchen-dish .emoji-img { width: 26px; height: 26px; }
.kitchen-order-name { font-weight: 800; font-size: 14px; color: var(--ink); flex: 1; }
.kitchen-order-status { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.kitchen-order-served .kitchen-order-status { background: #d9f2e2; color: #3c9a6a; }
.kitchen-ing { display: flex; gap: 6px; flex-wrap: wrap; }
.kitchen-ing-item { font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(200,230,180,0.35); padding: 2px 8px; border-radius: 10px; }
.kitchen-ing-item .emoji-img { width: 15px; height: 15px; vertical-align: -2px; }
.kitchen-ing-item.kitchen-ing-missing { color: #c6704a; background: rgba(255,200,170,0.4); }
.kitchen-reward { font-size: 13px; font-weight: 800; color: #c8860a; }
.kitchen-reward .emoji-img { width: 15px; height: 15px; vertical-align: -2px; }
.kitchen-order-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kitchen-order-btns .btn-sm { font-size: 11px; padding: 3px 8px; }
.kitchen-timer { font-size: 12px; font-weight: 700; color: var(--gold); }
.kitchen-missing-tip { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
/* 限时营业 */
.kitchen-rush-last {
  background: rgba(200, 240, 200, 0.5); border-radius: 12px; padding: 8px 12px;
  font-size: 13px; font-weight: 700; color: #3f8f5f; margin-bottom: 10px;
}
.kitchen-rush-idle { text-align: center; padding: 10px 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.kitchen-rush-bar {
  font-size: 14px; font-weight: 800; color: var(--ink);
  background: rgba(255, 230, 180, 0.5); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px;
}
.kitchen-rush-end { text-align: center; margin-top: 10px; padding-top: 10px; }
/* 等级锁定遮罩 */
.kitchen-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.94), rgba(255,236,214,0.94));
  border-radius: 22px; box-shadow: var(--shadow);
}
.kitchen-lock-emoji { font-size: 56px; }
.kitchen-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.kitchen-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }
.coop-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }

/* ============ 批次23：产业链（戴森球式物流网络 · 星河传送带） ============ */
.view-logistics.active { flex-direction: column; gap: 8px; position: relative; }
/* —— 顶部仪表盘 —— */
.logi-dash {
  flex: 0 0 auto;
  background: linear-gradient(150deg, rgba(30,34,64,0.94), rgba(58,42,90,0.94), rgba(24,52,74,0.94));
  border-radius: 18px; padding: 10px 16px 8px; box-shadow: var(--shadow-sm);
  border: 2px solid rgba(120,140,200,0.35); color: #eef1ff;
}
.logi-dash-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logi-dash-big { display: flex; align-items: baseline; gap: 6px; }
.logi-dash-icon { font-size: 18px; }
.logi-dash-icon .emoji-img { width: 18px; height: 18px; vertical-align: -3px; }
.logi-dash-big b { font-size: 30px; font-weight: 900; color: #ffd54f; line-height: 1; text-shadow: 0 0 12px rgba(255,213,79,0.45); }
.logi-dash-unit { font-size: 12px; color: #b8c0ea; font-weight: 700; }
.logi-dash-ops { display: flex; gap: 6px; }
.logi-dash-ops .btn-sm { font-size: 11px; padding: 4px 10px; }
.logi-all-on { background: linear-gradient(135deg, #6ee7b7, #34d399); color: #04332a; border: none; font-weight: 800; }
.logi-dash-sub {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: #aab3e4; font-size: 12px; font-weight: 600; margin-top: 6px;
}
.logi-dash-sub b { color: #8fecff; font-weight: 800; }
.logi-dash-dot { width: 4px; height: 4px; border-radius: 50%; background: #6b77b8; }
/* —— 星河地图 —— */
.logi-map {
  position: relative; width: 100%; max-width: 430px; margin: 0 auto;
  height: 0; padding-bottom: 83.333%; /* 300/360 比例；aspect-ratio 在 flex 列容器中不生效，用 padding 撑高 */
  overflow: hidden; border-radius: 18px; flex: 0 0 auto;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(90,120,255,0.18), transparent 60%),
    radial-gradient(900px 420px at 85% 110%, rgba(255,120,220,0.12), transparent 55%),
    linear-gradient(160deg, #0d1533, #141c3f 45%, #1b1740);
  box-shadow: inset 0 0 60px rgba(60,80,160,0.25), var(--shadow-sm);
  border: 2px solid rgba(110,130,220,0.3);
}
.logi-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.logi-edge { cursor: pointer; transition: stroke-opacity .2s; }
.logi-edge-locked { pointer-events: none; }
.logi-edge-glow { pointer-events: none; }
.logi-edge-on { filter: drop-shadow(0 0 4px rgba(255,255,255,0.35)); }
.logi-edge-on:not(.logi-edge-glow) { animation: logiDashScroll 1.4s linear infinite; }
@keyframes logiDashScroll { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.logi-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
/* 节点（物流中心） */
.logi-node {
  position: absolute; transform: translate(-50%, -50%); text-align: center;
  width: 74px; z-index: 2; pointer-events: none;
}
.logi-node-ring {
  position: absolute; left: 50%; top: 24px; width: 52px; height: 52px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(120,160,255,0.28), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.logi-node-active .logi-node-ring { opacity: 1; animation: logiNodePulse 2.2s ease-in-out infinite; }
@keyframes logiNodePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: .45; }
  50% { transform: translate(-50%, -50%) scale(1.25); opacity: .15; }
}
.logi-node-ico {
  width: 48px; height: 48px; line-height: 48px; font-size: 25px; margin: 0 auto;
  background: linear-gradient(160deg, #232a55, #2c2a5e); border: 2px solid rgba(140,160,255,0.5);
  border-radius: 50%; box-shadow: 0 0 14px rgba(90,120,255,0.25), var(--shadow-sm); position: relative;
}
.logi-node-ico .emoji-img { width: 25px; height: 25px; vertical-align: -5px; }
.logi-node-active .logi-node-ico { border-color: rgba(255,213,79,0.75); box-shadow: 0 0 18px rgba(255,213,79,0.35), var(--shadow-sm); }
.logi-node-locked { opacity: .5; filter: grayscale(.75); }
.logi-lock { position: absolute; right: -3px; bottom: -3px; font-size: 13px; }
.logi-node-name { font-size: 11px; font-weight: 800; color: #e6ebff; margin-top: 3px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.logi-node-meter {
  width: 46px; height: 4px; margin: 3px auto 0; border-radius: 99px;
  background: rgba(255,255,255,0.14); overflow: hidden;
}
.logi-node-meter i {
  display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8fecff, #ffd54f);
  transition: width .4s ease;
}
.logi-node-stock { font-size: 9px; color: #9aa6e0; font-weight: 600; line-height: 1.3; margin-top: 2px; }
/* 边中点标签 */
.logi-edge-label {
  position: absolute; transform: translate(-50%, -50%); z-index: 4;
  display: flex; align-items: center; gap: 3px; padding: 2px 8px;
  background: rgba(20,26,56,0.92); border: 1.5px solid rgba(120,140,220,0.4); border-radius: 999px;
  font-size: 10px; font-weight: 800; color: #b8c4ee; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45); line-height: 1;
}
.logi-edge-label .emoji-img { width: 13px; height: 13px; }
.logi-edge-label-on { background: rgba(40,80,60,0.92); border-color: #4caf50; color: #bff0c8; box-shadow: 0 0 12px rgba(76,175,80,0.4); }
.logi-edge-label-locked { opacity: .55; pointer-events: none; }
/* —— 管线卡片面板 —— */
.logi-panel { flex: 0 0 auto; }
.logi-panel-head { font-weight: 800; font-size: 14px; color: var(--ink); margin: 2px 4px 8px; display: flex; align-items: center; gap: 6px; }
.logi-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.logi-row.logi-card {
  display: block; margin: 0; padding: 0; overflow: hidden;
  background: rgba(255,255,255,0.8); border-radius: 16px; box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}
.logi-row-on.logi-card-on { background: linear-gradient(180deg, #f0fbf1, #fff); border-color: #b6dfc0; box-shadow: 0 4px 16px rgba(76,175,80,0.16); }
.logi-row-locked.logi-card-locked { opacity: .62; }
/* 管线条 */
.logi-pipe {
  position: relative; height: 8px; overflow: hidden;
  background: #ece9f2;
}
.logi-pipe-on {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 8px, rgba(255,255,255,0.28) 8px 12px),
    var(--pc);
}
.logi-pipe-shine {
  position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  animation: logiPipeFlow 1.2s linear infinite;
}
.logi-pipe-off { background: #e6e2ee; }
.logi-pipe-off .logi-pipe-shine { display: none; }
@keyframes logiPipeFlow { from { left: -30%; } to { left: 110%; } }
.logi-card-body { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.logi-card-icon { flex: 0 0 auto; font-size: 22px; }
.logi-card-icon .emoji-img { width: 22px; height: 22px; }
.logi-card-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.logi-card-meta b { font-size: 13px; color: var(--ink); }
.logi-card-desc { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.logi-card-stats { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.logi-card-flow { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.logi-card-flow b { font-size: 11px; color: var(--gold); }
.logi-card-rate { font-size: 10px; font-weight: 800; color: #4caf50; background: rgba(76,175,80,0.12); padding: 1px 6px; border-radius: 99px; }
/* 开关 */
.logi-switch {
  flex: 0 0 auto; width: 46px; height: 25px; border-radius: 999px; border: 1px solid #d3cbe0;
  background: #e4deee; position: relative; cursor: pointer; transition: background .2s, box-shadow .2s; padding: 0;
}
.logi-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22);
  transition: left .2s;
}
.logi-switch.logi-on { background: #4caf50; border-color: #43a047; box-shadow: 0 0 10px rgba(76,175,80,0.4); }
.logi-switch.logi-on::after { left: 23px; }
.logi-switch:disabled { opacity: .5; cursor: not-allowed; }
.logi-tip { font-size: 11px; color: var(--ink-soft); font-weight: 600; line-height: 1.5; padding: 2px 4px; }
.logi-tip .emoji-img { width: 13px; height: 13px; vertical-align: -2px; }

/* ============ 批次26：小镇工坊（雇佣居民 + 动画生产 + 成品卖出） ============ */
.view-workshop.active { flex-direction: column; gap: 8px; position: relative; }
.workshop-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.7); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm);
}
.workshop-title { font-weight: 800; font-size: 16px; }
.workshop-title .emoji-img { width: 20px; height: 20px; vertical-align: -3px; }
.workshop-meta { color: var(--ink-soft); font-weight: 600; font-size: 12px; text-align: right; line-height: 1.5; }
.workshop-controls { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 工坊画布（动画舞台） */
.workshop-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  box-shadow: var(--shadow); touch-action: none; position: relative;
  border: 3px solid rgba(180, 130, 70, 0.6); /* 暖木色描边 */
}
.workshop-tip { flex: 0 0 auto; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 2px 8px 4px; line-height: 1.6; }
.workshop-tip .emoji-img { width: 16px; height: 16px; vertical-align: -3px; }
.workshop-box { flex: 0 0 auto; background: rgba(255, 250, 240, 0.85); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); border: 2px solid var(--cream); }
.workshop-box-head { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.workshop-box-head .emoji-img { width: 17px; height: 17px; vertical-align: -2px; }
.workshop-craft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.workshop-craft-battle { position: relative; border-color: #c9a3ff; }
.workshop-craft-badge {
  position: absolute; top: -8px; right: -8px; z-index: 2;
  background: linear-gradient(135deg, #b39ddb, #7e57c2); color: #fff;
  border-radius: 999px; padding: 2px 7px; font-size: 12px; font-weight: 800;
  box-shadow: var(--shadow-sm); line-height: 1.4;
}
.workshop-craft-badge .emoji-img { width: 14px; height: 14px; vertical-align: -2px; }
.workshop-craft {
  background: rgba(255, 255, 255, 0.8); border-radius: 14px; padding: 10px 12px;
  border: 2px solid #eee0c8; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
}
.workshop-craft-top { display: flex; align-items: center; gap: 8px; }
.workshop-craft-emoji { font-size: 26px; line-height: 1; }
.workshop-craft-emoji .emoji-img { width: 26px; height: 26px; }
.workshop-craft-name { font-weight: 800; font-size: 14px; color: var(--ink); flex: 1 1 auto; }
.workshop-ing { display: flex; gap: 6px; flex-wrap: wrap; }
.workshop-ing-item { font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(140, 210, 255, 0.16); border-radius: 999px; padding: 3px 9px; }
.workshop-ing-item .emoji-img { width: 15px; height: 15px; vertical-align: -2px; }
.workshop-ing-missing { background: rgba(255, 158, 160, 0.16); color: var(--red); }
.workshop-craft-info { font-size: 13px; font-weight: 800; color: var(--gold); }
.workshop-craft-info .emoji-img { width: 15px; height: 15px; vertical-align: -2px; }
.workshop-craft-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.workshop-craft-tip { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
/* 工谱指派弹窗 */
.workshop-assign-modal { display: flex; flex-direction: column; gap: 8px; }
.ws-assign-opt { text-align: left; font-size: 13px; font-weight: 700; white-space: normal; line-height: 1.5; }
/* 等级锁定遮罩 */
.workshop-locked {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: rgba(255, 250, 240, 0.92); border-radius: 18px; padding: 20px;
}
.workshop-lock-emoji { font-size: 56px; }
.workshop-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.workshop-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }

/* ============ 批次29：羊村保卫战（PVZ 式塔防战斗场景） ============ */
.view-battle.active { flex-direction: column; gap: 8px; position: relative; }
.battle-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.72); border-radius: 16px;
  padding: 10px 16px; box-shadow: var(--shadow-sm);
}
.battle-title { font-weight: 800; font-size: 16px; }
.battle-title .emoji-img { width: 20px; height: 20px; vertical-align: -3px; }
.battle-meta { color: var(--ink-soft); font-weight: 700; font-size: 12px; text-align: right; line-height: 1.5; }
.battle-meta .emoji-img { width: 15px; height: 15px; vertical-align: -2px; }
.battle-controls { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.battle-canvas {
  flex: 1 1 auto; width: 100%; border-radius: 22px;
  background: linear-gradient(160deg, #8fd3f4, #eef9e6);
  box-shadow: var(--shadow); touch-action: none; position: relative;
  border: 3px solid rgba(120, 180, 120, 0.55);
}
.battle-arsenal { flex: 0 0 auto; background: rgba(255, 250, 240, 0.85); border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow-sm); border: 2px solid #e8e0c8; }
.battle-arsenal-head { font-weight: 800; font-size: 13px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.battle-arsenal-head .emoji-img { width: 16px; height: 16px; vertical-align: -2px; }
.battle-arsenal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.battle-wcard {
  background: rgba(255, 255, 255, 0.85); border-radius: 14px; padding: 8px 10px;
  border: 2px solid #eee0c8; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.battle-wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.battle-wcard-aiming { border-color: #66bb6a; box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.3); }
.battle-wcard-disabled { opacity: 0.55; cursor: default; }
.battle-wcard-disabled:hover { transform: none; box-shadow: var(--shadow-sm); }
.battle-wcard-emoji { font-size: 30px; line-height: 1; }
.battle-wcard-emoji .emoji-img { width: 30px; height: 30px; }
.battle-wcard-name { font-weight: 800; font-size: 13px; color: var(--ink); }
.battle-wcard-count { font-weight: 800; font-size: 13px; color: var(--gold); }
.battle-wcard-stat { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.battle-wcard .btn-buy { margin-top: 2px; background: linear-gradient(135deg, #ffe082, #ffd54f); color: #6d4c00; border-color: #f0c040; font-weight: 800; }
.battle-wcard .btn-buy:hover:not(:disabled) { background: linear-gradient(135deg, #ffd54f, #ffca28); }
.battle-wcard .btn-buy:disabled { opacity: 0.6; }
.battle-tip { flex: 0 0 auto; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 2px 8px 4px; line-height: 1.6; }
.battle-tip .emoji-img { width: 16px; height: 16px; vertical-align: -3px; }
/* 结算浮层 */
.battle-result {
  position: absolute; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center;
  background: rgba(40, 40, 30, 0.35); border-radius: 22px;
}
.battle-result-box {
  background: rgba(255, 255, 255, 0.96); border-radius: 20px; padding: 22px 28px;
  box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center;
  min-width: 220px;
}
.battle-result-win { border: 3px solid #66bb6a; }
.battle-result-lost { border: 3px solid #ef5350; }
.battle-result-emoji { font-size: 46px; line-height: 1; }
.battle-result-emoji .emoji-img { width: 46px; height: 46px; }
.battle-result-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.battle-result-row { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
/* 等级锁定遮罩 */
.battle-locked {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: rgba(235, 250, 240, 0.92); border-radius: 18px; padding: 20px;
}
.battle-lock-emoji { font-size: 56px; }
.battle-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.battle-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }

/* 批次36：已部署装备操作面板（升级 / 铲除，PVZ 强化 + 铲子） */
.battle-selpanel {
  position: absolute; left: 12px; bottom: 12px; z-index: 12;
  background: rgba(255, 252, 244, 0.96); border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow); border: 2px solid #e8d8a8;
  flex-direction: column; gap: 7px; max-width: 320px;
}
.battle-sel-title { font-weight: 800; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.battle-sel-title .emoji-img { width: 20px; height: 20px; }
.battle-sel-row { font-size: 12px; font-weight: 600; color: var(--ink-soft); line-height: 1.5; }
.battle-sel-row .emoji-img { width: 14px; height: 14px; vertical-align: -2px; }
.battle-sel-actions { display: flex; gap: 8px; margin-top: 2px; }

/* ============ 批次33：前端设计打磨（可访问性 / 动效 / 交互反馈） ============ */
/* —— 键盘可达性：品牌色焦点环 —— */
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.btn:focus-visible, .nav-btn:focus-visible { outline-offset: 3px; }

/* —— 文本选中：品牌色系 —— */
::selection { background: rgba(255, 158, 196, 0.32); color: var(--ink); }

/* —— 文本渲染与字距：西文/数字更顺滑，标题更舒展 —— */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.brand, .panel-head h2, .garden-title, .season-title, .modal-title, .result-title,
.workshop-title, .battle-title, .kitchen-title { letter-spacing: 0.02em; }

/* —— 视图切换：极轻的淡入（仅透明度，不影响布局） —— */
.view.active { animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }

/* —— 交互反馈：按钮按压轻压、卡片悬浮抬升 —— */
.btn:active { transform: translateY(1px) scale(0.98); }
.nav-btn:active { transform: translateY(1px) scale(0.97); }
.coll-card, .shop-item, .seed-item, .skin-item, .battle-wcard {
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.coll-card:hover, .shop-item:hover, .seed-item:hover, .skin-item:hover, .battle-wcard:hover {
  box-shadow: var(--shadow-md);
}
.inv-item { transition: transform .14s ease, box-shadow .18s ease; }
.inv-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* —— 动效降级：系统偏好减弱动效时关闭动画/过渡 —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* —— 滚动条：轻量品牌化（WebKit/Blink + Firefox） —— */
.view { scrollbar-width: thin; scrollbar-color: rgba(176, 107, 214, 0.35) transparent; }
.view::-webkit-scrollbar { width: 8px; }
.view::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb { background: rgba(176, 107, 214, 0.28); border-radius: var(--r-pill); }
.view::-webkit-scrollbar-thumb:hover { background: rgba(176, 107, 214, 0.45); }

/* —— 顶部栏与品牌：更清晰的白雾面板，品牌 emoji 对齐 —— */
.topbar { background: rgba(255, 255, 255, 0.82); }
.brand .emoji-img { width: 22px; height: 22px; vertical-align: -4px; }

/* —— 空状态统一（仓库 / 鱼塘 / 养鸡 / 厨房 / 访客） —— */
.inv-empty-tip, .fish-empty, .fish-pond-empty, .coop-empty, .kitchen-empty, .visitor-empty {
  padding: 18px 12px; font-size: 13px; line-height: 1.6;
}

/* ============ 移动端优化（置于文件末尾，确保覆盖基础规则） ============ */
@media (max-width: 520px) {
  .brand { font-size: 15px; }
  .brand-sub { font-size: 9px; margin-left: 4px; }
  /* 顶部栏更紧凑，给内容区让出高度 */
  .topbar { padding: 6px 10px; }
  .coin-pill, .ticket-pill { padding: 4px 10px; font-size: 13px; }
  /* 批次25：移动端存档按钮只留图标，节省顶部空间 */
  .save-btn-label { display: none; }
  .save-btn { padding: 6px 9px; }
  /* 导航压缩到图标按钮（14 个视图从 3 行降到 2 行） */
  .nav-label { display: none; }
  .nav-btn { padding: 5px 8px; border-radius: 12px; }
  .nav-icon { font-size: 16px; }
  .navbar { gap: 4px; padding: 6px 4px; }
  /* 游戏头部/模式/操作按钮压缩，让整局操作尽量一屏可见 */
  .game-top { padding: 6px 10px; margin-bottom: 6px; }
  .game-level { font-size: 14px; }
  .game-stats { font-size: 12px; gap: 5px; }
  .game-modes { gap: 4px; margin: 3px 0 2px; }
  .btn-mode { font-size: 11px; padding: 4px 7px; }
  .game-controls { gap: 4px; padding-top: 5px; }
  .game-controls .btn { font-size: 11px; padding: 6px 8px; }
  .card-face { width: 150px; height: 220px; }
  .coll-card .card-emoji { font-size: 42px; }
}

/* ============ 批次33：移动端细节（安全区 / 触控目标 / 防溢出） ============ */
@media (max-width: 640px) {
  .topbar, .navbar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .stage { padding: 8px; }
  /* 密集操作按钮保证基本触控目标，避免误触 */
  .game-controls .btn, .pasture-controls .btn, .fish-controls .btn,
  .coop-controls .btn, .kitchen-controls .btn, .battle-controls .btn {
    min-height: 32px;
  }
  /* 防止极端窄屏横向溢出 */
  .navbar { max-width: 100%; }
  .panel-head h2 { font-size: 17px; }
  .modal-box { padding: 18px; }
}

/* ============ 批次78：宠物屋（天价蛋孵化 + 温湿度养护 + 珍稀喂养） ============ */
.view-pet.active { flex-direction: column; position: relative; }
.pet-head {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: linear-gradient(150deg, rgba(255,247,236,0.9), rgba(255,236,214,0.9));
  border-radius: 16px; padding: 10px 16px; box-shadow: var(--shadow-sm); margin-bottom: 8px;
  border: 2px solid #f3d9b0;
}
.pet-title { font-weight: 800; font-size: 16px; color: var(--ink); }
.pet-title .emoji-img { width: 20px; height: 20px; vertical-align: -3px; }
.pet-meta { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-align: right; line-height: 1.5; }
.pet-tip {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: rgba(255, 250, 240, 0.7); border: 2px dashed #eadfc4; border-radius: 12px;
  padding: 8px 12px; margin-bottom: 10px; line-height: 1.6;
}
.pet-box {
  flex: 0 0 auto; margin-bottom: 12px;
  background: rgba(255, 250, 240, 0.85); border-radius: 18px; padding: 12px 14px;
  box-shadow: var(--shadow-sm); border: 2px solid var(--cream);
}
.pet-box-head { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pet-empty { color: var(--ink-soft); font-size: 13px; padding: 6px 2px; }
.pet-locked {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: linear-gradient(160deg, rgba(255,247,236,0.92), rgba(232,247,255,0.92));
  border-radius: 22px; box-shadow: var(--shadow);
}
.pet-lock-emoji { font-size: 56px; }
.pet-lock-title { font-weight: 800; font-size: 20px; color: var(--ink); }
.pet-lock-desc { color: var(--ink-soft); font-weight: 600; font-size: 14px; line-height: 1.6; }
.pet-lock-hint { color: var(--ink-soft); font-size: 12px; font-weight: 600; }

/* 买蛋档位卡 */
.pet-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pet-tier {
  border-radius: 16px; padding: 12px; text-align: center;
  background: #fff; box-shadow: var(--shadow-sm); border: 2px solid #f3d9a4;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pet-tier-emoji { font-size: 40px; }
.pet-tier-emoji .emoji-img { width: 40px; height: 40px; }
.pet-tier-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.pet-tier-cost { font-weight: 800; color: var(--gold); font-size: 14px; }
.pet-tier-desc { font-size: 11px; color: var(--ink-soft); font-weight: 600; line-height: 1.5; }

/* 孵化面板 */
.pet-incubate { display: flex; flex-direction: column; gap: 8px; }
.pet-egg-row { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pet-egg-row .emoji-img { width: 26px; height: 26px; }
.pet-remain { color: var(--gold); }
.pet-progress { height: 10px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; }
.pet-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8ed4b6, #4fc3f7); transition: width .4s ease; }
.pet-next { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

/* 温湿度仪表 */
.pet-gauge { display: flex; flex-direction: column; gap: 4px; }
.pet-gauge-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink); }
.pet-gauge-head .emoji-img { width: 16px; height: 16px; vertical-align: -3px; }
.pet-gauge-val small { font-weight: 600; color: var(--ink-soft); font-size: 11px; }
.pet-gauge-val.pet-ok { color: var(--green); }
.pet-gauge-val.pet-bad { color: #ff5252; }
.pet-gauge-track { position: relative; height: 12px; border-radius: 999px; background: rgba(0,0,0,0.06); }
.pet-gauge-band { position: absolute; top: 1px; bottom: 1px; border-radius: 999px; background: rgba(79, 195, 247, 0.35); border: 1px solid rgba(79, 195, 247, 0.6); }
.pet-gauge-mark { position: absolute; top: -2px; bottom: -2px; width: 4px; border-radius: 2px; background: #333; transform: translateX(-50%); }
.pet-gauge-mark.pet-bad { background: #ff5252; }

/* 危险条 */
.pet-danger { display: flex; flex-direction: column; gap: 3px; }
.pet-danger-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #b5482f; }
.pet-danger-head .emoji-img { width: 14px; height: 14px; vertical-align: -2px; }
.pet-danger-track { height: 8px; border-radius: 999px; background: rgba(0,0,0,0.07); overflow: hidden; }
.pet-danger-fill { height: 100%; background: linear-gradient(90deg, #ffca28, #ff7043); transition: width .4s ease; }
.pet-danger-fill.pet-danger-warn { background: #ffa726; }
.pet-danger-fill.pet-danger-bad { background: #ff5252; }

/* 物品按钮 */
.pet-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pet-item-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; line-height: 1.4; }
.pet-item-desc { font-weight: 600; color: var(--ink-soft); }
.pet-item-inv { font-size: 11px; font-weight: 700; color: var(--gold); }

/* 批次83：图鉴卡加速（消耗图鉴卡减少孵化剩余时间） */
.pet-card-accel { border: 2px dashed #e0b64a; border-radius: 12px; padding: 8px 10px; background: #fffdf5; }
.pet-card-accel-head { font-weight: 800; font-size: 12px; color: #8a6d1f; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.pet-card-accel-rows { display: flex; flex-direction: column; gap: 5px; }
.pet-card-accel-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink); }
.pet-card-accel-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-card-accel-rar { font-weight: 800; font-size: 11px; }
.pet-card-accel-reduce { font-size: 12px; font-weight: 800; color: #43a047; white-space: nowrap; }

/* 死亡 / 孵化完成 */
.pet-death {
  border: 2px solid #ff8a80; background: linear-gradient(150deg, #fff3f0, #ffe0db);
  border-radius: 14px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.pet-death-emoji { font-size: 40px; }
.pet-death-title { font-weight: 800; font-size: 16px; color: #c62828; }
.pet-death-reason { font-size: 13px; color: #b5482f; font-weight: 600; }
.pet-hatch-ready {
  border: 2px solid #ffd54f; background: linear-gradient(150deg, #fff7e0, #ffe9c4);
  border-radius: 14px; padding: 14px; text-align: center; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}

/* 商店 */
.pet-shop-group { margin-bottom: 10px; }
.pet-shop-group-title { font-weight: 800; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.pet-shop-rows { display: flex; flex-direction: column; gap: 6px; }
.pet-shop-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 6px 10px; box-shadow: var(--shadow-sm); border: 2px solid transparent;
}
.pet-shop-emoji { font-size: 22px; }
.pet-shop-emoji .emoji-img { width: 22px; height: 22px; }
.pet-shop-info { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.pet-shop-info small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.pet-shop-inv { font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

/* 我的宠物 */
.pet-active-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pet-card {
  border-radius: 16px; padding: 10px; text-align: center;
  background: #fff; box-shadow: var(--shadow-sm); border: 2px solid #f3d9a4;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pet-card.rar-N { border-color: var(--rar-N); }
.pet-card.rar-R { border-color: var(--rar-R); box-shadow: 0 8px 20px rgba(79,195,247,0.35); }
.pet-card.rar-SR { border-color: var(--rar-SR); box-shadow: 0 8px 20px rgba(186,104,200,0.4); }
.pet-card.rar-SSR { border-color: var(--rar-SSR); box-shadow: 0 8px 22px rgba(255,179,0,0.45); }
.pet-card.pet-card-leaving { border-color: #ff8a80; filter: grayscale(0.25); }
.pet-sprite { image-rendering: pixelated; }
.pet-card-name { font-weight: 800; font-size: 14px; color: var(--ink); }
.pet-card-rar { font-weight: 800; font-size: 11px; color: var(--ink-soft); }
.pet-full-bar { width: 100%; height: 8px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; }
.pet-full-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8ed4b6, #4fc3f7); }
.pet-full-label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.pet-hunger { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.pet-hunger.pet-bad { color: #ff5252; }

/* 图鉴 */
.pet-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.pet-history-card {
  border-radius: 12px; padding: 8px; text-align: center;
  background: #fff; box-shadow: var(--shadow-sm); border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.pet-sprite-sm { image-rendering: pixelated; }
.pet-history-name { font-weight: 700; font-size: 12px; color: var(--ink); }
.pet-history-counts { font-size: 11px; font-weight: 600; color: var(--ink-soft); }

/* 孵化结果 / 喂养弹窗 */
.pet-modal { text-align: center; line-height: 1.6; color: var(--ink); }
.pet-hatch-result { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.pet-hatch-name { font-weight: 800; font-size: 18px; color: var(--ink); }
.pet-hatch-rar { font-weight: 800; font-size: 13px; }
.pet-hatch-rar.rar-N { color: var(--rar-N); }
.pet-hatch-rar.rar-R { color: var(--rar-R); }
.pet-hatch-rar.rar-SR { color: var(--rar-SR); }
.pet-hatch-rar.rar-SSR { color: var(--rar-SSR); }
.pet-hatch-hint { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.pet-feed-list { display: flex; flex-direction: column; gap: 8px; }
.pet-feed-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.pet-feed-row .btn-sm { font-size: 11px; padding: 3px 10px; }

/* 移动端 */
@media (max-width: 640px) {
  .pet-meta { font-size: 12px; }
  .pet-tip { font-size: 11px; }
}

/* ============ 批次79：宠物房间舞台 + 纯 CSS 像素渲染 ============ */
.pet-stage { flex: 0 0 auto; margin-bottom: 12px; }
.pet-stage-label {
  font-weight: 800; font-size: 13px; color: var(--ink); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.pet-stage-label .emoji-img { width: 18px; height: 18px; vertical-align: -3px; }
.pet-stage-inner {
  position: relative; height: 260px; overflow: hidden;
  border-radius: 18px; border: 2px solid #eadfc4; box-shadow: var(--shadow-sm);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 236, 200, 0.95), rgba(255, 236, 200, 0.75) 45%, rgba(244, 214, 170, 0.9) 100%),
    linear-gradient(160deg, #fdf0dc, #f3d9b0);
  touch-action: none; user-select: none;
}
.pet-stage-inner::before {
  content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(255, 246, 224, 0.55));
  border-radius: 50% 50% 18px 18px;
}
/* 宠物演员（绝对定位，内含 1em 基准 .pet-pixel） */
.pet-actor {
  position: absolute; left: 0; top: 0;
  width: 1px; height: 1px;
  will-change: left, top, transform;
  transition: none;
  /* 缩放轴设在像素画原点（元素左上角），轻微 scale 不造成位置漂移 */
  transform-origin: 0 0;
}
.pet-actor-ssr { filter: drop-shadow(0 0 8px rgba(255, 213, 79, 0.9)) drop-shadow(0 0 14px rgba(255, 213, 79, 0.5)); }
/* 1em 基准元素：box-shadow 像素画（offset/spread 均为 em，随 font-size 缩放；
   基准必须是 1em×1em——与源仓库 itagn/SoulKnight 的 .box 一致——否则 spread=0 的
   轮廓/眼睛格会画成 1px 离散点。色值用 CSS 变量便于换色） */
.pet-pixel {
  display: inline-block; width: 1em; height: 1em;
  --c-main: #aaa; --c-sub: #aaa; --c-accent: #aaa;
}
.pet-pixel-emoji { width: auto; height: auto; font-size: 28px; line-height: 1; }
.pet-pixel-emoji .emoji-img { width: 28px; height: 28px; }
/* 舞台粒子/气泡（💤/✨/🎵/❤️） */
.pet-fx {
  position: absolute; left: 0; top: 0; pointer-events: none;
  font-size: 14px; line-height: 1; opacity: 1;
  transition: opacity 0.2s linear;
}
.pet-fx .emoji-img { width: 14px; height: 14px; }

/* 卡片内的像素区（.pet-card-pixel 撑高，避免 1px 基准塌陷） */
.pet-card-pixel { height: 56px; display: flex; align-items: center; justify-content: center; }
.pet-card-pixel .pet-pixel { margin: 0 auto; }
.pet-history-pixel { height: 44px; display: flex; align-items: center; justify-content: center; }
.pet-history-pixel .pet-pixel { margin: 0 auto; }

/* 个性 chip */
.pet-trait-chips { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.pet-trait-chip {
  font-size: 10px; font-weight: 700; color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.05); border-radius: 8px; padding: 1px 6px;
}

/* 舞台点击详情弹窗 */
.pet-detail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.pet-detail-name { font-weight: 800; font-size: 18px; color: var(--ink); }
.pet-detail-rar { font-weight: 800; font-size: 13px; }
.pet-detail-rar.rar-N { color: var(--rar-N); }
.pet-detail-rar.rar-R { color: var(--rar-R); }
.pet-detail-rar.rar-SR { color: var(--rar-SR); }
.pet-detail-rar.rar-SSR { color: var(--rar-SSR); }
.pet-detail-mood { font-size: 13px; font-weight: 700; color: var(--ink); }

/* 移动端舞台高度 */
@media (max-width: 640px) {
  .pet-stage-inner { height: 200px; }
}

/* ============ 批次80：宠物身份证 ID 显示 ============ */
.pet-card-id {
  font-size: 10px; font-weight: 700; color: var(--ink-soft);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.3px;
}
.pet-detail-id {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
}
.pet-history-ids {
  font-size: 10px; font-weight: 600; color: var(--ink-soft);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  line-height: 1.5; margin-top: 2px;
  max-width: 100%; overflow-wrap: anywhere;
}
