/* ============================================================
   小洛克们的助手 · 视觉系统
   设计取向：魔法学院质感 —— 深靛蓝主色 + 金色点缀 + 玻璃质感卡片
   ============================================================ */

:root {
  /* ★ 2026-10-14 欣姐要求「网页的主色改为白色」→ 整体转浅色主题。
     白底必须配深色文字才看得清，所以主色改成**深靛蓝**（仍保留魔法学院气质）。
     对比度已核：正文 #1a1f2e on #ffffff ≈ 15.8:1，次要 #525a6e ≈ 7.2:1，均过 WCAG AA。*/

  /* 底色：白 → 极浅蓝灰 → 淡蓝 */
  --bg-0: #ffffff;
  --bg-1: #f7f9fc;
  --bg-2: #eef2f8;

  /* 面板：白色（不再是半透明白，否则白底上看不见） */
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --panel-solid: #ffffff;

  /* 文字：深色，保证白底对比度 */
  --ink: #1a1f2e;
  --ink-2: #384154;
  --muted: #525a6e;

  /* 主色：魔法靛蓝（加深，白底上才够清晰） */
  --brand: #3b47c9;
  --brand-2: #6d28d9;
  --brand-soft: rgba(59, 71, 201, 0.13);

  /* 点缀：金色（加深） */
  --gold: #9a6b00;
  --gold-soft: rgba(154, 107, 0, 0.1);

  /* 语义（浅底上需要更深的前景色） */
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, 0.1);
  --warn: #a16207;
  --warn-soft: rgba(161, 98, 7, 0.11);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.1);

  --border: rgba(26, 31, 46, 0.12);
  --border-2: rgba(26, 31, 46, 0.2);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(26, 31, 46, 0.08);
  --shadow-sm: 0 3px 12px rgba(26, 31, 46, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  /* 用 min-height + 固定层的伪元素，避免长页面滚动时背景露白 */
  background: var(--bg-0);
}
/* 背景光晕层：固定在视口，长页面滚动也不会露白 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(59, 71, 201, 0.07), transparent 60%),
    radial-gradient(1000px 620px at 88% 0%, rgba(109, 40, 217, 0.06), transparent 58%),
    radial-gradient(900px 700px at 50% 108%, rgba(154, 107, 0, 0.05), transparent 60%),
    linear-gradient(168deg, var(--bg-0) 0%, var(--bg-1) 46%, var(--bg-2) 100%);
}

/* ── 顶栏 ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* Logo：洛克王国世界 WIKI 徽标（蓝紫星球 + 金色轨道） */
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 6px rgba(26, 31, 46, 0.18));
}
.brand-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 58%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand .tag {
  margin-left: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(154, 107, 0, 0.28);
  font-weight: 600;
}

/* ── 导航 ── */
nav {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 2px;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s, background 0.18s;
}
nav a i, nav a img {
  font-style: normal;
  width: 17px;
  height: 17px;
  object-fit: contain;
  opacity: 0.9;
  flex: 0 0 auto;
}
nav a:hover img, nav a:hover i { opacity: 1; transform: scale(1.08); }
nav a img { transition: transform 0.18s, opacity 0.18s; }
nav a i { transition: opacity 0.18s; }
nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 4px 14px rgba(109, 124, 255, 0.42);
}
nav a.active i { opacity: 1; }

/* ── 主体 ── */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 26px 60px;
  min-height: calc(100dvh - 62px);
  animation: fadeUp 0.32s ease both;
}
/* 首页垂直居中；内容页保持顶部对齐，避免长内容被压 */
body.home-active main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - 62px);
}
/* 首页容器占满可用高度，使 main 的居中生效 */
body.home-active main > .hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
/* 去掉入场动画的 transform 干扰（translateY 会造成视觉偏移） */
main { animation: fadeIn 0.3s ease both; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

h1 {
  font-size: 30px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
h2 {
  font-size: 21px;
  margin: 0 0 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
h2::before {
  content: "";
  width: 4px;
  height: 19px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
h3.sub {
  font-size: 15px;
  margin: 26px 0 11px;
  color: var(--ink-2);
  font-weight: 700;
  letter-spacing: 0.2px;
}
p { line-height: 1.7; }
.muted { color: var(--muted); }

/* ── 卡片 ── */
.hero {
  width: 100%;
}
.hero h1 {
  font-size: 40px;
  margin: 0 0 6px;
  font-weight: 900;
  letter-spacing: -1px;
  /* ★ 浅色主题：原来白→浅紫的渐变在白底上几乎看不见（首屏大标题"小洛克们的助手"
     整块消失）。改成品牌色渐变，深底浅底都清晰。 */
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 46%, var(--gold) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 13px;
  margin-top: 26px;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  cursor: pointer;
  /* 左右布局：文字在左，彩色图标在右 */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(109, 124, 255, 0.16), transparent 58%);
  opacity: 0;
  transition: opacity 0.22s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  background: var(--panel-2);
  box-shadow: var(--shadow-sm);
}
.card:hover::after { opacity: 1; }
/* 卡片文字区（左侧） */
.card .card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
/* 彩色图标（右侧，无圆形容器，直接放大展示） */
.card .card-ico {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: block;
  width: 46px;
  height: 46px;
  transition: transform 0.22s;
}
.card .card-ico svg { width: 100%; height: 100%; }
.card:hover .card-ico { transform: scale(1.12) translateX(2px); }
.card b { font-size: 15.5px; font-weight: 700; position: relative; }
.card span { color: var(--muted); font-size: 12.5px; position: relative; }
.card .card-idx {
  position: static;
  font-size: 11px;
  font-weight: 800;
  color: rgba(26, 31, 46, 0.34);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
.card:hover .card-idx { color: rgba(26, 31, 46, 0.6); }
.card .badge-ext {
  position: static;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(245, 196, 81, 0.3);
  font-weight: 700;
}
.card .tag.r-lock { align-self: flex-start; }

/* ── 工具栏 / 表单 ── */
.toolbar {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input,
.toolbar select {
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 150px;
  background: var(--panel);
  color: var(--ink);
  transition: border-color 0.18s, background 0.18s;
}
/* ★ placeholder 用深色 —— 原来的 rgba(135,146,184,.75) 是深色主题的浅字，
   换浅色主题后白底上几乎不可见，只剩一个「—」形状的残影 */
.toolbar input::placeholder { color: var(--muted); }
.toolbar input:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--panel-2);
}
.toolbar select option { background: var(--panel-solid); color: var(--ink); }

button {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(109, 124, 255, 0.34);
  transition: transform 0.16s, box-shadow 0.16s, opacity 0.16s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(109, 124, 255, 0.44); }
button:active { transform: none; }
button.ghost {
  background: var(--panel);
  color: var(--ink-2);
  border: 1px solid var(--border-2);
  box-shadow: none;
}
button.ghost:hover { background: var(--panel-2); color: var(--ink); box-shadow: none; }
button.link {
  background: none;
  border: 0;
  color: var(--brand);
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  align-self: flex-start;
}
button.link:hover { text-decoration: underline; transform: none; box-shadow: none; }

:is(a, button, input, select):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── 列表项 ── */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  transition: border-color 0.18s, background 0.18s;
}
.item:hover { border-color: var(--border-2); background: var(--panel-2); }
.item .tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item b { font-size: 15.5px; font-weight: 700; }
.item .meta { font-size: 13px; color: var(--ink-2); }
.item .meta.muted { color: var(--muted); }
.item.on {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.28) inset;
}
.item > span, .item .tag, .item .price { align-self: flex-start; }

/* ── 标签 ── */
.tag {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid rgba(59, 71, 201, 0.28);
  font-weight: 600;
  margin-left: 0;
  white-space: nowrap;
}
.tag.r-rare { background: rgba(2, 132, 199, 0.1); color: #0369a1; border-color: rgba(2, 132, 199, 0.28); }
.tag.r-epic { background: rgba(147, 51, 234, 0.1); color: #7e22ce; border-color: rgba(147, 51, 234, 0.26); }
.tag.r-legend { background: var(--gold-soft); color: var(--gold); border-color: rgba(245, 196, 81, 0.34); }
.tag.r-live { background: var(--ok-soft); color: var(--ok); border-color: rgba(4, 120, 87, 0.3); }
.tag.r-lock { background: rgba(100, 116, 139, 0.12); color: #475569; border-color: rgba(100, 116, 139, 0.28); }
.item .price { color: var(--gold); font-weight: 700; font-size: 13px; }

/* ── 提示条 ── */
.banner {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  margin-bottom: 14px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.banner.ok-bar { background: var(--ok-soft); border-color: rgba(52, 211, 153, 0.3); color: var(--ok); }
.banner.warn-bar { background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); color: var(--warn); }

/* ── 需登录门（用图标与标签表达，不堆说明文字）── */
.gate {
  background: var(--panel);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  margin: 14px 0;
}
.gate-icon { font-size: 30px; line-height: 1; opacity: 0.9; }
.gate h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 700; }
.gate p { margin: 4px 0; font-size: 13.5px; color: var(--muted); }
.gate code {
  background: var(--brand-soft);
  color: var(--brand-2);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
}
.gate button { margin-top: 16px; }

/* ── 原始数据展示 ── */
.raw {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: 400px;
  overflow: auto;
  background: #f4f7fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
}

/* ── 分页 ── */
.pager { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.pager .muted { margin-right: auto; font-size: 13px; }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── 详情展开 ── */
.petdetail { width: 100%; }
.petdetail:empty { display: none; }
.sec { margin-top: 12px; }
.sec h4 {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ── 二维码 ── */
.qrbox {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0;
  min-height: 210px;
}
.qrbox svg { max-width: 100%; height: auto; border-radius: 8px; }
.qrbox p { margin: 0; }
.status { font-size: 14px; margin-top: 10px; color: var(--ink-2); }
.status.ok { color: var(--ok); font-weight: 700; }
.warn { color: var(--warn); font-size: 13px; margin: 6px 0; }
.err { color: var(--danger); }

.tips {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px 14px 34px;
  margin: 0;
}
.tips li { line-height: 1.9; font-size: 13.5px; color: var(--ink-2); }

/* ── 精灵图鉴网格 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.pcard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  background: var(--panel-2);
}
.pimg {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(109, 124, 255, 0.16), transparent 70%);
}
.pimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pno { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.3px; }
.pname { font-size: 13.5px; font-weight: 700; text-align: center; line-height: 1.3; }
.ptags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ptags .tag { font-size: 10.5px; padding: 1px 7px; }
.pmeta { font-size: 11px; color: var(--muted); text-align: center; }

/* ── 属性克制矩阵表 ── */
.arrow { color: var(--muted); font-size: 16px; }
.mtx-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.mtx { border-collapse: collapse; font-size: 12px; width: 100%; }
.mtx th, .mtx td {
  padding: 6px 8px;
  text-align: center;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.mtx thead th { background: var(--panel-2); color: var(--ink-2); font-weight: 700; }
.mtx tbody th { background: var(--panel-2); text-align: left; font-weight: 600; color: var(--ink-2); }
.mtx td.c2 { background: rgba(52, 211, 153, 0.24); color: var(--ok); font-weight: 700; }
.mtx td.c05 { background: rgba(248, 113, 113, 0.2); color: var(--danger); font-weight: 700; }

/* ── 数据总览统计卡 ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin: 14px 0; }
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat b { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink-2); }
/* ── 条形分布 ── */
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 58px 1fr 34px; align-items: center; gap: 9px; font-size: 13px; }
.bar-row .bl { color: var(--ink-2); text-align: right; }
.bar-row .bt { background: rgba(26, 31, 46, 0.08); border-radius: 999px; height: 8px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.bar-row .bn { color: var(--muted); font-variant-numeric: tabular-nums; }

/* 图鉴卡片上的克制标注 */
.pbeat { font-size: 10.5px; color: var(--ok); margin-top: 1px; }

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(59, 71, 201, 0.55);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(26, 31, 46, 0.26); background-clip: padding-box; }

/* ── 移动端 ── */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 11px 15px; }
  .brand { font-size: 16px; }
  nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { flex: 0 0 auto; }
  main { padding: 20px 15px 60px; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .card { padding: 15px 15px 13px; }
  .toolbar input, .toolbar select { flex: 1 1 130px; min-width: 0; }
}

/* ── 远行商人：在售商品图标 + 折叠区 ── */
.goods-ico {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(26, 31, 46, .07);
}
details.fold {
  margin-top: 14px;
  border-top: 1px solid var(--border, rgba(26, 31, 46, .12));
  padding-top: 10px;
}
details.fold > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--muted, #9aa4b8);
  font-size: 13px;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: '\25B8\00a0';
  display: inline-block;
  transition: transform .15s ease;
}
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary:hover { color: var(--brand); }
details.fold > .list { margin-top: 8px; }

/* 原始响应取样（仅结构未识别时出现，供用户复制反馈） */
.mini-btn {
  margin-top: 10px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text);
  background: var(--panel, #1c2230);
  border: 1px solid var(--line, #2a3242);
  border-radius: 8px;
  cursor: pointer;
}
.mini-btn:hover { border-color: var(--accent, #7aa2ff); color: var(--accent, #7aa2ff); }

/* 账号区：文字按钮（忘记账号 / 忘记密码） */
button.link-btn {
  padding: 4px 2px;
  font-size: 13px;
  color: var(--muted, #9aa4b8);
  background: none;
  border: none;
  cursor: pointer;
}
button.link-btn + button.link-btn { margin-left: 14px; }
button.link-btn:hover { color: var(--accent, #7aa2ff); text-decoration: underline; }
button.link-btn:disabled { color: var(--muted, #9aa4b8); cursor: default; text-decoration: none; }
/* ── 二维码遮罩与倒计时（2026-10-14）──
   上游二维码只有 120 秒有效期，所以页面要显示倒计时；
   扫码成功后不撤走二维码，而是加模糊 + 文字提示。 */
.qr-wrap { position: relative; display: inline-block; }

.qr-dim {
  filter: blur(6px) grayscale(0.7);
  opacity: 0.5;
  transition: filter .2s ease, opacity .2s ease;
}

.qr-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(10, 14, 22, 0.55);
  color: #eaf0ff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  /* 遮罩层要盖在图片上，z-index 只在定位元素上生效，这里是 absolute 所以没问题 */
  z-index: 2;
}
.qr-mask[hidden] { display: none; }

.qr-mask-ok {
  background: rgba(16, 84, 48, 0.62);
  color: #d6ffe6;
}

.qr-countdown {
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.qr-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.qr-tab {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--ink-dim, #c9c2e6);
  padding: 7px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.qr-tab.active {
  background: linear-gradient(135deg, #6d5bd0, #9b6ad6);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* ── token 输入框的? 指引浮层 ──
   欣姐要求：鼠标停留在问号上，给出完整获取步骤，
   让完全不知道如何操作的用户也能照着做。 */
.help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.help-q {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border-radius: 50%;
  border: 1px solid var(--muted, #525a6e);
  background: transparent;
  color: var(--muted, #525a6e);
  font-size: 12px;
  line-height: 1;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.help-q:hover,
.help-q:focus {
  border-color: var(--accent, #7aa2ff);
  color: var(--accent, #7aa2ff);
  outline: none;
}

.help-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: -10px;
  width: 340px;
  max-width: 78vw;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(59, 71, 201, .28);
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  box-shadow: 0 12px 32px rgba(26, 31, 46, .16);
  z-index: 30;
  text-align: left;
}
.help-pop[hidden] { display: none; }
.help-pop ol { margin: 8px 0 0; padding-left: 20px; }
.help-pop li { margin-bottom: 6px; }
.help-pop code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(59, 71, 201, .1);
  font-size: 12px;
}
.help-pop .hp-title {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 2px;
}
.help-pop .hp-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted, #525a6e);
  font-size: 12px;
}
/* ============================================================
   家园卡片 · 图片展示
   参考小程序「洛克孵蛋」家园页的视觉：图为主、字为辅
   ============================================================ */

/* 顶部概况：数字直排，不要卡片角标堆砌 */
.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.home-stat {
  flex: 1 1 120px;
  min-width: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.home-stat .hs-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.home-stat .hs-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* 精灵网格：头像卡片，跟小程序一致 */
.home-pets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.home-pet {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.home-pet:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 71, 201, .16);
}
.home-pet .hp-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
  display: block;
  margin: 0 auto 8px;
}
.home-pet .hp-img.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  /* img 加了 is-empty 时用 visibility 隐藏而不是 display:none，
     否则 grid 布局会塌掉，圆形占位丢失 */
}
img.hp-img.is-empty {
  visibility: hidden;
}
.home-pet .hp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-pet .hp-lv {
  margin-top: 2px;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}

/* 变异/异色：卡片描边，一眼区分 */
.home-pet.is-mutation {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-soft) inset;
}

/* 作物地块网格 */
.home-plots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}
.home-plot {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.home-plot .hp-plot-no {
  font-size: 12px;
  color: var(--muted);
}
.home-plot .hp-plot-name {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.home-plot .hp-plot-time {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.home-plot.is-ripe {
  border-color: var(--ok);
  background: rgba(4, 120, 87, .06);
}
.home-plot.is-ripe .hp-plot-time {
  color: var(--ok);
  font-weight: 600;
}
.home-plot.is-stealable {
  border-color: var(--gold);
  background: rgba(154, 107, 0, .06);
}

/* 精灵详情浮层 */
/* ── 精灵详情弹窗（洛克孵蛋深色风格）── */
.pet-sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 20, .62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.pet-sheet {
  position: relative;
  width: min(380px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  background: linear-gradient(180deg, #232a3d 0%, #1a2030 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  padding: 18px 16px 20px;
  color: #e8ecf5;
}
.pet-sheet .ps-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #e8ecf5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}
.pet-sheet .ps-close:hover { background: rgba(255, 255, 255, .22); }
/* 头部：圆形立绘 + 名称 + GID + 属性标签 */
.pet-sheet .ps-top {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 6px 4px 14px;
}
.pet-sheet .ps-art {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 50% 35%, #3a4560, #2a3146);
  border: 2px solid rgba(255, 255, 255, .18);
  flex: none;
}
.pet-sheet .ps-head { min-width: 0; }
.pet-sheet .ps-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.pet-sheet .ps-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa6bd;
  font-variant-numeric: tabular-nums;
}
.pet-sheet .ps-gid {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: #8fd0ff;
  background: rgba(56, 132, 196, .18);
  border: 1px solid rgba(56, 132, 196, .35);
  border-radius: 8px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.pet-sheet .ps-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pet-sheet .ps-tag {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 8px;
  padding: 2px 10px;
}
/* 卡片容器 */
.pet-sheet .ps-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 12px 13px;
  margin-top: 12px;
}
.pet-sheet .ps-card-t {
  font-size: 13px;
  font-weight: 700;
  color: #cdd6e8;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pet-sheet .ps-card-t::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6ee7ff, #818cf8);
}
/* 六维雷达 */
.pet-sheet .ps-radar {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}
.pet-sheet .ps-radar .rl-grid { fill: none; stroke: rgba(255, 255, 255, .12); }
.pet-sheet .ps-radar .rl-axis { stroke: rgba(255, 255, 255, .14); }
.pet-sheet .ps-radar .rl-shape {
  fill: rgba(110, 231, 255, .22);
  stroke: #6ee7ff;
  stroke-width: 1.6;
}
.pet-sheet .ps-radar .rl-dot { fill: #6ee7ff; }
.pet-sheet .ps-radar .rl-lbl { fill: #aab4c8; font-size: 9px; }
.pet-sheet .ps-radar .rl-val { fill: #e8ecf5; font-size: 8px; font-weight: 700; }
/* 资质条 */
.pet-sheet .ps-bars { display: grid; gap: 9px; }
.pet-sheet .ps-bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.pet-sheet .ps-bar-row .ps-bar-name { color: #cdd6e8; }
.pet-sheet .ps-bar-track {
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.pet-sheet .ps-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #818cf8, #6ee7ff);
}
.pet-sheet .ps-bar-val {
  text-align: right;
  color: #e8ecf5;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* 基础信息 */
.pet-sheet .ps-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 12px;
  font-size: 13px;
}
.pet-sheet .ps-rows dt { color: #9aa6bd; }
.pet-sheet .ps-rows dd { margin: 0; color: #e8ecf5; }
.pet-sheet .ps-rows dd .ps-dim { color: #7d8aa3; font-size: 11px; margin-left: 4px; }
/* 炫彩色卡 */
.pet-sheet .ps-shine {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: rgba(0, 0, 0, .2);
}

/* ── 可收获的蛋 ── */
.home-eggs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 10px;
}
.home-egg {
  padding: 12px 10px;
  border: 1px solid var(--brand);
  border-radius: 14px;
  background: var(--brand-soft);
  text-align: center;
}
.home-egg .he-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}
.home-egg .he-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.home-egg .he-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.home-egg .he-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* ★ 洛克孵蛋小程序：顶部「待收取精灵蛋」横向卡片（绿边条） */
.home-egg-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: 12px 0 18px;
  background: #fff;
  border: 1px solid rgba(217, 196, 163, .4);
  border-left: 4px solid #10b981;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(120, 90, 30, .06);
  cursor: pointer;
  transition: box-shadow .16s ease;
}
.home-egg-bar:hover { box-shadow: 0 4px 14px rgba(120, 90, 30, .12); }
.heb-left { display: flex; flex-direction: column; gap: 6px; }
.heb-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}
.heb-sub {
  font-size: 12px;
  color: var(--muted);
}
.heb-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.heb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
}
.heb-arrow {
  font-size: 20px;
  color: #9ca3af;
  line-height: 1;
}

/* ── 守卫精灵：与居住精灵视觉上区分开 ── */
.home-pets.is-guard .home-pet {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, .05);
}
.home-pets.is-guard .home-pet:hover {
  border-color: #6d28d9;
  box-shadow: 0 6px 16px rgba(109, 40, 217, .18);
}

/* ── 作物图标 ── */
.hp-seed-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

/* ── 家园平面示意图 ── */
.home-map {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
  margin-bottom: 18px;
}
.hm-grid {
  display: grid;
  grid-template-columns: repeat(var(--hm-cols, 5), 1fr);
  gap: 8px;
}
/* 地块格子：方形图 + 名字一行（避免底部留大片空白） */
.hm-cell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.hm-in {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
}
.hm-cell img {
  /* .hm-cell .hm-seed 由下方规则单独接管 —— 这里不再锁 34×34 */
  width: auto;
  height: auto;
  object-fit: contain;
  flex: none;
}
.hm-cell .hm-label {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ★ 种子图占主导（不要"框+熟字"，要图） —— 改成立绘为主、名字在下 */
.hm-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 6px 10px;
  aspect-ratio: 1 / 1;
}
.hm-cell .hm-seed {
  flex: 1;
  width: 70%;
  height: 70%;
  object-fit: contain;
  margin-bottom: 4px;
}
.hm-cell .hm-seed.is-missing {
  opacity: .25;
  background: radial-gradient(circle, rgba(180, 140, 60, .15), transparent);
  border-radius: 50%;
}
.hm-cell .hm-label {
  position: relative;  /* 不再用 absolute */
  font-size: 11px;
  margin-top: 2px;
  width: 100%;
  text-align: center;
}
/* ★ 预计成熟时间 —— 位于名字下方 */
.hm-cell .hm-time {
  display: block;
  font-size: 10px;
  color: #b45309;
  font-weight: 600;
  margin-top: 1px;
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.hm-cell .hm-time.is-ripe {
  color: #047857;
  background: rgba(4, 120, 87, .1);
  border-radius: 3px;
  padding: 0 3px;
  display: inline-block;
  width: auto;
}
/* 无图时（图标缺失）仍要撑开高度 */
.hm-cell.is-nodata .hm-in { min-height: 48px; }
.hm-cell.is-empty {
  background: repeating-linear-gradient(45deg, transparent, transparent 5px,
              rgba(0, 0, 0, .03) 5px, rgba(0, 0, 0, .03) 10px);
}
.hm-cell.is-ripe {
  border-color: var(--ok);
  background: rgba(4, 120, 87, .08);
}
.hm-cell.is-stealable {
  border-color: var(--gold);
  background: rgba(154, 107, 0, .08);
}
.hm-cell.is-nodata {
  border-style: dashed;
}
.hm-cell .hm-no {
  position: absolute;
  left: 4px;
  top: 3px;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hm-cell .hm-badge {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--ok);
  color: #fff;
}
.hm-cell.is-stealable .hm-badge {
  background: var(--gold);
}
.hm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.hm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hm-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: inline-block;
}
.hm-dot.is-ripe { border-color: var(--ok); background: rgba(4, 120, 87, .18); }
.hm-dot.is-stealable { border-color: var(--gold); background: rgba(154, 107, 0, .18); }

/* 守卫精灵无图时：只列名字，不放图片占位 */
.home-nametag {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid #7c3aed;
  border-radius: 12px;
  background: rgba(124, 58, 237, .05);
}

/* 精灵卡片上的变异形态标注（如「异色炫彩」） */
.home-pet .hp-mut {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
}

/* ── 室内：居住位 / 守卫台 ── */
.hr-section {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 8px;
  padding-left: 9px;
  border-left: 3px solid var(--brand);
}
.hr-section.is-guard { border-left-color: #7c3aed; }
.hr-section.is-out { border-left-color: var(--gold); }

.hr-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}
/* 居住精灵卡片（参考竞品：一行多个、信息更全） */
.hr-slot {
  padding: 9px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}
.hr-slots {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.hs-pic {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 6px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel-2);
}
.hs-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 异色图：默认隐藏，hover 精灵时切换显示（点开详情也有） */
.hs-pic .hs-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .18s;
}
.hr-slot:hover .hs-pic .hs-shine { opacity: 1; }
.hr-slot:hover .hs-pic > img:not(.hs-shine) { opacity: 0; }
/* 等级与性别角标 */
.hs-lv {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 6px 0 6px 0;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  z-index: 2;
}
.hs-sex {
  position: absolute;
  right: 3px;
  top: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  z-index: 2;
}
/*★ 不要用 :has(.hs-shine) 判金边 —— 异色 img 元素始终存在（只是 opacity:0），
   会让所有卡片都描金边。改用服务端给的 is-shine 类。*/
.hr-slot.is-shine { border-color: var(--gold); }
.hr-slot .hs-name {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-slot .hs-mut {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
}
.hr-slot.is-mutation { border-color: var(--gold); }
.hr-slot.is-guard { border-color: #7c3aed; background: rgba(124, 58, 237, .05); }
.hr-slots.is-guard .hr-slot.is-guard { border-width: 2px; }

.hr-slot { cursor: pointer; transition: border-color .15s, transform .15s; }
.hr-slot:hover { border-color: var(--brand); transform: translateY(-2px); }
.hr-slot.is-guard:hover { border-color: #6d28d9; }

/* 详情浮层里的次要说明（如性格的属性修正方向） */
.ps-dim {
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

/* ── 异色开关（参考竞品：一键筛选异色精灵）── */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  padding: 0 4px;
  white-space: nowrap;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sw-track {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  border-radius: 12px;
  background: var(--border-2);
  transition: background .18s;
  flex: none;
}
.sw-track::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel-solid);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  transition: transform .18s;
}
.switch input:checked + .sw-track {
  background: var(--brand);
}
.switch input:checked + .sw-track::after {
  transform: translateX(19px);
}
.switch input:focus-visible + .sw-track {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 有异色的图鉴卡片：角标 + hover 切异色图 */
.dex-card.has-shine .pimg::after {
  content: '异色';
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  z-index: 2;
}
.dex-card .shine-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s;
  z-index: 1;
}
.dex-card.has-shine:hover .pimg > img:not(.shine-img) { opacity: 0; }
.dex-card.has-shine:hover .shine-img { opacity: 1; }

/* ── 卡片内的状态/变异/灵感文本 ── */
.hr-slot .hs-mut {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-slot .hs-st {
  font-size: 11px;
  color: var(--ink);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 1px 0;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-slot .hs-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.hr-slot .hs-insp {
  font-size: 10px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 家园视图标签页：室内 / 室外 / 家具 ── */
.hr-tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 14px;
  border-bottom: 1px solid var(--border);
}
.hr-tab {
  padding: 8px 18px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.hr-tab:hover { color: var(--ink); }
.hr-tab.is-on {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}
.hr-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-radius: 4px;
}
.hr-pane { display: none; }
.hr-pane.is-on { display: block; }

/* 家具陈列 */
.hf-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.hf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.hf-card {
  padding: 9px 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}
.hf-card img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  margin: 0 auto 5px;
}
.hf-name {
  font-size: 11px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hf-foot {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

/* 家具卡：暂无图片时的占位（不显示破图，也不留大片空白） */
.hf-card.is-noimg {
  background: var(--panel-2);
}
.hf-ph {
  width: 46px;
  height: 46px;
  margin: 0 auto 5px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, transparent, transparent 4px,
              rgba(0, 0, 0, .03) 4px, rgba(0, 0, 0, .03) 8px);
}

/* 家具卡：图片最大不超过卡片宽度，保持比例，不拉伸 */
.hf-card img {
  max-width: 56px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* ══════════════════════════════════════════════════════════════
   家园页美化（2026-10-15）
   解决之前的问题：立绘被 border-radius 裁成白圆球 / 金边刷屏 /
   卡片太窄 / 分区标题弱 / 底部大片空白
   ══════════════════════════════════════════════════════════════ */

/* ── 分区标题：小标题 + 计数徽标，比 hr-section 更有层级 ── */
.hr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 12px;
}
.hr-head:first-child { margin-top: 4px; }
.hr-head-t {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}
.hr-head-n {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 1px 9px;
  line-height: 18px;
}
.hr-head.is-guard .hr-head-t { color: #6d28d9; }
.hr-head.is-guard .hr-head-n {
  color: #6d28d9;
  background: rgba(124, 58, 237, .12);
}
/* 分区标题左侧的小竖条，换成更精致的渐变条 */
.hr-head::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), transparent);
}
.hr-head.is-guard::before {
  background: linear-gradient(180deg, #7c3aed, transparent);
}

/* ★ 房间型标题（截图风格）："家园居住精灵" + 计数 + 右上"3D家园 ›" */
.hr-head-room {
  justify-content: flex-start;
  font-size: 17px;
  font-weight: 700;
}
.hr-head-room .hr-head-t {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.hr-head-room .hr-head-n {
  margin-left: 2px;
}
.hr-head-3d {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .08);
  transition: background .16s;
}
.hr-head-3d:hover {
  background: rgba(99, 102, 241, .18);
  color: #4338ca;
}
.hr-sub {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 12px;
  padding-left: 11px;
  font-weight: 500;
}

/* ── 精灵卡片网格：横向布局（截图1） ── */
/* 截图里的卡是 2 列 380px 宽、左立绘右信息的横向布局 */
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}

/* ★ 洛克孵蛋小程序卡式：浅奶油底、圆头像、信息右排 */
.rc {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 196, 163, .45);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffbf5 0%, #fff5e6 100%);
  cursor: pointer;
  overflow: hidden;
  /* ★ 欣姐 2026-10-15：精灵卡片 高:宽 = 1:2.8（即 aspect-ratio = 宽/高 = 2.8） */
  aspect-ratio: 2.8 / 1;
  min-height: 0;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.rc:hover {
  transform: translateY(-2px);
  border-color: #d9c4a3;
  box-shadow: 0 8px 20px -8px rgba(120, 90, 30, .25);
}
.rc:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ★ 左图区：头像（圆）+ 炫彩色卡（方），并排 */
.rc-pic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
/* 头像圆形框 + 无图占位字 */
.rc-av {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex: 0 0 84px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  background: linear-gradient(135deg, #fff7eb, #ffefd5);
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 163, .35), 0 2px 6px rgba(120, 90, 30, .08);
}
.rc-ph {
  font-size: 30px;
  font-weight: 800;
  color: rgba(120, 90, 30, .3);
  user-select: none;
}

/* ★ 炫彩色卡缩略图（仅炫彩精灵，用该精灵自己的炫彩立绘） */
.rc-shine {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  flex: 0 0 72px;
  overflow: hidden;
  object-fit: contain;
  background: linear-gradient(145deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
  border: 1px solid rgba(99, 102, 241, .35);
  box-shadow: 0 2px 8px rgba(67, 56, 202, .3);
}

/* 头像左下角炫彩色卡小徽章（优先上游真实图案，无则兜底炫彩头像） */
.rc-shine-card {
  position: absolute;
  left: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: linear-gradient(145deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
  border: 1px solid rgba(99, 102, 241, .35);
  box-shadow: 0 1px 4px rgba(67, 56, 202, .3);
  z-index: 3;
}

/* ★ 角标：异色炫彩 / 生蛋 / 守卫（图区右上，与头像部分重叠） */
.rc-badges {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 3;
}
.rc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.rc-shine-icon {
  width: 20px;
  height: 20px;
  color: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, .55));
}
.rc-shine-icon svg { width: 100%; height: 100%; display: block; }
.rc-egg {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
/* 异色蛋：金边 + 暖光，与游戏内异色蛋图标区分 */
.rc-egg.is-shiny {
  border-radius: 50%;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, .65);
  background: rgba(255, 247, 235, .9);
}
.rc-egg-txt {
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 5px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #422006;
}
.rc-guard {
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
}

/* ★ 信息区字段（每行 标签+值，2 列网格） */
.rc-fields {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 14px;
  margin-top: 2px;
}
.rc-f {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.rc-fl {
  font-size: 10px;
  color: var(--muted);
  flex: none;
  white-space: nowrap;
}
.rc-fv {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

/* ★ 异色标识 / 守卫标识：已改为 .rc-mut / .rc-guard 角标（见上方 .rc-badges） */

/* ★ 信息区：右侧四行（行1 名字+Lv+性别， 行2 chips， 行3 灵感） */
.rc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 4px 2px 0;
  align-self: center;
}
.rc-r1 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rc-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Lv 小灰底 pill（截图里是嵌在名字旁边的浅灰小标） */
.rc-lv {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 1px 7px;
  border-radius: 5px;
  line-height: 16px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
/* 性别：截图是右上角蓝/粉小圆标 */
.rc-sex {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  flex: none;
}
.rc-sex.m { background: #3b82f6; }
.rc-sex.f { background: #ec4899; }

/* 状态角标（产出中=蓝，可被偷=红）—— 截图里不显示这个，但数据真实存在就保留 */
.rc-st {
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .04);
  color: #6b7280;
  white-space: nowrap;
  flex: none;
}
.rc-st.is-work {
  background: rgba(59, 130, 246, .12);
  color: #2563eb;
}
.rc-st.is-steal {
  background: rgba(239, 68, 68, .14);
  color: #dc2626;
  font-weight: 700;
}
.rc-st.is-guard {
  background: rgba(124, 58, 237, .12);
  color: #6d28d9;
}
/* ★ 炫彩色卡角标（rc-r1 行内）：渐变紫卡 + 季标号，与非异色区分 */
.rc-shine-tag {
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 1px 4px rgba(67, 56, 202, .35);
  flex: none;
  white-space: nowrap;
}

/* ★ 第二行：性格 / 声音 / 体型 三个 chip —— 图片式展示（图标+进度） */
.rc-r2 {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

/* ★ 系别小标签（元素） */
.rc-elems {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 1px;
}
.rc-elem {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(99, 102, 241, .12);
  color: #4f46e5;
  letter-spacing: .02em;
}

.rc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px 3px 5px;
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-height: 20px;
}
.rc-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rc-ico {
  width: 12px;
  height: 12px;
  flex: none;
  opacity: .85;
}
/* 性格 = 中性灰 + 盾形图标 */
.rc-nat {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #4b5563;
  border: 1px solid rgba(0, 0, 0, .04);
}
/* 声音 = 紫 + 喇叭图标 */
.rc-voice {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, .12);
}
/* 体型 = 蓝 + 体重秤图标 */
.rc-weight {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, .12);
}

/* ★ 声音 dB 横条：左负右正双向条 */
.rc-bar {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: rgba(124, 58, 237, .15);
  vertical-align: middle;
  overflow: hidden;
}
.rc-bar-mid {
  position: absolute;
  left: 50%;
  top: -1px;
  bottom: -1px;
  width: 1px;
  background: rgba(124, 58, 237, .55);
  z-index: 2;
}
.rc-bar-pos {
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #a78bfa, #6d28d9);
  z-index: 1;
}
.rc-bar-neg {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #6d28d9, #4c1d95);
  z-index: 1;
}
/* ★ 体型% 圆环 */
.rc-ring {
  width: 16px;
  height: 16px;
  flex: none;
}
.rc-chip b {
  font-weight: 700;
  font-size: 11px;
  margin-left: 1px;
}

/* ★ 第三行：灵感倒计时 —— 截图里带 ⏰ 图标，文字偏橙棕 */
.rc-r3 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #b45309;
  font-weight: 600;
  margin-top: 2px;
}
.rc-inspire-icon { font-size: 13px; line-height: 1; }
.rc-inspire { font-variant-numeric: tabular-nums; }
.rc-inspire-deadline {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  margin-top: -2px;
  padding-left: 17px;
  font-variant-numeric: tabular-nums;
}

/* 守卫卡：紫色描边 */
.rc.is-guard {
  border-color: rgba(124, 58, 237, .28);
  background: linear-gradient(180deg, rgba(124, 58, 237, .04), transparent 50%), #fff;
}
.rc.is-guard:hover { border-color: #6d28d9; }
.rc.is-shine {
  border-color: rgba(240, 180, 41, .35);
  box-shadow: 0 0 0 1px rgba(240, 180, 41, .12) inset;
}

/* 兼容手机：1 列 */
@media (max-width: 640px) {
  .rc-grid { grid-template-columns: 1fr; }
}

/* ── 旧 .hr-slot 样式已废弃，保留守卫台以外可能用到的基础框 ── */
.hr-slots { display: contents; }

/* ── 顶部统计：做成带图标的胶囊行，比六个灰盒子好看 ── */
.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.home-stat {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  position: relative;
  overflow: hidden;
}
.home-stat::after {
  content: '';
  position: absolute;
  right: -16px;
  top: -16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-soft);
  opacity: .7;
}
.home-stat .hs-label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: var(--muted);
}
.home-stat .hs-value {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* ── 标签页：胶囊按钮组 ── */
.hr-tabs {
  display: inline-flex;
  gap: 3px;
  margin: 16px 0 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.hr-tab {
  padding: 6px 18px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: color .15s, background .15s, box-shadow .15s;
}
.hr-tab:hover { color: var(--ink); }
.hr-tab.is-on {
  color: var(--brand);
  font-weight: 600;
  background: var(--panel-solid);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.hr-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ── 移动端：更紧凑的卡片 ── */
@media (max-width: 560px) {
  .rc-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
  .rc-name { font-size: 12px; margin-top: 6px; }
  .home-stat .hs-value { font-size: 17px; }
  .home-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hr-tab { padding: 6px 14px; font-size: 12px; }
}

/* ── 尊重系统「减少动态效果」偏好 ── */
@media (prefers-reduced-motion: reduce) {
  .rc, .rc-shine, .rc-art, .hr-tab { transition: none !important; }
  .rc:hover { transform: none; }
}


/* ══ 第二轮修正（看截图后）══════════════════════════════════ */

/* ① 「异色炫彩」徽章：原 .rc-mut 在 .rc-pic 内是 absolute 定位，
      旧版 (rc-mut) 想把它挪到 .rc-info 行里 → position:static。
      现在改成横向卡 + 徽章贴立绘左下角（截图2样式），
      旧规则作废，新规则由 1646 行的 .rc-mut 接管。 */

/* ② 「待命」被 ellipsis 截成「待空」→ 状态胶囊不许截断，加宽间距 */
.rc-meta {
  gap: 5px;
  margin-top: 6px;
  min-height: 18px;
}
.rc-st,
.rc-feed {
  flex: none;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  text-overflow: clip;
}

/* ③ 底部大片空白：室内卡片不满行时，让植物园地块并排展示得更紧凑，
      并给整个视图一个最小高度，避免内容少时页面下半截全空 */
.hr-pane.is-on { min-height: 0; }
.rc-grid {
  align-content: start;
}
/* ④ 顶部统计：去掉右上角那个抢眼的圆形装饰，改成左上的细色条 */
.home-stat::after { display: none; }
.home-stat {
  padding: 12px 14px;
  background: linear-gradient(150deg, var(--panel) 0%, var(--panel-2) 100%);
}
.home-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
  opacity: .55;
}

/* ⑤ 守卫台只有 1 只时，让它跟居住卡一样宽（与上方 .rc-grid 协同） */
.rc.is-guard { max-width: none; }

/* ⑥ 标签页胶囊：去掉下边框遗留的横线 */
.hr-tabs { border: 1px solid var(--border); }

/* ── 异色/变异标记：独立一行，不再压在立绘上，也不再被 flex 挤成竖排 ── */
.rc-mutline {
  margin: 4px 8px 0;
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  line-height: 17px;
  padding: 0 8px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  white-space: nowrap;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 室内内容少时，别让页面下半截全空：给视图一个观感高度 ── */
.hr-pane.is-on {
  padding-bottom: 8px;
}
/* 卡片网格不满行时，最后一行不要拉高 */
.rc-grid { align-content: start; grid-auto-rows: min-content; }

/* ★ 家园信息页：浅米黄底（截图1的整体色温），卡片仍是白底浮在上面 */
.home-info {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-radius: 16px;
  padding: 14px 16px 22px;
}

/* ── 平面图（俯视视角房间） ── */
.rl-floor {
  margin: 6px 0 18px;
  border-radius: 16px;
  overflow: hidden;
}
.rl-stage {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #4a4569 0%, #3a3552 100%);
  border-radius: 16px;
  padding: 14px 16px 14px;
}
.rl-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #3a3552;
  border-radius: 12px;
  overflow: hidden;
}
.rl-rooms { position: relative; width: 100%; transition: transform .15s ease; transform-origin: center; }
.rl-room { position: relative; display: none; }
.rl-room.is-on { display: block; }
.rl-room-label { position: absolute; left: 12px; top: 10px; z-index: 2; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0,0,0,.35); padding: 3px 10px; border-radius: 12px; }
.rl-pet-svg {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .16s;
}
/* ★ 放大作用在内层 g 上（fill-box + 自身中心），定位 translate 在外层 <g>，
     两者互不干扰，hover 不再把头像弹回原点闪跳 */
.rl-pet-pos:hover .rl-pet-svg {
  transform: scale(1.25);
}
/* 右侧楼层切换（截图样式：右靠右盖 3 个圆角胶囊） */
.rl-floors {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rl-floor-btn {
  padding: 8px 18px;
  border-radius: 22px;
  border: 1.5px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
  backdrop-filter: blur(4px);
}
.rl-floor-btn.is-on {
  background: #fef3c7;
  color: #92400e;
  border-color: #fef3c7;
  box-shadow: 0 2px 6px rgba(254, 243, 199, .4);
}
.rl-floor-btn.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}
/* 底部缩放控件（截图样式：底部左下，圆形按钮 + 滑块 + 居中） */
.rl-zoom {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .12);
  border-radius: 22px;
  padding: 4px 8px;
  backdrop-filter: blur(4px);
}
.rl-zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rl-zoom-slider {
  width: 100px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, .35);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.rl-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.rl-zoom-center {
  padding: 4px 14px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* 守卫卡：宽度与居住卡一致（网格自动决定），这里只限最大宽 */
.rc.is-guard { max-width: none; }

/* 植物园分区标题：金色竖条，与室内/守卫区分 */
.hr-head.is-out::before {
  background: linear-gradient(180deg, #f0b429, transparent);
}
.hr-head.is-out .hr-head-n {
  color: #b45309;
  background: rgba(240, 180, 41, .16);
}

/* 室内栏底部的「植物园速览」紧凑变体 —— 不画全图，只放编号+状态点 */
.hr-head.is-mini { margin: 18px 0 8px; }
.hr-head.is-mini .hr-head-t {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.hr-head.is-mini .hr-head-n {
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
  background: rgba(240, 180, 41, .14);
}
.hm-grid.hm-mini {
  margin-top: 0;
  gap: 4px;
  margin-bottom: 4px;
  /* 10列紧排：每格自然成方形 */
  max-width: 540px;
}
.hm-grid.hm-mini .hm-cell {
  /* 紧凑方格：固定高 44px，让每格近似方块 */
  height: 44px;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  font-size: 10px;
  background: rgba(148, 163, 184, .12);
  border: 1px solid rgba(148, 163, 184, .2);
  position: relative;
}
.hm-grid.hm-mini .hm-cell.is-ripe {
  background: rgba(34, 197, 94, .18);   /* 成熟 = 浅绿 */
  border-color: rgba(34, 197, 94, .35);
}
.hm-grid.hm-mini .hm-cell.is-stealable {
  background: rgba(239, 68, 68, .16);   /* 可偷 = 浅红 */
  border-color: rgba(239, 68, 68, .35);
}
.hm-grid.hm-mini .hm-no {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  color: rgba(15, 23, 42, .55);
}
.hm-grid.hm-mini .hm-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 9px;
  padding: 1px 4px;
}
/* ★ 室内速览：每格放种子缩略图（和室外植物园同源），悬浮看成熟信息 */
.hm-grid.hm-mini .hm-seed-mini {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
}
.hm-grid.hm-mini .hm-rt {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #15803d;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .7);
  pointer-events: none;
}
.hm-cell.is-more {
  background: rgba(99, 102, 241, .08);
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px dashed rgba(99, 102, 241, .25);
  height: 38px;
  aspect-ratio: auto;
}

/* 地块网格：与卡片网格同节奏 */
.hm-grid { margin-top: 0; }
