/* ============ 亡者世界 · 生存图鉴 ============ */
:root {
  --bg: #090c0b;
  --bg-2: #0f1412;
  --panel: #141a17;
  --panel-2: #1a211d;
  --panel-3: #202923;
  --line: #29332d;
  --line-strong: #3b493f;
  --text: #ece8dd;
  --muted: #9aa59c;
  --dim: #6d786f;
  --amber: #e0a94a;
  --amber-2: #f0c274;
  --amber-soft: rgba(224, 169, 74, 0.13);
  --green: #7fc79a;
  --green-soft: rgba(127, 199, 154, 0.13);
  --red: #e07a5f;
  --red-soft: rgba(224, 122, 95, 0.13);
  --blue: #7ea8c9;
  --purple: #b09acb;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 64px;
  --wz-atlas: url("../textures/atlas.webp");
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(820px 460px at 8% -8%, rgba(224, 169, 74, 0.14), transparent 62%),
    radial-gradient(680px 420px at 108% 4%, rgba(127, 199, 154, 0.09), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(224, 122, 95, 0.06), transparent 65%),
    linear-gradient(180deg, #0b0f0d 0%, #090c0b 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 70%);
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--amber-2); text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(224, 169, 74, 0.3); }

/* ---------- 布局 ---------- */
.app { max-width: 760px; margin: 0 auto; min-height: 100dvh; }
.view {
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 72px) 16px calc(var(--tab-h) + var(--safe-b) + 40px);
  outline: none;
}
@media (min-width: 780px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 760px;
  z-index: 40;
  padding-top: var(--safe-t);
  background: rgba(9, 12, 11, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(41, 51, 45, 0.75);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark {
  width: 36px; height: 36px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #2a2318, #171d19);
  border: 1px solid rgba(224, 169, 74, 0.45);
  color: var(--amber);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.brand-text { min-width: 0; }
.brand-title {
  font-size: 16px; font-weight: 700; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  font-size: 10.5px; color: var(--dim); letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-actions { display: flex; gap: 6px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.accent { color: var(--amber); }

.page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 11px 0 8px;
  border-radius: 10px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
}
.back-btn:active { transform: scale(0.97); }
.page-title { font-size: 20px; font-weight: 750; letter-spacing: 0.01em; line-height: 1.25; }
.page-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* ---------- 搜索 ---------- */
.searchbar {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  min-height: 44px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.searchbar:focus-within { border-color: rgba(224, 169, 74, 0.55); box-shadow: 0 0 0 3px rgba(224, 169, 74, 0.1); }
.searchbar svg { color: var(--dim); flex: none; }
.searchbar input {
  flex: 1; min-width: 0; height: 42px;
  background: none; border: 0; outline: 0;
  font-size: 15px;
}
.searchbar input::placeholder { color: var(--dim); }
.search-clear {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--dim);
  background: var(--panel-3);
}
.search-clear:hover { color: var(--text); }
.topbar .searchbar { flex: 1; min-width: 0; }

/* ---------- 通用 ---------- */
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-title { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.section-note { font-size: 11.5px; color: var(--dim); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace; font-size: 0.9em; }
.nowrap { white-space: nowrap; }
.card {
  background: linear-gradient(180deg, rgba(26, 33, 29, 0.92), rgba(20, 26, 23, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; -ms-overflow-style: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 13px;
  border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s;
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--amber-soft); border-color: rgba(224, 169, 74, 0.55); color: var(--amber-2); }
.chip .n { font-size: 11px; color: var(--dim); font-weight: 500; }
.chip.active .n { color: rgba(240, 194, 116, 0.7); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  background: var(--panel-3); color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.t1 { background: rgba(127, 199, 154, 0.12); color: #9ed8b3; border-color: rgba(127, 199, 154, 0.35); }
.badge.t2 { background: rgba(126, 168, 201, 0.12); color: #a7c8e2; border-color: rgba(126, 168, 201, 0.35); }
.badge.t3 { background: rgba(176, 154, 203, 0.13); color: #c9b6e0; border-color: rgba(176, 154, 203, 0.36); }
.badge.t4 { background: rgba(224, 122, 95, 0.14); color: #f0a48e; border-color: rgba(224, 122, 95, 0.4); }
.badge.mixed { background: rgba(224, 169, 74, 0.12); color: #e8c184; border-color: rgba(224, 169, 74, 0.32); }
.badge.hot { background: rgba(224, 122, 95, 0.12); color: #eda18b; border-color: rgba(224, 122, 95, 0.3); }
.badge.cold { background: rgba(126, 168, 201, 0.12); color: #a7c8e2; border-color: rgba(126, 168, 201, 0.3); }
.badge.warm { background: rgba(224, 169, 74, 0.11); color: #e8c184; border-color: rgba(224, 169, 74, 0.3); }
.badge.rad { background: rgba(180, 210, 90, 0.12); color: #cfe58a; border-color: rgba(180, 210, 90, 0.32); }
.badge.custom { background: rgba(127, 199, 154, 0.1); color: var(--green); border-color: rgba(127, 199, 154, 0.3); }
.badge.override { background: rgba(224, 169, 74, 0.1); color: var(--amber); border-color: rgba(224, 169, 74, 0.3); }

/* ---------- 首页 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(224, 169, 74, 0.22);
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(224, 169, 74, 0.18), transparent 70%),
    linear-gradient(150deg, #1c211b 0%, #121714 55%, #0f1412 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute; right: -20px; bottom: -42px;
  width: 190px; height: 190px;
  border: 1px solid rgba(224, 169, 74, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(224, 169, 74, 0.045), 0 0 0 48px rgba(224, 169, 74, 0.025);
  pointer-events: none;
}
.hero-kicker { font-size: 11px; letter-spacing: 0.16em; color: var(--amber); font-weight: 700; text-transform: uppercase; }
.hero-title { font-size: 26px; line-height: 1.15; font-weight: 800; margin: 7px 0 6px; letter-spacing: 0.01em; }
.hero-desc { font-size: 12.5px; color: var(--muted); max-width: 92%; }
.hero-stats { display: flex; gap: 18px; margin-top: 18px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-stat .v { font-size: 21px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-stat .k { font-size: 10.5px; color: var(--dim); letter-spacing: 0.06em; }

.quick-search { margin-top: 16px; }

.region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 360px) { .region-grid { grid-template-columns: 1fr; } }
.region-card {
  position: relative; overflow: hidden;
  padding: 14px;
  min-height: 104px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--panel-2), var(--panel));
  transition: transform 0.16s, border-color 0.16s;
  text-align: left;
}
.region-card:active { transform: scale(0.975); }
.region-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--amber));
  opacity: 0.85;
}
.region-card .rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.region-card .rc-name { font-size: 15px; font-weight: 750; line-height: 1.3; }
.region-card .rc-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.region-card .rc-nums { display: flex; gap: 14px; margin-top: 12px; }
.region-card .rc-num b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.region-card .rc-num span { font-size: 10.5px; color: var(--dim); }
.region-card .rc-arrow { color: var(--dim); flex: none; margin-top: 2px; }

.hot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-chip {
  padding: 7px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.hot-chip:active { transform: scale(0.96); }

.guide-note {
  display: flex; gap: 10px;
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(126, 168, 201, 0.07);
  border: 1px solid rgba(126, 168, 201, 0.18);
  color: #b9c8cf;
  font-size: 12.5px;
  line-height: 1.6;
}
.guide-note svg { flex: none; color: var(--blue); margin-top: 1px; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.row-card:hover, .row-card:focus-visible { border-color: var(--line-strong); background: var(--panel-2); }
.row-card:active { transform: scale(0.988); }
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 14.5px; font-weight: 650; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-sub {
  font-size: 11.5px; color: var(--dim); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-right { flex: none; text-align: right; }
.row-right .big { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--amber-2); }
.row-right .cap { font-size: 10px; color: var(--dim); }
.avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--amber);
  font-weight: 800; font-size: 15px;
}
.monster-avatar {
  background-size: cover;
  background-position: 30% 18%;
  background-repeat: no-repeat;
  border-color: var(--line-strong);
  image-rendering: auto;
}
.monster-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: #0c100e;
  box-shadow: var(--shadow);
}
.monster-hero img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: center 20%;
}
.monster-hero img.pixel {
  width: min(70%, 260px);
  margin: 0 auto;
  max-height: 300px;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 12px 0;
}
.monster-hero-note {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(9, 12, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 10px;
  backdrop-filter: blur(8px);
}
.prob-mini { width: 54px; height: 5px; border-radius: 99px; background: var(--panel-3); overflow: hidden; margin-top: 5px; margin-left: auto; }
.prob-mini i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #9b7434, var(--amber)); }

/* ---------- 建筑详情 ---------- */
.detail-hero { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, var(--panel-2), var(--panel)); }
.detail-hero h1 { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 800; }
.detail-hero .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 15px; border-radius: 12px; overflow: hidden; background: var(--line); }
.detail-stats > div { background: var(--panel); padding: 10px 12px; }
.detail-stats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; word-break: break-word; }
.detail-stats span { font-size: 10.5px; color: var(--dim); }

.building-hero-copy { min-width: 0; }
.building-detail-hero.has-thumb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(112px, 18vw, 240px);
  grid-template-areas:
    "copy thumb"
    "stats stats";
  align-items: start;
  column-gap: clamp(14px, 2vw, 28px);
}
.building-detail-hero.has-thumb .building-hero-copy { grid-area: copy; }
.building-detail-hero.has-thumb .detail-stats { grid-area: stats; width: 100%; }
.detail-hero .building-hero-thumb {
  grid-area: thumb;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  cursor: default;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.accordion { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); overflow: hidden; }
.accordion + .accordion { margin-top: 8px; }
.acc-head {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 13px 14px;
  background: none;
}
.acc-head:hover { background: rgba(255, 255, 255, 0.02); }
.acc-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; }
.acc-sub { font-size: 11px; color: var(--dim); font-weight: 400; margin-top: 2px; }
.acc-chev { flex: none; color: var(--dim); transition: transform 0.2s; }
.accordion.open .acc-chev { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 10px 10px; }
.accordion.open .acc-body { display: block; animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.container-block { border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.container-block + .container-block { margin-top: 8px; }
.container-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 11px 12px;
}
.container-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 650; }
.container-count { font-size: 11px; color: var(--dim); }
.container-items { display: none; border-top: 1px solid var(--line); }
.container-block.open .container-items { display: block; }
.container-block.open .acc-chev { transform: rotate(90deg); }

.item-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(41, 51, 45, 0.55);
}
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: rgba(255, 255, 255, 0.018); }
.item-ico {
  width: 32px; height: 32px; flex: none;
  border-radius: 8px; display: grid; place-items: center;
  background-color: var(--panel-3); border: 1px solid var(--line);
  color: var(--muted); font-size: 11px; font-weight: 800;
}
.item-ico.tex, .avatar.tex, .chip-ico.tex {
  background-image: var(--wz-atlas);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  border-color: transparent;
  color: transparent;
}
.chip-ico {
  width: 20px; height: 20px; flex: none;
  border-radius: 5px;
  background-color: var(--panel-3);
  display: inline-grid; place-items: center;
  font-size: 9px; font-weight: 800; color: var(--muted);
  overflow: hidden;
}
.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-nbt { font-size: 10.5px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-qty { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; white-space: nowrap; }
.item-prob { flex: none; width: 62px; text-align: right; }
@media (max-width: 380px) {
  .item-row { gap: 7px; padding-left: 10px; padding-right: 10px; }
  .item-prob { width: 56px; }
  .item-qty { display: none; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .detail-stats > div { padding: 8px 10px; }
  .detail-stats > div:last-child { grid-column: 1 / -1; }
  .detail-stats b { font-size: 15px; }
}
.item-prob b { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--amber-2); }
.item-prob span { display: block; font-size: 9.5px; color: var(--dim); }
.prob-bar { height: 4px; border-radius: 99px; background: var(--panel-3); overflow: hidden; margin-top: 4px; }
.prob-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8a6a30, var(--amber)); }
.prob-bar.high i { background: linear-gradient(90deg, #3f7d55, var(--green)); }
.star { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--dim); border-radius: 8px; }
.star:hover { color: var(--amber); background: var(--panel-3); }
.star.on { color: var(--amber); }

/* ---------- 详情页 ---------- */
.item-hero { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.item-hero .item-ico { width: 52px; height: 52px; border-radius: 13px; font-size: 17px; }
.item-hero h1 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 800; }
.item-hero .id { font-size: 11px; color: var(--dim); margin-top: 3px; word-break: break-all; }
.source-card { padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); }
.source-card + .source-card { margin-top: 8px; }
.source-top { display: flex; align-items: flex-start; gap: 10px; }
.source-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; }
.source-prob { flex: none; text-align: right; }
.source-prob b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--amber-2); }
.source-prob span { display: block; font-size: 9.5px; color: var(--dim); }
.source-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.source-meta .badge { font-weight: 600; font-size: 10.5px; }
.split { height: 1px; background: var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.text-block { font-size: 13.5px; line-height: 1.72; color: #d8d4c9; white-space: pre-wrap; }
.callout {
  padding: 12px 14px; border-radius: 12px;
  background: var(--amber-soft); border: 1px solid rgba(224, 169, 74, 0.24);
  font-size: 12.5px; line-height: 1.65;
}
.callout.green { background: var(--green-soft); border-color: rgba(127, 199, 154, 0.24); }
.callout.red { background: var(--red-soft); border-color: rgba(224, 122, 95, 0.24); }
.callout-title { font-weight: 750; font-size: 12px; letter-spacing: 0.05em; margin-bottom: 4px; color: var(--amber-2); }
.callout.green .callout-title { color: var(--green); }
.callout.red .callout-title { color: var(--red); }

.threat { display: flex; gap: 3px; align-items: center; }
.threat i { width: 7px; height: 7px; border-radius: 50%; background: var(--panel-3); }
.threat i.on { background: var(--red); box-shadow: 0 0 6px rgba(224, 122, 95, 0.5); }

.empty {
  padding: 40px 18px; text-align: center; color: var(--dim);
  border: 1px dashed var(--line); border-radius: 14px;
}
.empty .em-title { font-size: 14px; color: var(--muted); margin-top: 10px; font-weight: 650; }
.empty .em-sub { font-size: 12px; margin-top: 4px; }

/* ---------- 浮动按钮 ---------- */
.fab {
  position: fixed;
  right: max(16px, calc((100vw - 760px) / 2 + 16px));
  bottom: calc(var(--tab-h) + var(--safe-b) + 18px);
  z-index: 30;
  height: 48px; padding: 0 18px 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--amber-2), #c78f33);
  color: #231a09;
  font-size: 13.5px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(224, 169, 74, 0.3), 0 2px 0 rgba(255, 255, 255, 0.18) inset;
}
.fab:active { transform: scale(0.96); }

/* ---------- 底栏 ---------- */
.tabbar {
  position: fixed;
  left: 50%; bottom: 0; transform: translateX(-50%);
  z-index: 40;
  width: 100%; max-width: 760px;
  padding: 7px 12px calc(7px + var(--safe-b));
  background: rgba(10, 13, 12, 0.9);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(41, 51, 45, 0.8);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 48px; padding: 5px 0 3px;
  border-radius: 12px;
  color: var(--dim);
  font-size: 10.5px; font-weight: 600;
  transition: color 0.16s, background 0.16s;
}
.tab svg { opacity: 0.9; }
.tab.active { color: var(--amber-2); background: var(--amber-soft); }
.tab:active { transform: scale(0.96); }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 5, 4, 0.66);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.16s ease;
}
.sheet {
  width: 100%; max-width: 760px;
  max-height: 92dvh;
  display: flex; flex-direction: column;
  background: #111614;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sheet-title { flex: 1; font-size: 17px; font-weight: 750; }
.sheet-body { padding: 16px 18px calc(20px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  display: flex; gap: 8px; padding: 12px 18px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line); flex: none;
  background: #111614;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px;
  border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13.5px; font-weight: 650;
  transition: transform 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(145deg, var(--amber-2), #c78f33); border-color: transparent; color: #231a09; font-weight: 800; }
.btn.danger { color: var(--red); border-color: rgba(224, 122, 95, 0.35); background: var(--red-soft); }
.btn.ghost { background: none; border-color: var(--line); color: var(--muted); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; gap: 13px; }
.field label { display: block; font-size: 12px; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 43px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  outline: 0;
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { min-height: 82px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(224, 169, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(224, 169, 74, 0.09);
}
.field .hint { font-size: 10.5px; color: var(--dim); margin-top: 5px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .form-2 { grid-template-columns: 1fr; } }

/* ---------- 图鉴 Hub ---------- */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 360px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card {
  position: relative; overflow: hidden;
  padding: 16px;
  min-height: 138px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
  text-align: left;
  transition: transform 0.16s, border-color 0.16s;
}
.hub-card:active { transform: scale(0.975); }
.hub-card::after {
  content: ""; position: absolute; right: -26px; bottom: -34px;
  width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid var(--hub-accent, rgba(224,169,74,.2));
  box-shadow: 0 0 0 18px color-mix(in srgb, var(--hub-accent, #e0a94a) 8%, transparent);
  opacity: 0.55;
}
.hub-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--hub-accent, var(--amber));
}
.hub-title { font-size: 17px; font-weight: 800; margin-top: 10px; }
.hub-sub { font-size: 11px; color: var(--dim); margin-top: 2px; line-height: 1.45; }
.hub-count { font-size: 24px; font-weight: 800; color: var(--hub-accent, var(--amber-2)); margin-top: 8px; font-variant-numeric: tabular-nums; }
.hub-count span { font-size: 10.5px; color: var(--dim); font-weight: 500; margin-left: 3px; }

.guide-thumb {
  flex: none;
  border-radius: 11px;
  border: 1px solid var(--line);
  background-color: var(--panel-3);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.guide-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: #0c100e;
  box-shadow: var(--shadow);
}
.guide-hero img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.guide-hero-note {
  position: absolute; left: 10px; bottom: 10px;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(9,12,11,.78);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted); font-size: 10px;
}
.guide-icon-hero { display: flex; justify-content: center; padding: 18px 0 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat-box {
  padding: 10px 12px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--line);
}
.stat-box b { display: block; font-size: 17px; color: var(--amber-2); font-variant-numeric: tabular-nums; word-break: break-word; }
.stat-box span { font-size: 10.5px; color: var(--dim); }
.piece-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(41,51,45,.55);
}
.piece-row:last-child { border-bottom: 0; }
.piece-main { flex: 1; min-width: 0; }
.piece-name { font-size: 13px; font-weight: 600; }
.piece-id { font-size: 10.5px; color: var(--dim); }
.bonus-row {
  padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.6;
}
.bonus-row + .bonus-row { margin-top: 7px; }
.bonus-tag { font-size: 10px; color: var(--amber); margin-right: 6px; }
.story-text { white-space: pre-wrap; font-size: 15px; line-height: 1.9; color: var(--text); font-weight: 450; }
[data-theme="light"] .story-text { color: #18232f; font-weight: 500; }
[data-theme="light"] .text-block { color: #22303f; }
.story-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.region-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.region-chips::-webkit-scrollbar { display: none; }

/* ---------- 我的 ---------- */
.profile-card { padding: 18px; display: flex; align-items: center; gap: 14px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #2a2318, #171d19);
  border: 1px solid rgba(224, 169, 74, 0.4);
  color: var(--amber);
}
.profile-name { font-size: 17px; font-weight: 800; }
.profile-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat { padding: 13px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.mini-stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; color: var(--amber-2); }
.mini-stat span { font-size: 10.5px; color: var(--dim); }
.menu-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:active { background: var(--panel-2); }
.menu-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); flex: none; }
.menu-main { flex: 1; min-width: 0; display: block; }
.menu-title { display: block; font-size: 13.5px; font-weight: 650; }
.menu-sub { display: block; font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.menu-item .chev { color: var(--dim); flex: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 22px);
  transform: translate(-50%, 12px);
  z-index: 90;
  max-width: 88vw;
  padding: 10px 16px;
  border-radius: 11px;
  background: #222b25;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 桌面端 ---------- */
@media (min-width: 780px) {
  .view { padding-left: 22px; padding-right: 22px; }
  .region-grid { grid-template-columns: repeat(3, 1fr); }
  .tabbar { border-radius: 18px 18px 0 0; }
  .fab { right: calc((100vw - 760px) / 2 + 22px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media (display-mode: standalone) {
  .install-only { display: none !important; }
}

/* ============ 浅色主题（默认） ============ */
:root[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-2: #eef3f9;
  --panel: #ffffff;
  --panel-2: #f7faff;
  --panel-3: #edf4fc;
  --line: #e3eaf3;
  --line-strong: #cdd9e7;
  --text: #172231;
  --muted: #5f7085;
  --dim: #93a1b2;
  --amber: #3aa0f5;
  --amber-2: #1e88e5;
  --amber-soft: #e8f4ff;
  --green: #2fae7a;
  --green-soft: #e6f7f0;
  --red: #e05d55;
  --red-soft: #fff0ef;
  --blue: #3a8ed6;
  --purple: #8d7bd8;
  --shadow: 0 8px 28px rgba(31, 75, 132, 0.10);
  color-scheme: light;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(820px 460px at 8% -8%, rgba(58, 160, 245, 0.16), transparent 62%),
    radial-gradient(680px 420px at 108% 4%, rgba(47, 174, 122, 0.10), transparent 60%),
    linear-gradient(180deg, #f7faff 0%, #f2f6fb 100%);
}
[data-theme="light"] body::after {
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(31, 75, 132, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 75, 132, 0.035) 1px, transparent 1px);
}
[data-theme="light"] ::selection { background: rgba(58, 160, 245, 0.22); }
[data-theme="light"] a { color: var(--amber-2); }
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(227, 234, 243, 0.9);
  box-shadow: 0 1px 0 rgba(31, 75, 132, 0.03);
}
[data-theme="light"] .brand-mark {
  background: linear-gradient(145deg, #eaf5ff, #d8ebff);
  border-color: #b9dcff;
  color: #1e88e5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 14px rgba(31, 75, 132, 0.10);
}
[data-theme="light"] .icon-btn:hover,
[data-theme="light"] .icon-btn:focus-visible { background: #eef5fd; }
[data-theme="light"] .hero {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(58, 160, 245, 0.18), transparent 70%),
    linear-gradient(150deg, #ffffff 0%, #f2f8ff 60%, #eaf4ff 100%);
  border-color: #d9eafb;
}
[data-theme="light"] .hero::after {
  border-color: rgba(58, 160, 245, 0.18);
  box-shadow: 0 0 0 22px rgba(58, 160, 245, 0.05), 0 0 0 48px rgba(58, 160, 245, 0.03);
}
[data-theme="light"] .region-card {
  background: linear-gradient(150deg, #ffffff, #f6faff);
  border-color: #e3eaf3;
}
[data-theme="light"] .detail-hero {
  background: linear-gradient(150deg, #ffffff, #f5f9ff);
  border-color: #e3eaf3;
}
[data-theme="light"] .row-card { background: #ffffff; }
[data-theme="light"] .row-card:hover,
[data-theme="light"] .row-card:focus-visible { background: #f7fbff; }
[data-theme="light"] .searchbar { background: #ffffff; }
[data-theme="light"] .tabbar {
  background: rgba(255, 255, 255, 0.92);
  border-top-color: rgba(227, 234, 243, 0.95);
  box-shadow: 0 -4px 24px rgba(31, 75, 132, 0.06);
}
[data-theme="light"] .sheet,
[data-theme="light"] .sheet-foot { background: #ffffff; }
[data-theme="light"] .overlay { background: rgba(24, 42, 66, 0.32); }
[data-theme="light"] .monster-hero { background: #eef4fb; }
[data-theme="light"] .monster-hero-note,
[data-theme="light"] .guide-hero-note {
  background: rgba(255, 255, 255, 0.86);
  color: #45566b;
}
[data-theme="light"] .guide-thumb { background-color: #eef4fb; }
[data-theme="light"] .guide-icon-hero {
  background: linear-gradient(145deg, #ffffff, #eef6ff);
  border-color: #e3eaf3;
}
[data-theme="light"] .guide-note {
  background: #eef7ff;
  border-color: #d8ebfc;
  color: #4a6a8a;
}
[data-theme="light"] .callout,
[data-theme="light"] .callout.red { background: #fff4f3; border-color: #ffd9d5; }
[data-theme="light"] .fab {
  background: linear-gradient(145deg, #4cb2ff, #1e88e5);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(30, 136, 229, 0.30);
}
[data-theme="light"] .btn.primary {
  background: linear-gradient(145deg, #4cb2ff, #1e88e5);
  color: #ffffff;
}
[data-theme="light"] .btn.ghost { background: #ffffff; }
[data-theme="light"] .kv dt { color: var(--dim); }
[data-theme="light"] .stat-box { background: #f7faff; }
[data-theme="light"] .theme-btn { color: #5b7897; }

/* 区域卡片图片（两种主题通用） */
.region-card.has-img {
  min-height: 156px;
  color: #ffffff;
  border-color: transparent;
  background: #1a2330;
  box-shadow: 0 10px 26px rgba(8, 25, 48, 0.22);
}
.region-card.has-img .rc-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.region-card.has-img::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 18, 32, 0.08) 0%, rgba(8, 18, 32, 0.42) 48%, rgba(8, 18, 32, 0.88) 100%);
}
.region-card.has-img .rc-top,
.region-card.has-img .rc-nums { position: relative; z-index: 2; }
.region-card.has-img .rc-name { color: #ffffff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.region-card.has-img .rc-num b { color: #ffffff; }
.region-card.has-img .rc-num span { color: rgba(255, 255, 255, 0.78); }
.region-card.has-img .rc-arrow { color: rgba(255, 255, 255, 0.85); }
.region-card.has-img .badge { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); color: #ffffff; }
.region-card.has-img::before { opacity: 0.95; }

/* 合成配方 */
.recipe-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
  margin-top: 8px;
}
.recipe-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.recipe-title { font-size: 13.5px; font-weight: 750; }
.recipe-station { flex: none; }
.recipe-mats { display: flex; flex-direction: column; gap: 2px; }
.mat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
}
.mat-row:last-child { border-bottom: 0; }
.mat-main { flex: 1; min-width: 0; }
.mat-name { font-size: 13.5px; font-weight: 600; }
.mat-id { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-count { font-size: 14px; font-weight: 800; color: var(--amber-2); font-variant-numeric: tabular-nums; flex: none; }
.recipe-note { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.recipe-piece { margin-top: 12px; }
.recipe-piece:first-child { margin-top: 0; }
.recipe-piece-head { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 2px 0 4px; }
[data-theme="light"] .mat-count { color: #1e88e5; }
.mat-ico {
  width: 32px; height: 32px; flex: none;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 7px;
  background: var(--panel-2);
}

/* ============ 页面背景（任务书官方美术） ============ */
.hero.has-bg,
.detail-hero.has-bg {
  background-image:
    linear-gradient(90deg, rgba(9, 12, 11, 0.96) 0%, rgba(9, 12, 11, 0.86) 42%, rgba(9, 12, 11, 0.34) 100%),
    var(--banner);
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
}
[data-theme="light"] .hero.has-bg,
[data-theme="light"] .detail-hero.has-bg {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 42%, rgba(255, 255, 255, 0.34) 100%),
    var(--banner);
}

/* ============ 原声播放器 ============ */
.music-host { position: relative; z-index: 66; }
.music-fab {
  position: fixed;
  right: max(14px, calc((100vw - 760px) / 2 + 16px));
  bottom: calc(var(--tab-h) + var(--safe-b) + 76px);
  z-index: 46;
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #241b0d;
  background: linear-gradient(145deg, var(--amber-2), #c78f33);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  opacity: 0.76;
  transition: transform 0.16s, box-shadow 0.16s, opacity 0.16s;
}
.music-fab:hover, .music-fab:focus-visible { opacity: 1; }
.music-fab::after {
  content: "";
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(224, 169, 74, 0.28);
  opacity: 0;
  transform: scale(0.86);
}
.music-fab.playing::after { animation: musicPulse 2.4s ease-out infinite; }
.music-fab:active { transform: scale(0.94); }
body.music-open .music-fab { opacity: 0; pointer-events: none; transform: scale(0.9); }
.music-fab-disc { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; }
.music-fab-disc svg { animation: musicSpin 9s linear infinite; animation-play-state: paused; }
.music-fab.playing .music-fab-disc svg { animation-play-state: running; }
.music-bars {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 1.5px; height: 6px;
  opacity: 0; transition: opacity 0.2s;
}
.music-bars i { width: 1.5px; height: 3px; border-radius: 2px; background: #241b0d; animation: eq 0.8s ease-in-out infinite alternate; animation-play-state: paused; }
.music-bars i:nth-child(2) { height: 5px; animation-delay: -0.2s; }
.music-bars i:nth-child(3) { height: 4px; animation-delay: -0.45s; }
.music-bars i:nth-child(4) { height: 6px; animation-delay: -0.1s; }
.music-fab.playing .music-bars { opacity: 1; }
.music-fab.playing .music-bars i { animation-play-state: running; }
@keyframes musicSpin { to { transform: rotate(360deg); } }
@keyframes musicPulse {
  0% { opacity: 0.8; transform: scale(0.86); }
  70%, 100% { opacity: 0; transform: scale(1.25); }
}
@keyframes eq { from { transform: scaleY(0.45); } to { transform: scaleY(1); } }

.music-backdrop {
  position: fixed; inset: 0; z-index: 64;
  background: rgba(3, 5, 4, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.16s ease;
}
.music-panel {
  position: fixed;
  right: max(14px, calc((100vw - 760px) / 2 + 16px));
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  z-index: 67;
  width: min(392px, calc(100vw - 28px));
  max-height: calc(100dvh - var(--tab-h) - var(--safe-b) - 24px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow-x: hidden;
  overflow-y: auto;
}
.music-panel[hidden] { display: none; }
.music-panel.music-in { animation: musicIn 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes musicIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.music-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 15px 11px; border-bottom: 1px solid var(--line); }
.music-head-main { flex: 1; min-width: 0; }
.music-kicker { font-size: 9.5px; letter-spacing: 0.16em; color: var(--dim); font-weight: 750; }
.music-head-title { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; margin-top: 1px; }
.music-icon-btn {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.music-icon-btn:hover, .music-icon-btn:focus-visible { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.music-icon-btn:active { transform: scale(0.94); }
.music-icon-btn.is-muted { color: var(--red); }
.music-now { display: flex; align-items: center; gap: 11px; padding: 13px 15px 4px; }
.music-cover {
  width: 48px; height: 48px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--amber-2);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(145deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line);
}
.music-now-main { flex: 1; min-width: 0; }
.music-now-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-now-sub { font-size: 10.5px; color: var(--dim); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-stop { color: var(--dim); }
.music-progress { padding: 8px 15px 0; }
.music-range { width: 100%; height: 22px; margin: 0; accent-color: var(--amber-2); cursor: pointer; }
.music-times { display: flex; justify-content: space-between; margin-top: -3px; font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.music-controls { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 5px 15px 10px; }
.music-play {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #241b0d;
  background: linear-gradient(145deg, var(--amber-2), #c78f33);
  box-shadow: 0 8px 22px rgba(224, 169, 74, 0.28);
}
.music-play:active { transform: scale(0.95); }
.music-volume { display: flex; align-items: center; gap: 8px; padding: 0 15px 10px; }
.music-volume .music-range { flex: 1; }
.music-status { flex: none; min-width: 52px; text-align: right; font-size: 10px; color: var(--dim); }
.music-list {
  flex: 1 1 140px;
  min-height: 96px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.music-track {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 43px;
  padding: 7px 15px;
  text-align: left;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.music-track:last-child { border-bottom: 0; }
.music-track:hover, .music-track:focus-visible { background: var(--panel-2); }
.music-track.active { background: var(--amber-soft); }
.music-track-no { width: 26px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.music-track.active .music-track-no { color: var(--amber-2); }
.music-track-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-track.active .music-track-title { color: var(--amber-2); }
.music-track-kind { flex: none; font-size: 9.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }
.mini-bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.mini-bars i { width: 2px; height: 4px; border-radius: 2px; background: currentColor; animation: eq 0.75s ease-in-out infinite alternate; }
.mini-bars i:nth-child(2) { height: 8px; animation-delay: -0.22s; }
.mini-bars i:nth-child(3) { height: 6px; animation-delay: -0.4s; }
.music-src { flex: none; padding: 10px 15px 13px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.55; color: var(--dim); }
.music-src a { color: var(--amber-2); }

[data-theme="light"] .music-fab { color: #ffffff; background: linear-gradient(145deg, #4cb2ff, #1e88e5); box-shadow: 0 10px 26px rgba(30, 136, 229, 0.30); }
[data-theme="light"] .music-fab::after { border-color: rgba(30, 136, 229, 0.28); }
[data-theme="light"] .music-bars i { background: #ffffff; }
[data-theme="light"] .music-panel { background: #ffffff; border-color: #d9e6f4; box-shadow: 0 18px 50px rgba(31, 75, 132, 0.18); }
[data-theme="light"] .music-cover { background: linear-gradient(145deg, #eef7ff, #dceeff); border-color: #d4e8fb; color: #1e88e5; }
[data-theme="light"] .music-play { color: #ffffff; background: linear-gradient(145deg, #4cb2ff, #1e88e5); box-shadow: 0 8px 22px rgba(30, 136, 229, 0.26); }
[data-theme="light"] .music-backdrop { background: rgba(24, 42, 66, 0.24); }
[data-theme="light"] .music-track-kind { border-color: #e3eaf3; }
[data-theme="light"] .music-now-sub,
[data-theme="light"] .music-src,
[data-theme="light"] .music-times,
[data-theme="light"] .music-status { color: #60758d; }

@media (max-width: 520px) {
  .music-panel {
    left: 12px; right: 12px;
    width: auto;
    bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
    max-height: calc(100dvh - var(--tab-h) - var(--safe-b) - 24px);
  }
  .music-fab { right: 14px; }
}

@media (max-width: 420px) {
  .topbar-inner { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .back-btn { padding: 0 8px; min-width: 36px; justify-content: center; }
  .back-btn span { display: none; }
  .top-actions { gap: 2px; }
  .top-actions .icon-btn { width: 33px; height: 33px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
}


/* ============ 改枪台 ============ */
.gs-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.gs-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted);
}
.gs-search span { display: grid; place-items: center; color: var(--dim); flex: none; }
.gs-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 14px;
}
.gs-search input::placeholder { color: var(--dim); }
.gs-search.small { margin: 0 0 8px; padding: 8px 10px; }
.gs-chiprow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.gs-chiprow::-webkit-scrollbar { display: none; }
.gs-chiprow .chip { flex: none; }
.gs-chiprow.tight { margin-bottom: 8px; }

.gs-gun-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.gs-gun-card {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; padding: 10px 11px;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text);
}
.gs-gun-card:active { background: var(--panel-2); }
.gs-gun-thumb {
  width: 76px; height: 62px; flex: none; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.gs-gun-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-gun-body { flex: 1; min-width: 0; }
.gs-gun-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-gun-sub { color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-gun-stats { display: flex; gap: 9px; margin-top: 5px; color: var(--dim); font-size: 10.5px; }
.gs-gun-stats b { color: var(--amber-2); font-variant-numeric: tabular-nums; }
.gs-gun-arrow { color: var(--dim); flex: none; }
.gs-fallback { color: var(--dim); display: grid; place-items: center; }

.gs-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.gs-head-icon {
  width: 92px; height: 76px; flex: none; border-radius: 12px;
  background: var(--panel-3); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.gs-head-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-head-body { flex: 1; min-width: 0; }
.gs-kicker { color: var(--amber-2); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; }
.gs-head h1 { margin: 2px 0 5px; font-size: 19px; line-height: 1.2; }
.gs-badges, .gs-gun-modes { display: flex; flex-wrap: wrap; gap: 5px; }
.gs-badge {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 700; border: 1px solid transparent;
}
.gs-badge.fire { color: var(--amber-2); background: var(--amber-soft); border-color: rgba(224,169,74,.22); }
.gs-badge.bolt { color: var(--muted); background: var(--panel-3); border-color: var(--line); }
.gs-head-ammo { margin-top: 5px; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-switch {
  flex: none; align-self: flex-start; padding: 7px 10px; border-radius: 9px;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 11px;
  background: var(--panel);
}
.gs-actions { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.gs-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 11px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px;
}
.gs-btn.primary { color: var(--amber-2); border-color: rgba(224,169,74,.35); background: var(--amber-soft); }
.gs-btn:active { background: var(--panel-2); }

.gs-stat-table {
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
  background: var(--panel);
}
.gs-stat-header, .gs-stat-row {
  display: grid;
  grid-template-columns: 1.25fr .65fr 1fr .72fr;
  gap: 4px; align-items: center;
}
.gs-stat-header {
  padding: 8px 10px; background: var(--panel-2);
  color: var(--dim); font-size: 9.5px; font-weight: 700;
}
.gs-stat-row {
  position: relative; padding: 8px 10px 14px;
  border-top: 1px solid var(--line);
}
.gs-stat-label { color: var(--muted); font-size: 11px; }
.gs-stat-base { color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.gs-stat-value { color: var(--text); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.gs-stat-value span { font-size: 9px; color: var(--dim); font-weight: 500; margin-left: 2px; }
.gs-stat-delta { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.gs-stat-value.good, .gs-stat-delta.good { color: var(--green); }
.gs-stat-value.bad, .gs-stat-delta.bad { color: var(--red); }
.gs-stat-delta.same { color: var(--dim); font-weight: 500; }
.gs-stat-bar {
  position: absolute; left: 10px; right: 10px; bottom: 6px;
  height: 3px; border-radius: 3px; background: var(--panel-3); overflow: hidden;
}
.gs-stat-bar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
}
.gs-stat-bar b {
  position: absolute; top: 0; bottom: 0; width: 1px; background: var(--dim); opacity: .8;
}
.gs-legend { display: flex; gap: 8px; font-size: 9.5px; }
.gs-legend .good { color: var(--green); }
.gs-legend .bad { color: var(--red); }
.gs-note, .gs-sub { color: var(--dim); font-size: 10px; margin-top: 6px; }
.gs-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.gs-flags span { padding: 2px 6px; border-radius: 5px; background: var(--panel-3); color: var(--muted); font-size: 9.5px; }

.gs-slots { display: grid; grid-template-columns: 1fr; gap: 8px; }
.gs-slot {
  width: 100%; text-align: left; padding: 10px 11px;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text);
}
.gs-slot:active { background: var(--panel-2); }
.gs-slot.filled { border-color: rgba(224,169,74,.25); }
.gs-slot-head { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.gs-slot-plus { color: var(--amber-2); font-weight: 600; }
.gs-slot-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gs-slot-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-slot-mods { color: var(--dim); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-slot-empty { color: var(--dim); font-size: 12px; padding: 4px 0; }
.gs-att-img { border-radius: 7px; object-fit: contain; background: var(--panel-2); flex: none; }
.gs-att-fallback { display: grid; place-items: center; border-radius: 7px; background: var(--panel-2); color: var(--dim); flex: none; }

.gs-presets { display: grid; grid-template-columns: 1fr; gap: 8px; }
.gs-preset {
  padding: 11px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--gs-accent, var(--amber));
}
.gs-preset-head { display: flex; justify-content: space-between; align-items: center; }
.gs-preset-head b { font-size: 13px; }
.gs-preset-head span { color: var(--dim); font-size: 9.5px; }
.gs-preset-desc { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.gs-preset-name { color: var(--dim); font-size: 9.5px; margin-top: 5px; min-height: 14px; }
.gs-preset-btn {
  margin-top: 8px; padding: 6px 10px; border-radius: 8px;
  background: var(--panel-3); color: var(--amber-2); font-size: 10.5px; font-weight: 700;
}
.gs-preset-btn[disabled] { color: var(--dim); opacity: .55; }

.gs-open-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 10px; padding: 11px 12px; border-radius: 11px;
  background: var(--amber-soft); border: 1px solid rgba(224,169,74,.3);
  color: var(--amber-2); font-size: 12px; font-weight: 700; text-align: left;
}
.gs-open-btn span { flex: 1; }

/* 改枪台弹层 */
.gs-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.gs-modal-bg { position: absolute; inset: 0; background: rgba(3,7,5,.58); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.gs-modal.show .gs-modal-bg { opacity: 1; }
.gs-sheet {
  position: relative; width: min(520px, calc(100% - 20px));
  max-height: 84vh; overflow: auto; padding: 14px 14px calc(18px + var(--safe-b));
  border-radius: 18px 18px 0 0; background: var(--panel);
  border: 1px solid var(--line-strong); box-shadow: 0 -18px 50px rgba(0,0,0,.4);
  transform: translateY(18px); opacity: 0; transition: transform .2s, opacity .2s;
}
.gs-modal.show .gs-sheet { transform: translateY(0); opacity: 1; }
.gs-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.gs-sheet-kicker { color: var(--dim); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; }
.gs-sheet-title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.gs-sheet-close { width: 32px; height: 32px; border-radius: 9px; background: var(--panel-3); color: var(--muted); display: grid; place-items: center; flex: none; }
.gs-att-list { display: flex; flex-direction: column; gap: 6px; }
.gs-att-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px; border-radius: 11px; background: var(--panel-2);
  border: 1px solid transparent; color: var(--text);
}
.gs-att-row.active { border-color: rgba(224,169,74,.45); background: var(--amber-soft); }
.gs-att-row:active { background: var(--panel-3); }
.gs-att-row.clear { margin-bottom: 7px; background: transparent; border: 1px dashed var(--line-strong); }
.gs-att-body { flex: 1; min-width: 0; }
.gs-att-name { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gs-equipped { font-size: 8.5px; color: var(--amber-2); border: 1px solid rgba(224,169,74,.3); padding: 1px 5px; border-radius: 5px; }
.gs-att-mods { color: var(--dim); font-size: 9.5px; margin-top: 2px; }
.gs-att-delta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.gs-att-delta span { font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.gs-att-delta .good { color: var(--green); background: var(--green-soft); }
.gs-att-delta .bad { color: var(--red); background: var(--red-soft); }
.gs-att-add { color: var(--dim); flex: none; }
.gs-att-thumb { width: 52px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: var(--panel); }
.gs-att-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-att-clear { width: 44px; height: 40px; display: grid; place-items: center; color: var(--dim); flex: none; font-size: 18px; }
.gs-att-list.gun-list { max-height: 58vh; overflow: auto; }

@media (min-width: 620px) {
  .gs-gun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-stat-header, .gs-stat-row { grid-template-columns: 1.4fr .7fr 1fr .8fr; }
}

.gs-att-row.mismatch { opacity: .72; border-color: var(--line); }
.gs-mismatch { font-size: 8.5px; color: var(--red); border: 1px solid rgba(224,122,95,.3); padding: 1px 5px; border-radius: 5px; }

/* 窄屏枪械头部：避免标题被图标和换枪按钮挤成竖排 */
.gs-head { position: relative; padding: 12px; gap: 10px; }
.gs-head-icon { width: 64px; height: 58px; }
.gs-head-body { padding-right: 40px; }
.gs-head h1 { font-size: 17px; margin: 2px 0 4px; word-break: break-word; }
.gs-switch { position: absolute; top: 10px; right: 10px; padding: 5px 8px; font-size: 10px; }
.gs-head-ammo { max-width: 100%; }

body.gs-modal-open { overflow: hidden; }

/* ============================================================
   5.11.19 扩展：气候 / 建筑徽标 / 交易报价单 / 威胁评级 / 手记
   ============================================================ */

/* ---------- 地区气候配色 ---------- */
.view.climate-page { position: relative; }
.view.climate-warm {
  background: linear-gradient(180deg, rgba(127, 199, 154, 0.07), transparent 380px);
}
.view.climate-hot {
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(224, 122, 95, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(224, 122, 95, 0.06), transparent 400px);
}
.view.climate-cold {
  background:
    radial-gradient(520px 240px at 0% 0%, rgba(126, 168, 201, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(126, 168, 201, 0.06), transparent 400px);
}
.view.climate-rad {
  background:
    repeating-linear-gradient(135deg, rgba(224, 169, 74, 0.055) 0 16px, rgba(0, 0, 0, 0.16) 16px 32px),
    linear-gradient(180deg, #221d10 0, #12110c 340px, var(--bg) 720px);
}
.climate-hero.climate-rad {
  border-color: rgba(224, 169, 74, 0.45);
  background:
    repeating-linear-gradient(135deg, rgba(224, 169, 74, 0.07) 0 14px, rgba(0, 0, 0, 0.2) 14px 28px),
    linear-gradient(150deg, #2a2414, #17150e);
}
.view.climate-mixed {
  background:
    radial-gradient(520px 240px at 0% 0%, rgba(224, 122, 95, 0.10), transparent 70%),
    radial-gradient(520px 240px at 100% 0%, rgba(126, 168, 201, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(126, 168, 201, 0.04), transparent 400px);
}
.climate-hero.climate-mixed { border-color: rgba(224, 169, 74, 0.35); }
.climate-hero.climate-hot { border-color: rgba(224, 122, 95, 0.35); }
.climate-hero.climate-cold { border-color: rgba(126, 168, 201, 0.35); }
.climate-hero.climate-warm { border-color: rgba(127, 199, 154, 0.28); }

.rad-banner {
  position: sticky;
  top: calc(var(--safe-t) + 64px);
  z-index: 35;
  margin: 0 0 12px;
  padding: 10px 48px 10px 13px;
  border-radius: 11px;
  border: 1px solid #ff5a5a;
  background: linear-gradient(90deg, #8f1118, #c21f24);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(150, 16, 24, 0.38);
}
.rad-float {
  position: fixed;
  top: calc(var(--safe-t) + 76px);
  right: max(14px, calc((100vw - 760px) / 2 + 14px));
  z-index: 45;
  font-size: 27px;
  line-height: 1;
  pointer-events: none;
  animation: radBlink 1.35s ease-in-out infinite;
}
@keyframes radBlink {
  0%, 100% { opacity: 0.28; transform: scale(0.9); filter: drop-shadow(0 0 2px rgba(255, 40, 40, 0.35)); }
  50% { opacity: 1; transform: scale(1.12); filter: drop-shadow(0 0 11px rgba(255, 40, 40, 0.95)); }
}
.region-card.climate-rad {
  border-color: rgba(224, 169, 74, 0.5);
  background:
    repeating-linear-gradient(135deg, rgba(224, 169, 74, 0.09) 0 13px, rgba(0, 0, 0, 0.2) 13px 26px),
    linear-gradient(150deg, #292313, #15140e);
}
.region-card.climate-mixed { border-color: rgba(224, 169, 74, 0.34); }
.region-card.climate-hot { border-color: rgba(224, 122, 95, 0.3); }
.region-card.climate-cold { border-color: rgba(126, 168, 201, 0.3); }
.region-card.climate-warm { border-color: rgba(127, 199, 154, 0.28); }
.rc-rad-ico {
  display: inline-block;
  margin-right: 5px;
  animation: radBlink 1.5s ease-in-out infinite;
}
.rc-rad-warn {
  margin-top: 9px;
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 60, 60, 0.16);
  border: 1px solid rgba(255, 90, 90, 0.4);
  color: #ff9b8d;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* ---------- 建筑名称后缀徽标 ---------- */
.b-title-wrap { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; line-height: 1.35; }
.b-title { font-weight: 750; }
.b-horde {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 1px 5px; border-radius: 5px;
  color: #ff8b7c; background: rgba(224, 60, 50, 0.16);
  border: 1px solid rgba(224, 80, 60, 0.4);
  font-size: 9.5px; font-weight: 800; white-space: nowrap;
}
.b-horde .item-ico { display: inline-block; }
.b-size { display: inline-flex; align-items: center; gap: 2px; }
.szdot {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: #77807a;
}
.szdot.gray { background: #77807a; }
.szdot.blue { background: #5aa7e8; box-shadow: 0 0 4px rgba(90, 167, 232, 0.55); }
.szdot.gold { background: #e0a94a; box-shadow: 0 0 5px rgba(224, 169, 74, 0.65); }
.b-loot {
  display: inline-flex; padding: 1px 6px; border-radius: 5px;
  font-size: 9.5px; font-weight: 700; white-space: nowrap; border: 1px solid;
}
.b-loot.high { color: #ff9b8d; background: rgba(224, 80, 60, 0.13); border-color: rgba(224, 80, 60, 0.35); }
.b-loot.mid { color: #e8c184; background: rgba(224, 169, 74, 0.11); border-color: rgba(224, 169, 74, 0.32); }
.b-loot.low { color: var(--dim); background: var(--panel-3); border-color: var(--line); }
.building-row.climate-rad { border-left: 3px solid #c9a227; }
.building-row.climate-mixed { border-left: 3px solid #c9a227; }
.building-row.climate-hot { border-left: 3px solid #e07a5f; }
.building-row.climate-cold { border-left: 3px solid #7ea8c9; }
.building-row.climate-warm { border-left: 3px solid #7fc79a; }
.b-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.b-title-row h1 { margin: 0; }

/* ---------- NPC 交易报价单 ---------- */
.npc-quote {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(360px 160px at 100% 0%, rgba(224, 169, 74, 0.08), transparent 70%),
    linear-gradient(155deg, var(--panel-2), var(--panel));
  padding: 13px;
  box-shadow: var(--shadow);
}
.npc-quote-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.quote-avatar {
  width: 54px; height: 54px; flex: none; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--panel-3); display: grid; place-items: center;
}
.quote-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quote-avatar-fallback { font-size: 20px; font-weight: 800; color: var(--green); }
.npc-quote-id { flex: 1; min-width: 0; }
.npc-quote-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; font-weight: 800; line-height: 1.25; }
.quote-region {
  display: inline-flex; padding: 1px 7px; border-radius: 5px;
  font-size: 9.5px; font-weight: 700; border: 1px solid var(--line);
  background: var(--panel-3); color: var(--muted); white-space: nowrap;
}
.quote-region.climate-rad { color: #ffd45c; background: rgba(224, 169, 74, 0.14); border-color: rgba(224, 169, 74, 0.42); }
.quote-region.climate-hot { color: #f0a48e; background: rgba(224, 122, 95, 0.13); border-color: rgba(224, 122, 95, 0.36); }
.quote-region.climate-cold { color: #a7c8e2; background: rgba(126, 168, 201, 0.13); border-color: rgba(126, 168, 201, 0.36); }
.quote-region.climate-warm { color: #9ed8b3; background: rgba(127, 199, 154, 0.12); border-color: rgba(127, 199, 154, 0.32); }
.npc-timing { color: var(--amber-2); font-size: 11px; font-weight: 700; margin-top: 4px; }
.npc-timing-sub { color: var(--dim); font-size: 10px; margin-top: 1px; }
.npc-quote-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 0 8px; }
.npc-shop-title { display: inline-flex; align-items: center; gap: 5px; flex: 1; min-width: 120px; font-size: 12px; font-weight: 750; color: var(--text); }
.npc-currency-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  border: 1px solid var(--line); background: var(--panel-3); color: var(--muted);
}
.npc-currency-chip.money { color: #ffd45c; border-color: rgba(224, 169, 74, 0.35); background: rgba(224, 169, 74, 0.1); }
.npc-currency-chip.barter { color: var(--green); border-color: rgba(127, 199, 154, 0.3); background: var(--green-soft); }
.quote-toggle {
  margin-left: auto; padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--amber-2);
  font-size: 9.5px; font-weight: 700;
}
.quote-list { display: flex; flex-direction: column; gap: 7px; }
.quote-row-wrap[hidden] { display: none !important; }
.quote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 5px; align-items: stretch;
  padding: 8px 7px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.quote-side {
  min-width: 0; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 3px;
  padding: 5px 4px; border-radius: 9px;
}
.quote-side.pay { background: rgba(224, 122, 95, 0.055); }
.quote-side.get { background: rgba(127, 199, 154, 0.055); }
.quote-ico-box {
  position: relative; width: 54px; height: 54px;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 13px; border: 1px solid var(--line-strong);
  background: var(--panel-2);
}
.quote-ico-box.money { border-color: rgba(224, 169, 74, 0.38); }
.quote-ico-wrap { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; }
.quote-ico-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.quote-label {
  max-width: 100%; min-height: 24px;
  color: var(--dim); font-size: 9.5px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.quote-price {
  color: var(--red); font-size: 18px; font-weight: 900; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.quote-row.barter .quote-price { color: var(--text); }
.quote-qty {
  color: var(--green); font-size: 18px; font-weight: 900; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.quote-arrow {
  align-self: center; display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  filter: drop-shadow(0 0 7px rgba(224, 169, 74, 0.32));
}
.quote-arrow.money { color: var(--amber-2); font-size: 27px; font-weight: 900; text-shadow: 0 0 10px rgba(224, 169, 74, 0.5); }
.quote-arrow.barter { color: var(--amber-2); font-size: 25px; font-weight: 900; }
.coin-spark {
  position: absolute; top: 1px; right: 2px; font-size: 13px;
  color: #ffd75e; text-shadow: 0 0 7px #ffd75e;
  animation: coinSpark 1.7s ease-in-out infinite;
}
@keyframes coinSpark {
  0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(16deg); }
}
.npc-quote-empty {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 10px 2px 2px; color: var(--dim); font-size: 11.5px;
}
.quote-foot { margin-top: 8px; color: var(--dim); font-size: 9.5px; text-align: center; }

/* ---------- 敌对生物威胁评级 ---------- */
.monster-row { flex-wrap: wrap; align-items: flex-start; row-gap: 5px; }
.monster-row .row-main { flex: 1 1 calc(100% - 54px); min-width: 0; }
.monster-row .row-right { flex: 1 1 100%; text-align: left; padding-left: 54px; }
.badge.rad { background: rgba(224, 169, 74, 0.14); color: #f0c274; border-color: rgba(224, 169, 74, 0.4); }
.threat-tag {
  display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-3); color: var(--muted);
  font-size: 9.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.threat-tag em { font-style: normal; }
.threat-dots { display: inline-flex; align-items: center; gap: 2px; }
.threat-dots i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.threat-tag.normal { color: #b9c0ba; border-color: rgba(185, 192, 186, 0.3); background: rgba(185, 192, 186, 0.08); }
.threat-tag.normal .threat-dots i.on { background: #ff5b52; box-shadow: 0 0 5px rgba(255, 91, 82, 0.8); }
.threat-tag.special { color: #c9b6e0; border-color: rgba(176, 154, 203, 0.38); background: rgba(176, 154, 203, 0.12); }
.threat-tag.special .threat-dots i.on { background: #b09acb; box-shadow: 0 0 5px rgba(176, 154, 203, 0.8); }
.threat-tag.leader { color: #ffc861; border-color: rgba(224, 169, 74, 0.42); background: rgba(224, 169, 74, 0.12); }
.threat-tag.minor { color: #e8b06a; border-color: rgba(224, 169, 74, 0.32); background: rgba(224, 169, 74, 0.08); }
.threat-tag.minor .threat-dots i.on { background: #ff5b52; box-shadow: 0 0 5px rgba(255, 91, 82, 0.8); }
.threat-tag.calamity {
  color: #ff8585; border-color: rgba(255, 70, 70, 0.5); background: rgba(160, 20, 36, 0.2);
  animation: calamityPulse 1.9s ease-in-out infinite;
}
@keyframes calamityPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 40, 60, 0); filter: brightness(1); }
  50% { box-shadow: 0 0 15px rgba(255, 40, 60, 0.42); filter: brightness(1.18); }
}
.threat-tag.level1 {
  color: #ff9a6a; border-color: rgba(255, 120, 60, 0.45); background: rgba(150, 55, 20, 0.2);
}
.threat-tag.level2 {
  color: #ff6b7a; border-color: rgba(255, 40, 70, 0.62); background: rgba(170, 10, 35, 0.26);
  animation: calamityPulse2 1.6s ease-in-out infinite;
}
@keyframes calamityPulse2 {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 20, 50, 0); filter: brightness(1); }
  50% { box-shadow: 0 0 20px rgba(255, 20, 50, 0.55); filter: brightness(1.28); }
}
.threat-tag.boss-tier {
  color: #f0cf8a; border-color: rgba(224, 169, 74, 0.45); background: rgba(120, 85, 20, 0.18);
  letter-spacing: 0.2px;
}
.threat-tag.boss-tier.t3 { color: #ffb08a; border-color: rgba(255, 120, 60, 0.45); background: rgba(140, 55, 20, 0.2); }
.threat-tag.boss-tier.t4 { color: #ff7d8a; border-color: rgba(255, 55, 80, 0.5); background: rgba(150, 15, 40, 0.22); }
.threat-section.level2 {
  border-color: rgba(255, 45, 75, 0.42) !important;
  background: linear-gradient(150deg, rgba(150, 12, 38, 0.22), var(--panel));
}
.tier-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(224, 169, 74, 0.32);
  background: linear-gradient(135deg, rgba(224, 169, 74, 0.12), rgba(224, 169, 74, 0.04));
  color: var(--text); font-size: 12px; line-height: 1.65;
}
.tier-note svg { flex: 0 0 auto; margin-top: 2px; color: #e0a94a; }
.threat-tag.fungus { color: #93e07f; border-color: rgba(110, 200, 90, 0.42); background: rgba(80, 170, 60, 0.13); }
.threat-tag.friendly { color: #9ed8b3; border-color: rgba(127, 199, 154, 0.34); background: rgba(127, 199, 154, 0.1); }
.threat-tag.custom { color: var(--muted); }
.threat-rad { color: inherit; font-size: 11.5px; letter-spacing: 0.5px; text-shadow: 0 0 6px currentColor; }
.fungus-mini { font-size: 10px; margin-left: 1px; }
.threat-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.threat-desc { flex: 1; min-width: 180px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.threat-section.calamity {
  border: 1px solid rgba(255, 70, 70, 0.28) !important;
  background: linear-gradient(150deg, rgba(130, 20, 34, 0.16), var(--panel));
  border-radius: 14px; padding: 12px;
}
.threat-section.fungus {
  border: 1px solid rgba(110, 200, 90, 0.25) !important;
  background: linear-gradient(150deg, rgba(70, 150, 50, 0.1), var(--panel));
  border-radius: 14px; padding: 12px;
}
.threat-section.minor {
  border: 1px solid rgba(224, 169, 74, 0.22) !important;
  background: linear-gradient(150deg, rgba(224, 169, 74, 0.08), var(--panel));
  border-radius: 14px; padding: 12px;
}
.badge.threat-meta.calamity { color: #ff8585; border-color: rgba(255, 70, 70, 0.42); background: rgba(160, 20, 36, 0.18); }
.badge.threat-meta.leader { color: #ffc861; border-color: rgba(224, 169, 74, 0.4); background: rgba(224, 169, 74, 0.12); }
.badge.threat-meta.minor { color: #e8b06a; border-color: rgba(224, 169, 74, 0.3); background: rgba(224, 169, 74, 0.08); }
.badge.threat-meta.fungus { color: #93e07f; border-color: rgba(110, 200, 90, 0.36); background: rgba(80, 170, 60, 0.12); }
.badge.threat-meta.special { color: #c9b6e0; border-color: rgba(176, 154, 203, 0.36); background: rgba(176, 154, 203, 0.12); }

/* ---------- 幸存者手记 ---------- */
.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.note-card {
  position: relative; overflow: hidden; text-align: left;
  padding: 14px; min-height: 148px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
  transition: transform 0.16s, border-color 0.16s;
}
.note-card:active { transform: scale(0.975); }
.note-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--note-accent, var(--amber)); opacity: 0.9;
}
.note-card::after {
  content: ""; position: absolute; right: -26px; bottom: -34px;
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--note-accent, var(--amber)); opacity: 0.055;
}
.note-card-emoji { font-size: 25px; line-height: 1; }
.note-card-title { margin-top: 7px; font-size: 15px; font-weight: 800; color: var(--text); }
.note-card-sub { margin-top: 3px; font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.note-card-tag {
  display: inline-flex; margin-top: 9px; padding: 2px 7px;
  border-radius: 5px; border: 1px solid var(--line);
  background: var(--panel-3); color: var(--note-accent, var(--amber));
  font-size: 9.5px; font-weight: 700;
}
.tone-red { --note-accent: #e05a5a; }
.tone-temp { --note-accent: #5aa7e8; }
.tone-pink { --note-accent: #ef7fa8; }
.tone-yellow { --note-accent: #e0c14a; }
.tone-power { --note-accent: #4ab0e0; }
.tone-darkred { --note-accent: #a8232e; }
.note-hero { position: relative; overflow: hidden; }
.note-hero-emoji { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.note-article { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 13px; }
.note-lead {
  padding: 11px 12px; border-radius: 10px;
  border-left: 3px solid var(--note-accent, var(--amber));
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted); font-size: 12px; line-height: 1.65;
}
.note-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.note-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 10px; align-items: start;
  padding: 10px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.note-emoji { font-size: 19px; line-height: 1.2; text-align: center; }
.note-body b { font-size: 12.5px; }
.note-body p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.note-tag {
  grid-column: 2; justify-self: start; width: max-content; max-width: 100%;
  padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--note-accent, var(--amber)); font-size: 9px; font-weight: 700;
}
.note-callout {
  margin-top: 12px; padding: 11px 12px; border-radius: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--note-accent, var(--amber));
  background: var(--panel-2); font-size: 11px; line-height: 1.6; color: var(--muted);
}
.note-callout b { color: var(--text); font-size: 12px; }
.note-callout p { margin: 4px 0 0; }
.note-tip { margin-top: 10px; color: var(--dim); font-size: 10.5px; line-height: 1.55; }
.temp-ladder { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.temp-step {
  --tc: var(--amber);
  padding: 9px 11px; border-radius: 11px;
  border: 1px solid var(--line); border-left: 4px solid var(--tc);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), var(--panel-2) 52%);
}
.temp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.temp-head b { color: var(--tc); font-size: 14px; }
.temp-head span { color: var(--dim); font-size: 8px; letter-spacing: 0.15em; font-weight: 700; }
.temp-body p { margin: 3px 0 2px; font-size: 11px; color: var(--text); }
.temp-body small { color: var(--muted); font-size: 10px; line-height: 1.5; display: block; }
.temp-step.extreme-heat { --tc: #ff4d4d; }
.temp-step.scorching { --tc: #ff8a3d; }
.temp-step.hot { --tc: #e0a94a; }
.temp-step.warm { --tc: #7fc79a; }
.temp-step.cold { --tc: #7ea8c9; }
.temp-step.freezing { --tc: #5a8ce8; }
.heart-track {
  margin-top: 12px; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(239, 127, 168, 0.28);
  background: linear-gradient(90deg, rgba(239, 127, 168, 0.12), rgba(224, 122, 95, 0.05));
}
.heart-cells { display: flex; gap: 4px; }
.heart-cells i { flex: 1; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.heart-cells i.on { background: linear-gradient(90deg, #ef7fa8, #e05a5a); box-shadow: 0 0 8px rgba(239, 127, 168, 0.45); }
.heart-track-cap { display: flex; justify-content: space-between; margin-top: 6px; color: var(--dim); font-size: 9px; }
.note-stickies { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sticky {
  position: relative; padding: 13px 12px; border-radius: 3px 12px 4px 12px;
  background: linear-gradient(160deg, #f4e6a8, #e6cf72);
  color: #3a3218; box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
  font-size: 10.5px; line-height: 1.5;
}
.sticky:nth-child(odd) { transform: rotate(-0.7deg); }
.sticky:nth-child(even) { transform: rotate(0.6deg); }
.sticky b { display: block; font-size: 12.5px; margin-bottom: 3px; color: #2c2510; }
.sticky p { margin: 0; }
.note-callout.yellow { --note-accent: #e0c14a; }
.note-callout.pink { --note-accent: #ef7fa8; }
.note-callout.blue { --note-accent: #5aa7e8; }
.note-callout.power { --note-accent: #4ab0e0; }
.note-callout.darkred { --note-accent: #c22a36; }
.tech-tree { display: flex; flex-direction: column; gap: 0; margin-top: 13px; }
.tech-step {
  position: relative; display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 10px; padding: 0 0 16px;
}
.tech-step::before {
  content: ""; position: absolute; left: 12px; top: 27px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, rgba(74, 176, 224, 0.55), rgba(224, 169, 74, 0.25));
}
.tech-step:last-child::before { display: none; }
.tech-node {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; z-index: 1;
  background: var(--panel-3); border: 1px solid rgba(224, 169, 74, 0.5);
  color: var(--amber-2); font-size: 11px; font-weight: 800;
}
.tech-step b { font-size: 12.5px; }
.tech-step p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.tech-meta {
  grid-column: 2; justify-self: start; width: max-content;
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line);
  background: var(--panel-3); color: var(--dim); font-size: 9px; font-weight: 700;
}
.tactic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tactic-card {
  padding: 10px; border-radius: 11px;
  background: linear-gradient(150deg, rgba(168, 35, 46, 0.14), var(--panel-2));
  border: 1px solid rgba(168, 35, 46, 0.3);
}
.tactic-card b { color: #ff9a8a; font-size: 11.5px; }
.tactic-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.note-nav { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 380px) {
  .note-grid, .note-stickies, .tactic-grid { grid-template-columns: 1fr; }
  .quote-row { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
  .quote-arrow { font-size: 17px; }
  .quote-arrow.barter { font-size: 21px; }
  .quote-ico-box { width: 48px; height: 48px; }
  .quote-ico-wrap { width: 40px; height: 40px; }
  .quote-price, .quote-qty { font-size: 16px; }
}
@media (max-width: 340px) {
  .note-card { padding: 11px; min-height: 132px; }
  .note-card-title { font-size: 13.5px; }
}

/* ---------- 浅色主题适配 ---------- */
:root[data-theme="light"] .view.climate-warm { background: linear-gradient(180deg, rgba(127, 199, 154, 0.16), transparent 380px); }
:root[data-theme="light"] .view.climate-hot { background: linear-gradient(180deg, rgba(224, 122, 95, 0.16), transparent 400px); }
:root[data-theme="light"] .view.climate-cold { background: linear-gradient(180deg, rgba(126, 168, 201, 0.18), transparent 400px); }
:root[data-theme="light"] .view.climate-rad {
  background:
    repeating-linear-gradient(135deg, rgba(168, 130, 20, 0.1) 0 16px, rgba(120, 80, 0, 0.07) 16px 32px),
    linear-gradient(180deg, #fbf3d9 0, #f7f3e7 360px, var(--bg) 720px);
}
:root[data-theme="light"] .climate-hero.climate-rad {
  background:
    repeating-linear-gradient(135deg, rgba(168, 130, 20, 0.1) 0 14px, rgba(120, 80, 0, 0.07) 14px 28px),
    linear-gradient(150deg, #fff8df, #f7f0d8);
}
:root[data-theme="light"] .region-card.climate-rad {
  background:
    repeating-linear-gradient(135deg, rgba(168, 130, 20, 0.12) 0 13px, rgba(120, 80, 0, 0.08) 13px 26px),
    linear-gradient(150deg, #fff7dc, #f7efd4);
}
:root[data-theme="light"] .note-card { background: linear-gradient(155deg, #ffffff, #f7faff); }
:root[data-theme="light"] .note-article { background: #ffffff; }
:root[data-theme="light"] .note-row,
:root[data-theme="light"] .note-callout,
:root[data-theme="light"] .tech-meta { background: #f7faff; }
:root[data-theme="light"] .note-lead { background: rgba(30, 80, 140, 0.05); }
:root[data-theme="light"] .temp-step { background: linear-gradient(90deg, #ffffff, #f7faff 52%); }
:root[data-theme="light"] .heart-track { background: linear-gradient(90deg, rgba(239, 127, 168, 0.16), rgba(224, 122, 95, 0.07)); }
:root[data-theme="light"] .heart-cells i { background: rgba(30, 60, 90, 0.12); }
:root[data-theme="light"] .npc-quote { background: radial-gradient(360px 160px at 100% 0%, rgba(224, 169, 74, 0.12), transparent 70%), linear-gradient(155deg, #ffffff, #f7faff); }
:root[data-theme="light"] .quote-row { background: #ffffff; }
:root[data-theme="light"] .quote-ico-box { background: #f3f8fe; }
:root[data-theme="light"] .quote-side.pay { background: rgba(224, 122, 95, 0.07); }
:root[data-theme="light"] .quote-side.get { background: rgba(60, 160, 110, 0.07); }
:root[data-theme="light"] .threat-tag.normal { color: #5b6a60; background: #eef2ef; }
:root[data-theme="light"] .threat-tag.special { color: #7b5fa8; background: #f2ecfb; }
:root[data-theme="light"] .threat-tag.leader { color: #a67416; background: #fff6df; }
:root[data-theme="light"] .threat-tag.minor { color: #95651a; background: #fff9ec; }
:root[data-theme="light"] .threat-tag.calamity { color: #b31f2e; background: #ffe9e9; }
:root[data-theme="light"] .threat-tag.level1 { color: #b1531e; background: #fff1e6; }
:root[data-theme="light"] .threat-tag.level2 { color: #a80f28; background: #ffe3e7; }
:root[data-theme="light"] .threat-tag.boss-tier { color: #8a6414; background: #fff7e2; }
:root[data-theme="light"] .threat-tag.boss-tier.t3 { color: #a4421a; background: #fff0e6; }
:root[data-theme="light"] .threat-tag.boss-tier.t4 { color: #a5162e; background: #ffe8ec; }
:root[data-theme="light"] .tier-note { color: #6b4a10; background: linear-gradient(135deg, #fff7e2, #fffdf7); border-color: rgba(190, 140, 40, 0.35); }
:root[data-theme="light"] .threat-tag.fungus { color: #2f7a25; background: #ecf9e8; }
:root[data-theme="light"] .threat-tag.friendly { color: #2f7d52; background: #eaf7ef; }
:root[data-theme="light"] .threat-tag.normal .threat-dots i { background: rgba(30, 60, 45, 0.14); }
:root[data-theme="light"] .threat-section.calamity { background: linear-gradient(150deg, #fff0f0, #ffffff); }
:root[data-theme="light"] .threat-section.minor { background: linear-gradient(150deg, #fffbf0, #ffffff); }
:root[data-theme="light"] .threat-section.fungus { background: linear-gradient(150deg, #f1fbea, #ffffff); }
:root[data-theme="light"] .rad-banner { color: #ffffff; }
:root[data-theme="light"] .tactic-card { background: linear-gradient(150deg, #fff0ee, #ffffff); }
:root[data-theme="light"] .tactic-card b { color: #a8232e; }
:root[data-theme="light"] .tech-node { background: #fff8e8; }

/* ---------- 星级 / 枪械表 / 防御树 / 难度 ---------- */
.star-rating { color: #e0a94a; letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.star-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 780px; }
.data-table th, .data-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.data-table th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-size: 11px; z-index: 1; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--panel-3); }
.data-table td b { color: #ff9b8d; }
.defense-columns { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; align-items: flex-start; }
.defense-col { flex: 0 0 172px; display: flex; flex-direction: column; gap: 7px; }
.defense-col-head { font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.defense-node { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.defense-node:hover { border-color: rgba(224,169,74,.5); background: var(--panel-3); }
.defense-node-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.defense-node-main b { font-size: 12px; line-height: 1.25; }
.defense-node-main small { color: var(--muted); font-size: 9.5px; }
.difficulty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.difficulty-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel-2); }
.difficulty-card.green { border-color: rgba(127,199,154,.4); }
.difficulty-card.blue { border-color: rgba(126,168,201,.4); }
.difficulty-card.amber { border-color: rgba(224,169,74,.45); }
.difficulty-card.red { border-color: rgba(224,80,60,.5); }
.difficulty-name { font-size: 18px; font-weight: 850; margin-bottom: 4px; }
.difficulty-sum { color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 10px; }
.difficulty-block { margin-top: 9px; font-size: 11.5px; line-height: 1.6; }
.difficulty-block b { color: var(--text); }
.difficulty-block ul { margin: 4px 0 0; padding-left: 17px; color: var(--muted); }

/* ---------- 全局小水印 ---------- */
.site-watermark {
  position: fixed;
  right: 10px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  max-width: 210px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(10, 12, 16, 0.28);
  color: rgba(230, 235, 242, 0.38);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(2px);
}
:root[data-theme="light"] .site-watermark { background: rgba(255,255,255,.35); color: rgba(30,40,55,.32); }
@media (max-width: 600px) { .site-watermark { right: 6px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); font-size: 8px; max-width: 170px; } }

/* ---------- 改枪台方案记录 ---------- */
.gs-record-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gs-record-hint { color: var(--muted); font-size: 10.5px; }
.gs-records { display: flex; flex-direction: column; gap: 6px; }
.gs-record { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.gs-record-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gs-record-main b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-record-main small { color: var(--muted); font-size: 9.5px; }
.gs-record-btn { border: 1px solid var(--line); background: var(--panel-3); color: var(--text); border-radius: 6px; padding: 4px 8px; font-size: 10px; cursor: pointer; }
.gs-record-btn:hover { border-color: var(--amber); }
.gs-record-btn.danger { color: #ff8b7c; }

/* ---------- 同阶星级 / 末日难度 ---------- */
.star-note { color: var(--muted); font-size: 10px; margin-left: 4px; }
.difficulty-card.purple { border-color: rgba(176,154,203,.55); background: linear-gradient(160deg, rgba(176,154,203,.09), var(--panel-2)); }
.difficulty-command { margin-top: 8px; padding: 4px 7px; border-radius: 6px; background: rgba(176,154,203,.1); color: #c9b6e0; font-size: 11px; font-family: ui-monospace, Consolas, monospace; }

/* ---------- 顶格：我的入口 + 居中 logo ---------- */
.topbar-center { flex: 1; min-width: 0; display: flex; justify-content: center; }
.brand-center { display: flex; align-items: center; }
.me-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.me-btn-label { font-size: 13px; font-weight: 700; }
.me-btn:hover { border-color: var(--amber); }

/* ---------- 我的 左侧半屏抽屉 ---------- */
.me-drawer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
body.me-open .me-drawer { pointer-events: auto; }
.me-drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); border: 0; cursor: pointer; }
.me-drawer-close { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; cursor: pointer; }
.me-drawer-close:hover { border-color: var(--amber); }
.me-drawer-panel { position: absolute; top: 0; left: 0; bottom: 0; width: 50%; max-width: 420px; min-width: 300px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; padding: calc(var(--safe-t) + 20px) 16px 40px; transform: translateX(-102%); transition: transform .24s ease; box-shadow: 20px 0 60px rgba(0,0,0,.35); }
body.me-open .me-drawer-panel { transform: translateX(0); }
.me-drawer-backdrop { display: none; }
body.me-open .me-drawer-backdrop { display: block; }

/* ---------- 电脑版 ---------- */
body.view-pc .app, body.view-pc .topbar, body.view-pc .tabbar { max-width: 1280px; }
body.view-pc .region-grid { grid-template-columns: repeat(4, 1fr); }
body.view-pc .hub-grid { grid-template-columns: repeat(4, 1fr); }
body.view-pc .view { padding-left: 28px; padding-right: 28px; }
body.view-pc .poster-carousel { height: 320px; }

/* ---------- 区域建筑海报轮播 ---------- */
.poster-section { margin-top: 4px; }
.poster-carousel { position: relative; height: 200px; border-radius: 16px; overflow: hidden; background: var(--panel-2); }
.poster-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.poster-slide.active { opacity: 1; z-index: 1; }
.poster-img { width: 100%; height: 100%; object-fit: cover; }
.poster-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(5,8,7,.82) 100%), linear-gradient(90deg, rgba(5,8,7,.35), transparent 60%); }
.poster-info { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.poster-name { font-size: 17px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); line-height: 1.25; }
.poster-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.poster-tier, .poster-climate, .poster-rad, .poster-horde { font-size: 10.5px; font-weight: 800; color: #fff; padding: 3px 8px; border-radius: 6px; letter-spacing: .03em; }
.poster-tier { background: var(--tier); }
.poster-climate { background: var(--climate); }
.poster-rad { background: #c9a227; color: #17130a; }
.poster-horde { background: rgba(224,60,50,.85); }
.poster-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.poster-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: all .2s; }
.poster-dot.active { background: var(--amber); width: 18px; border-radius: 4px; }

/* ---------- 辐射文字标签 ---------- */
.rc-rad-tag { display: inline-block; margin-left: 7px; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; color: #17130a; background: #e0a94a; vertical-align: 1px; }
.rad-banner-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 900; color: #17130a; background: #ffd45c; }

/* ---------- 社区在线版 ---------- */
.community-chat { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding: 4px 0; }
.chat-row { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; line-height: 1.5; padding: 5px 8px; border-radius: 8px; background: var(--panel-2); }
.chat-row b { color: var(--amber); flex: 0 0 auto; }
.chat-row span { color: var(--text); word-break: break-word; }
.community-form { display: flex; gap: 8px; margin-top: 10px; }
.community-form input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.community-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.community-photo { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.community-photo img { width: 100%; height: 90px; object-fit: cover; display: block; }
.community-photo figcaption { padding: 4px 6px; font-size: 10px; color: var(--muted); }

/* 电脑版铺满整个网页 */
body.view-pc .app,
body.view-pc .topbar,
body.view-pc .tabbar {
  max-width: none !important;
  width: 100% !important;
}
body.view-pc .view {
  padding-left: clamp(16px, 2.2vw, 40px) !important;
  padding-right: clamp(16px, 2.2vw, 40px) !important;
}
@media (min-width: 960px) {
  body.view-pc .view { padding-top: calc(var(--safe-t) + 82px); }
  body.view-pc .detail-hero { padding: 24px; }
  body.view-pc .detail-hero h1 { font-size: 30px; }
  body.view-pc .detail-stats { margin-top: 20px; }
  body.view-pc .detail-stats > div { padding: 14px 16px; }
  body.view-pc .detail-stats b { font-size: 20px; }
}

/* 海报保持比例，完整显示 */
.poster-carousel { height: auto !important; aspect-ratio: 4 / 3; background: #0b0f0d; }
.poster-img { object-fit: contain !important; background: #0b0f0d; }
body.view-pc .poster-carousel { height: min(62vh, 560px) !important; aspect-ratio: auto; }

/* 建筑列表分页 */
.page-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.page-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.page-btn:hover { border-color: var(--line-strong); }
.page-bar span { color: var(--muted); font-size: 13px; }

/* 海报 + 建筑档案侧栏 */
.poster-layout { display: flex; gap: 14px; align-items: stretch; }
.poster-main { flex: 1; min-width: 0; }
.poster-side { width: 300px; flex: 0 0 300px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.poster-side-kicker { font-size: 10px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.poster-side-name { font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.25; }
.poster-side-desc { font-size: 13px; line-height: 1.65; color: var(--muted); flex: 1; }
.poster-side-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.poster-side-stats span { font-size: 11px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; }
.poster-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.poster-nav-btn { width: 34px; height: 30px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; }
.poster-nav-btn:hover { border-color: var(--line-strong); }
#poster-index { font-size: 12px; color: var(--muted); }
.poster-dot { cursor: pointer; }
@media (max-width: 900px) {
  .poster-layout { flex-direction: column; }
  .poster-side { width: auto; flex: none; }
}

.guide-thumb.building-thumb { background-size: cover; background-position: center; border-radius: 9px; }

/* 小地图缩略图 + 放大查看 */
.poster-thumb-box { border-top: 1px solid var(--line); padding-top: 8px; display: flex; align-items: center; gap: 8px; }
.poster-thumb-box[hidden] { display: none !important; }
.poster-thumb-img { width: 76px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: var(--panel-2); }
.poster-thumb-open { flex: 1; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 8px 10px; font-weight: 700; cursor: pointer; }
.poster-thumb-open:hover { border-color: var(--line-strong); }
.poster-thumb-open:disabled { opacity: .4; cursor: default; }
.thumb-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(5,8,7,.86); display: flex; align-items: center; justify-content: center; padding: 20px; }
.thumb-modal[hidden] { display: none !important; }
.thumb-modal-inner { position: relative; max-width: 92vw; max-height: 90vh; }
.thumb-modal-inner img { max-width: 92vw; max-height: 86vh; display: block; border: 1px solid var(--line-strong); border-radius: 10px; background: #000; image-rendering: auto; }
.thumb-modal-close { position: absolute; top: -14px; right: -14px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 12px; }

/* 评级圆点：级数越高，白球越少 */
.threat-dots i { width: 8px !important; height: 8px !important; background: #ffffff !important; border: 1px solid #aab4ad; box-shadow: none; }
.threat-tag .threat-dots i.on { border-color: transparent; }

/* 评级实心点：特殊紫色，头目/灾厄红色 */
.threat-tag.special .threat-dots i.on,
.threat-tag.fungus .threat-dots i.on,
.threat-tag.minor .threat-dots i.on {
  background: #a97ad6 !important;
  border-color: #a97ad6 !important;
  box-shadow: 0 0 5px rgba(169, 122, 214, 0.65) !important;
}
.threat-tag.leader .threat-dots i.on,
.threat-tag.calamity .threat-dots i.on,
.threat-tag.normal .threat-dots i.on {
  background: #d94b45 !important;
  border-color: #d94b45 !important;
  box-shadow: 0 0 5px rgba(217, 75, 69, 0.6) !important;
}

/* 评级颜色：特殊紫、头目橙、Boss/灾厄红、真菌绿 */
.threat-tag.special .threat-dots i.on {
  background: #a97ad6 !important; border-color: #a97ad6 !important; box-shadow: 0 0 5px rgba(169,122,214,.65) !important;
}
.threat-tag.fungus .threat-dots i.on {
  background: #58b66a !important; border-color: #58b66a !important; box-shadow: 0 0 5px rgba(88,182,106,.6) !important;
}
.threat-tag.leader .threat-dots i.on,
.threat-tag.minor .threat-dots i.on {
  background: #e0913a !important; border-color: #e0913a !important; box-shadow: 0 0 5px rgba(224,145,58,.6) !important;
}
.threat-tag.boss .threat-dots i.on,
.threat-tag.calamity .threat-dots i.on {
  background: #d94b45 !important; border-color: #d94b45 !important; box-shadow: 0 0 5px rgba(217,75,69,.6) !important;
}

/* 装备 / 武器 大图浏览 */
.showcase { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.showcase-side { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px; position: sticky; top: 78px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; gap: 10px; }
.showcase-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.showcase-side-head h1 { font-size: 20px; margin: 0; }
.showcase-side-head span { font-size: 11px; color: var(--muted); }
.showcase-groups { max-height: none; overflow: visible; flex-wrap: wrap; }
.showcase-list { overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.showcase-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; color: var(--text); padding: 7px; border-radius: 9px; cursor: pointer; }
.showcase-item:hover { background: var(--panel-2); }
.showcase-item-thumb { width: 38px; height: 38px; flex: none; border-radius: 7px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.showcase-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.showcase-item-main { min-width: 0; display: flex; flex-direction: column; }
.showcase-item-main b { font-size: 12.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-item-main small { font-size: 10.5px; color: var(--muted); }
.showcase-main { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 18px; min-height: 520px; }
.showcase-visual { height: 260px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, var(--panel-2), var(--bg)); display: grid; place-items: center; overflow: hidden; margin-bottom: 14px; }
.showcase-img { width: 100%; height: 100%; max-width: 96%; max-height: 96%; object-fit: contain; padding: 10px; }
.showcase-icon { transform: scale(1.6); }
.showcase-kicker { font-size: 10px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.showcase-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.showcase-title-row h2 { margin: 3px 0 4px; font-size: 28px; line-height: 1.1; }
.showcase-sub { font-size: 12px; color: var(--muted); }
.showcase-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.showcase-stats div { border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; padding: 8px; text-align: center; }
.showcase-stats b { display: block; font-size: 19px; color: var(--amber); }
.showcase-stats span { font-size: 10px; color: var(--muted); }
.showcase-kv { display: grid; grid-template-columns: 58px minmax(0,1fr) 58px minmax(0,1fr) 58px minmax(0,1fr); word-break: break-all; gap: 6px 8px; font-size: 11.5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 0; }
.showcase-kv span { color: var(--muted); }
.showcase-desc { font-size: 12.5px; line-height: 1.65; color: var(--muted); margin-top: 10px; }
.showcase-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.showcase-label { font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-bottom: 6px; }
.showcase-list-kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.showcase-list-kv li { display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 4px 0; font-size: 11.5px; }
.showcase-list-kv span { color: var(--muted); }
.showcase-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase-side { position: static; max-height: none; }
  .showcase-list { max-height: 280px; }
  .showcase-columns { grid-template-columns: 1fr; }
  .showcase-stats { grid-template-columns: repeat(2, 1fr); }
}
.gs-bench-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; align-items: start; }
.gs-bench-col .section { margin-top: 0; }
@media (max-width: 820px) { .gs-bench-grid { grid-template-columns: 1fr; } }

.showcase-stats.five { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 700px) { .showcase-stats.five { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* T1–T4 区域总览 */
.tier-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.tier-card { position: relative; min-height: 320px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; padding: 0; background: var(--panel); cursor: pointer; color: var(--text); display: flex; flex-direction: column; justify-content: space-between; }
.tier-card.has-img { color: #fff; border-color: rgba(255,255,255,.12); }
.tier-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tier-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(5,8,7,.15) 0%, rgba(5,8,7,.35) 45%, rgba(5,8,7,.9) 100%); }
.tier-top, .tier-body { position: relative; z-index: 2; padding: 14px; }
.tier-top { display: flex; justify-content: space-between; align-items: center; }
.tier-code { font-size: 12px; font-weight: 900; letter-spacing: .18em; background: rgba(224,169,74,.92); color: #17120b; border-radius: 6px; padding: 4px 8px; }
.tier-card:not(.has-img) .tier-code { background: var(--amber); }
.tier-body h2 { margin: 0 0 4px; font-size: 26px; line-height: 1.05; }
.tier-body p { margin: 0 0 10px; font-size: 12px; opacity: .82; }
.tier-meta { font-size: 10.5px; letter-spacing: .04em; opacity: .78; }
@media (max-width: 1100px) { .tier-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .tier-grid { grid-template-columns: 1fr; } .tier-card { min-height: 230px; } }

/* 整体 UI / 字体放大 */

.b-size.super { padding: 2px 8px; border: 1px solid #d94b45; color: #d94b45; font-size: 11px; font-weight: 900; border-radius: 6px; letter-spacing: .04em; }

/* 更新日志 */
.log-list { display: flex; flex-direction: column; gap: 10px; }
.log-item { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; overflow: hidden; }
.log-item summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.log-item summary::-webkit-details-marker { display: none; }
.log-version { font-size: 12px; font-weight: 900; color: var(--amber); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.log-title { flex: 1; font-weight: 800; font-size: 14px; }
.log-count { font-size: 11px; color: var(--muted); }
.log-item ul { margin: 0; padding: 0 18px 14px 34px; display: flex; flex-direction: column; gap: 6px; }
.log-item li { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.log-item[open] summary { border-bottom: 1px solid var(--line); }

/* ===== 引入自「网站部署版」的前端样式（按本仓库 DOM 与双主题适配） ===== */

/* 卡片、按钮与徽标改为硬边，贴近部署版视觉 */
.chip, .icon-btn, .btn, .badge, .row-card, .hub-card, .region-card, .tier-card,
.detail-hero, .guide-note, .callout, .log-item { border-radius: 0 !important; }

.section { margin-top: 30px; }

/* 首页 Hero：深色背景图上使用浅色文字 */
.hero-kicker { color: #8ed36b !important; letter-spacing: .22em !important; }
.hero-title { font-size: clamp(34px, 5vw, 60px) !important; letter-spacing: -.03em !important; max-width: 720px; }
[data-theme="dark"] .hero .hero-title,
[data-theme="dark"] .hero .hero-stat .v { color: #fff !important; }
[data-theme="dark"] .hero .hero-desc { color: #d4d4d4 !important; }
[data-theme="dark"] .hero .hero-stat .k { color: #bcbcbc !important; }
[data-theme="light"] .hero-kicker { color: #3f8f4c !important; }
.hero-stats { margin-top: 18px !important; border-top: 1px solid var(--line-strong); padding-top: 18px; max-width: 720px; }
.hero-stat .v { font-size: 38px !important; }
.hero-stat .k { letter-spacing: .12em; }

@media (max-width: 899px) {
  .hero {
    border: 0 !important; border-radius: 0 !important;
    min-height: 480px !important; padding: 34px 18px 24px !important;
    justify-content: center !important; text-align: center;
  }
  .hero .hero-title { font-size: 34px !important; line-height: 1.08 !important; max-width: 100%; margin: 8px 0; }
  .hero .hero-desc { font-size: 12.5px !important; line-height: 1.55; max-width: 100%; margin: 0 auto; }
  .hero-stats { justify-content: space-between; gap: 8px; width: 100%; }
  .hero-stat { flex: 1; min-width: 0; }
  .hero-stat .v { font-size: 26px !important; }
  .hero-stat .k { font-size: 9px !important; }
  .section { margin-top: 24px; }
  .section-title { font-size: 13.5px !important; }
  .region-grid, .hub-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .detail-hero { border-left: 0 !important; border-right: 0 !important; }
}

/* 正文与列表可读性：比仓库默认略大，但不至于像部署版那样放大 1.5 倍 */
.hero-desc { font-size: 15px !important; line-height: 1.6; }
.row-sub { font-size: 13.5px !important; line-height: 1.5; }
.text-block, .callout, .log-item li { font-size: 14.5px !important; line-height: 1.7; }
.guide-note { font-size: 13.5px !important; line-height: 1.55; }
.item-name, .container-name { font-size: 15px !important; }
.kv, .kv dt, .kv dd { font-size: 15px !important; line-height: 1.6; }
.badge { font-size: 12px !important; padding: 3px 9px !important; }
