/* ============================================================
   冒险岛怀旧资料库 · 暗黑玻璃风 (iOS glass, dark only)
   ============================================================ */
:root {
  --bg: #08080d;
  --text: #f2f2f7;
  --text-2: #a1a1aa;
  --text-3: #6e6e76;
  --accent: #409cff;
  --accent-soft: rgba(10, 132, 255, 0.17);
  --blue: #64b5ff;
  --green: #30d158;
  --red: #ff453a;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(24, 24, 30, 0.72);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-soft: rgba(255, 255, 255, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 52px;
  --rail-w: 224px;
  --maxw: 1080px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  padding: var(--nav-h) 0 0 var(--rail-w);
}
/* 背景光斑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 420px at 12% -5%, rgba(30, 120, 255, 0.14), transparent 62%),
    radial-gradient(640px 480px at 95% 8%, rgba(90, 200, 250, 0.10), transparent 62%),
    radial-gradient(700px 560px at 55% 108%, rgba(150, 60, 255, 0.09), transparent 62%);
  /* 提升到独立合成层，避免卡片 backdrop-filter 反复重采样固定渐变造成闪烁 */
  transform: translateZ(0);
  will-change: transform;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
img.px { image-rendering: pixelated; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

.icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* ---------- 公共外壳：桌面侧栏 + 顶部工具栏 ---------- */
.nav {
  position: fixed; top: 0; right: 0; left: var(--rail-w); z-index: 55;
  height: var(--nav-h);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  background: rgba(12, 12, 18, 0.72);
  border-bottom: 1px solid var(--stroke-soft);
}
.nav-inner {
  width: 100%; max-width: var(--maxw); height: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 16px;
}
.mobile-brand, .rail-toggle, .route-back { display: none; }
.brand-logo { height: 23px; width: auto; display: block; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
body.detail-route .route-back {
  display: flex; align-items: center; gap: 6px; margin-right: auto;
  height: 36px; padding: 0 13px 0 10px; border: 1px solid var(--stroke); border-radius: 999px;
  color: var(--text-2); background: rgba(255, 255, 255, 0.055);
  font-size: 13px; font-weight: 650;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
body.detail-route .route-back:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.085); }
.route-back .icon { width: 18px; height: 18px; }
.search-btn {
  display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap;
  border: 1px solid var(--stroke); background: var(--glass);
  height: 32px; border-radius: 999px; padding: 0 12px; color: var(--text-3); font-size: 12.5px;
  transition: border-color 0.18s, color 0.18s;
}
.search-btn .icon { width: 15px; height: 15px; }
.search-btn:hover { border-color: rgba(255, 255, 255, 0.22); color: var(--text-2); }
.search-btn kbd {
  font: 600 9.5px/1 ui-monospace, monospace;
  border: 1px solid var(--stroke); border-radius: 5px; padding: 3px 4px; color: var(--text-3);
}
.language-toggle {
  display: inline-flex; align-items: center; padding: 3px;
  border: 1px solid var(--stroke); border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}
.language-toggle button {
  min-width: 28px; height: 26px; padding: 0 7px; border-radius: 999px;
  color: var(--text-3); font-size: 11.5px; font-weight: 700;
  transition: color 0.18s, background 0.18s;
}
.language-toggle button.on { color: var(--text); background: rgba(255, 255, 255, 0.13); }

.side-rail {
  position: fixed; inset: 0 auto 0 0; z-index: 70;
  width: var(--rail-w); padding: 12px 12px 18px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(13, 15, 23, 0.86);
  border-right: 1px solid var(--stroke-soft);
  backdrop-filter: blur(30px) saturate(1.35);
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
}
.rail-brand {
  min-height: 40px; padding: 0 10px;
  display: flex; align-items: center;
}
.rail-brand img { display: block; width: auto; max-width: 100%; height: 22px; }
.rail-nav { display: flex; flex-direction: column; gap: 5px; }
.rail-nav a {
  min-height: 40px; padding: 0 12px; border-radius: 13px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-2); font-size: 13px; font-weight: 600;
  transition: color 0.18s, background 0.18s, transform 0.18s;
}
.rail-nav a .icon { width: 17px; height: 17px; }
.rail-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.065); transform: translateX(2px); }
.rail-nav a.on { color: var(--accent); background: var(--accent-soft); }
.rail-spacer { flex: 1; min-height: 24px; }
.rail-user-shell { position: relative; }
.rail-user {
  width: 100%; min-height: 48px; padding: 6px 9px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--stroke-soft); border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  text-align: left; transition: background 0.18s, border-color 0.18s;
}
.rail-user:hover, .rail-user[aria-expanded="true"] { background: rgba(255, 255, 255, 0.075); border-color: var(--stroke); }
.rail-user:focus-visible, .rail-panel-item:focus-visible, .rail-panel-avatar:focus-visible,
.rail-name-edit:focus-visible, .rail-panel-name:focus-visible { outline: 2px solid rgba(64, 156, 255, 0.7); outline-offset: 2px; }
.rail-user img {
  width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover;
  background: rgba(255, 255, 255, 0.08); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.rail-user #rail-user-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.rail-user-more { width: 15px; height: 15px; flex: none; color: var(--text-3); }
.rail-user-panel {
  position: absolute; left: 0; right: 0; bottom: 66px; z-index: 2;
  padding: 13px 10px 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px;
  background: rgba(28, 29, 38, 0.92); box-shadow: 0 22px 55px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(28px) saturate(1.35); -webkit-backdrop-filter: blur(28px) saturate(1.35);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px) scale(0.98); transform-origin: bottom center;
  transition: opacity 0.16s, visibility 0.16s, transform 0.16s;
}
.rail-user-panel.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.rail-panel-head { display: flex; align-items: center; gap: 10px; padding: 2px 5px 9px; }
.rail-panel-avatar { position: relative; flex: none; border-radius: 50%; }
.rail-panel-avatar > img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--glass); }
.rail-avatar-camera {
  position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px;
  display: grid; place-items: center; border: 2px solid #22232c; border-radius: 50%;
  color: var(--text); background: #f2f2f7;
}
.rail-avatar-camera .icon { width: 10px; height: 10px; color: #18181d; }
.rail-panel-who { min-width: 0; flex: 1; }
.rail-name-row { display: flex; align-items: center; gap: 4px; }
.rail-panel-name {
  min-width: 0; max-width: 118px; padding: 1px 3px; border-radius: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 750; outline: 0;
}
.rail-panel-name[contenteditable="true"]:focus { overflow: visible; background: rgba(64, 156, 255, 0.12); box-shadow: 0 0 0 2px rgba(64, 156, 255, 0.35); }
.rail-name-edit { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-3); border-radius: 7px; }
.rail-name-edit:hover { color: var(--text); background: var(--glass); }
.rail-name-edit .icon { width: 13px; height: 13px; }
.rail-panel-sub { display: block; margin-top: 1px; color: var(--text-3); font-size: 10.5px; white-space: nowrap; }
.rail-panel-sep { height: 1px; margin: 0 5px 6px; background: var(--stroke); }
.rail-panel-item {
  width: 100%; min-height: 40px; padding: 0 8px; border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 13px; font-weight: 650; text-align: left;
}
.rail-panel-item:hover:not(:disabled) { background: rgba(255, 255, 255, 0.065); }
.rail-panel-item:disabled { cursor: default; opacity: 0.7; }
.rail-panel-item .icon { width: 17px; height: 17px; }
.rail-panel-value { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.rail-panel-ext { width: 13px; height: 13px; margin-left: auto; color: var(--text-3); }
.rail-backdrop { display: none; }

/* ---------- 布局 ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 90px; }
.crumbs { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }

.card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-h {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 18px; font-weight: 700; font-size: 15.5px;
  border-bottom: 1px solid var(--stroke-soft);
}
.card-h .icon { color: var(--accent); }
.card-h .cnt { margin-left: auto; color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.card-b { padding: 16px 18px; }

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 52px 16px 34px; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #7ec1ff, #2f8bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); margin-top: 10px; font-size: 15px; }
.hero-search {
  margin: 26px auto 0; max-width: 560px; display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 15px 18px; color: var(--text-3); cursor: pointer;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hero-search:hover { border-color: rgba(10, 132, 255, 0.45); transform: translateY(-1px); box-shadow: 0 10px 34px rgba(0,0,0,0.35); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-top: 8px; }
.home-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.home-tile:hover { transform: translateY(-3px); border-color: rgba(10, 132, 255, 0.4); background: rgba(255, 255, 255, 0.08); }
.home-tile .icon { width: 26px; height: 26px; color: var(--accent); }
.home-tile b { font-size: 16px; }
.home-tile span { color: var(--text-3); font-size: 12.5px; }
.home-tile .num { font-size: 22px; font-weight: 800; color: var(--text); }

/* ---------- 工具条 / 筛选 ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.input-wrap {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 9px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 10px 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.input-wrap:focus-within { border-color: rgba(10, 132, 255, 0.5); }
.input-wrap .icon { color: var(--text-3); }
.input-wrap input { flex: 1; background: none; border: 0; outline: 0; font-size: 14.5px; }
.input-wrap input::placeholder { color: var(--text-3); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips.scroll-x {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px; margin-right: -16px; padding-right: 16px;
}
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips.scroll-x .chip { flex: none; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--stroke);
  transition: all 0.15s; white-space: nowrap;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.25); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: rgba(10, 132, 255, 0.5); color: var(--accent); font-weight: 600; }
select.chip { appearance: none; -webkit-appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
select.chip option { background: #17171d; color: var(--text); }

/* ---------- 列表 ---------- */
.section-tag {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 22px 0 12px; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13.5px;
}
.rows { display: flex; flex-direction: column; gap: 9px; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 11px 15px;
  background: var(--glass); border: 1px solid var(--stroke-soft); border-radius: 15px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.row:hover { border-color: rgba(10, 132, 255, 0.35); background: rgba(255, 255, 255, 0.075); transform: translateX(3px); }
.row .thumb {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border-radius: 11px;
}
.row .thumb img { max-width: 42px; max-height: 42px; image-rendering: pixelated; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-name { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row .r-sub { color: var(--text-3); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-stats { display: flex; gap: 14px; color: var(--text-2); font-size: 12.5px; flex: none; align-items: center; }
.row .r-stats b { color: var(--text); font-weight: 650; }
.stat-compact { display: none; }
.drop-mini { display: flex; gap: 4px; align-items: center; width: 96px; justify-content: flex-end; flex: none; overflow: hidden; }
.drop-mini img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; flex: none; }
.stat-num { min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.stat-npc { min-width: 96px; text-align: right; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .thumb-map { width: 78px; overflow: hidden; }
.row .thumb-map img.mapshot { max-width: 74px; max-height: 42px; object-fit: contain; border-radius: 6px; image-rendering: auto; }
.row .thumb-map.noimg { background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e6e76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center no-repeat; }
.row .thumb.noquest { background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e6e76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 17V5a2 2 0 0 0-2-2H4'/%3E%3Cpath d='M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3'/%3E%3C/svg%3E") center no-repeat; }
.row .thumb.noquest svg { display: none; }
.maplinks a.maplink-thumb { padding: 7px 12px 7px 7px; }
.maplinks .thumb.thumb-map {
  width: 64px; height: 38px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,0.05); border-radius: 8px; overflow: hidden;
}
.maplinks .thumb.thumb-map img.mapshot { max-width: 60px; max-height: 34px; object-fit: contain; border-radius: 5px; }
.lv-badge {
  flex: none; font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 999px;
}
.lv-badge.boss { color: var(--red); background: rgba(255, 69, 58, 0.14); }
.lv-badge.boss.purple {
  color: #d9a3ff;
  background: rgba(191, 90, 242, 0.14);
}
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gcard {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 16px 10px 13px; background: var(--glass); border: 1px solid var(--stroke-soft);
  border-radius: 15px; transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.gcard:hover { border-color: rgba(10, 132, 255, 0.35); transform: translateY(-2px); background: rgba(255,255,255,0.075); }
.gcard img { height: 52px; image-rendering: pixelated; object-fit: contain; }
.gcard b { font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.gcard span { color: var(--text-3); font-size: 11px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.load-more { display: block; margin: 22px auto 0; padding: 11px 30px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); color: var(--text-2); font-size: 14px; }
.load-more:hover { border-color: rgba(10, 132, 255, 0.5); color: var(--accent); }
.empty { text-align: center; color: var(--text-3); padding: 46px 0; }
.result-cnt { color: var(--text-3); font-size: 13px; margin-bottom: 12px; }

/* ---------- 道具分类与卡片 ---------- */
.item-filter-panel {
  margin: 12px 0 14px; padding: 13px 15px;
  background: rgba(255,255,255,0.035); border: 1px solid var(--stroke-soft); border-radius: 16px;
}
.item-filter-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: start; }
.item-filter-row + .item-filter-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--stroke-soft); }
.item-filter-label { padding-top: 7px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.item-filter-panel .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.item-filter-count { color: var(--text-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.item-filter-panel .chip.on .item-filter-count { color: currentColor; opacity: 0.72; }
.item-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; }
.item-card {
  min-width: 0; min-height: 208px; padding: 11px 10px 9px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: rgba(22,22,29,0.74); border: 1px solid var(--stroke-soft); border-radius: 15px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.item-card:hover {
  transform: translateY(-2px); border-color: rgba(10,132,255,0.42);
  background: rgba(29,30,39,0.9); box-shadow: 0 9px 24px rgba(0,0,0,0.22);
}
.item-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.item-card-icon { width: 100%; height: 51px; display: grid; place-items: center; margin-bottom: 3px; }
.item-card-icon img {
  max-width: 48px; max-height: 48px; object-fit: contain; image-rendering: pixelated;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.cash-item-visual { position: relative; }
.cash-item-mark {
  position: absolute !important; z-index: 6;
  width: 24px !important; height: 24px !important;
  min-width: 24px; min-height: 24px;
  max-width: 24px !important; max-height: 24px !important;
  object-fit: contain !important; image-rendering: pixelated;
  filter: none !important; pointer-events: none;
}
.item-card-cn {
  width: 100%; min-height: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.35;
}
.item-card-en {
  width: 100%; margin-top: 1px; min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-3); font-size: 11.5px; font-weight: 450; line-height: 1.35;
}
.item-card-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.item-card-meta span {
  padding: 1px 6px; border: 1px solid var(--stroke-soft); border-radius: 999px;
  background: rgba(255,255,255,0.04); color: var(--text-3); font-size: 9.5px; font-weight: 620;
}
.item-card-meta .hidden-item-reason,
.hidden-item-badge {
  color: #ffb340; border-color: rgba(255,159,10,0.32); background: rgba(255,159,10,0.09);
}
.item-card-stats {
  width: 100%; height: 42px; flex: 0 0 42px; margin-top: 5px;
  display: flex; align-items: center; align-content: center; justify-content: center;
  flex-wrap: wrap; gap: 3px 9px; font-variant-numeric: tabular-nums;
}
.item-card-stats span { color: var(--text-2); font-size: 11px; font-weight: 620; line-height: 1.35; }
.item-card-stats .item-card-speed { flex: 0 0 100%; text-align: center; }
.item-card .muted { color: var(--text-3) !important; font-weight: 520 !important; }
.item-card-price {
  width: 100%; min-height: 27px; margin-top: 2px; padding-top: 7px; border-top: 1px solid var(--stroke-soft);
  display: flex; justify-content: center; align-items: center;
}
.item-card-price strong { color: #ffbd43; font-size: 13.5px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.item-card-price .cash-price { color: #ff9f0a; font-size: 12.5px; }

/* ---------- 游戏式道具悬浮预览（仅桌面精细指针） ---------- */
.item-hover-preview {
  position: fixed; top: 0; left: 0; z-index: 1200;
  width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 12px 13px 13px; overflow: hidden; pointer-events: none;
  color: #f6f8ff; background: rgba(21, 27, 45, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 18px;
  backdrop-filter: blur(28px) saturate(1.55) brightness(0.92);
  -webkit-backdrop-filter: blur(28px) saturate(1.55) brightness(0.92);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 3px 10px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.055);
  opacity: 0; will-change: transform; contain: layout paint;
  transition: opacity 80ms ease-out;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
}
.item-hover-preview.is-visible { opacity: 1; }
.item-hover-title {
  min-height: 24px; padding: 0 1px 8px; text-align: left;
  color: #8de9ff; font-size: 16px; font-weight: 600; line-height: 1.3;
  text-shadow: 0 1px 7px rgba(55, 180, 255, 0.24);
}
#item-hover-preview .item-hover-title {
  color: #fff;
  text-shadow: none;
}
.item-hover-top { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; }
.item-hover-top.compact { grid-template-columns: 104px minmax(0, 1fr); }
.item-hover-icon {
  width: 104px; height: 104px; aspect-ratio: 1; display: grid; place-items: center;
  min-width: 0; overflow: hidden;
  background: rgba(225, 235, 255, 0.085); border: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035);
}
.item-hover-icon img {
  display: block; width: 92%; height: 92%; max-width: 100%; max-height: 100%;
  object-fit: contain; image-rendering: pixelated;
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.48));
}
.item-hover-icon.card-icon img {
  width: auto; height: 82%; max-width: 78%; max-height: 82%;
}
.item-hover-icon.compact-icon img {
  width: 80%; height: 80%;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.42));
}
.item-hover-icon .cash-item-mark {
  right: 3px; bottom: 3px;
}
.item-hover-top.compact .item-hover-attrs { align-self: center; margin: 0; }
.item-hover-req { align-self: center; min-width: 0; }
.item-hover-req-row {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px;
  color: #eef3ff; text-align: left; font-size: 13px; font-weight: 400; line-height: 1.52;
}
.item-hover-req-row span { color: rgba(237, 242, 255, 0.8); font-weight: 400; }
.item-hover-req-row b { color: #fff; text-align: left; font-weight: 500; }
.item-hover-jobs {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px;
  margin-top: 9px; padding: 8px 0;
  border-top: 0.5px solid rgba(235, 241, 255, 0.2);
  border-bottom: 0.5px solid rgba(235, 241, 255, 0.2);
  text-align: center; font-size: 10.5px; font-weight: 400; line-height: 1.25;
}
.item-hover-jobs .ok { color: #fff; font-weight: 500; }
.item-hover-jobs .no { color: #EF632A; font-weight: 400; opacity: 1; }
.item-hover-attrs {
  margin: 9px 0 0; padding-left: 17px; color: #ff9f26;
  list-style-position: outside;
}
.item-hover-attrs li { padding-left: 0; font-size: 12.5px; font-weight: 400; line-height: 1.55; }
.item-hover-attrs li::marker { color: #ff8b18; }
.item-hover-attrs li span { color: rgba(236, 242, 255, 0.84); }
.item-hover-attrs li b { margin-left: 7px; color: #fff; font-weight: 500; }
.item-hover-attrs li b .item-hover-attr-note {
  color: rgba(210, 218, 238, 0.55); font-weight: 400;
}
.item-hover-target { display: inline-grid; place-items: center; }
.drop-mini .item-hover-target { width: 20px; height: 20px; flex: none; }
.drop-mini .item-hover-target img { width: 100%; height: 100%; }
.drop-mini .item-hover-target.monster-card-thumb { width: 18px; height: 26px; }
.drop-mini .item-hover-target.monster-card-thumb img { object-fit: contain; }
.item-hover-desc {
  margin-top: 9px; padding: 8px 1px 0;
  border-top: 0.5px solid rgba(235, 241, 255, 0.18);
  color: rgba(229, 236, 252, 0.78); font-size: 11.5px; font-weight: 400; line-height: 1.52; white-space: pre-line;
}
.hover-copy-hint {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 9px; padding-top: 7px;
  border-top: 0.5px solid rgba(235, 241, 255, 0.14);
  color: rgba(221, 229, 247, 0.48); font-size: 9.5px; line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.hover-copy-hint span:last-child { color: rgba(117, 190, 255, 0.78); }

/* ---------- 路线图怪物 / NPC 悬浮信息 ---------- */
.entity-hover-preview { width: min(318px, calc(100vw - 24px)); }
.entity-hover-main {
  display: grid; grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px; align-items: center;
}
.entity-hover-icon img { width: 94%; height: 94%; }
.entity-hover-icon.npc img {
  width: auto; height: auto; max-width: 92%; max-height: 92%;
}
.entity-hover-content { min-width: 0; }
.entity-hover-category {
  display: inline-flex; margin-bottom: 7px; padding: 2px 8px;
  border: 1px solid rgba(255, 107, 97, 0.36); border-radius: 999px;
  color: #ff8a82; background: rgba(255, 69, 58, 0.12);
  font-size: 10.5px; font-weight: 700; line-height: 1.35;
}
.entity-hover-category.event {
  color: #d9a3ff; border-color: rgba(191, 90, 242, 0.38);
  background: rgba(191, 90, 242, 0.14);
}
.entity-hover-category.purple {
  color: #d9a3ff; border-color: rgba(191, 90, 242, 0.38);
  background: rgba(191, 90, 242, 0.14);
}
.entity-hover-stats { display: grid; gap: 3px; }
.entity-hover-stat {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px; font-size: 12.5px; line-height: 1.48;
}
.entity-hover-stat span { color: rgba(236, 242, 255, 0.72); }
.entity-hover-stat b {
  color: #fff; text-align: right; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entity-hover-section-title {
  margin-bottom: 6px; color: rgba(236, 242, 255, 0.7);
  font-size: 11.5px; font-weight: 650;
}
.entity-hover-quests { display: grid; gap: 4px; }
.entity-hover-quests div {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #fff; font-size: 11.5px; line-height: 1.35;
}
.entity-hover-more, .entity-hover-empty {
  margin-top: 6px; color: rgba(221, 229, 247, 0.58);
  font-size: 10.5px; line-height: 1.4;
}

/* ---------- 详情页 ---------- */
.detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-head .portrait {
  width: 88px; height: 88px; flex: none; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 22px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.detail-head .portrait img { max-width: 76px; max-height: 76px; image-rendering: pixelated; }
.detail-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.detail-head .alias { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.detail-head .meta-badges { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.badge {
  font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); color: var(--text-2);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge.orange { background: var(--accent-soft); color: var(--accent); border-color: rgba(10, 132, 255, 0.35); }
.badge.green { background: rgba(48, 209, 88, 0.14); color: var(--green); border-color: rgba(48, 209, 88, 0.3); }
.badge.red { background: rgba(255, 69, 58, 0.13); color: var(--red); border-color: rgba(255, 69, 58, 0.3); }
.badge.purple { background: rgba(191, 90, 242, 0.14); color: #d9a3ff; border-color: rgba(191, 90, 242, 0.38); }
.badge.blue { background: rgba(100, 181, 255, 0.13); color: var(--blue); border-color: rgba(100, 181, 255, 0.3); }
.badge.muted { color: var(--text-3); background: rgba(255, 255, 255, 0.045); }
.trade-muted { color: var(--text-3) !important; }
.item-hover-attrs li.trade-muted b { color: rgba(205, 213, 231, 0.62); font-weight: 500; }
.trade-untradeable { color: #ff9f0a !important; }
.item-hover-attrs li.trade-untradeable b { color: #ff9f0a; font-weight: 500; }
.badge.trade-untradeable {
  color: #ff9f0a !important;
  background: rgba(255, 159, 10, 0.12);
  border-color: rgba(255, 159, 10, 0.32);
}
.detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell { padding: 11px 16px; border-bottom: 1px solid var(--stroke-soft); }
.stat-cell:nth-child(odd) { border-right: 1px solid var(--stroke-soft); }
.stat-cell .k { color: var(--text-3); font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.stat-cell .v { font-weight: 700; font-size: 15px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.stat-grid .stat-cell:nth-last-child(-n+2) { border-bottom: 0; }

/* 详情页统一为单列阅读流；摘要属性保持高密度，其余模块按内容自然增高。 */
.detail-stack { display: flex; flex-direction: column; gap: 16px; }
.detail-stack > .card { width: 100%; margin-top: 0; }
.detail-stack > .card + .card { margin-top: 0; }
.detail-summary-card .card-b { padding: 12px; }
.detail-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px;
}
.detail-stat-cell {
  min-width: 0; min-height: 62px; padding: 10px 12px;
  border: 1px solid var(--stroke-soft); border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.detail-stat-cell .k {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  color: var(--text-3); font-size: 11.5px; font-weight: 550;
}
.detail-stat-cell .k .icon { width: 13px; height: 13px; flex: none; }
.detail-stat-cell .v {
  margin-top: 5px; color: var(--text); font-size: 14.5px; font-weight: 720;
  line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.detail-accent-value { color: var(--accent); }
.detail-empty { padding: 12px 0; }
.detail-info-extra {
  display: flex; flex-direction: column; gap: 11px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke-soft);
}
.detail-info-extra > * { margin-top: 0; }
.detail-info-label {
  margin-bottom: 7px; color: var(--text-3); font-size: 11.5px; font-weight: 650;
}
.detail-stat-toggle {
  display: none; width: 100%; min-height: 42px; margin-top: 8px; padding: 0 11px;
  align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 650;
  border: 1px solid var(--stroke-soft); border-radius: 10px; background: rgba(255,255,255,0.035);
}
.detail-stat-toggle small { margin-left: auto; color: var(--text-3); font-size: 11px; font-weight: 500; }
.detail-stat-toggle .icon { width: 15px; height: 15px; transition: transform 0.18s ease; }
.detail-summary-card.is-expanded .detail-stat-toggle .icon { transform: rotate(180deg); }
.detail-section-card .card-b { padding: 14px 16px 16px; }
.detail-subsection + .detail-subsection {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke-soft);
}
.detail-subsection-head {
  display: flex; align-items: center; gap: 10px; min-height: 20px; margin-bottom: 9px;
}
.detail-subsection-head h3 { color: var(--text-2); font-size: 13px; font-weight: 700; }
.detail-subsection-head .cnt {
  margin-left: auto; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.monster-combat-card .card-b { padding: 16px; }
.monster-combat { display: flex; flex-direction: column; gap: 14px; }
.combat-elements,
.combat-extra { min-width: 0; }
.combat-section-title {
  margin-bottom: 8px; color: var(--text-3); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.03em;
}
.combat-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.combat-tag {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 11px;
  color: var(--text-2); font-size: 12.5px; font-weight: 650;
  border: 1px solid var(--stroke-soft); border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.combat-tag.weak {
  color: #66db82; border-color: rgba(48,209,88,0.28); background: rgba(48,209,88,0.09);
}
.combat-tag.resist {
  color: #ffb34b; border-color: rgba(255,159,10,0.3); background: rgba(255,159,10,0.09);
}
.combat-tag.immune {
  color: #ff7b73; border-color: rgba(255,69,58,0.3); background: rgba(255,69,58,0.09);
}
.combat-tag.neutral { color: var(--text); }
.combat-tag.skill {
  color: #8ac4ff; border-color: rgba(10,132,255,0.3); background: rgba(10,132,255,0.09);
}
.combat-tag.trait {
  color: #d5a5f4; border-color: rgba(191,90,242,0.26); background: rgba(191,90,242,0.08);
}
.combat-help { margin-top: 6px; color: var(--text-3); font-size: 11px; }
.combat-facts {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--stroke-soft);
}
.combat-fact {
  min-width: 0; min-height: 58px; padding: 9px 11px; border-radius: 10px;
  background: rgba(255,255,255,0.035); border: 1px solid var(--stroke-soft);
}
.combat-fact span { display: block; color: var(--text-3); font-size: 10.5px; font-weight: 600; }
.combat-fact b {
  display: block; margin-top: 4px; color: var(--text); font-size: 12.5px;
  line-height: 1.45; font-weight: 680; overflow-wrap: anywhere;
}
.combat-extra { padding-top: 13px; border-top: 1px solid var(--stroke-soft); }
.combat-note {
  display: flex; align-items: flex-start; gap: 7px; padding: 10px 11px;
  color: var(--text-3); font-size: 11.5px; line-height: 1.55;
  border-radius: 10px; background: rgba(10,132,255,0.055);
}
.combat-note .icon { width: 14px; height: 14px; margin-top: 1px; color: var(--accent); flex: none; }
.maplink-copy { min-width: 0; }
.maplink-copy > small {
  display: block; color: var(--text-3); font-size: 11px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.maplink-thumb .cnt2 { white-space: nowrap; }
.map-preview-card .card-b {
  display: grid; place-items: center; min-height: 160px; padding: 18px; text-align: center;
}
.map-preview-card .map-shot { width: auto; max-width: 100%; max-height: min(66vh, 680px); }
.map-preview-card .card-h .cnt {
  display: flex; align-items: center; gap: 10px;
}
.map-preview-controls { display: flex; align-items: center; gap: 5px; }
.map-preview-controls[hidden],
.map-preview-controls .chip[hidden] { display: none !important; }
.map-preview-controls .chip {
  padding: 5px 10px; font-size: 11.5px; line-height: 1.25; cursor: pointer;
}
.map-preview-zoom-hint { white-space: nowrap; }
.map-preview-stage {
  position: relative; display: inline-block; max-width: 100%; line-height: 0;
  border-radius: 10px; cursor: zoom-in; outline: none; user-select: none;
}
.map-preview-stage:focus-visible {
  box-shadow: 0 0 0 2px rgba(10,132,255,0.72), 0 0 0 5px rgba(10,132,255,0.16);
}
.map-preview-stage .map-shot { display: block; }
.map-preview-stage .map-preview-marks { pointer-events: none; }
.map-preview-stage .map-preview-marks .lb-mark { pointer-events: auto; }

.drop-group { margin-bottom: 14px; }
.drop-group:last-child { margin-bottom: 0; }
.drop-group .dg-title { color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke-soft);
  border-radius: 11px; padding: 6px 11px 6px 7px; font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.pill:hover { border-color: rgba(10, 132, 255, 0.4); background: rgba(255, 255, 255, 0.08); }
.pill img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.pill .rate { color: var(--accent); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill small { color: var(--text-3); font-size: 11px; }
.quest-reward-pills { align-items: flex-start; }
.quest-reward-pill { max-width: 100%; min-height: 40px; }
.quest-reward-pill > span { min-width: 0; overflow-wrap: anywhere; }
.quest-reward-pill > .icon { width: 16px; height: 16px; flex: none; }
.recipe-list, .recipe-usage-list { display: flex; flex-direction: column; gap: 9px; }
.recipe-entry {
  padding: 11px 12px; border: 1px solid var(--stroke-soft); border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}
.recipe-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recipe-entity {
  display: inline-flex; align-items: center; gap: 9px; min-width: 0;
  color: var(--text); font-size: 13.5px; font-weight: 700;
}
.recipe-entity img {
  width: 38px; height: 38px; flex: none; object-fit: contain; image-rendering: pixelated;
}
.recipe-cost {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  color: var(--accent); font-size: 12px; font-weight: 700;
}
.recipe-cost .icon { width: 14px; height: 14px; }
.recipe-label {
  margin: 8px 0 6px; padding-top: 8px; border-top: 1px solid var(--stroke-soft);
  color: var(--text-3); font-size: 10.5px; font-weight: 650;
}
.recipe-materials { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-material {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 6px;
  border-radius: 9px; background: rgba(255, 255, 255, 0.05);
  color: var(--text-2); font-size: 12px;
}
.recipe-material:hover { background: rgba(10, 132, 255, 0.12); color: var(--text); }
.recipe-material img {
  width: 24px; height: 24px; flex: none; object-fit: contain; image-rendering: pixelated;
}
.recipe-material b {
  color: var(--accent); font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.exchange-meso { color: var(--accent); font-weight: 700; }
.exchange-meso .icon { width: 18px; height: 18px; }
.exchange-extra {
  margin-top: 8px; color: var(--text-3); font-size: 11px; font-weight: 650;
}
.recipe-usage {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--stroke-soft); border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.recipe-usage:hover { border-color: rgba(100, 181, 255, 0.4); }
.recipe-usage > img {
  width: 34px; height: 34px; flex: none; object-fit: contain; image-rendering: pixelated;
}
.recipe-usage > span { min-width: 0; }
.recipe-usage b, .recipe-usage small { display: block; }
.recipe-usage b { font-size: 13px; }
.recipe-usage small { margin-top: 2px; color: var(--text-3); font-size: 11px; }
.recipe-usage > .icon { width: 15px; height: 15px; margin-left: auto; color: var(--text-3); flex: none; }
.region-h { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; margin: 14px 0 8px; color: var(--text); }
.region-h:first-child { margin-top: 0; }
.region-h .icon { color: var(--blue); width: 15px; height: 15px; }
.maplinks { display: flex; flex-direction: column; gap: 6px; }
.maplinks a {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04); border-radius: 10px; font-size: 13.5px;
  border: 1px solid transparent; transition: border-color 0.15s;
}
.maplinks a:hover { border-color: rgba(100, 181, 255, 0.4); }
.maplinks .cnt2 { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.monster-map-region { container: monster-map-region / inline-size; }
.monster-maplinks { display: grid; grid-template-columns: 1fr; }
@container monster-map-region (min-width: 620px) {
  .monster-maplinks.spawn-cols-2,
  .monster-maplinks.spawn-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container monster-map-region (min-width: 1080px) {
  .monster-maplinks.spawn-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.monster-maplinks .maplink-thumb { min-width: 0; }
.monster-maplinks .maplink-copy { overflow: hidden; }
.related-quest-region { container: related-quest-region / inline-size; }
.related-quest-links { display: grid; grid-template-columns: 1fr; }
@container related-quest-region (min-width: 620px) {
  .related-quest-links.spawn-cols-2,
  .related-quest-links.spawn-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container related-quest-region (min-width: 1080px) {
  .related-quest-links.spawn-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.related-quest-links .related-quest-link {
  min-width: 0; min-height: 58px; padding: 8px 10px;
}
.related-quest-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
}
.related-quest-icon img {
  width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated;
}
.related-quest-icon .icon { width: 18px; height: 18px; color: var(--text-2); }
.related-quest-copy { min-width: 0; overflow: hidden; }
.related-quest-copy b,
.related-quest-copy small {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.related-quest-copy b { color: var(--text); font-size: 13.5px; }
.related-quest-copy small { margin-top: 2px; color: var(--text-3); font-size: 11px; }
.related-quest-qty {
  margin-left: auto; color: var(--accent); font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none;
}
.quest-group-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 10px 0 7px; color: var(--text-2); font-size: 12.5px; font-weight: 700;
}
.quest-group-title small { color: var(--text-3); font-size: 11px; font-weight: 500; }
.quest-drop-groups { display: flex; flex-direction: column; gap: 8px; }
.quest-drop-group {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; padding: 8px; border: 1px solid var(--stroke-soft); border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.quest-drop-source,
.quest-drop-items { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.quest-drop-items { padding-left: 8px; border-left: 1px solid var(--stroke-soft); }
.quest-drop-group .maplinks { flex: 1; }
.quest-drop-group .maplinks a {
  flex: 1; min-height: 68px; padding: 9px 12px !important;
}
.quest-drop-group .maplinks a > img {
  width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; flex: none;
}
.quest-drop-label {
  color: var(--text-3); font-size: 10.5px; font-weight: 650; letter-spacing: 0.02em;
}
.quest-current-label {
  display: flex; align-items: baseline; gap: 8px;
  margin: 18px 2px 10px; color: var(--text); font-size: 15px; font-weight: 700;
}
.quest-current-label span { color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.quest-mode-nav {
  display: flex; gap: 8px; margin-bottom: 14px; padding-bottom: 2px;
}
.quest-mode-nav .chip {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
}
.quest-mode-nav .icon { width: 15px; height: 15px; }

/* yampiz 任务链竖排步骤 */
.ystep { padding: 16px 18px; border-bottom: 1px solid var(--stroke-soft); scroll-margin-top: 74px; }
.ystep:last-child { border-bottom: 0; }
.ystep.cur { background: rgba(10, 132, 255, 0.06); box-shadow: inset 3px 0 0 var(--accent); }
.ystep-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ystep-head .num {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.08); color: var(--text-3);
}
.ystep.cur .ystep-head .num { background: var(--accent); color: #06121f; }
.ystep-head h3 { font-size: 15.5px; font-weight: 700; }
.ystep-head h3 small { margin-left: 6px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.ystep-head h3 a:hover { color: var(--accent); }
.ystep-row { display: flex; gap: 12px; margin-bottom: 8px; align-items: flex-start; }
.ystep-row .ystep-label { flex: none; width: 62px; color: var(--text-3); font-size: 12px; padding-top: 8px; }
.ystep-row .pills { flex: 1; }

/* 任务线卡片 */
.chain-card { margin-bottom: 16px; }
.chain-card .card-h { padding: 12px 16px; font-size: 14px; }
.chain-card .card-h .cnt a { color: var(--accent); }
.chain-card .card-h .cnt a:hover { text-decoration: underline; }
.chain-flow-step .ystep-head { margin-bottom: 0; }
.questline-entry-list {
  display: flex; align-items: stretch; gap: 7px; flex-wrap: wrap;
}
.questline-entry-list > a,
.questline-entry-list > span { min-height: 38px; }
.quest-entry {
  min-width: 0; min-height: 48px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid transparent; border-radius: 10px;
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s;
}
.quest-entry:hover {
  border-color: rgba(10,132,255,0.28);
  background: rgba(255,255,255,0.065);
}
.quest-entry > img {
  width: 30px; height: 30px; flex: none;
  object-fit: contain; image-rendering: pixelated;
}
.quest-entry-monster { min-height: 64px; }
.quest-entry-monster > img { width: 48px; height: 48px; }
.quest-entry > span { min-width: 0; }
.client-line-step .ystep-head h3,
.questline-directory .ystep-head h3 { min-width: 0; }
.client-line-step .ystep-head h3 small,
.questline-directory .ystep-head h3 small { white-space: normal; }
.questline-row .badge { font-size: 10px; padding: 2px 7px; }
.chain-step { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px 8px 9px; font-size: 13px; }
.chain-step .num {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.09); color: var(--text-3); flex: none;
}
.chain-step.on .num { background: var(--accent); color: #06121f; }

.kv { display: flex; flex-direction: column; }
.kv .kv-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--stroke-soft); font-size: 13.5px; }
.kv .kv-row:last-child { border-bottom: 0; }
.kv .kv-row .k { color: var(--text-3); flex: none; }
.kv .kv-row .v { text-align: right; font-weight: 600; }
.cash-shop-prices { margin-top: 3px; }
.cash-shop-price-row .cash-shop-price { color: #ff9f0a; }
.cash-shop-price-row.inactive .v { color: var(--text-3); }
.cash-shop-price-row .v small {
  display: block; margin-top: 2px; color: var(--text-3);
  font-size: 10.5px; font-weight: 500;
}
.cash-shop-sale-badge {
  color: #ffad33; border-color: rgba(255,159,10,0.32);
  background: rgba(255,159,10,0.09);
}
.jobs-line { display: flex; gap: 6px; flex-wrap: wrap; }
.job-chip { font-size: 12px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--stroke); color: var(--text-2); background: rgba(255,255,255,0.05); }
.job-chip.no { opacity: 0.32; text-decoration: line-through; }
.job-chip.ok { color: var(--green); border-color: rgba(48, 209, 88, 0.35); background: rgba(48, 209, 88, 0.08); }
.item-description-list {
  display: flex; flex-direction: column; gap: 8px; margin-top: 10px;
}
.item-description {
  padding: 11px 14px; border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; background: rgba(10, 132, 255, 0.06);
}
.item-description.secondary {
  border-left-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.025);
}
.item-description-label {
  margin-bottom: 5px; color: var(--text-3);
  font-size: 9.5px; font-weight: 750; letter-spacing: 0.8px;
  line-height: 1.2; text-transform: uppercase;
}
.item-description-text {
  color: var(--text-2); font-size: 13.5px; line-height: 1.65;
  white-space: pre-line;
}
.desc-quote {
  border-left: 3px solid var(--accent); padding: 8px 14px; margin-top: 12px;
  background: rgba(10, 132, 255, 0.06); border-radius: 0 10px 10px 0;
  color: var(--text-2); font-size: 13.5px; white-space: pre-line;
}
.desc-quote.secondary-desc {
  background: rgba(255,255,255,0.025);
  border-left-color: rgba(255,255,255,0.13);
}
.desc-quote.secondary-desc small {
  display: block; margin-bottom: 4px;
  color: var(--text-3); font-size: 9.5px; font-weight: 750; letter-spacing: 0.8px;
}
.dialogue li { list-style: none; margin-bottom: 8px; padding: 9px 14px; background: rgba(255,255,255,0.045); border-radius: 4px 14px 14px 14px; font-size: 13.5px; color: var(--text-2); }
/* hidden-street 攻略步骤 */
.hs-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }
.hs-steps li { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.hs-steps li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.hs-link { color: var(--accent); font-weight: 600; }
.hs-link:hover { text-decoration: underline; }
/* 地图详情：头像小地图 & 高清图缩放查看器 */
.detail-head .portrait { position: relative; }
.detail-head .portrait .portrait-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; background: rgba(0, 0, 0, 0.35);
}
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4, 5, 8, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: grab; overscroll-behavior: contain; touch-action: none;
}
.lightbox:active { cursor: grabbing; }
.lightbox .lb-stage { position: relative; will-change: transform; line-height: 0; }
.lightbox .lb-stage > img {
  display: block; width: auto; height: auto;
  max-width: 94vw; max-height: 92vh; user-select: none;
  border-radius: 8px;
}
/* 标记层：与地图同坐标系、同比例缩放（渲染图 1:1 游戏像素，立绘原生尺寸贴地） */
.lb-marks { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-mark {
  position: absolute; transform: translate(-50%, -100%);   /* 坐标即脚底位置 */
  display: block; pointer-events: auto; line-height: 0;
}
.lb-mark img { display: block; height: auto; image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55)); }
.lb-mark.mb, .lb-mark.np { z-index: 2; }
.lb-mark.np img { filter: drop-shadow(0 0 4px rgba(48, 209, 88, 0.9)); }
.lb-mark.pt {
  transform: none; z-index: 1; image-rendering: pixelated;
  background-repeat: no-repeat;
}
.lb-mark.pt.visible {
  width: 89px; height: 257px;
  margin-left: -44px; margin-top: -248px;
  background-size: 712px 257px;
  transform: scale(var(--portal-scale, 1));
  transform-origin: 44px 248px;
  animation: portal-pv-frames 800ms steps(8) infinite;
  filter: drop-shadow(0 0 5px rgba(103, 224, 255, 0.68));
}
/* 客户端 ph 资源：隐藏门接近玩家后显示的金色环。 */
.lb-mark.pt.hidden {
  width: 128px; height: 122px;
  margin-left: -62px; margin-top: -119px;
  background-size: 896px 122px;
  transform: scale(var(--portal-scale, 1));
  transform-origin: 62px 119px;
  animation: portal-ph-frames 700ms steps(7) infinite;
  filter: drop-shadow(0 0 4px rgba(255, 213, 75, 0.7));
}
.lb-mark.pt.visible:hover, .lb-mark.pt.hidden:hover { filter: brightness(1.2) drop-shadow(0 0 7px rgba(116, 224, 255, 0.9)); }
/* 隐形、脚本型门在游戏里没有光柱，只保留一个工具性虚线标记。 */
.lb-mark.pt.utility {
  width: 16px; height: 16px; margin-left: -8px; margin-top: -16px;
  border: 2px dashed rgba(191, 90, 242, 0.95); border-radius: 50%;
  background: rgba(26, 18, 34, 0.72);
  box-shadow: 0 0 0 2px rgba(191, 90, 242, 0.16), 0 1px 4px rgba(0,0,0,0.6);
}
.lb-mark.pt.utility:hover { background: rgba(191, 90, 242, 0.92); }
@keyframes portal-pv-frames { to { background-position: -712px 0; } }
@keyframes portal-ph-frames { to { background-position: -896px 0; } }
@media (prefers-reduced-motion: reduce) {
  .lb-mark.pt.visible, .lb-mark.pt.hidden { animation-play-state: paused; }
}
.lb-marks.marks-paused .lb-mark.pt.visible,
.lb-marks.marks-paused .lb-mark.pt.hidden { animation-play-state: paused; }
.lb-marks.hide-mb .lb-mark.mb, .lb-marks.hide-np .lb-mark.np, .lb-marks.hide-pt .lb-mark.pt { display: none; }
.lb-toggles {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 1001;
}
.lb-toggles .chip { opacity: 0.55; }
.lb-toggles .chip.on { opacity: 1; border-color: rgba(10, 132, 255, 0.5); color: var(--accent); }
/* 路线大地图：区域详情是独立的全屏无限画布 */
body.atlas-fullscreen {
  width: 100%; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  padding: 0; overscroll-behavior: none;
}
body.atlas-fullscreen > .nav,
body.atlas-fullscreen > .side-rail,
body.atlas-fullscreen > .rail-backdrop,
body.atlas-fullscreen > .footer,
body.atlas-fullscreen > .tabbar,
body.atlas-fullscreen > .backtop,
body.atlas-fullscreen > .overlay { display: none !important; }
body.atlas-fullscreen .page {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh;
  max-width: none; margin: 0; padding: 0;
}
body.atlas-fullscreen .skeleton,
body.atlas-fullscreen .empty {
  position: fixed; inset: 0; display: grid; place-items: center;
  margin: 0; padding: 72px 20px 20px;
}
.atlas-back {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  z-index: 20; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: var(--text); background: rgba(18, 20, 28, 0.74);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}
.atlas-back:hover { background: rgba(38, 42, 55, 0.9); border-color: rgba(64,156,255,0.48); }
.atlas-back:active { transform: scale(0.96); }
.atlas-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.atlas-back .icon { width: 20px; height: 20px; }
.atlas-mode-switch {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: calc(68px + env(safe-area-inset-left));
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  background: rgba(18, 20, 28, 0.78);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.atlas-mode-switch a,
.atlas-mode-switch span {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.atlas-mode-switch b {
  color: var(--text-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.atlas-mode-switch a:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.atlas-mode-switch a.on {
  color: #64adff;
  background: rgba(10,132,255,0.18);
}
.atlas-mode-switch a.on.activity {
  color: #d58cff;
  background: rgba(191,90,242,0.18);
}
.atlas-mode-switch .disabled { opacity: 0.42; }
.atlas-viewport {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  overflow: hidden; border: 0; border-radius: 0;
  background:
    radial-gradient(1100px 700px at 18% 0%, rgba(10,132,255,0.055), transparent 66%),
    radial-gradient(900px 700px at 88% 100%, rgba(90,42,160,0.045), transparent 68%),
    #090b11;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  overscroll-behavior: none;
}
.atlas-viewport:active { cursor: grabbing; }
.atlas-canvas { position: absolute; transform-origin: 0 0; }
.atlas-canvas.is-interacting { will-change: transform; }
.atlas-canvas svg { position: absolute; inset: 0; pointer-events: none; }
.atlas-canvas .atlas-connections { overflow: visible; }
.atlas-canvas .atlas-link-bodies { z-index: 0; }
.atlas-canvas .atlas-link-endpoints { z-index: 3; }
.atlas-link {
  fill: none; stroke: #409cff; stroke-width: var(--atlas-link-width, 1.34px); opacity: 0.76;
  stroke-linecap: round; stroke-linejoin: round;
  filter: none; pointer-events: none;
}
.atlas-link-hit {
  fill: none; stroke: transparent; stroke-width: var(--atlas-link-hit-width, 14px);
  pointer-events: stroke; cursor: pointer;
}
.atlas-link.legacy { stroke: rgba(64, 156, 255, 0.58); }
.atlas-link.topology {
  stroke: rgba(138, 150, 170, 0.72);
  stroke-width: calc(var(--atlas-link-width, 1.34px) * 0.9);
  stroke-dasharray: 5 5;
  opacity: 0.72;
}
.atlas-link.hidden { stroke: #bf5af2; stroke-width: calc(var(--atlas-link-width, 1.34px) * 0.965); stroke-dasharray: none; opacity: 0.82; }
.atlas-link.return {
  stroke: #bf5af2;
  stroke-dasharray: 7 5;
  opacity: 0.76;
}
.atlas-link.is-route-highlighted {
  stroke: #ffd60a; opacity: 1;
  stroke-width: var(--atlas-link-highlight-width, 2.1px);
  filter: drop-shadow(0 0 var(--atlas-link-glow, 2.5px) rgba(255,214,10,0.72));
}
.atlas-portal-dot {
  pointer-events: all; cursor: pointer;
  filter: drop-shadow(0 0 2px rgba(64,156,255,0.62));
}
.atlas-portal-hit { r: var(--atlas-portal-hit-radius, 10px); fill: transparent; }
.atlas-portal-ring { r: var(--atlas-portal-ring-radius, 4.5px); fill: rgba(236,247,255,0.98); }
.atlas-portal-core { r: var(--atlas-portal-core-radius, 2.8px); fill: #409cff; }
.atlas-portal-dot.hidden { filter: drop-shadow(0 0 2px rgba(191,90,242,0.7)); }
.atlas-portal-dot.hidden .atlas-portal-core { fill: #bf5af2; }
.atlas-portal-dot:hover, .atlas-portal-dot.is-route-highlighted { filter: drop-shadow(0 0 4px rgba(255,214,10,0.9)); }
.atlas-portal-dot:hover .atlas-portal-ring, .atlas-portal-dot.is-route-highlighted .atlas-portal-ring { fill: #fff1a6; }
.atlas-portal-dot:hover .atlas-portal-core, .atlas-portal-dot.is-route-highlighted .atlas-portal-core { fill: #ffd60a; }
.atlas-node { position: absolute; z-index: 1; width: 200px; display: flex; flex-direction: column; }
.atlas-node, .atlas-node img { -webkit-user-drag: none; }
/* 普通卡片 hover 不抬高整个节点，避免盖住上层的传送点与端点引线。 */
.atlas-node:has(.an-npc-more:hover),
.atlas-node:has(.an-npc-more:focus-within) { z-index: 6; }
/* 怪物立绘"站"在小地图上沿（参考手绘城镇图设计） */
.atlas-node .an-mobs {
  display: flex; align-items: flex-end; gap: 2px; height: 46px;
  padding: 0 8px; margin-bottom: -6px; position: relative; z-index: 2; overflow: visible;
}
.atlas-node .an-mob, .atlas-node .an-npc {
  height: 42px; display: flex; align-items: flex-end; justify-content: center;
  border-radius: 7px;
  transition: transform 0.14s, filter 0.14s;
}
.atlas-node .an-mob { flex: 0 0 44px; width: 44px; }
.atlas-node .an-mobs > .an-npc { flex: 0 0 42px; width: 42px; }
.atlas-node .an-mob:hover, .atlas-node .an-npc:hover { transform: translateY(-3px); filter: brightness(1.18); }
.atlas-node .an-mob:focus-visible, .atlas-node .an-npc:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.atlas-node .an-mobs img {
  width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain;
  image-rendering: pixelated; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.85));
}
.atlas-node .an-npc-more {
  position: relative; flex: 0 0 30px; width: 30px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.atlas-node .an-npc-more-trigger {
  min-width: 27px; height: 24px; padding: 0 5px; display: inline-flex;
  align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; background: rgba(31,35,46,0.96); color: var(--text-2);
  font-size: 10px; font-weight: 750; line-height: 1; cursor: default;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.atlas-node .an-npc-more:hover .an-npc-more-trigger,
.atlas-node .an-npc-more:focus-visible .an-npc-more-trigger,
.atlas-node .an-npc-more:focus-within .an-npc-more-trigger {
  color: var(--text); border-color: rgba(64,156,255,0.5); background: rgba(39,47,63,0.98);
}
.atlas-node .an-npc-more:focus-visible { outline: none; }
.atlas-node .an-npc-popover {
  /* 与“更多”按钮轻微重叠，消除鼠标移入面板时会穿过的悬停断层。 */
  position: absolute; right: -8px; bottom: 32px; z-index: 20; width: 280px;
  padding: 10px; display: block; border: 1px solid rgba(255,255,255,0.13);
  border-radius: 12px; background: rgba(17,19,27,0.97); color: var(--text);
  box-shadow: 0 14px 34px rgba(0,0,0,0.58); opacity: 0; visibility: hidden;
  pointer-events: none; transform: scale(var(--atlas-ui-inverse-scale, 1)) translateY(4px);
  transform-origin: right bottom; transition: opacity 0.13s, visibility 0.13s, transform 0.13s;
  backdrop-filter: blur(14px);
}
.atlas-node .an-npc-more:hover .an-npc-popover,
.atlas-node .an-npc-more:focus-within .an-npc-popover {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: scale(var(--atlas-ui-inverse-scale, 1)) translateY(0);
}
.atlas-node .an-npc-popover-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 8px; color: var(--text-2); font-size: 11px; font-weight: 700;
}
.atlas-node .an-npc-popover-title b { color: var(--text); }
.atlas-node .an-npc-popover-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
  max-height: 226px; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.28) transparent;
  touch-action: pan-y; padding-right: 2px;
}
.atlas-node .an-npc-popover-grid::-webkit-scrollbar { width: 5px; }
.atlas-node .an-npc-popover-grid::-webkit-scrollbar-track { background: transparent; }
.atlas-node .an-npc-popover-grid::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,0.28); }
.atlas-node .an-npc-popover .an-npc-all {
  min-width: 0; height: 48px; padding: 4px 6px; display: flex;
  align-items: center; justify-content: flex-start; gap: 6px;
  color: var(--text-2); text-decoration: none; background: rgba(255,255,255,0.045);
}
.atlas-node .an-npc-popover .an-npc-all:hover { background: rgba(64,156,255,0.12); color: #fff; }
.atlas-node .an-npc-popover .an-npc-all img { flex: 0 0 36px; max-width: 36px; max-height: 38px; }
.atlas-node .an-npc-popover .an-npc-all span {
  display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 10px; line-height: 1.1; text-align: left;
}
.atlas-node .an-thumb {
  height: 88px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--stroke);
  background: rgba(22, 24, 32, 0.92); overflow: hidden; color: var(--text-3);
  transition: border-color 0.15s;
}
.atlas-node .an-map-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.atlas-node.cur .an-thumb,
.atlas-node .an-map-link:hover .an-thumb, .atlas-node .an-map-link:focus-visible .an-thumb {
  border-color: transparent;
  box-shadow: inset 0 0 0 var(--atlas-map-hover-ring, 2px) #ffd60a; outline: none;
}
.atlas-node .an-map-link:focus-visible { outline: none; }
.atlas-node.is-anchor-target .an-thumb { animation: atlas-anchor-target 0.9s ease-out; }
@keyframes atlas-anchor-target {
  0% { border-color: transparent; box-shadow: inset 0 0 0 var(--atlas-map-hover-ring, 2px) #ffd60a, 0 0 0 0 rgba(255,214,10,0.92); }
  38% { border-color: transparent; box-shadow: inset 0 0 0 var(--atlas-map-hover-ring, 2px) #ffd60a, 0 0 0 var(--atlas-anchor-spread, 7px) rgba(255,214,10,0.58); }
  100% { border-color: transparent; box-shadow: inset 0 0 0 var(--atlas-map-hover-ring, 2px) #ffd60a, 0 0 0 var(--atlas-anchor-spread-end, 15px) rgba(255,214,10,0); }
}
.atlas-node .an-thumb img { max-width: 190px; max-height: 78px; object-fit: contain; }
.atlas-node .an-name {
  font-size: 12.5px; font-weight: 650; text-align: left; margin-top: 5px; padding-left: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
/* 路线大地图首页 */
.atlas-towns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.atlas-town {
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.03);
  transition: border-color 0.15s, transform 0.15s;
}
.atlas-town:hover { border-color: rgba(10, 132, 255, 0.5); transform: translateY(-2px); }
.atlas-town .at-thumb {
  height: 64px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(0,0,0,0.35); overflow: hidden; color: var(--text-3);
}
.atlas-town .at-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.atlas-town b { font-size: 13.5px; }
.atlas-town small { color: var(--text-3); font-size: 11.5px; }
.lightbox .lb-hint {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: var(--text-3); font-size: 12px; background: rgba(0,0,0,0.45);
  padding: 6px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
.map-shot { border-radius: 14px; border: 1px solid var(--stroke); max-height: 420px; object-fit: contain; background: rgba(0,0,0,0.3); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--text-3); font-size: 11.5px; font-weight: 650; letter-spacing: 0.6px; padding: 7px 10px; border-bottom: 1px solid var(--stroke); }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--stroke-soft); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: rgba(255, 255, 255, 0.03); }
.mob-cell { display: flex; align-items: center; gap: 9px; }
.mob-cell img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.mob-cell .n { font-weight: 600; }
.mob-cell small { display: block; color: var(--text-3); font-size: 11px; }

/* ---------- 搜索弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(5, 5, 10, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 9vh 16px 16px;
}
.overlay.show { display: block; }
.omnibox {
  max-width: 620px; margin: 0 auto; display: flex; flex-direction: column;
  max-height: 76vh;
  background: var(--glass-strong); border: 1px solid var(--stroke);
  border-radius: 22px; overflow: hidden;
  backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(0.985); opacity: 0; } }
.omni-head { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--stroke-soft); }
.omni-head .icon { color: var(--text-3); width: 20px; height: 20px; }
.omni-head input { flex: 1; background: none; border: 0; outline: 0; font-size: 16.5px; }
.omni-head input::placeholder { color: var(--text-3); }
.omni-close { color: var(--text-3); font-size: 11px; border: 1px solid var(--stroke); padding: 4px 8px; border-radius: 7px; }
.omni-body { overflow-y: auto; padding: 8px; }
.omni-sec { color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; padding: 10px 12px 4px; }
.omni-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 12px; cursor: pointer;
}
.omni-item img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; flex: none; }
.omni-item .omni-thumb { position: relative; width: 44px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; }
.omni-item .omni-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; border-radius: 5px; background: rgba(255,255,255,0.03); }
.omni-item .omni-thumb.px img { image-rendering: pixelated; background: none; }
.omni-item .oi-n { font-weight: 600; font-size: 14px; }
.omni-item .oi-s { color: var(--text-3); font-size: 12px; }
.omni-item .oi-tag { margin-left: auto; color: var(--text-3); font-size: 11px; flex: none; }
.omni-item:hover, .omni-item.sel { background: rgba(10, 132, 255, 0.13); }
/* 角色 + 客户端动画预览：戒指、骑宠与椅子共用角色切换和锚点合成。 */
.avatar-preview-control {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 13px 14px;
  border: 1px solid var(--stroke-soft); border-radius: 14px;
  background: rgba(255,255,255,0.025);
}
.avatar-preview-copy { min-width: 180px; flex: 1 1 240px; }
.avatar-preview-copy b { display: block; font-size: 13.5px; color: var(--text-1); }
.avatar-preview-copy small {
  display: block; margin-top: 3px; color: var(--text-3);
  font-size: 11.5px; line-height: 1.55;
}
.avatar-preview-form {
  display: flex; align-items: center; gap: 7px; flex: 1 1 330px;
}
.avatar-preview-input {
  min-width: 130px; flex: 1; height: 36px; padding: 0 11px;
  border: 1px solid var(--stroke); border-radius: 10px;
  background: rgba(4,8,17,0.48); color: var(--text-1);
  outline: none; font: inherit; font-size: 12.5px;
}
.avatar-preview-input:focus { border-color: rgba(10,132,255,0.72); }
.avatar-preview-apply,
.avatar-preview-reset {
  height: 36px; padding: 0 12px; border: 1px solid var(--stroke);
  border-radius: 10px; background: rgba(255,255,255,0.045);
  color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer;
  white-space: nowrap;
}
.avatar-preview-apply {
  border-color: rgba(10,132,255,0.52);
  background: rgba(10,132,255,0.13); color: var(--accent);
}
.avatar-preview-apply:hover,
.avatar-preview-reset:hover { filter: brightness(1.16); }
.avatar-preview-status {
  flex-basis: 100%; min-height: 15px; margin-top: -6px;
  color: var(--text-3); font-size: 11.5px;
}
.avatar-preview-status.ok { color: #4ed17b; }
.avatar-preview-status.error { color: #ff6b6b; }
.equipped-effect-grid {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.equipped-effect-card {
  position: relative; z-index: 1;
  overflow: visible;
}
.equipped-effect-tile {
  position: relative; min-width: 0; overflow: visible;
  border: 1px solid var(--stroke-soft); border-radius: 14px;
  background:
    radial-gradient(circle at 50% 55%, rgba(87,114,166,0.12), transparent 58%),
    rgba(255,255,255,0.022);
}
.equipped-effect-stage {
  position: relative; max-width: 100%; margin: 0 auto;
  overflow: visible; flex: none;
}
.equipped-effect-layer {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated; pointer-events: none;
}
.equipped-effect-layer.front { z-index: 3; }
.equipped-avatar-anchor {
  position: absolute; z-index: 2;
  left: var(--avatar-x); top: var(--avatar-y);
  width: 0; height: 0; pointer-events: none;
}
.equipped-avatar {
  position: absolute; display: block; max-width: none;
  image-rendering: pixelated;
  transition: opacity 0.16s ease;
}
.equipped-avatar.loading { opacity: 0.28; }
.mount-avatar-anchor .equipped-avatar,
.chair-avatar-anchor .equipped-avatar {
  transform: translate(-50%, -50%) scale(var(--fx-scale));
  transform-origin: 50% 50%;
}
.ring-avatar-anchor .equipped-avatar {
  transform: translate(-50%, -100%) scale(var(--fx-scale));
  transform-origin: 50% 100%;
}
.mount-effect-stage,
.ring-effect-stage {
  margin-top: 8px; margin-bottom: 6px;
}
.mount-effect-stage {
  width: 100%; height: 180px;
}
.mount-effect-canvas {
  position: absolute; left: 50%; top: 50%;
  max-width: none; overflow: visible;
  transform: translate(-50%, -50%);
}
.equipped-effect-label {
  position: relative; z-index: 4;
  min-height: 42px; padding: 9px 11px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.01);
  border-top: 1px solid var(--stroke-soft);
}
.equipped-effect-label b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 12.5px;
}
.equipped-effect-label code {
  margin-left: auto; color: var(--text-3); font-size: 10.5px;
}
.chair-fx-wrap {
  position: relative;
  height: 340px;
  overflow: visible;
}
.chair-fx-stage {
  position: absolute;
  z-index: 1;
  left: 50%; top: 50%;
  max-width: none;
  flex: none;
  transform: translate(
    calc(-1 * var(--chair-origin-x)),
    calc(-1 * var(--chair-origin-y))
  );
}
.chair-fx-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.chair-fx-layer.back { z-index: 1; }
.chair-fx-layer.front { z-index: 3; }
.chair-effect-card {
  position: relative; z-index: 1;
  overflow: visible;
}
.chair-effect-card .avatar-preview-control {
  position: relative;
  z-index: 5;
}
.chair-effect-card .card-b { overflow: visible; }
@media (max-width: 980px) {
  .equipped-effect-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .avatar-preview-form { flex-wrap: wrap; }
  .avatar-preview-input { flex-basis: 100%; }
  .equipped-effect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chair-fx-wrap { height: 300px; }
}
.pet-command-intro {
  color: var(--text-2); font-size: 12.5px; line-height: 1.7;
  padding: 1px 2px 13px;
}
.pet-command-list {
  display: grid; gap: 8px;
}
.pet-command-group {
  overflow: hidden;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--stroke-soft);
  border-radius: 13px;
}
.pet-command-group > summary {
  min-height: 48px; padding: 9px 12px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; list-style: none;
  transition: background 0.15s;
}
.pet-command-group > summary::-webkit-details-marker { display: none; }
.pet-command-group > summary:hover { background: rgba(255,255,255,0.035); }
.pet-command-group > summary .icon {
  width: 16px; height: 16px; margin-left: 2px;
  color: var(--text-3); transition: transform 0.16s;
}
.pet-command-group[open] > summary .icon { transform: rotate(180deg); }
.pet-command-phrases {
  min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.pet-command-phrases code {
  padding: 3px 8px;
  color: #8fc8ff; background: rgba(10,132,255,0.13);
  border: 1px solid rgba(10,132,255,0.24); border-radius: 7px;
  font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pet-command-stage-count {
  margin-left: auto; color: var(--text-3); font-size: 11px; white-space: nowrap;
}
.pet-command-levels {
  padding: 0 10px 10px;
}
.pet-command-level {
  padding: 12px 2px;
  border-top: 1px solid var(--stroke-soft);
}
.pet-command-level:last-child { padding-bottom: 2px; }
.pet-command-level-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 9px;
}
.pet-command-level-head b { margin-right: 2px; font-size: 12px; }
.pet-command-level-head span {
  padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 650;
}
.pet-command-prob {
  color: var(--green); background: rgba(48,209,88,0.11);
}
.pet-command-affection {
  color: #ffb340; background: rgba(255,159,10,0.11);
}
.pet-command-outcomes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pet-command-outcome {
  min-width: 0; padding: 9px;
  background: rgba(255,255,255,0.024);
  border: 1px solid var(--stroke-soft); border-radius: 10px;
}
.pet-command-outcome.success { border-color: rgba(48,209,88,0.15); }
.pet-command-outcome.fail { border-color: rgba(255,69,58,0.13); }
.pet-command-outcome-title {
  margin-bottom: 7px; color: var(--text-3);
  font-size: 10px; font-weight: 750; letter-spacing: 0.6px;
}
.pet-command-outcome.success .pet-command-outcome-title { color: rgba(100,220,130,0.82); }
.pet-command-outcome.fail .pet-command-outcome-title { color: rgba(255,120,112,0.78); }
.pet-command-outcome-row + .pet-command-outcome-row { margin-top: 9px; }
.pet-command-action {
  display: inline-flex; align-items: baseline; gap: 5px;
  margin-bottom: 6px; font-size: 11.5px; font-weight: 650;
}
.pet-command-action code {
  color: var(--text-3); font: 9.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pet-command-replies { display: grid; gap: 5px; }
.pet-command-replies q {
  quotes: none; display: block;
  padding-left: 8px; border-left: 2px solid rgba(255,255,255,0.09);
  color: var(--text-2); font-size: 11px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.pet-command-replies q::before,
.pet-command-replies q::after { content: none; }
.pet-command-no-reply {
  color: var(--text-3); font-size: 10.5px;
}
.pet-care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.pet-care-item {
  min-width: 0; min-height: 86px; padding: 10px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--stroke-soft); border-radius: 12px;
  color: inherit; text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.pet-care-item:hover {
  border-color: rgba(10,132,255,0.34);
  background: rgba(10,132,255,0.075);
  transform: translateY(-1px);
}
.pet-care-icon {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  background:
    radial-gradient(circle, rgba(255,255,255,0.07), transparent 68%);
}
.pet-care-icon img {
  max-width: 54px; max-height: 54px;
  image-rendering: pixelated;
}
.pet-care-copy { min-width: 0; display: grid; gap: 3px; }
.pet-care-copy b {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 680;
}
.pet-care-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-3); font-size: 10px; line-height: 1.3;
}
.pet-care-effects {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 3px;
}
.pet-care-effects span {
  padding: 2px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 680; white-space: nowrap;
}
.pet-care-effects .fullness {
  color: #6dc8ff; background: rgba(10,132,255,0.11);
}
.pet-care-effects .closeness {
  color: #ffb340; background: rgba(255,159,10,0.11);
}
.compatible-pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.compatible-pet-grid > a {
  min-width: 0; padding: 9px 10px;
  display: flex; align-items: center; gap: 9px;
  color: inherit; text-decoration: none;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--stroke-soft); border-radius: 11px;
}
.compatible-pet-grid > a:hover {
  border-color: rgba(10,132,255,0.32);
  background: rgba(10,132,255,0.07);
}
.compatible-pet-icon {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
}
.compatible-pet-icon img {
  max-width: 40px; max-height: 40px; image-rendering: pixelated;
}
.compatible-pet-grid > a > span:last-child {
  min-width: 0; display: grid; gap: 2px;
}
.compatible-pet-grid b,
.compatible-pet-grid small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compatible-pet-grid b { font-size: 11.5px; }
.compatible-pet-grid small { color: var(--text-3); font-size: 9.5px; }
/* 原比例越界展示：网格尺寸不变，透明动画可跨过卡片边界，标签保持在最上层。 */
.pet-action-card {
  position: relative; z-index: 1;
  overflow: visible;
}
.pet-action-grid {
  position: relative; isolation: isolate;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
@media (min-width: 861px) {
  .pet-action-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
}
.pet-action-tile {
  position: relative;
  min-width: 0; overflow: visible;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--stroke-soft);
  border-radius: 13px;
}
.pet-action-stage {
  position: relative; z-index: 2;
  height: 166px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.055), transparent 68%);
}
.pet-action-img {
  position: relative; z-index: 1;
  image-rendering: pixelated;
  width: auto; height: auto; max-width: none;
  flex: none;
  transform: scale(var(--pet-action-scale, var(--pet-scale, 1)));
  transform-origin: center;
}
.pet-action-stage[data-action="love"] {
  align-items: flex-end;
}
.pet-action-stage[data-action="love"] .pet-action-img {
  transform-origin: center bottom;
}
.pet-action-label {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 38px; padding: 8px 10px;
  background: rgba(255,255,255,0.01);
  border-top: 1px solid var(--stroke-soft);
}
.pet-action-label b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 650;
}
.pet-action-label code {
  color: var(--text-3); font-size: 10px; white-space: nowrap;
}

/* ---------- 道具玩法效果与跨实体关联 ---------- */
.gameplay-section + .gameplay-section,
.pet-evolution-block + .pet-evolution-block {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke-soft);
}
.gameplay-section-title {
  margin-bottom: 10px;
  color: var(--text-2); font-size: 11.5px; font-weight: 700;
}
.gameplay-destination {
  min-height: 82px; padding: 12px 14px;
  display: flex; align-items: center; gap: 13px;
  color: inherit; text-decoration: none;
  border: 1px solid var(--stroke-soft); border-radius: 13px;
  background: linear-gradient(135deg, rgba(10,132,255,0.10), rgba(10,132,255,0.025));
}
.gameplay-destination.map-destination:hover,
.gameplay-entity-link:hover {
  border-color: rgba(10,132,255,0.38);
  background: rgba(10,132,255,0.08);
}
.gameplay-destination-icon {
  width: 50px; height: 50px; flex: none;
  display: grid; place-items: center;
  color: var(--accent); border-radius: 14px;
  background: rgba(10,132,255,0.12);
}
.gameplay-destination-icon .icon { width: 25px; height: 25px; }
.gameplay-map-thumb {
  width: 82px; height: 56px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--stroke-soft); border-radius: 10px;
  background: rgba(0,0,0,0.18);
}
.gameplay-map-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gameplay-destination > span:nth-child(2) {
  min-width: 0; display: grid; gap: 3px;
}
.gameplay-destination small,
.gameplay-destination em,
.gameplay-entity-link small,
.gameplay-entity-link em {
  color: var(--text-3); font-size: 10px; font-style: normal;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gameplay-destination b { font-size: 14px; }
.gameplay-destination > .icon { margin-left: auto; color: var(--text-3); }
.gameplay-effect-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 9px;
}
.gameplay-effect-meta span,
.pet-evolution-requirements span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 8px; color: var(--text-2);
  border: 1px solid var(--stroke-soft); border-radius: 999px;
  background: rgba(255,255,255,0.025); font-size: 10px; font-weight: 650;
}
.gameplay-effect-meta .icon,
.pet-evolution-requirements .icon { width: 13px; height: 13px; color: var(--accent); }
.status-cure-list { display: flex; flex-wrap: wrap; gap: 8px; }
.status-cure-list span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; color: #c5a7ff;
  border: 1px solid rgba(191,133,255,0.25); border-radius: 999px;
  background: rgba(191,133,255,0.08); font-size: 11px; font-weight: 700;
}
.status-cure-list .icon { width: 14px; height: 14px; }
.morph-effect {
  min-height: 180px; padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  border: 1px solid var(--stroke-soft); border-radius: 14px;
  background: radial-gradient(circle at 35% 50%, rgba(191,133,255,0.12), transparent 42%);
  overflow: visible;
}
.morph-effect-stage {
  width: 170px; height: 150px; flex: none;
  display: grid; place-items: center; overflow: visible;
}
.morph-effect-stage img {
  width: auto; height: auto; max-width: none; max-height: none;
  image-rendering: pixelated; transform: scale(2); transform-origin: center;
}
.morph-effect-stage .icon { width: 36px; height: 36px; color: #c6a5ff; }
.morph-effect-copy { display: grid; gap: 5px; }
.morph-effect-copy small { color: var(--text-3); font-size: 10px; }
.morph-effect-copy b { font-size: 16px; }
.morph-effect-copy span {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-2); font-size: 10.5px;
}
.morph-effect-copy .icon { width: 13px; height: 13px; color: var(--accent); }
.gameplay-link-grid,
.pet-evolution-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.gameplay-entity-link {
  min-width: 0; padding: 9px 10px;
  display: flex; align-items: center; gap: 9px;
  color: inherit; text-decoration: none;
  border: 1px solid var(--stroke-soft); border-radius: 11px;
  background: rgba(255,255,255,0.025);
}
.gameplay-entity-icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; overflow: visible;
}
.gameplay-entity-icon img {
  max-width: 42px; max-height: 42px; image-rendering: pixelated;
}
.gameplay-entity-link > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.gameplay-entity-link b {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px;
}
.gameplay-entity-link > .icon {
  width: 14px; height: 14px; margin-left: auto; flex: none; color: var(--text-3);
}
.pet-evolution-flow {
  display: grid; grid-template-columns: 116px auto minmax(0, 1fr);
  align-items: center; gap: 11px;
}
.pet-evolution-source {
  min-width: 0; min-height: 98px; padding: 9px;
  display: grid; place-items: center; gap: 5px;
  border: 1px solid rgba(10,132,255,0.22); border-radius: 12px;
  background: rgba(10,132,255,0.055);
}
.pet-evolution-source img {
  max-width: 62px; max-height: 62px; image-rendering: pixelated;
}
.pet-evolution-source b {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px;
}
.pet-evolution-arrow { color: var(--accent); }
.pet-evolution-arrow .icon { width: 20px; height: 20px; }
.pet-evolution-requirements { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.pet-evolution-material { margin-top: 8px; max-width: 360px; }

.omni-hint { text-align: center; color: var(--text-3); font-size: 13px; padding: 30px 0; }
.omni-hist-head { display: flex; align-items: center; justify-content: space-between; }
.omni-hist-clear { background: none; border: 0; cursor: pointer; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 2px 4px; }
.omni-hist-clear:hover { color: var(--text); }
.omni-hist { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 8px; }
.omni-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 999px;
  padding: 6px 8px 6px 12px; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.omni-chip:hover { background: rgba(10, 132, 255, 0.14); border-color: rgba(10, 132, 255, 0.4); color: var(--text); }
.omni-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-chip-x { font-style: normal; font-size: 15px; line-height: 1; color: var(--text-3); padding: 0 2px; }
.omni-chip-x:hover { color: var(--text); }

/* ---------- 其他 ---------- */
.backtop {
  position: fixed; right: 18px; bottom: 84px; z-index: 40;
  width: 42px; height: 42px; border-radius: 50%; display: none; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text-2);
}
.backtop.show { display: grid; }
.copy-id-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 3000;
  max-width: min(420px, calc(100vw - 24px)); padding: 10px 16px;
  border: 1px solid rgba(48, 209, 88, 0.34); border-radius: 12px;
  color: #dfffea; background: rgba(20, 45, 31, 0.92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 12.5px; font-weight: 650; line-height: 1.4;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.copy-id-toast.show { opacity: 1; transform: translate(-50%, 0); }
.copy-id-toast.failed {
  color: #ffe4e2; border-color: rgba(255, 69, 58, 0.36);
  background: rgba(66, 24, 24, 0.94);
}
.footer { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 40px 16px 24px; }
.footer a { color: var(--text-2); }
.skeleton { display: grid; place-items: center; color: var(--text-3); padding: 70px 0; gap: 12px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--stroke); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  :root { --nav-h: 58px; }
  body { padding-left: 0; }
  body.rail-open { overflow: hidden; }
  .nav { left: 0; }
  .nav-inner { position: relative; justify-content: space-between; padding: 0 12px; }
  .rail-toggle {
    display: grid; place-items: center; flex: none;
    width: 40px; height: 40px; border: 1px solid var(--stroke); border-radius: 13px;
    color: var(--text-2); background: rgba(255, 255, 255, 0.055);
  }
  .rail-toggle .icon { width: 20px; height: 20px; }
  body.detail-route .rail-toggle { display: none; }
  body.detail-route .route-back {
    height: 40px; padding: 0 11px 0 8px; border-radius: 13px;
    font-size: 12.5px;
  }
  .mobile-brand {
    display: flex; align-items: center; justify-content: center;
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  }
  .mobile-brand .brand-logo { height: 21px; max-width: 190px; }
  .nav-actions { margin-left: auto; }
  .nav-actions .language-toggle, .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 40px; height: 40px; justify-content: center; padding: 0; border-radius: 13px; color: var(--text-2); }
  .search-btn .icon { width: 20px; height: 20px; }
  .side-rail {
    width: min(310px, 82vw); padding-top: calc(18px + env(safe-area-inset-top));
    transform: translateX(-105%); transition: transform 0.24s cubic-bezier(.2,.8,.2,1);
    box-shadow: 28px 0 70px rgba(0, 0, 0, 0.46);
  }
  body.rail-open .side-rail { transform: none; }
  .rail-backdrop {
    display: block; position: fixed; inset: 0; z-index: 65;
    opacity: 0; visibility: hidden; pointer-events: none;
    background: rgba(3, 4, 8, 0.64); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.22s, visibility 0.22s;
  }
  body.rail-open .rail-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
  .rail-brand { min-height: 54px; padding: 7px 8px 17px; }
  .rail-brand img { width: 192px; height: auto; }
  .rail-nav a { min-height: 48px; padding: 0 13px; gap: 12px; font-size: 15px; }
  .rail-nav a .icon { width: 19px; height: 19px; }
  .rail-user { min-height: 56px; padding: 8px 10px; border-radius: 16px; }
  .rail-user img { width: 38px; height: 38px; }
  .rail-user #rail-user-name { font-size: 15px; font-weight: 700; }
  .rail-user-more { width: 17px; height: 17px; }
  .page { padding-bottom: 90px; }
  .backtop { bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .row .r-stats { display: none; }
  .monster-row,
  .quest-row,
  .questline-row { gap: 10px; }
  .monster-row .r-stats,
  .quest-row .r-stats,
  .questline-row .r-stats {
    display: flex; gap: 8px; align-items: center; justify-content: flex-end;
    color: var(--text-2); font-size: 11.5px;
  }
  .monster-row .drop-mini,
  .quest-row .drop-mini { width: 92px; gap: 4px; }
  .monster-row .stat-num,
  .quest-row .stat-num,
  .questline-row .stat-num { min-width: 58px; }
  .quest-row .stat-npc,
  .questline-row .stat-npc {
    min-width: 82px; max-width: 104px; white-space: normal;
    overflow: visible; text-overflow: clip; line-height: 1.3;
  }
  .monster-row .r-stats > :empty,
  .quest-row .r-stats > :empty,
  .questline-row .r-stats > :empty { display: none; }
  .monster-row,
  .quest-row {
    gap: 8px; padding: 11px 12px;
  }
  .monster-row .r-main,
  .quest-row .r-main { flex: 1 1 72px; min-width: 0; }
  .monster-row .r-name,
  .quest-row .r-name {
    display: block; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; flex-wrap: nowrap;
  }
  .monster-row .r-name .lv-badge,
  .quest-row .r-name .lv-badge { display: none; }
  .monster-row .r-sub,
  .quest-row .r-sub {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .monster-row .r-stats,
  .quest-row .r-stats {
    flex: none; min-width: 0; gap: 6px; white-space: nowrap; font-size: 12.5px;
  }
  .monster-row .drop-mini { width: 92px; gap: 4px; }
  .quest-row .drop-mini { width: auto; max-width: 92px; gap: 4px; }
  .monster-row .stat-num,
  .quest-row .stat-num { min-width: 0; white-space: nowrap; }
  .monster-row.compact-stats .stat-full,
  .quest-row.compact-stats .stat-full { display: none; }
  .monster-row.compact-stats .stat-compact,
  .quest-row.compact-stats .stat-compact { display: inline; }
  .quest-row .stat-npc { display: none; }
  .monster-row > .icon,
  .quest-row > .icon { flex: none; }
  .row .r-sub { white-space: normal; }
  .monster-row .r-sub,
  .quest-row .r-sub { white-space: nowrap; }
  .hero { padding: 30px 10px 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .detail-stack { gap: 12px; }
  .detail-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .detail-summary-card:not(.is-expanded) .detail-stat-cell.is-secondary { display: none; }
  .detail-summary-card .detail-stat-toggle { display: flex; }
  .detail-summary-card .card-b { padding: 9px; }
  .detail-stat-cell { min-height: 60px; padding: 9px 10px; }
  .detail-stat-cell .v { font-size: 14px; }
  .detail-info-extra { margin-top: 10px; padding: 10px 2px 2px; }
  .detail-section-card .card-b { padding: 12px; }
  .monster-combat-card .card-b { padding: 12px; }
  .monster-combat { gap: 12px; }
  .combat-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding-top: 12px; }
  .combat-fact { min-height: 57px; padding: 9px 10px; }
  .combat-tag { min-height: 33px; padding: 6px 9px; font-size: 12px; }
  .combat-note { font-size: 11px; }
  .maplink-thumb .cnt2 { max-width: 82px; text-align: right; font-size: 10.5px; }
  .detail-subsection + .detail-subsection { margin-top: 13px; padding-top: 13px; }
  .map-preview-card .card-b { min-height: 120px; padding: 12px; }
  .map-preview-card .map-shot { max-height: 58vh; }
  .map-preview-card .card-h { gap: 7px; padding-left: 14px; padding-right: 14px; }
  .map-preview-card .card-h .cnt { gap: 5px; }
  .map-preview-zoom-hint { display: none; }
  .map-preview-controls .chip { padding: 5px 8px; font-size: 11px; }
  .pet-command-outcomes { grid-template-columns: 1fr; }
  .pet-command-stage-count { display: none; }
  .detail-head .portrait { width: 70px; height: 70px; border-radius: 18px; }
  .detail-head h1 { font-size: 20px; }
  .quest-drop-group { grid-template-columns: 1fr; }
  .quest-drop-items { padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--stroke-soft); }
  .quest-mode-nav { overflow-x: auto; scrollbar-width: none; }
  .quest-mode-nav::-webkit-scrollbar { display: none; }
  .quest-mode-nav .chip { flex: none; }
  .client-line-step .ystep-row { flex-direction: column; gap: 4px; }
  .client-line-step .ystep-row .ystep-label { width: auto; padding-top: 0; }
  .item-filter-panel { padding: 11px 12px; margin-bottom: 12px; }
  .item-filter-row { grid-template-columns: 1fr; gap: 6px; }
  .item-filter-label { padding-top: 0; }
  .item-filter-panel .chips {
    flex-wrap: nowrap; overflow-x: auto; margin-right: -12px; padding-right: 12px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .item-filter-panel .chips::-webkit-scrollbar { display: none; }
  .item-filter-panel .chip { flex: none; }
  .item-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .item-card { min-height: 210px; padding: 12px 9px 10px; border-radius: 13px; }
  .item-card-icon { height: 51px; }
  .item-card-icon img { max-width: 48px; max-height: 48px; }
  .item-card-cn { font-size: 12.5px; }
  .item-card-en { font-size: 10.5px; }
  .item-card-meta span { font-size: 9px; padding: 1px 5px; }
  .item-card-stats { height: 42px; flex-basis: 42px; margin-top: 6px; gap: 3px 7px; }
  .item-card-stats span { font-size: 10.5px; }
  .item-card-price { min-height: 27px; padding-top: 7px; }
  .item-card-price strong { font-size: 12.5px; }
  .morph-effect { flex-direction: column; gap: 10px; text-align: center; }
  .morph-effect-stage { width: 100%; height: 135px; }
  .pet-evolution-flow { grid-template-columns: 1fr; }
  .pet-evolution-source { min-height: 88px; }
  .pet-evolution-arrow { justify-self: center; transform: rotate(90deg); }
  .gameplay-link-grid,
  .pet-evolution-targets { grid-template-columns: 1fr; }
  .atlas-back {
    top: calc(10px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    width: 42px; height: 42px; border-radius: 13px;
  }
  .atlas-mode-switch {
    top: calc(10px + env(safe-area-inset-top));
    left: calc(62px + env(safe-area-inset-left));
  }
  .atlas-mode-switch a,
  .atlas-mode-switch span { height: 34px; padding: 0 9px; font-size: 12px; }
}
@media (max-width: 520px) {
  .questline-row {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-rows: auto auto; column-gap: 12px; row-gap: 8px;
    padding: 11px 13px;
  }
  .questline-row > .thumb { grid-column: 1; grid-row: 1; }
  .questline-row > .r-main { grid-column: 2; grid-row: 1; }
  .questline-row > .icon { grid-column: 3; grid-row: 1; }
  .questline-row .r-stats {
    grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0;
    padding-top: 8px; border-top: 1px solid var(--stroke-soft);
    flex-wrap: wrap; justify-content: flex-end;
  }
  .questline-row .stat-npc { max-width: 132px; }
}
@media (max-width: 430px) {
  .monster-row { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .monster-row .drop-mini { width: auto; max-width: 44px; }
  .monster-row .drop-mini > :nth-child(n + 3) { display: none; }
}
@media (hover: none), (pointer: coarse) {
  .item-hover-preview { display: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .item-hover-preview {
    background: rgba(22, 27, 42, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .item-hover-preview { border-color: rgba(255, 255, 255, 0.42); }
}
