/* ===== 自然遗迹调查队 · 宠物养成（复刻版） ===== */
:root {
  --paper: #f3ead8;
  --paper-deep: #e4d5b8;
  --surface: #fff8ec;
  --ink: #2a241c;
  --ink-soft: #5a5146;
  --muted: #8a7f72;
  --line: #d9ccb8;
  --moss: #3f7a4a;
  --moss-deep: #2f5d38;
  --moss-fg: #f6f3ea;
  --leaf: #7ea36a;
  --sky: #4f9bb8;
  --rose: #c45b45;
  --rose-fg: #fff7f4;
  --gold: #d4a017;
  --shadow-hud: 0 0 0 1px rgba(42, 36, 28, .08), 0 8px 18px -10px rgba(42, 36, 28, .4);
  --shadow-soft: 0 2px 8px -4px rgba(42, 36, 28, .18);
  --shadow-stage: 0 16px 40px -18px rgba(42, 36, 28, .55);
  --font-sans: "Noto Sans SC", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", SimSun, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper-deep);
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app-deep {
  min-height: 100dvh;
  background: var(--paper-deep);
}
.app {
  position: relative;
  max-width: 32rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(42, 36, 28, .12);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(243, 234, 216, .9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.75rem 1rem;
}
.topbar-left { display: flex; align-items: center; gap: 0.5rem; }
.topbar-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.badge-date {
  border-radius: 999px;
  background: rgba(63, 122, 74, .15);
  color: var(--moss);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
}
.topbar-res { display: flex; align-items: center; gap: 0.5rem; font-size: 12px; }
.res-chip {
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.res-sand { background: rgba(212, 160, 23, .2); color: var(--ink); }
.res-badge { background: rgba(63, 122, 74, .15); color: var(--moss); }

/* ---------- 主区域 ---------- */
main { flex: 1; overflow-y: auto; }
.screen { padding: 0.75rem 1rem 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }

/* ---------- 底部导航 ---------- */
.bottomnav {
  position: sticky;
  bottom: 0;
  z-index: 30;
  width: 100%;
  background: rgba(255, 248, 236, .95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: var(--shadow-hud);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav-inner { display: grid; grid-template-columns: repeat(8, 1fr); }
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 3.5rem;
  font-size: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-sans);
}
.nav-item .nav-ico {
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.nav-item.active { color: var(--moss); }
.nav-item.active .nav-ico { background: rgba(63, 122, 74, .15); }
.nav-ico svg { width: 1.25rem; height: 1.25rem; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, background-color .15s, transform .15s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled { pointer-events: none; opacity: .5; }
.btn svg { width: 1rem; height: 1rem; }
.btn-primary { background: var(--moss); color: var(--moss-fg); }
.btn-primary:hover { background: var(--moss-deep); }
.btn-outline { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-hud); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--paper-deep); color: var(--ink); }
.btn-danger { background: var(--rose); color: var(--rose-fg); }
.btn-sky { background: var(--sky); color: var(--moss-fg); }
.btn-sm { height: 2.25rem; padding: 0 0.75rem; font-size: 14px; }
.btn-md { height: 2.75rem; padding: 0 1rem; font-size: 14px; }
.btn-lg { height: 3rem; padding: 0 1.25rem; font-size: 16px; }
.btn-full { width: 100%; }
.btn-start { justify-content: flex-start; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-hud);
}
.card h2, .card h3 { font-weight: 500; }
.h2 { font-family: var(--font-display); font-size: 1.25rem; }
.h3 { font-size: 14px; font-weight: 500; margin-bottom: 0.5rem; }

/* ---------- 领养页 ---------- */
.adopt-header { text-align: center; }
.adopt-kicker { font-size: 12px; letter-spacing: .025em; color: var(--moss); }
.adopt-title { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; letter-spacing: -0.025em; }
.adopt-sub { font-size: 14px; color: var(--ink-soft); }

.stage {
  position: relative;
  background: var(--paper-deep);
  border-radius: 12px;
  padding: 8px 12px 12px;
  box-shadow: var(--shadow-stage);
}
.stage-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(42, 36, 28, .55);
  color: var(--moss-fg);
  box-shadow: var(--shadow-hud);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stage-arrow svg { width: 1.25rem; height: 1.25rem; }
.stage-arrow.prev { left: 0.5rem; }
.stage-arrow.next { right: 0.5rem; }
.stage-pet { display: block; margin: 0 auto; height: 14rem; max-width: 100%; }
.stage-name { text-align: center; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.stage-type { text-align: center; font-size: 12px; color: var(--moss); }
.stage-desc { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 4px; }

.pet-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.pet-pick {
  min-height: 4.5rem;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-hud);
  padding: 0;
  cursor: pointer;
  transition: transform .15s;
  background: rgba(42, 36, 28, .15);
}
.pet-pick:active { transform: scale(.96); }
.pet-pick img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 2px; display: block; }
.pet-pick.selected { box-shadow: var(--shadow-hud), 0 0 0 2px var(--moss); }
.pick-lumisprout { background: rgba(212, 160, 23, .35); }
.pick-mosswhisk { background: rgba(126, 163, 106, .4); }
.pick-emberpaw { background: rgba(196, 91, 69, .3); }
.pick-stoneback { background: rgba(42, 36, 28, .2); }
.pick-galeear { background: rgba(79, 155, 184, .4); }

.name-input, .rename-input {
  width: 100%;
  height: 3rem;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-hud);
  padding: 0 12px;
  font-size: 16px;
  font-family: var(--font-sans);
  outline: none;
}
.name-input:focus, .rename-input:focus { box-shadow: var(--shadow-hud), 0 0 0 2px rgba(63, 122, 74, .3); }

/* ---------- 营地 ---------- */
.camp-hero { position: relative; overflow: hidden; background: var(--paper-deep); }
.camp-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camp-hero .veil { position: absolute; inset: 0; background: rgba(42, 36, 28, .25); }
.camp-hero .content { position: relative; padding: 0.75rem 1rem; }
.camp-id {
  display: inline-block;
  border-radius: 999px;
  background: rgba(42, 36, 28, .55);
  color: var(--moss-fg);
  box-shadow: var(--shadow-hud);
  padding: 4px 12px;
  margin-bottom: 4px;
}
.camp-name { font-family: var(--font-display); font-size: 1.125rem; line-height: 1.2; }
.camp-meta { font-size: 12px; opacity: .8; }
.camp-switch {
  float: right;
  border: none;
  border-radius: 999px;
  background: rgba(42, 36, 28, .55);
  color: var(--moss-fg);
  box-shadow: var(--shadow-hud);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.camp-pet {
  position: relative;
  margin: 0 auto;
  height: 13rem;
  width: 100%;
  max-width: 20rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camp-pet img { height: 13rem; max-width: 100%; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  border-radius: 8px;
  background: rgba(42, 36, 28, .5);
  padding: 0.75rem;
  box-shadow: var(--shadow-hud);
}
.bar-row { margin-bottom: 0.5rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar-head { display: flex; justify-content: space-between; font-size: 12px; color: rgba(246, 243, 234, .8); }
.bar-head b { font-weight: 500; }
.bar {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(42, 36, 28, .35);
  margin-top: 2px;
}
.bar > i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.bar-rose > i { background: var(--rose); }
.bar-leaf > i { background: var(--leaf); }
.bar-sky > i { background: var(--sky); }
.bar-gold > i { background: var(--gold); }
.bar-moss > i { background: var(--moss); }

.interact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.interact-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 5rem;
  border: none;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-hud);
  padding: 8px 4px;
  cursor: pointer;
  transition: transform .15s;
  font-family: var(--font-sans);
}
.interact-btn:active { transform: scale(.96); }
.interact-btn:disabled { opacity: .5; pointer-events: none; }
.interact-btn .ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 122, 74, .15);
  color: var(--moss);
}
.interact-btn.danger-ico .ico { background: rgba(196, 91, 69, .15); color: var(--rose); }
.interact-btn .label { font-size: 12px; font-weight: 500; }
.interact-btn .dots { display: flex; gap: 2px; }
.interact-btn .dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.interact-btn .dots i.on { background: var(--moss); }

.hungry-banner {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: var(--rose);
  color: var(--rose-fg);
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  animation: hungry-pulse 1.6s ease-out infinite;
  font-family: var(--font-sans);
}

.food-panel { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.food-panel .btn { gap: 4px; }
.food-panel p { font-size: 14px; color: var(--muted); }

.journal-list { list-style: none; }
.journal-list li { font-size: 14px; margin-bottom: 0.5rem; }
.journal-list li:last-child { margin-bottom: 0; }
.journal-list .jt { font-weight: 500; }
.journal-list .jb { color: var(--ink-soft); }
.muted { color: var(--muted); }

/* ---------- 调查 ---------- */
.map-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 4px; }
.map-tab {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-hud);
  font-family: var(--font-sans);
}
.map-tab.on { background: var(--moss); color: var(--moss-fg); }
.map-tab.off { background: var(--surface); color: var(--ink-soft); }

.zone-card {
  position: relative;
  min-height: 7rem;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-stage);
  margin-bottom: 0.75rem;
}
.zone-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zone-card .veil { position: absolute; inset: 0; background: rgba(42, 36, 28, .5); }
.zone-card .body {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 12px;
  color: var(--moss-fg);
}
.zone-name { font-family: var(--font-display); font-size: 1.25rem; }
.zone-meta { font-size: 12px; opacity: .85; }

/* ---------- 战斗 ---------- */
.combat-field {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-stage);
}
.combat-field img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.combat-field .veil { position: absolute; inset: 0; background: rgba(42, 36, 28, .55); }
.combat-field .grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 12px;
}
.fighter { text-align: center; }
.fighter .avatar { margin: 0 auto; height: 7rem; width: 7rem; display: flex; align-items: center; justify-content: center; }
.fighter .avatar img { height: 7rem; }
.fighter .monster-avatar {
  margin: 0 auto;
  height: 7rem;
  width: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(42, 36, 28, .4);
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--gold);
  box-shadow: var(--shadow-hud);
}
.fighter .fname { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--moss-fg); }
.battle-log { list-style: none; }
.battle-log li { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.battle-log li:last-child { margin-bottom: 0; }
.combat-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.combat-actions .span2 { grid-column: span 2; }

/* ---------- 见闻 ---------- */
.story-hero { position: relative; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-stage); }
.story-hero img { height: 9rem; width: 100%; object-fit: cover; display: block; }
.story-hero .veil { position: absolute; inset: 0; background: rgba(42, 36, 28, .4); }
.story-hero .title {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--moss-fg);
}
.story-body { font-size: 14px; line-height: 1.625; color: var(--ink-soft); }
.story-choices { display: flex; flex-direction: column; gap: 0.5rem; }

/* ---------- 远征 ---------- */
.exp-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 12px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-hud);
  margin-bottom: 0.75rem;
}
.exp-row img { width: 3.5rem; height: 3.5rem; border-radius: 4px; object-fit: cover; }
.exp-row .info { flex: 1; min-width: 0; }
.exp-row .info .t { font-weight: 500; }
.exp-row .info .s { font-size: 12px; color: var(--muted); }
.progress-bar { height: 0.5rem; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--moss); transition: width .3s; }

/* ---------- 背包 / 商店 ---------- */
.pack-list { list-style: none; margin-top: 0.75rem; }
.pack-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.pack-list li:last-child { border-bottom: none; }
.pack-list .n { font-weight: 500; }
.pack-list .s { font-size: 12px; color: var(--muted); }
.pack-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- 商店 ---------- */
.shop-summary { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.shop-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all .15s;
}
.chip.on { background: var(--moss); border-color: var(--moss); color: #fff; }
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.shop-card {
  display: flex;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  box-shadow: var(--shadow-soft);
}
.shop-ico {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #fdf6e9, #f3ead8);
}
.shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-name { font-weight: 600; font-size: 15px; }
.shop-meta { display: flex; align-items: center; gap: 0.4rem; }
.shop-tag {
  font-size: 10px;
  color: var(--moss);
  background: rgba(63, 122, 74, .12);
  border-radius: 4px;
  padding: 1px 6px;
}
.shop-have { font-size: 11px; color: var(--muted); }
.shop-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.shop-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.shop-price { font-weight: 600; font-size: 14px; }
.shop-price em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.shop-btns { display: flex; gap: 0.4rem; }

/* ---------- 更多 ---------- */
.job-row, .train-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 6px 0; }
.job-row .n, .train-row .n { font-size: 14px; font-weight: 500; }
.job-row .s, .train-row .s { font-size: 12px; color: var(--muted); }
.codex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.codex-cell { border-radius: 8px; padding: 4px; text-align: center; }
.codex-cell.current { box-shadow: 0 0 0 2px var(--moss); }
.codex-cell img { margin: 0 auto; width: 4rem; height: 4rem; border-radius: 999px; object-fit: contain; display: block; }
.codex-cell .stage-tag { font-size: 10px; color: var(--moss); }
.codex-cell .stage-name { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.evo-card {
  border-radius: 8px;
  background: var(--paper);
  padding: 12px;
  box-shadow: var(--shadow-hud);
  margin-bottom: 0.75rem;
}
.evo-head { display: flex; align-items: center; gap: 0.5rem; }
.evo-head img { width: 3.5rem; height: 3.5rem; border-radius: 999px; object-fit: contain; }
.evo-head .arrow { color: var(--moss); }
.evo-head .info { flex: 1; min-width: 0; }
.evo-head .info .t { font-weight: 500; }
.evo-head .info .s { font-size: 12px; color: var(--muted); }
.evo-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 反馈元素 ---------- */
.flash {
  position: fixed;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 99;
  border-radius: 999px;
  background: rgba(42, 36, 28, .9);
  color: var(--moss-fg);
  padding: 8px 16px;
  font-size: 14px;
  box-shadow: var(--shadow-stage);
  pointer-events: none;
  white-space: nowrap;
  animation: flash-fade 2.2s ease forwards;
}
@keyframes flash-fade {
  0% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  8% { opacity: 1; transform: translateX(-50%) translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}
.pop-text {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(42, 36, 28, .8);
  color: var(--gold);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  animation: float-pop .9s ease-out forwards;
  pointer-events: none;
  white-space: nowrap;
}
.pop-text.rose { background: rgba(196, 91, 69, .9); color: var(--rose-fg); }
.confirm-box { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.confirm-text { font-size: 14px; }

/* ---------- 宠物动画 ---------- */
.anim-idle { animation: 2.6s ease-in-out infinite pet-idle; }
.anim-idle-evolved { animation: 3.1s ease-in-out infinite pet-idle; }
.anim-idle-awaken {
  filter: drop-shadow(0 10px 14px rgba(42, 36, 28, .28)) drop-shadow(0 0 14px rgba(212, 175, 55, .4));
  animation: 2.4s ease-in-out infinite pet-idle;
}
.anim-eat { animation: .85s ease-in-out infinite pet-eat; }
.anim-wash { animation: .7s ease-in-out infinite pet-wash; }
.anim-touch { animation: .55s ease-in-out infinite pet-touch; }
.anim-walk { animation: .7s ease-in-out infinite pet-walk; }
.anim-evolve { animation: 1.15s ease-out pet-evolve; }

.pet-drop {
  position: absolute;
  top: 16%;
  background: color-mix(in srgb, var(--sky) 65%, white);
  border-radius: 50% 50% 55% 55%;
  width: 7px;
  height: 10px;
  pointer-events: none;
  animation: .7s ease-in infinite pet-drop;
}
.pet-drop-2 { animation-delay: .12s; left: 34%; }
.pet-drop-3 { animation-delay: .28s; left: 50%; }
.pet-drop-4 { animation-delay: 80ms; left: 64%; }
.pet-crumb {
  position: absolute;
  bottom: 20%;
  left: 58%;
  background: var(--gold);
  border-radius: 50%;
  width: 9px;
  height: 9px;
  pointer-events: none;
  animation: .7s ease-in-out infinite pet-crumb;
}
.awaken-glow {
  position: absolute;
  inset: 18%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212, 175, 55, .28), transparent 70%);
  pointer-events: none;
}

@keyframes pet-idle {
  0%, 100% { transform: translateY(0) scale(1) rotate(0); }
  40% { transform: translateY(-14px) scale(1.03, .97) rotate(-2deg); }
  70% { transform: translateY(-4px) scale(.99, 1.02) rotate(1.2deg); }
}
@keyframes pet-eat {
  0%, 100% { transform: translateY(0) scale(1) rotate(0); }
  20% { transform: translateY(7px) scale(1.07, .88) rotate(-7deg); }
  40% { transform: translateY(-3px) scale(.94, 1.08) rotate(5deg); }
  60% { transform: translateY(7px) scale(1.06, .9) rotate(-6deg); }
  80% { transform: translateY(-2px) scale(.98, 1.04) rotate(3deg); }
}
@keyframes pet-wash {
  0%, 100% { transform: rotate(0) translateY(0); }
  16% { transform: rotate(-18deg) translateY(-6px); }
  32% { transform: rotate(16deg) translateY(-2px); }
  48% { transform: rotate(-14deg) translateY(-8px); }
  64% { transform: rotate(12deg) translateY(-2px); }
  80% { transform: rotate(-6deg) translateY(-4px); }
}
@keyframes pet-touch {
  0%, 100% { transform: scale(1) translateY(0); }
  35% { transform: scale(1.08, .9) translateY(5px); }
  70% { transform: scale(.96, 1.08) translateY(-8px); }
}
@keyframes pet-walk {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-12px) rotate(-5deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-12px) rotate(5deg); }
}
@keyframes pet-drop {
  0% { opacity: 0; transform: translateY(-6px) scale(.4); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateY(34px) scale(.75); }
}
@keyframes pet-crumb {
  0%, 100% { opacity: 0; transform: translateY(0) scale(.6); }
  30% { opacity: 1; transform: translateY(-6px) scale(1); }
  70% { opacity: 1; transform: translateY(4px) scale(.9); }
}
@keyframes pet-evolve {
  0% { filter: brightness(2.1); opacity: .35; transform: scale(.55) rotate(-10deg); }
  42% { filter: brightness(1.35); opacity: 1; transform: scale(1.16) rotate(5deg); }
  100% { filter: brightness(1); transform: scale(1) rotate(0); }
}
@keyframes float-pop {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  20% { opacity: 1; transform: translate(-50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -36px) scale(1); }
}
@keyframes hungry-pulse {
  0%, 100% { box-shadow: 0 0 rgba(196, 91, 69, .35); }
  50% { box-shadow: 0 0 0 6px rgba(196, 91, 69, 0); }
}

/* 图标颜色 */
.ico-gold { color: var(--gold); }
.ico-moss { color: var(--moss); }

.section-gap { margin-bottom: 0.75rem; }

/* 布局辅助 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.clearfix::after { content: ""; display: table; clear: both; }
.mx-auto { margin-left: auto; margin-right: auto; }
.h-52 { height: 13rem; }
.h-28 { height: 7rem; }

/* 宠物图像容器 */
.pet-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pet-wrap .pet-img {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}
.pet-shadow { filter: drop-shadow(0 14px 18px rgba(42, 36, 28, .28)); }
.stage-pet, .camp-pet, .fighter .pet-wrap { height: 100%; }
.fighter .pet-wrap { width: 7rem; }
.fighter .pet-wrap .pet-img { height: 7rem; }

/* ---------- 扩展系统：今日任务 / 成就 / 合成 / 设置 / 好感 ---------- */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.bond-chip {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(63, 122, 74, .14);
  color: var(--moss-deep);
  font-weight: 600;
}
.quest-list, .ach-list, .craft-list { list-style: none; margin: 0; padding: 0; }
.quest-list li, .ach-list li, .craft-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.quest-list li:first-child, .ach-list li:first-child, .craft-list li:first-child { border-top: none; }
.quest-list li.claimed, .ach-list li.claimed { opacity: .55; }
.q-main, .ach-main, .craft-main { min-width: 0; flex: 1; }
.q-name, .ach-main .n, .craft-main .n { font-size: 14px; font-weight: 500; }
.q-prog { font-size: 12px; color: var(--muted); font-weight: 400; }
.q-desc, .ach-main .s, .craft-main .s { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ach-new {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
  animation: hungry-pulse 1.6s infinite;
}
.ach-bar { height: 6px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; margin-top: 5px; }
.ach-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #e7b75f);
  transition: width .3s;
}
.craft-mat { color: var(--ink); }
.craft-mat.lack { color: var(--rose); text-decoration: line-through; opacity: .75; }
.codex-fam { margin-bottom: 12px; }
.codex-fam:last-child { margin-bottom: 0; }
.codex-fam-name { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.codex-fam-name svg { width: 0.85rem; height: 0.85rem; }
.codex-cell.locked img { filter: grayscale(1) brightness(.5); }
.codex-cell.locked .stage-tag, .codex-cell.locked .stage-name { opacity: .5; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 8px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: none; }
.set-row .n { font-size: 14px; font-weight: 500; }

/* ---------- 职业系统 ---------- */
.job-chip {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(79, 155, 184, .14);
  color: #2f6a7e;
  font-weight: 600;
}
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.job-row:first-of-type { border-top: none; }
.job-row.cur { border-radius: 10px; background: rgba(63, 122, 74, .06); padding: 10px 8px; margin: 0 -8px; }
.job-main { min-width: 0; flex: 1; }
.job-main .n { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.job-main .n svg { width: 0.95rem; height: 0.95rem; color: var(--ink-soft); }
.job-main .s { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.job-lv { font-size: 11px; color: var(--moss-deep); background: rgba(63, 122, 74, .12); border-radius: 999px; padding: 0 7px; font-weight: 500; }
.job-cur { font-size: 10px; color: #fff; background: var(--moss); border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.job-next { opacity: .8; }
.job-btns { display: flex; flex-direction: column; gap: 6px; }

/* ---------- 宝石系统 ---------- */
.btn-xs { padding: 3px 9px; font-size: 11px; border-radius: 8px; }
.gem-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.gem-slot { border: 1px dashed var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.gem-slot.filled { border-style: solid; background: rgba(255, 255, 255, .5); }
.gem-empty { color: var(--muted); font-size: 12px; }
.gem-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin: 0 auto; }
.gem-ico svg { width: 20px; height: 20px; color: #fff; }
.gem-glow { background: linear-gradient(135deg, #f6c453, #e8853d); }
.gem-tide { background: linear-gradient(135deg, #5bc0de, #2a6fb0); }
.gem-dew { background: linear-gradient(135deg, #8fd3a0, #3e9c6a); }
.gem-star { background: linear-gradient(135deg, #b7a4f2, #6d5bd0); }
.gem-night { background: linear-gradient(135deg, #8a9bb8, #3e4a63); }
.gem-amber { background: linear-gradient(135deg, #e8a44a, #c2562e); }
.gem-info { min-width: 0; }
.gem-name { font-size: 13px; font-weight: 600; }
.gem-eff { font-size: 11px; color: var(--muted); margin-top: 1px; }
.gem-list { margin-top: 10px; }
.gem-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 8px 0; border-top: 1px solid var(--line); }
.gem-list li:first-child { border-top: none; }
.gem-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.gem-main .gem-ico { width: 30px; height: 30px; margin: 0; flex-shrink: 0; }
.gem-main .gem-ico svg { width: 17px; height: 17px; }
.gem-count { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.gem-btns { display: flex; gap: 6px; flex-shrink: 0; }
.gem-max { font-size: 11px; color: var(--gold); padding: 3px 6px; }

/* ---------- 调查档案 / 称号 ---------- */
.title-chip {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(168, 130, 60, .14);
  color: #8a6a2f;
  font-weight: 600;
}
.beast-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.beast-cell {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 2px;
  text-align: center;
  background: rgba(255, 255, 255, .4);
}
.beast-cell.locked { opacity: .45; background: rgba(42, 36, 28, .04); }
.beast-ico {
  width: 26px; height: 26px;
  margin: 0 auto 3px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(63, 122, 74, .1);
}
.beast-ico svg { width: 16px; height: 16px; color: var(--moss-deep); }
.beast-ico.elite { background: rgba(168, 130, 60, .14); }
.beast-ico.elite svg { color: var(--gold); }
.beast-name { font-size: 10px; line-height: 1.2; }
.beast-meta { font-size: 9px; color: var(--muted); margin-top: 2px; }
.title-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.title-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  background: rgba(255, 255, 255, .4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.title-cell.have { border-color: rgba(168, 130, 60, .5); background: rgba(168, 130, 60, .05); }
.title-cell.cur { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.title-name { font-size: 13px; font-weight: 600; }
.title-desc { font-size: 10px; color: var(--muted); line-height: 1.3; }
.title-meta { font-size: 10px; color: var(--muted); }

/* ---------- 功能中心 / 子页面 ---------- */
.sub-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 2px 10px;
}
.sub-t {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  color: var(--ink);
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.more-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.more-cell:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(42, 36, 28, .08); }
.more-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(63, 122, 74, .1);
  margin-bottom: 4px;
}
.more-ico svg { width: 19px; height: 19px; color: var(--moss-deep); }
.more-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.more-desc { font-size: 11px; color: var(--muted); line-height: 1.35; }
.more-status {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  color: var(--moss-deep);
  background: rgba(63, 122, 74, .1);
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 600;
}

/* ===== 装备系统 ===== */
.gear-summary { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 8px; gap: 8px; flex-wrap: wrap; }
.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.equip-cell {
  min-height: 52px; border-radius: 10px; border: 1px dashed var(--sand-dark, #d8c8a8);
  background: var(--bg-soft, #fffdf5); padding: 4px 6px; cursor: default;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; color: var(--sand-dark, #a08c68);
}
.equip-cell.filled { border: 1px solid var(--moss, #6a8f4e); background: #f3f8ec; cursor: pointer; }
.equip-cell-name { font-size: 11px; font-weight: 600; color: var(--ink, #3f3a2e); line-height: 1.2; text-align: center; }
.equip-cell-meta { font-size: 9px; color: var(--sand-dark, #a08c68); }
.equip-cell-empty { font-size: 11px; }
.equip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.equip-list li {
  border: 1px solid var(--sand, #e4d9c0); border-radius: 12px; padding: 8px 10px;
  background: var(--bg-soft, #fffdf5); display: flex; flex-direction: column; gap: 6px;
}
.eq-main { display: flex; flex-direction: column; gap: 2px; }
.eq-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.eq-tag { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 999px; color: #fff; }
.eq-tag.t1 { background: #9aa3ad; }
.eq-tag.t2 { background: #3a8a5f; }
.eq-tag.t3 { background: #b0782e; }
.eq-meta { font-size: 11px; color: var(--sand-dark, #a08c68); }
.eq-attr { font-size: 12px; color: var(--ink, #3f3a2e); font-weight: 600; }
.eq-perk { font-size: 11px; color: var(--moss, #6a8f4e); }
.eq-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.eq-btns .btn { margin: 0; }

/* ===== NPC 地图 · 沉眠之丘 ===== */
.map-hero { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #eef2e4, #f7f1e0); border: 1px solid var(--sand, #e4d9c0); margin: 2px 2px 8px; }
.map-hero-ico { width: 34px; height: 34px; color: var(--moss, #6a8f4e); flex-shrink: 0; }
.npc-card { display: flex; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--sand, #e4d9c0); background: var(--bg-soft, #fffdf5); margin-bottom: 8px; }
.npc-ico { width: 40px; height: 40px; flex-shrink: 0; color: var(--moss, #6a8f4e); background: #f1f5e8; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.npc-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.npc-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.npc-desc { font-size: 12px; color: var(--ink-soft, #6b6350); margin: 0; line-height: 1.5; }
.npc-meta { font-size: 11px; color: var(--sand-dark, #a08c68); }
.npc-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.grave-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 8px; }
.grave-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.grave-tomb { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid #d9d4c8; background: #f3f0ea; filter: grayscale(1); align-items: center; }
.grave-ico { width: 34px; height: 34px; flex-shrink: 0; color: #9a9488; }
.grave-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.grave-name { font-size: 13px; font-weight: 700; color: #7d786c; }
.grave-meta { font-size: 11px; color: #a09a8e; }
.grave-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.grave-dead { font-size: 10px; color: #b5afa3; border: 1px dashed #c9c3b7; border-radius: 999px; padding: 1px 8px; }

/* ===== VIP 会员 ===== */
.vip-hero { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid #e6d9a8; background: linear-gradient(135deg, #fdf8e3, #f6ecd0); margin: 2px 2px 8px; }
.vip-hero.on { border-color: #c9a227; background: linear-gradient(135deg, #fdf3c8, #f7e7ad); box-shadow: 0 2px 10px rgba(201, 162, 39, .18); }
.vip-hero-ico { width: 36px; height: 36px; color: #c9a227; flex-shrink: 0; }
.vip-coin { margin-left: auto; font-size: 15px; font-weight: 700; color: #a8781f; background: #fff8e0; border: 1px solid #e6d9a8; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.vip-coin em { font-style: normal; font-size: 11px; font-weight: 500; color: #b09450; }
.vip-chip-line { margin: 6px 2px 0; display: flex; align-items: center; gap: 8px; }
.vip-chip { font-size: 11px; font-weight: 700; color: #8a6a1a; background: linear-gradient(135deg, #f7e7ad, #eeda8f); border: 1px solid #d9bc5e; border-radius: 999px; padding: 2px 10px; }
.vip-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.vip-perks li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--sand, #e4d9c0); background: var(--bg-soft, #fffdf5); font-size: 12px; }
.vip-perks li.got { border-color: #d9bc5e; background: #fdf7e2; }
.vip-perk-lv { flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fff; background: #c9a227; border-radius: 999px; padding: 1px 8px; }
.vip-perk-name { font-weight: 700; flex-shrink: 0; }
.vip-perk-desc { color: var(--ink-soft, #6b6350); flex: 1; }
.vip-perk-state { flex-shrink: 0; font-size: 10px; color: #8a6a1a; background: #f3e3ae; border-radius: 999px; padding: 1px 8px; }

/* ===== 远征分类 / 异界 ===== */
.exp-cats { display: flex; gap: 6px; margin: 2px 2px 8px; }
.exp-cats .chip { flex: 1; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--sand, #e4d9c0); background: var(--bg-soft, #fffdf5); color: var(--ink-soft, #6b6350); }
.exp-cats .chip.chip-on { border-color: #8aa58c; background: #e9f0e6; color: #3f5c43; }
.chip-sub { font-size: 10px; opacity: .75; }
.abyss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.abyss-cell { border: 1px solid var(--sand, #e4d9c0); border-radius: 12px; padding: 8px; background: var(--bg-soft, #fffdf5); display: flex; flex-direction: column; gap: 4px; }
.abyss-cell.locked { opacity: .55; background: #f1ece2; }
.abyss-lv { font-size: 13px; font-weight: 700; }
.abyss-req { font-size: 11px; color: var(--ink-soft, #6b6350); }
.abyss-done { color: #3f7d4a; font-weight: 600; }
.abyss-reward { font-size: 10px; color: #9a8b62; }
.abyss-cell .btn { margin-top: auto; }

/* ---------- 隐藏职业 ---------- */
.hc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hc-cell { background: rgba(255,255,255,.55); border: 1px solid rgba(60,45,25,.1); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; }
.hc-cell.locked { opacity: .6; }
.hc-cell.have { border-color: rgba(212,160,23,.45); }
.hc-cell.cur { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); background: linear-gradient(135deg, rgba(212,160,23,.13), rgba(255,255,255,.55)); }
.hc-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--ink-soft, #6b6350); }
.hc-fam { color: var(--gold); font-weight: 700; }
.hc-lv { background: rgba(60,45,25,.08); border-radius: 6px; padding: 1px 5px; }
.hc-name { font-weight: 700; font-size: 14px; margin: 3px 0 1px; color: var(--ink, #3a2f22); }
.hc-eff { font-size: 11px; color: #5c5348; line-height: 1.4; }
.hc-cond { font-size: 10px; color: #8a7c6a; margin: 5px 0 7px; line-height: 1.45; min-height: 28px; }
.hc-cell .btn { margin-top: auto; }

/* ---------- 营地身份标签（分色实底） ---------- */
.camp-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.camp-meta { font-size: 12px; color: rgba(255, 250, 235, .92); text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.bond-chip, .job-chip, .title-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
}
.bond-chip { background: #3f7a4a; color: #fff; }
.job-chip { background: linear-gradient(135deg, #e0a92a, #b8860b); color: #fff; }
.title-chip { background: linear-gradient(135deg, #8a6cc9, #6b4fa0); color: #fff; }
.camp-tags svg { width: 11px; height: 11px; }

/* ---------- 装备 9 品质 ---------- */
.eq-tag.q1 { background: #8a8a8a; color: #fff; }
.eq-tag.q2 { background: #ecebe4; color: #55524b; border: 1px solid rgba(0,0,0,.08); }
.eq-tag.q3 { background: #3a3a3a; color: #fff; }
.eq-tag.q4 { background: #4caf50; color: #fff; }
.eq-tag.q5 { background: #2196f3; color: #fff; }
.eq-tag.q6 { background: linear-gradient(120deg, #7b2ff7, #b388ff, #7b2ff7); background-size: 200% 100%; color: #fff; animation: qshimmer 2.4s ease-in-out infinite; }
.eq-tag.q7 { background: linear-gradient(120deg, #9aa7b1, #e8f0f5, #9aa7b1); background-size: 200% 100%; color: #22303a; animation: qshimmer 2.4s ease-in-out infinite; }
.eq-tag.q8 { background: linear-gradient(120deg, #d4a017, #ffe08a, #d4a017); background-size: 200% 100%; color: #3d2c00; animation: qshimmer 2s ease-in-out infinite; }
.eq-tag.q9 { background: linear-gradient(120deg, #d32f2f, #ff8a80, #d32f2f); background-size: 200% 100%; color: #fff; animation: qshimmer 1.8s ease-in-out infinite; }
@keyframes qshimmer { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.equip-cell.filled { border-color: rgba(120, 80, 20, .35); }
.equip-cell .eq-tag { font-size: 9px; padding: 0 4px; margin-left: 2px; }

/* ---------- 宝物 ---------- */
.tres-fam { margin-bottom: 8px; }
.tres-fam-name { font-size: 11px; font-weight: 700; color: var(--gold, #b8860b); margin: 2px 0 4px; }
.tres-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tres-cell {
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(60, 45, 25, .12); border-radius: 8px;
  padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 34px; font-size: 10px; line-height: 1.3;
}
.tres-cell.filled { border-color: var(--gold, #b8860b); background: linear-gradient(135deg, rgba(212, 160, 23, .15), rgba(255, 255, 255, .5)); cursor: pointer; }
.tres-cell.locked { opacity: .45; }
.tres-name { font-weight: 700; color: var(--ink, #3a2f22); }
.tres-meta, .tres-empty { color: #8a7c6a; }
.shop-floors { display: flex; gap: 6px; }

/* ---------- 推荐装备 ---------- */
.rec-equips { display: flex; flex-direction: column; gap: 6px; }
.rec-item { background: rgba(255,255,255,.5); border: 1px solid rgba(60,45,25,.1); border-radius: 9px; padding: 6px 8px; }
.rec-item.worn { border-color: var(--gold, #b8860b); background: linear-gradient(135deg, rgba(212,160,23,.12), rgba(255,255,255,.5)); }
.rec-name { font-size: 13px; font-weight: 700; color: var(--ink, #3a2f22); }
.rec-badge { font-size: 10px; color: var(--gold, #b8860b); margin-left: 2px; }
.rec-meta { font-size: 11px; color: #8a7c6a; }
.rec-attr { font-size: 11px; color: #5c5348; margin: 1px 0 3px; }

/* ===== 装备边框（精工 > 品质 > 默认灰） ===== */
.eq-frame { border: 1.5px solid #9aa0a6; border-radius: 10px; }
.eq-frame.q1 { border-color: #8b8f94; }
.eq-frame.q2 { border-color: #e2e2e6; }
.eq-frame.q3 { border-color: #3a3d42; }
.eq-frame.q4 { border-color: #3aa55d; }
.eq-frame.q5 { border-color: #3a7bd5; }
.eq-frame.q6 { border-color: #9b4de0; }
.eq-frame.q7 { border-color: #c0c7d1; }
.eq-frame.q8 { border-color: #e0a33a; }
.eq-frame.q9 { border-color: #e03a3a; }
.eq-frame.craft { border-color: #d4af37; box-shadow: 0 0 8px rgba(212, 175, 55, .45); }
.rec-item.eq-frame, .shop-card.eq-frame, .equip-list li.eq-frame { padding: 8px 10px; }
.mat-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mat-slot { border: 1.5px dashed #c9a227; border-radius: 10px; padding: 6px; text-align: center; min-height: 54px; font-size: 11px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.mat-slot.empty { color: #9a8f6f; }
.mat-slot.filled { border-style: solid; }
.mat-name { font-weight: 600; font-size: 11px; }
.mat-q { font-size: 10px; }
.equip-cell.eq-frame { border-width: 1.5px; }
.equip-cell.eq-frame.craft { border: 1.5px solid #d4af37; }

/* ===== 世界树五行 ===== */
.tree-ele { display: inline-block; min-width: 22px; text-align: center; font-size: 11px; font-weight: 700; color: #fff; border-radius: 6px; padding: 1px 6px; margin-right: 2px; }
.tree-metal { background: #c9a227; }
.tree-wood { background: #3aa55d; }
.tree-water { background: #3a7bd5; }
.tree-fire { background: #d6543a; }
.tree-earth { background: #a5713a; }

.pack-none { opacity: .45; }
.pack-none .n { color: #8b8b8b; }

/* ===== 宠魅圣地 ===== */
.petm-done { opacity: .5; background: #ececec; }
.petm-lock { opacity: .7; }
.starsea-red { color: #d22; font-weight: 800; text-shadow: 0 0 6px rgba(220, 40, 40, .5); }

/* ---------- 登录屏 / 账号 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(160deg, #3f5a43 0%, #2e4032 55%, #232f26 100%); }
.login-card { width: 100%; max-width: 360px; background: #fbf7ef; border-radius: 20px; padding: 28px 24px; box-shadow: 0 18px 40px rgba(0,0,0,.35); text-align: center; }
.login-logo { font-size: 44px; line-height: 1; margin-bottom: 6px; }
.login-title { margin: 0; font-family: 'Noto Serif SC', serif; color: #3f5a43; font-size: 22px; letter-spacing: 2px; }
.login-sub { margin: 6px 0 16px; color: #8a7a66; font-size: 12px; letter-spacing: 1px; }
.login-err { background: #b04a3a1a; color: #b04a3a; border: 1px solid #b04a3a33; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 12px; }
.login-hint { color: #8a7a66; font-size: 11px; margin: 10px 0 0; line-height: 1.6; }
.login-foot { color: #a89a86; font-size: 10px; margin-top: 14px; }
.login-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.login-field { text-align: left; margin-bottom: 12px; }
.login-field label { display: block; font-size: 12px; color: #6d5d4a; margin-bottom: 5px; font-weight: 600; }
.login-field input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d9cdba; border-radius: 10px; background: #fff; font-size: 15px; color: #3a3226; outline: none; }
.login-field input:focus { border-color: #4f6f52; box-shadow: 0 0 0 2px #4f6f5222; }
/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 6px; }
.rank-row.rank-me { background: #4f6f5214; border-color: #4f6f52; }
.rank-no { font-size: 16px; width: 30px; text-align: center; flex: none; font-weight: 700; color: #a38210; }
.rank-body { flex: 1; min-width: 0; }
.rank-val { font-weight: 700; color: #3f5a43; font-size: 14px; flex: none; }

/* ===== 钱包 ===== */
.wallet-bal { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.wallet-bal .wb { flex: 1; min-width: 90px; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 10px 6px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.wallet-bal .wb b { font-size: 16px; color: var(--moss-deep); }
.wallet-sum { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.wallet-sum .ws { flex: 1; min-width: 80px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.wl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 5px; }
.wl-in { color: var(--green, #2e9e5b); font-weight: 700; font-size: 13px; flex: none; }
.wl-out { color: var(--rose, #d02b2b); font-weight: 700; font-size: 13px; flex: none; }
