/* ============================================================
 *  修仙纪 · 样式
 * ============================================================ */
:root {
  --bg: #060910;
  --panel: rgba(15, 23, 36, 0.80);
  --panel2: rgba(22, 33, 50, 0.62);
  --line: rgba(130, 170, 200, 0.14);
  --line-strong: rgba(150, 190, 220, 0.28);
  --gold: #e8c07a;
  --gold-dim: #a8874c;
  --jade: #6fd6b0;
  --red: #e0655c;
  --blue: #7fb8e8;
  --purple: #b98cf0;
  --text: #dbe6f2;
  --dim: #8395a9;
  --dim2: #5d6d80;
  --r: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  overflow: hidden;
}

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(60, 130, 140, 0.16), transparent 60%),
    radial-gradient(900px 600px at 95% 8%, rgba(120, 90, 180, 0.12), transparent 62%),
    radial-gradient(800px 500px at 50% 110%, rgba(190, 150, 90, 0.08), transparent 60%),
    linear-gradient(180deg, #060910, #080d16 55%, #05080e);
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

h1, h2, h3, .serif, .brand, .char-name, .view-title, .res-title, .map-title, .tabs .tab {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", "Times New Roman", serif;
}

button { font-family: inherit; cursor: pointer; color: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(140, 175, 205, 0.22); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 顶部 ---------------- */
#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; width: 100%; max-width: 100vw; overflow: hidden; }

.topbar {
  position: relative; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 16, 26, 0.95), rgba(8, 12, 20, 0.72));
  backdrop-filter: blur(8px);
  flex: 0 0 auto;
}
.brand { font-size: 20px; letter-spacing: 3px; color: var(--gold); text-shadow: 0 0 18px rgba(232, 192, 122, 0.35); }
.brand span { font-size: 11px; letter-spacing: 2px; color: var(--dim); margin-left: 6px; }
.top-meta { display: flex; gap: 18px; align-items: center; margin-left: auto; font-size: 12.5px; color: var(--dim); flex-wrap: wrap; }
.top-meta b { color: var(--text); font-weight: 500; }
.top-meta .gold { color: var(--gold); }
.top-btns { display: flex; gap: 8px; }

.btn {
  border: 1px solid var(--line-strong);
  background: rgba(30, 44, 62, 0.55);
  color: var(--text);
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; letter-spacing: 1px;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(52, 74, 100, 0.75); border-color: rgba(200, 220, 240, 0.4); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, rgba(232, 192, 122, 0.92), rgba(190, 146, 74, 0.92));
  color: #14100a; border-color: rgba(255, 226, 170, 0.6); font-weight: 600;
  box-shadow: 0 4px 18px rgba(200, 150, 70, 0.25);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.mini { padding: 3px 9px; font-size: 11.5px; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* ---------------- 布局 ---------------- */
.layout {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 268px minmax(0, 1fr) 272px;
  gap: 12px; padding: 12px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  min-height: 0;
}
.char-panel { overflow-y: auto; padding: 14px; }
.char-info { min-width: 0; }
.layout > * { min-width: 0; }
.log-panel { display: flex; flex-direction: column; overflow: hidden; }
.main-panel { display: flex; flex-direction: column; overflow: hidden; }

/* ---------------- 人物卡 ---------------- */
.char-art { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #070b12; }
.char-art svg { display: block; width: 100%; height: auto; }
.char-art .realm-badge {
  position: absolute; left: 8px; top: 8px; font-size: 11px; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 20px; background: rgba(6, 10, 16, 0.7);
  border: 1px solid var(--line-strong); color: var(--gold);
}
.char-name { font-size: 19px; margin: 10px 0 2px; letter-spacing: 2px; display: flex; align-items: baseline; gap: 8px; }
.char-name small { font-size: 11.5px; color: var(--dim); letter-spacing: 0; font-family: inherit; }
.char-sub { font-size: 12px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); font-size: 11px; }
.tag.jade { color: var(--jade); border-color: rgba(111, 214, 176, 0.3); }
.tag.gold { color: var(--gold); border-color: rgba(232, 192, 122, 0.3); }
.tag.purple { color: var(--purple); border-color: rgba(185, 140, 240, 0.3); }

.bar {
  position: relative; height: 14px; border-radius: 8px; overflow: hidden;
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.05);
  margin: 5px 0; font-size: 10px;
}
.bar i { display: block; height: 100%; border-radius: 8px; transition: width .35s ease; }
.bar b {
  position: absolute; right: 7px; top: 0; line-height: 13px; font-weight: 400;
  color: rgba(255, 255, 255, 0.72); font-size: 9.5px; letter-spacing: .5px;
}
.bar.hp i { background: linear-gradient(90deg, #b8443c, #e0655c); }
.bar.mp i { background: linear-gradient(90deg, #2f6fa8, #6fb0e8); }
.bar.qi i { background: linear-gradient(90deg, #a07b34, #e8c07a); }
.bar.exp i { background: linear-gradient(90deg, #2f7a68, #6fd6b0); }

.lbl { font-size: 11px; color: var(--dim2); letter-spacing: 1px; margin: 10px 0 4px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 9px; border-radius: 7px; background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.04); font-size: 12px;
}
.stat span { color: var(--dim); }
.stat b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

.equip-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.equip-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 1px dashed rgba(255, 255, 255, 0.09); border-radius: 7px;
  font-size: 12px; cursor: pointer; transition: all .15s;
}
.equip-row:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.equip-row .slot-name { color: var(--dim2); width: 34px; flex: 0 0 auto; font-size: 11px; }
.equip-row .slot-val { color: var(--dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equip-row .plus { color: var(--gold); font-size: 11px; }

/* ---------------- 页签 ---------------- */
.tabs {
  display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line);
  overflow-x: auto; flex: 0 0 auto; scrollbar-width: none; min-width: 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 9px 15px 10px; font-size: 14px; letter-spacing: 2px;
  color: var(--dim); background: none; border: none; white-space: nowrap; transition: color .18s;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold); }
.tab.on::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 12px rgba(232, 192, 122, 0.5);
}
.tab .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: middle; }

.view { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; }

/* ---------------- 通用块 ---------------- */
.view-title { font-size: 17px; letter-spacing: 3px; color: var(--gold); display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.view-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.view-sub { font-size: 12px; color: var(--dim); margin-bottom: 12px; line-height: 1.7; }

.card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008));
  margin-bottom: 10px;
}
.card-title { font-size: 13px; color: var(--gold); letter-spacing: 1.5px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }

.scene-banner {
  position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  margin-bottom: 12px; height: 236px;
}
.scene-banner svg { width: 100%; height: 100%; display: block; filter: brightness(1.18) saturate(1.05); }
.scene-banner .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 14, 0.92));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.scene-banner .cap h3 { margin: 0 0 3px; font-size: 16px; letter-spacing: 2px; color: #fff; font-weight: 500; }
.scene-banner .cap p { margin: 0; font-size: 11.5px; color: rgba(210, 225, 240, 0.7); max-width: 74%; line-height: 1.6; }
.scene-banner .stamp {
  font-size: 10.5px; color: var(--gold); border: 1px solid rgba(232, 192, 122, 0.4);
  padding: 3px 8px; border-radius: 3px; letter-spacing: 2px; flex: 0 0 auto;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.muted { color: var(--dim); }
.gold { color: var(--gold); }
.jade { color: var(--jade); }
.red { color: var(--red); }

/* ---------------- 地图 ---------------- */
.region-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px; border-radius: 20px; font-size: 12px; color: var(--dim);
  transition: all .16s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.on { color: var(--gold); border-color: rgba(232, 192, 122, 0.45); background: rgba(232, 192, 122, 0.08); }
.chip.locked { opacity: .45; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.map-col { min-width: 0; }
.map-box { position: relative; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: #070c14; }
.map-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 6px; }
.tile {
  position: relative; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.05);
  background: none; padding: 0; border-radius: 4px; overflow: hidden;
  transition: all .16s ease;
}
.tile svg { display: block; width: 100%; height: 100%; filter: brightness(1.18) saturate(1.05); }
.tile.reach { border-color: rgba(232, 192, 122, 0.62); box-shadow: inset 0 0 16px rgba(232, 192, 122, 0.18); cursor: pointer; }
.tile:disabled { cursor: default; }
.tile.reach:hover { transform: scale(1.04); box-shadow: 0 0 16px rgba(232, 192, 122, 0.35); z-index: 2; }
.tile.cur { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(232, 192, 122, 0.4); z-index: 3; }
.tile.cur::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff, 0 0 20px var(--gold);
  animation: pulse 1.6s infinite;
}
.tile.cleared { opacity: .34; }
.tile.visited { opacity: .82; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.35); opacity: .55; } }

.map-side .card { margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 11.5px; color: var(--dim); }
.legend i { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 3px; margin-right: 4px; font-style: normal; font-size: 10px; }

/* ---------------- 物品 ---------------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.item-card {
  position: relative; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 6px 7px; text-align: center; background: rgba(255, 255, 255, 0.02);
  cursor: pointer; transition: all .16s;
}
.item-card:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.item-card .ico {
  width: 34px; height: 34px; margin: 0 auto 5px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  font-family: "Noto Serif SC", serif; border: 1px solid rgba(255, 255, 255, 0.08);
}
.item-card .nm { font-size: 11px; color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card .qty { position: absolute; right: 4px; top: 3px; font-size: 9.5px; color: var(--dim); }
.item-card .eq {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; color: #06130e;
  background: rgba(111, 214, 176, .85); padding: 1px 0; letter-spacing: 1px;
  border-radius: 0 0 7px 7px;
}
.item-card.r0 .ico { color: #9aa4b2; }
.item-card.r1 .ico { color: #6fd6a0; border-color: rgba(111, 214, 160, .3); }
.item-card.r2 .ico { color: #6fa8e8; border-color: rgba(111, 168, 232, .3); }
.item-card.r3 .ico { color: #b98cf0; border-color: rgba(185, 140, 240, .3); }
.item-card.r4 .ico { color: #e8b45c; border-color: rgba(232, 180, 92, .35); }

/* ---------------- 配方 / 列表 ---------------- */
.rec-list { display: flex; flex-direction: column; gap: 7px; }
.rec-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02);
}
.rec-row .rec-main { flex: 1; min-width: 0; }
.rec-row .rec-name { font-size: 13px; color: var(--text); }
.rec-row .rec-need { font-size: 11px; color: var(--dim); margin-top: 3px; }
.rec-row .rec-need .lack { color: var(--red); }
.rec-row .rec-rate { font-size: 11px; color: var(--dim); text-align: right; width: 62px; flex: 0 0 auto; }

/* ---------------- 宗门 ---------------- */
.sect-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.sect-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: rgba(255,255,255,.02); transition: all .18s; }
.sect-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.sect-card h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: 2px; }
.sect-card .motto { font-size: 11.5px; color: var(--dim); font-style: italic; margin: 6px 0 8px; }
.sect-card p { font-size: 12px; color: var(--dim); line-height: 1.6; margin: 0 0 10px; }

.rank-line { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.rank-line.on { color: var(--gold); }

/* ---------------- 灵兽 ---------------- */
.beast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.beast-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px; background: rgba(255,255,255,.022); }
.beast-card.active { border-color: rgba(111, 214, 176, 0.4); box-shadow: 0 0 18px rgba(111, 214, 176, 0.1); }
.beast-card .bh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.beast-art { height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.beast-art svg { height: 100%; width: auto; transform: scale(1.35); filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }

/* ---------------- 日志 ---------------- */
.log-head { padding: 11px 14px 8px; font-size: 12px; letter-spacing: 3px; color: var(--gold); border-bottom: 1px solid var(--line); }
.log-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column-reverse; gap: 5px; font-size: 11.8px; line-height: 1.55; }
.log-item { color: var(--dim); border-left: 2px solid rgba(255, 255, 255, 0.07); padding-left: 8px; }
.log-item.gold { color: var(--gold); border-color: rgba(232, 192, 122, .4); }
.log-item.jade { color: var(--jade); border-color: rgba(111, 214, 176, .35); }
.log-item.red { color: var(--red); border-color: rgba(224, 101, 92, .4); }
.log-item.item { color: #9fc8e8; border-color: rgba(127, 184, 232, .3); }
.log-item.dim { color: var(--dim2); }
.log-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--dim2); line-height: 1.6; }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 150; background: rgba(3, 6, 11, 0.74);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; transition: opacity .2s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, #101a28, #0a111c);
  border: 1px solid rgba(150, 190, 220, 0.2); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); padding: 18px 20px;
  transform: translateY(10px) scale(.98); transition: transform .22s;
}
.modal-backdrop.show .modal { transform: none; }
.modal.wide { width: min(820px, 100%); }
.modal h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: 2px; color: var(--gold); font-weight: 500; }
.modal .m-sub { font-size: 11.5px; color: var(--dim); margin-bottom: 12px; }
.modal p { font-size: 13px; line-height: 1.85; color: #c6d4e2; margin: 0 0 12px; }
.modal .m-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.modal .m-actions .btn { text-align: left; padding: 11px 14px; line-height: 1.5; }
.modal .m-actions .btn small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.modal .m-close { position: absolute; right: 10px; top: 8px; }

/* ---------------- 提示 ---------------- */
#toastRoot { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(12, 20, 32, 0.95); border: 1px solid rgba(150, 190, 220, 0.25);
  color: var(--text); padding: 9px 18px; border-radius: 22px; font-size: 12.5px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: toastIn .25s ease;
}
.toast.gold { border-color: rgba(232, 192, 122, .5); color: var(--gold); }
.toast.red { border-color: rgba(224, 101, 92, .5); color: #f0a09a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------------- 战斗 ---------------- */
.battle-overlay {
  position: fixed; inset: 0; z-index: 200; opacity: 0; transition: opacity .28s;
  display: flex; flex-direction: column; pointer-events: none;
}
.battle-overlay.show { opacity: 1; pointer-events: auto; }
.battle-bg { position: absolute; inset: 0; }
.battle-bg svg { width: 100%; height: 100%; display: block; }
.battle-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, transparent 26%, rgba(2, 5, 9, 0.58) 100%),
              linear-gradient(180deg, rgba(2, 5, 9, 0.58), transparent 20%, transparent 54%, rgba(2, 5, 9, 0.88));
}
.battle-head { position: relative; padding: 16px 22px 0; display: flex; align-items: baseline; gap: 14px; }
.battle-title { font-size: 17px; letter-spacing: 4px; color: var(--gold); font-family: "Noto Serif SC", serif; }
.battle-turn { font-size: 11.5px; color: rgba(200, 215, 230, .6); }
.battle-stage {
  position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center;
  gap: 34px; padding: 4px 20px 26px; min-height: 0; flex-wrap: wrap;
  background: radial-gradient(ellipse 56% 26% at 50% 88%, rgba(150, 220, 200, 0.14), transparent 70%);
}
.mob-card { width: 172px; text-align: center; transition: transform .2s; position: relative; }
.mob-aura {
  position: absolute; left: 50%; bottom: 16px; width: 132%; height: 74%;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 72%, var(--au, #6fd6b0) 0%, transparent 66%);
  opacity: .2; filter: blur(14px); z-index: 0;
}
.mob-card.boss .mob-aura { width: 118%; height: 58%; bottom: 40px; opacity: .26; filter: blur(22px); }
.mob-art, .mob-name, .mob-card .bar, .mob-hp { position: relative; z-index: 1; }
.mob-card.boss .mob-art svg { transform: scale(1.04); }
.mob-art { height: 200px; display: flex; align-items: flex-end; justify-content: center; }
.mob-art svg { height: 100%; width: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.mob-card.boss { width: 260px; }
.mob-card.boss .mob-art { height: 380px; }
.mob-card.boss .mob-art svg { height: 100%; }
.mob-card.boss .mob-art svg { filter: drop-shadow(0 0 24px rgba(224, 80, 70, .35)); }
.mob-card.dead { opacity: .18; filter: grayscale(1); transform: translateY(8px) scale(.94); }
.mob-name {
  font-size: 12.5px; color: #e8f2fc; margin-bottom: 4px; font-family: "Noto Serif SC", serif;
  text-shadow: 0 1px 4px #000;
}
.mob-name span { color: var(--dim); font-size: 10px; }
.mob-name em { font-style: normal; color: var(--red); font-size: 10px; border: 1px solid rgba(224,101,92,.4); padding: 0 4px; border-radius: 3px; margin-left: 3px; }
.mob-hp { font-size: 10px; color: rgba(232, 240, 248, .8); margin-top: 3px; letter-spacing: .5px; text-shadow: 0 1px 3px #000; }
.mob-card .bar { height: 7px; margin: 0; }
.mob-card .bar i { background: linear-gradient(90deg, #8a2b28, #e0655c); }

.battle-foot {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 22px 18px; gap: 16px; flex-wrap: wrap;
}
.fighter { display: flex; gap: 10px; align-items: center; max-width: 380px; position: relative; }
.fp-art {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  border: 1px solid rgba(232, 192, 122, .4); box-shadow: 0 0 20px rgba(232, 192, 122, .16);
  background: #0a121c;
}
.fp-art svg { display: block; width: 100%; height: 100%; }
.fp-info { min-width: 190px; flex: 1; }
.fp-name { font-size: 13px; margin-bottom: 4px; font-family: "Noto Serif SC", serif; }
.fp-name span { font-size: 10.5px; color: var(--gold); margin-left: 5px; }
.fp-beast { font-size: 10px; color: var(--jade); margin-top: 2px; }
.fighter .bar { height: 12px; }
.fighter .bar b { line-height: 11px; }

.battle-actions { flex: 1 1 380px; max-width: 520px; }
.act-row { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.act {
  display: flex; align-items: center; gap: 7px; padding: 9px 13px;
  border: 1px solid rgba(150, 190, 220, 0.24); border-radius: 9px;
  background: linear-gradient(180deg, rgba(28, 42, 60, .92), rgba(14, 22, 34, .92));
  font-size: 12.5px; letter-spacing: 1px; transition: all .15s;
}
.act:hover:not(:disabled) { border-color: rgba(232, 192, 122, .5); background: linear-gradient(180deg, rgba(44, 62, 86, .95), rgba(22, 34, 50, .95)); transform: translateY(-2px); }
.act:disabled { opacity: .4; }
.act .ai {
  width: 20px; height: 20px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; background: rgba(232, 192, 122, .14); color: var(--gold); font-family: "Noto Serif SC", serif;
}
.act.ghost { border-color: rgba(255,255,255,.1); }
.act.spell, .act.item { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 11px; min-width: 140px; }
.act .sn { font-size: 12.5px; color: var(--gold); }
.act .sc { position: absolute; right: 8px; top: 7px; font-size: 9.5px; color: var(--blue); }
.act.spell { position: relative; }
.act .sd { font-size: 10px; color: var(--dim); }
.act-grid { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-height: 150px; overflow-y: auto; }
.sub-head { font-size: 11px; color: var(--dim); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.empty-note { font-size: 12px; color: var(--dim2); padding: 12px; text-align: center; }

.battle-logline {
  position: relative; padding: 6px 24px 8px; min-height: 28px;
  display: flex; flex-direction: column; gap: 2px; font-size: 11.5px;
}
.bl { color: rgba(200, 215, 230, .8); }
.bl.gold { color: var(--gold); }
.bl.jade { color: var(--jade); }
.bl.red { color: #f0928a; }
.bl.enemy { color: #f0a89a; }
.bl.player { color: #a8d0f0; }
.bl.dim { color: var(--dim); }

.float-num {
  position: absolute; left: 50%; top: 34%; transform: translateX(-50%);
  font-size: 20px; font-weight: 700; color: #ff9a8a; text-shadow: 0 2px 8px rgba(0,0,0,.9);
  animation: floatUp .9s ease-out forwards; pointer-events: none; z-index: 5;
  font-family: "Noto Serif SC", serif;
}
.float-num.crit { font-size: 27px; color: #ffd08a; }
.float-num.player { color: #ff8a7a; top: 20%; }
.float-num.player.heal { color: #8ff0b8; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); }
  22% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}
.shake { animation: shake .34s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  55% { transform: translateX(5px); }
  80% { transform: translateX(-3px); }
}

.battle-result {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(2, 5, 9, 0.7); backdrop-filter: blur(4px); z-index: 10;
}
.battle-result.show { display: flex; animation: toastIn .3s ease; }
.res-card {
  width: min(360px, 88vw); text-align: center; padding: 26px 24px;
  background: linear-gradient(180deg, rgba(22, 34, 50, .97), rgba(10, 16, 26, .97));
  border: 1px solid rgba(232, 192, 122, .35); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.65), inset 0 0 60px rgba(232,192,122,.05);
}
.res-title { font-size: 26px; letter-spacing: 10px; color: var(--gold); margin-bottom: 14px; text-shadow: 0 0 30px rgba(232,192,122,.4); }
.res-card.lose .res-title { color: var(--red); text-shadow: 0 0 30px rgba(224,101,92,.35); }
.res-line { font-size: 13px; color: #c6d4e2; padding: 4px 0; }
.res-line b { color: var(--gold); font-weight: 500; }
.res-line.dim { color: var(--dim); font-size: 12px; }
.res-card .btn { margin-top: 14px; width: 100%; }

/* ---------------- 开局 ---------------- */
.create-screen {
  position: fixed; inset: 0; z-index: 180; overflow-y: auto;
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.create-bg { position: fixed; inset: 0; z-index: -1; }
.create-bg svg { width: 100%; height: 100%; filter: brightness(1.25) saturate(1.1); }
.create-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(3,7,12,.22), rgba(3,7,12,.82) 82%); }
.create-box { width: min(940px, 100%); }
.create-title { text-align: center; margin-bottom: 22px; }
.create-title h1 { font-size: 40px; letter-spacing: 16px; margin: 0 0 6px; color: #f0dfc0; text-shadow: 0 0 40px rgba(232,192,122,.35); font-weight: 500; }
.create-title p { margin: 0; font-size: 12px; letter-spacing: 5px; color: var(--dim); }
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-panel { border: 1px solid rgba(150,190,220,.16); border-radius: 12px; padding: 14px 16px; background: rgba(10,16,26,.8); backdrop-filter: blur(8px); }
.create-panel h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: 2px; color: var(--gold); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.root-show { text-align: center; padding: 8px 0 4px; }
.root-show .rt { filter: brightness(1.35); font-size: 22px; letter-spacing: 3px; margin-bottom: 6px; }
.root-show .re { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 6px 0 8px; }
.root-show .re span { padding: 3px 10px; border-radius: 20px; font-size: 12px; border: 1px solid; }
.root-show .rd { font-size: 11.5px; color: var(--dim); line-height: 1.6; }
.talent-list { display: flex; flex-direction: column; gap: 6px; }
.talent-pick {
  border: 1px solid rgba(255,255,255,.09); border-radius: 8px; padding: 8px 11px;
  background: rgba(255,255,255,.02); text-align: left; transition: all .16s;
}
.talent-pick:hover { border-color: rgba(232,192,122,.4); background: rgba(232,192,122,.05); }
.talent-pick.on { border-color: var(--gold); background: rgba(232,192,122,.1); }
.talent-pick b { font-size: 13px; color: var(--text); font-weight: 500; }
.talent-pick small { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }
.origin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.origin-pick { border: 1px solid rgba(255,255,255,.09); border-radius: 8px; padding: 8px; background: rgba(255,255,255,.02); text-align: left; transition: all .16s; }
.origin-pick:hover { border-color: rgba(232,192,122,.35); }
.origin-pick.on { border-color: var(--gold); background: rgba(232,192,122,.08); }
.origin-pick b { font-size: 12.5px; font-weight: 500; }
.origin-pick small { display: block; font-size: 10.5px; color: var(--dim); line-height: 1.5; margin-top: 3px; }
.name-in {
  width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); outline: none; font-family: inherit;
}
.name-in:focus { border-color: rgba(232,192,122,.5); background: rgba(232,192,122,.05); }
.create-foot { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.create-foot .btn { padding: 11px 34px; font-size: 14px; letter-spacing: 3px; }

/* ---------------- 动画 ---------------- */
.art-fire { animation: drift 4s ease-in-out infinite; }
@keyframes drift { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-12px); opacity: .9; } }
.art-lantern { animation: sway 3.4s ease-in-out infinite; transform-origin: top center; }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.mob-idle { animation: idle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes idle { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.015); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr) 232px; gap: 10px; padding: 10px; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .char-panel { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; overflow: visible; align-items: start; }
  .char-panel .char-art { grid-row: auto; }
  .char-panel .equip-wrap, .char-panel .lbl, .char-panel .stat-grid { display: none; }
  .log-panel { display: none; }
  .main-panel { min-height: 62vh; }
  .map-layout { grid-template-columns: 1fr; }
  .create-grid { grid-template-columns: 1fr; }
  .brand { font-size: 16px; letter-spacing: 2px; white-space: nowrap; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .top-meta { margin-left: 0; width: 100%; order: 3; justify-content: space-between; }
  .top-btns { margin-left: auto; }
  .brand span { display: none; }
  .top-meta { gap: 10px; font-size: 11px; }
  .top-btns .btn { padding: 6px 9px; font-size: 12px; }
}
@media (max-width: 620px) {
  .battle-stage { gap: 8px; }
  .mob-card { width: 112px; }
  .mob-art { height: 108px; }
  .mob-card.boss { width: 160px; }
  .mob-card.boss .mob-art { height: 168px; }
  .battle-foot { padding: 0 12px 12px; }
  .fighter { max-width: 100%; }
  .fp-art { width: 48px; }
  .battle-actions { max-width: 100%; flex: 1 1 100%; }
  .act-row { justify-content: stretch; }
  .act { flex: 1; justify-content: center; padding: 9px 8px; }
  .act.spell, .act.item { min-width: 118px; }
  .scene-banner { height: 140px; }
  .scene-banner .cap p { display: none; }
  .create-title h1 { font-size: 28px; letter-spacing: 8px; }
  .tab { padding: 8px 10px 9px; font-size: 13px; letter-spacing: 1px; }
  .tabs { padding: 6px 8px 0; }
  .tile.cur::after { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
  .view { padding: 10px 10px 16px; }
}

/* ============================================================
 *  场景原画层（位图优先 / SVG 兜底）
 * ============================================================ */
.scene-layer { position: absolute; inset: 0; overflow: hidden; }
.scene-layer > svg.art-scene,
.scene-layer > img.scene-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.scene-layer > img.scene-photo {
  object-fit: cover; object-position: center 46%;
  filter: saturate(1.08) brightness(1.1) contrast(1.02);
}
.scene-layer .scene-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(4, 8, 14, 0) 38%, rgba(4, 8, 14, 0.42) 100%),
    linear-gradient(180deg, rgba(4, 8, 14, 0.16), rgba(4, 8, 14, 0) 34%, rgba(4, 8, 14, 0.62));
}
.scene-banner { height: 258px; }
.scene-banner .cap { z-index: 4; }
.scene-banner .cap h3 { text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.battle-bg .scene-layer img { object-position: center 42%; filter: brightness(0.82) saturate(1.06); }
.battle-bg .scene-layer .scene-sheen { background: linear-gradient(180deg, rgba(4, 8, 14, .5), rgba(4, 8, 14, .1) 40%, rgba(4, 8, 14, .55)); }
.create-bg .scene-layer img { object-position: center 40%; filter: brightness(0.72) saturate(1.02); }

/* 光尘 */
.scene-motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.scene-motes i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 186, .95), rgba(255, 232, 186, 0) 70%);
  animation: moteRise linear infinite;
}
@keyframes moteRise {
  0% { transform: translateY(24px) scale(.6); opacity: 0; }
  18% { opacity: .85; }
  100% { transform: translateY(-150px) scale(1.1); opacity: 0; }
}

/* ============================================================
 *  音律控件
 * ============================================================ */
.music-wrap { position: relative; }
.music-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; }
.music-btn .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.music-btn .music-note { display: none; font-size: 14px; line-height: 1; color: var(--jade); font-family: serif; }
.music-btn.playing .music-note { color: var(--gold); text-shadow: 0 0 8px rgba(232, 192, 122, .8); }
.music-btn .eq i {
  width: 2.5px; height: 4px; border-radius: 1px; background: var(--jade);
  transition: height .2s;
}
.music-btn.playing .eq i { animation: eqBar .9s ease-in-out infinite; }
.music-btn.playing .eq i:nth-child(1) { animation-delay: 0s; }
.music-btn.playing .eq i:nth-child(2) { animation-delay: .18s; }
.music-btn.playing .eq i:nth-child(3) { animation-delay: .36s; }
.music-btn.playing .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eqBar { 0%, 100% { height: 3px; opacity: .55; } 50% { height: 11px; opacity: 1; } }
.music-btn .mtxt { font-size: 11.5px; letter-spacing: 1px; color: var(--dim); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-btn.playing .mtxt { color: var(--gold); }

.music-pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 272px; z-index: 80;
  background: linear-gradient(180deg, #101b2a, #0a121d);
  border: 1px solid rgba(232, 192, 122, .32); border-radius: 12px; padding: 13px 14px 15px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .62), 0 0 0 1px rgba(0, 0, 0, .3) inset;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.music-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.music-pop h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: 2px; color: var(--gold); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.music-pop h4 .mp-close { font-size: 14px; color: var(--dim); cursor: pointer; padding: 0 2px; }
.mp-row { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.mp-row label { font-size: 11.5px; color: var(--dim); flex: 0 0 auto; }
.mp-row input[type=range] {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(232, 192, 122, .75), rgba(232, 192, 122, .2));
  outline: none; cursor: pointer;
}
.mp-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: none; box-shadow: 0 0 9px rgba(232, 192, 122, .75);
}
.mp-row input[type=range]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: var(--gold);
  border: none; box-shadow: 0 0 9px rgba(232, 192, 122, .75);
}
.mp-val { font-size: 11px; color: var(--text); width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.trk-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.trk {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035); transition: all .16s; cursor: pointer;
}
.trk b { font-size: 12px; font-weight: 500; color: var(--text); letter-spacing: .5px; }
.trk small { font-size: 10.5px; color: var(--dim); }
.trk:hover { border-color: rgba(232, 192, 122, .34); background: rgba(232, 192, 122, .05); }
.trk.on { border-color: rgba(232, 192, 122, .6); background: rgba(232, 192, 122, .1); }
.trk.on b { color: var(--gold); }
.mp-tip { font-size: 11px; color: rgba(168, 185, 204, .95); line-height: 1.7; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .07); }
.mp-toggle {
  flex: 0 0 auto; width: 40px; height: 22px; border-radius: 20px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05); position: relative; transition: all .18s;
}
.mp-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--dim); transition: all .18s;
}
.mp-toggle.on { background: rgba(111, 214, 176, .24); border-color: rgba(111, 214, 176, .55); }
.mp-toggle.on::after { left: 20px; background: var(--jade); box-shadow: 0 0 8px rgba(111, 214, 176, .7); }

/* ============================================================
 *  典籍 · 图鉴
 * ============================================================ */
.codex-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.region-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: rgba(14, 22, 34, .72); transition: transform .18s, border-color .18s;
}
.region-card:hover { transform: translateY(-2px); border-color: rgba(232, 192, 122, .34); }
.region-card .thumb {
  position: relative; height: 112px; overflow: hidden;
  background: linear-gradient(120deg, #0a1420 0%, #101d2c 46%, #0a1420 100%);
}
.region-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.92); }
.region-card .thumb .ph { position: absolute; inset: 0; }
.region-card .thumb .ph svg { width: 100%; height: 100%; display: block; }
.region-card .thumb .lv {
  position: absolute; right: 6px; top: 6px; font-size: 10px; color: #f4e6c8;
  background: rgba(6, 10, 18, .7); border: 1px solid rgba(232, 192, 122, .3);
  padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(4px);
}
.region-card .body { padding: 9px 11px 10px; }
.region-card .body b { font-size: 13px; letter-spacing: 1px; font-family: "Noto Serif SC", serif; }
.region-card .body p { margin: 4px 0 0; font-size: 10.5px; color: var(--dim); line-height: 1.55; }
.region-card.locked .thumb img, .region-card.locked .thumb .ph { filter: grayscale(.85) brightness(.62); }
.region-card.locked .body b { color: var(--dim); }

.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mon-card {
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 6px 8px; text-align: center;
  background: rgba(14, 22, 34, .68);
}
.mon-card .ma { height: 84px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mon-card .ma svg { height: 100%; width: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.mon-card b { display: block; font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.mon-card small { font-size: 10px; color: var(--dim); }
.mon-card.locked .ma svg { filter: brightness(.22) grayscale(1); }
.mon-card.locked b { color: var(--dim2); }

.recipe-list { display: flex; flex-direction: column; gap: 7px; }
.recipe-row {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(14, 22, 34, .6);
}
.recipe-row .rname { flex: 1; min-width: 0; }
.recipe-row .rname b { font-size: 12.5px; font-weight: 500; }
.recipe-row .rname small { display: block; font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.recipe-row .ring { font-size: 10.5px; color: var(--dim); text-align: right; white-space: nowrap; }

/* 天象 */
.wx { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--blue); }
.wx b { font-weight: 500; color: var(--text); }
.hero-card { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); }
.hero-card .hc-bg { position: absolute; inset: 0; }
.hero-card .hc-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) saturate(1.05); }
.hero-card .hc-body { position: relative; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }

@media (max-width: 980px) {
  .music-pop { right: -6px; width: 250px; }
  .music-btn .mtxt, .music-btn .eq { display: none; }
  .music-btn .music-note { display: inline-block; font-size: 15px; }
  .music-btn { padding: 5px 9px; }
  .scene-banner { height: 190px; }
  .codex-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .region-card .thumb { height: 92px; }
}
@media (max-width: 620px) {
  .scene-banner { height: 156px; }
  .music-pop { width: min(270px, 78vw); }
  .mon-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
  .mon-card .ma { height: 68px; }
}

/* 洞府：天象 / 传闻 / 场景右侧信息 */
.scene-banner .cap-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.wx i {
  font-style: normal; display: inline-flex; width: 17px; height: 17px; border: 1px solid;
  border-radius: 4px; align-items: center; justify-content: center; font-size: 10px;
  font-family: "Noto Serif SC", serif; margin-right: 5px; vertical-align: -2px;
}
.wx-glyph {
  width: 54px; height: 54px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  border: 1px solid; border-radius: 9px; font-size: 23px; font-family: "Noto Serif SC", serif;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .07), rgba(255, 255, 255, .01));
  box-shadow: 0 0 22px rgba(0, 0, 0, .35) inset;
}
.rumor {
  font-size: 12.5px; line-height: 1.8; color: #c3d2e2; padding-left: 10px;
  border-left: 2px solid rgba(232, 192, 122, .45);
  font-family: "Noto Serif SC", "Songti SC", serif;
}
.scene-banner .cap .stamp { backdrop-filter: blur(3px); }

/* 图鉴卡片按钮复位 */
button.region-card, button.mon-card {
  font-family: inherit; color: inherit; padding: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
button.region-card { display: block; width: 100%; text-align: left; }
button.mon-card { display: block; width: 100%; }
button.mon-card:hover { border-color: rgba(232, 192, 122, .34); background: rgba(22, 33, 50, .8); }
.region-card .body .rank-line { padding: 2px 0; }

.create-hint {
  grid-column: 1 / -1; text-align: center; font-size: 11px; color: rgba(150, 168, 188, .75);
  letter-spacing: .5px; line-height: 1.6; margin-top: 2px;
}

/* ============================================================
 *  服饰（霓裳阁）
 * ============================================================ */
.cloth-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 14px; align-items: start; }
.cloth-left { min-width: 0; }
.cloth-preview {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #070b12;
}
.cloth-preview svg { display: block; width: 100%; height: auto; }
.cp-tag {
  position: absolute; left: 8px; top: 8px; font-size: 10.5px; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 12px; background: rgba(6, 10, 16, .72);
  border: 1px solid var(--line-strong); color: var(--gold);
}
.cloth-agg { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.ca-lines { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--jade); line-height: 1.7; }
.cloth-slots { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cloth-slot {
  display: flex; align-items: center; gap: 9px; padding: 5px 8px;
  border: 1px dashed rgba(255,255,255,.09); border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.cloth-slot.filled { border-style: solid; border-color: var(--line); background: rgba(255,255,255,.02); }
.cloth-slot.filled:hover { border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.cs-ico { width: 36px; height: 36px; flex: 0 0 auto; }
.cs-ico svg { width: 100%; height: 100%; display: block; }
.cs-empty {
  display: flex; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px;
  align-items: center; justify-content: center; color: var(--dim2); font-style: normal;
  font-family: "Noto Serif SC", serif; font-size: 15px;
}
.cs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-cat { font-size: 10px; color: var(--dim2); }
.cs-main b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-off { flex: 0 0 auto; }

.outfit-list { display: flex; flex-direction: column; gap: 6px; }
.outfit-chip { display: flex; gap: 6px; }
.o-apply {
  flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,.03); font-size: 12.5px; transition: all .15s;
}
.o-apply:hover { border-color: rgba(232,192,122,.4); background: rgba(232,192,122,.06); }
.o-apply small { color: var(--dim); font-size: 10.5px; flex: 0 0 auto; }
.o-del { width: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--dim2); transition: all .15s; }
.o-del:hover { color: var(--red); border-color: rgba(224,101,92,.4); }

.cloth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 8px; }
.cloth-card {
  position: relative; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 6px 16px; text-align: center; background: rgba(14,22,34,.68);
  cursor: pointer; transition: all .16s; font-family: inherit; color: inherit;
}
.cloth-card:hover { transform: translateY(-2px); border-color: rgba(232,192,122,.34); background: rgba(22,33,50,.8); }
.cloth-card .ci { height: 62px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cloth-card .ci svg { height: 100%; width: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.cloth-card .cn { font-size: 11.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloth-card .cc { font-size: 10px; color: var(--dim); margin-top: 1px; }
.cloth-card.wearing { border-color: rgba(111,214,176,.45); box-shadow: 0 0 14px rgba(111,214,176,.08); }
.cloth-card .cw {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; letter-spacing: 1px;
  color: #06130e; background: rgba(111,214,176,.85); padding: 1px 0; border-radius: 0 0 8px 8px;
}
.cloth-card.r1 .ci { filter: drop-shadow(0 0 6px rgba(111,214,160,.12)); }
.cloth-card.r2 .ci { filter: drop-shadow(0 0 6px rgba(111,168,232,.16)); }
.cloth-card.r3 .ci { filter: drop-shadow(0 0 8px rgba(185,140,240,.2)); }
.cloth-card.r4 .ci { filter: drop-shadow(0 0 10px rgba(232,180,92,.26)); }

.cloth-detail { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 14px; margin-bottom: 12px; align-items: start; }
.cd-icon {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  background: radial-gradient(ellipse at 50% 82%, rgba(232,192,122,.09), transparent 72%);
  display: flex; align-items: center; justify-content: center;
}
.cd-icon svg { width: 100%; height: auto; }
.cd-preview {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #070b12; width: 100%; max-width: 200px; justify-self: end;
}
.cd-preview svg { display: block; width: 100%; height: auto; }

/* 披风轻摆 / 仙鹤滑翔 */
.art-cape { transform-box: fill-box; transform-origin: 50% 22%; animation: capeSway 3.8s ease-in-out infinite; }
@keyframes capeSway { 0%,100% { transform: rotate(-1.1deg); } 50% { transform: rotate(1.3deg); } }
.art-crane { animation: craneFly 5.6s ease-in-out infinite; }
@keyframes craneFly { 0%,100% { transform: translate(0,0); } 50% { transform: translate(10px,-6px); } }

/* ============================================================
 *  天象动画层
 * ============================================================ */
.wxfx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.wxfx i, .wxfx b { position: absolute; display: block; }
.wx-drop {
  top: -8%; width: 1.5px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(160,200,240,0), rgba(160,200,240,.7));
  animation: wxFall linear infinite;
}
@keyframes wxFall { from { transform: translateY(-16px) rotate(11deg); } to { transform: translateY(330px) rotate(11deg); } }
.wx-flash { inset: 0; background: rgba(205,225,255,.85); opacity: 0; animation: wxFlash 7s infinite; }
@keyframes wxFlash { 0%, 90%, 96.5%, 100% { opacity: 0; } 91.5% { opacity: .5; } 93.5% { opacity: .08; } 95% { opacity: .35; } }
.wx-flake { width: 3px; height: 3px; border-radius: 50%; background: #ecf6ff; animation: wxSnow linear infinite; }
@keyframes wxSnow {
  from { transform: translate(0,-12px); opacity: 0; }
  14% { opacity: .9; }
  to { transform: translate(16px,300px); opacity: 0; }
}
.wx-twinkle { width: 2.5px; height: 2.5px; border-radius: 50%; background: #eaf2ff; animation: wxTwinkle ease-in-out infinite; }
@keyframes wxTwinkle { 0%,100% { opacity: .12; transform: scale(.7); } 50% { opacity: .95; transform: scale(1.25); } }
.wx-shoot {
  top: 16%; left: 72%; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(255,255,255,.5); opacity: 0; animation: wxShoot 9s linear infinite;
}
.wx-shoot::after {
  content: ''; position: absolute; left: 1px; top: .5px; width: 64px; height: 1.4px;
  background: linear-gradient(90deg, rgba(255,255,255,.75), transparent);
  transform: rotate(158deg); transform-origin: left center;
}
.wx-shoot.s2 { top: 28%; left: 88%; animation-delay: 4.6s; animation-duration: 11s; }
@keyframes wxShoot {
  0%, 86% { transform: translate(0,0); opacity: 0; }
  88% { opacity: 1; }
  100% { transform: translate(-270px,116px); opacity: 0; }
}
.wx-streak {
  left: -12%; width: 64px; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(200,215,230,.55), transparent);
  animation: wxGust linear infinite;
}
@keyframes wxGust { from { transform: translateX(-90px); opacity: 0; } 22% { opacity: .8; } to { transform: translateX(920px); opacity: 0; } }
.wx-petal { top: -6%; width: 6px; height: 5px; border-radius: 62% 38% 62% 38%; background: rgba(240,200,150,.72); animation: wxPetal linear infinite; }
@keyframes wxPetal { from { transform: translate(0,-8px) rotate(0); opacity: 0; } 12% { opacity: .9; } to { transform: translate(130px,300px) rotate(320deg); opacity: 0; } }
.wx-fog {
  left: -32%; width: 82%; height: 34px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(200,230,225,.15), transparent 72%);
  animation: wxFog ease-in-out infinite alternate;
}
@keyframes wxFog { from { transform: translateX(-5%); } to { transform: translateX(42%); } }
.wx-arc {
  left: 10%; top: 2%; width: 80%; height: 64%; border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 50% 100%, transparent 52%, rgba(232,160,208,.13) 66%, rgba(160,216,232,.11) 76%, rgba(240,224,160,.09) 86%, transparent 97%);
  animation: wxArcPulse 6s ease-in-out infinite;
}
@keyframes wxArcPulse { 0%,100% { opacity: .45; } 50% { opacity: .95; } }
.wx-ray {
  top: -10%; right: 8%; width: 120px; height: 130%;
  background: linear-gradient(180deg, rgba(255,236,190,.13), transparent 75%);
  transform: skewX(-14deg); animation: wxRay 7s ease-in-out infinite;
}
.wx-ray.r2 { right: 26%; width: 66px; animation-delay: 2.4s; }
@keyframes wxRay { 0%,100% { opacity: .35; } 50% { opacity: .85; } }

/* 突破灵光 */
.break-flash {
  position: fixed; inset: 0; z-index: 400; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, rgba(255,238,190,.95), rgba(232,192,122,.5) 34%, transparent 70%);
  animation: breakFlash 1.4s ease-out forwards;
}
@keyframes breakFlash {
  0% { opacity: 0; transform: scale(.62); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.55); }
}

@media (max-width: 980px) {
  .cloth-layout { grid-template-columns: 1fr; }
  .cloth-preview { max-width: 236px; margin: 0 auto; }
  .cd-preview { max-width: 170px; }
}
@media (max-width: 620px) {
  .cloth-grid { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); }
  .cloth-detail { grid-template-columns: 86px minmax(0,1fr); gap: 10px; }
  .wx-gust { }
}
