/* =========================================================
   灵溪问道 · 仙侠水墨青玉界面样式（style.css）
   这个文件只负责“古风仙侠外观包装”（配色、边框、弹窗排版），
   游戏里的地图、青云散修和 NPC 像素画都画在 Canvas 画布里。
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, #1b2d30 0%, #0f1618 72%);
  color: #edf3ec;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  padding: 0;
  overflow: hidden;
  user-select: none;
}

.hidden {
  display: none !important;
}

.game-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #172023;
  border: 2px solid #59857d;
  box-shadow: inset 0 0 0 2px #26363a;
  overflow: hidden;
}

/* ---------- 顶部仙侠状态栏 ---------- */
.hud-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #213035 0%, #172226 100%);
  border-bottom: 1px solid #3c5d58;
  flex-wrap: wrap;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-avatar {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2b8a7d, #19474c);
  border: 2px solid #d9b86c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 23px;
  font-weight: bold;
  color: #f6f2dc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero-name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #f4ead0;
}

.hero-title {
  font-size: 12px;
  color: #8fd4c6;
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.stat-label {
  color: #cfe0d8;
  font-weight: bold;
}

.bar-track {
  width: 84px;
  height: 11px;
  background: #0e1416;
  border: 1px solid #496b66;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.25s ease;
}

.hp-fill {
  background: linear-gradient(90deg, #b5322e, #e35c4b);
}

.mp-fill {
  background: linear-gradient(90deg, #217b8a, #5cd6c9);
}

.stat-num {
  font-size: 12px;
  color: #dcebe4;
  min-width: 52px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #10191c;
  border: 1px solid #59857d;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: #8bf5e3;
  font-weight: bold;
}

.stone-dot {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #bffff4, #3dc4b0);
  box-shadow: 0 0 6px #5de8d3;
  display: inline-block;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  /* 顶部栏换行时，右侧按钮组仍贴住右边缘 */
  margin-left: auto;
}

.hud-btn {
  background: #1f3338;
  color: #dff7f1;
  border: 1px solid #5d948a;
  border-radius: 5px;
  padding: 6px 11px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hud-btn:hover {
  background: #2b474d;
  border-color: #86dfd0;
}

.hud-btn-subtle {
  background: #172428;
  border-color: #466662;
  color: #bad4ce;
  padding: 6px 9px;
}

.hud-btn-subtle.is-muted {
  color: #7c928e;
  border-color: #364746;
}

.location-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #111a1d;
  border: 1px solid #8a7346;
  border-radius: 20px;
  padding: 5px 12px;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #f5e2b5;
}

.location-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6de6c4;
  box-shadow: 0 0 6px #6de6c4;
}

/* ---------- 仙缘目标小指引 + 善恶声望徽章 ---------- */
.quest-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px;
  background: #121b1e;
  border-bottom: 1px solid #2b4244;
  font-size: 13px;
  color: #d7e6de;
  flex-wrap: wrap;
}

.quest-hint-text {
  flex: 1;
  min-width: 260px;
}

.time-pill {
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #59857d;
  background: rgba(16, 30, 34, 0.92);
  color: #bceee4;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.karma-pill {
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #758f8a;
  background: rgba(18, 28, 32, 0.9);
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.quest-badge {
  background: #3d311c;
  color: #f5d27a;
  border: 1px solid #a6823e;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

/* ---------- 中间游戏画布区 ---------- */
.stage-wrapper {
  flex: 1;
  min-height: 0;
  container-type: size;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1315;
  padding: 6px;
  overflow: hidden;
}

/* 画布按剩余视口高度与宽度自适应铺满，并严格保持 4:3 等比与像素锐利 */
#game-canvas {
  display: block;
  width: min(100cqw, calc(100cqh * 4 / 3));
  height: min(100cqh, calc(100cqw * 3 / 4));
  border: 2px solid #3f5e59;
  border-radius: 4px;
  background: #2c5c3e;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.coord-badge {
  position: absolute;
  top: 22px;
  right: 40px;
  background: rgba(13, 21, 24, 0.8);
  border: 1px solid #59857d;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
  color: #cdebe4;
  pointer-events: none;
}

.toast-box {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 90%;
  max-width: 860px;
  background: rgba(14, 22, 25, 0.9);
  border: 1px solid #78a89f;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #eef7f3;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* ---------- 通用古风弹窗层 ---------- */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 13, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 20;
  backdrop-filter: blur(2px);
}

.modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 92%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1d2a2e 0%, #141d20 100%);
  border: 2px solid #8c7a52;
  border-radius: 12px;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(126, 224, 206, 0.2);
  overflow: hidden;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #566e6d;
  background: #1a2629;
  color: #c8dbd6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #2f4348;
  color: #ffffff;
}

/* ---------- NPC 仙缘对话框 ---------- */
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 24, 27, 0.9);
  border-bottom: 1px solid #3c5754;
}

.npc-id-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.npc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid #d9b86c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 26px;
  font-weight: bold;
  color: #faf0d7;
  flex-shrink: 0;
}

.npc-name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #f7e9c6;
}

.npc-title {
  font-size: 12px;
  color: #93c4bc;
}

.affinity-box {
  flex: 1;
  max-width: 260px;
}

.affinity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 5px;
}

.affinity-label {
  color: #aebfbd;
}

.affinity-rank {
  border: 1px solid #c9bea9;
  border-radius: 10px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: bold;
}

.affinity-num {
  color: #d9e6e1;
}

.affinity-track {
  height: 8px;
  background: #0c1214;
  border: 1px solid #3d5754;
  border-radius: 4px;
  overflow: hidden;
}

.affinity-fill {
  height: 100%;
  transition: width 0.3s ease, background 0.3s ease;
}

.dialog-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.dialog-text {
  font-size: 16px;
  line-height: 1.75;
  color: #f4efe0;
  background: rgba(11, 18, 20, 0.55);
  border-left: 3px solid #59bfa9;
  padding: 12px 16px;
  border-radius: 4px;
}

.dialog-feedback,
.menu-feedback {
  display: none;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 13px;
  border-radius: 5px;
  border: 1px solid transparent;
}

.dialog-feedback.visible,
.menu-feedback.visible {
  display: block;
}

.menu-feedback {
  margin: 10px 16px 0;
}

.fb-good {
  background: rgba(34, 92, 72, 0.45);
  border-color: #4db894 !important;
  color: #bdf7e2;
}

.fb-gold {
  background: rgba(105, 79, 24, 0.45);
  border-color: #e6be63 !important;
  color: #ffebb0;
}

.fb-warn {
  background: rgba(112, 42, 36, 0.45);
  border-color: #d96b62 !important;
  color: #ffd0cb;
}

.fb-info {
  background: rgba(29, 64, 82, 0.45);
  border-color: #5ea5c7 !important;
  color: #cdeeff;
}

.dialog-subpanel {
  background: rgba(11, 17, 19, 0.72);
  border: 1px solid #3b5856;
  border-radius: 7px;
  padding: 11px 13px;
}

.subpanel-title {
  font-size: 13px;
  font-weight: bold;
  color: #93ded0;
  margin-bottom: 8px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 13px 18px;
  background: rgba(13, 20, 22, 0.92);
  border-top: 1px solid #324a48;
}

.action-btn {
  padding: 8px 15px;
  border-radius: 6px;
  border: 1px solid #597c79;
  background: #223539;
  color: #ecf7f4;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.action-btn:hover {
  background: #2d494f;
  border-color: #84d6c8;
  transform: translateY(-1px);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.npc-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.npc-skill-pill {
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(25, 44, 48, 0.85);
  border: 1px solid #446e6b;
  color: #cdeee8;
}

.npc-skill-pill strong {
  color: #ffe394;
}

.npc-warn-banner {
  font-size: 13px;
  line-height: 1.45;
  padding: 7px 11px;
  margin-bottom: 8px;
  border-radius: 5px;
  background: rgba(112, 34, 30, 0.45);
  border: 1px solid #d96b62;
  color: #ffd0cb;
}

.subpanel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.equip-bag-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equip-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.equip-confirm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 13px;
  background: rgba(88, 66, 22, 0.45);
  border: 1px solid #d4aa52;
  color: #ffefc2;
  flex-wrap: wrap;
}

.equip-confirm-bar.is-danger {
  background: rgba(105, 32, 30, 0.48);
  border-color: #d96b62;
  color: #ffd4d0;
}

/* ---------- 系统 1：功法重数熟练度与融合词条 ---------- */
.art-mastery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.art-mastery-bar-wrap {
  flex: 1;
  min-width: 120px;
}

.art-mastery-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a6c4be;
  margin-bottom: 3px;
}

.fusion-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
  color: #93b5b0;
}

.fusion-pill {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(54, 41, 86, 0.65);
  border: 1px solid #7c5eb5;
  color: #e2caff;
  font-size: 11px;
}

/* ---------- 1主修 + 3辅修心法槽 & 6格出战招式槽 ---------- */
.art-slots-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.art-slot-chip {
  background: rgba(14, 24, 27, 0.85);
  border: 1px dashed #3a5654;
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.art-slot-chip.is-main {
  border-style: solid;
  border-color: #e6be63;
  background: linear-gradient(180deg, rgba(64, 49, 20, 0.55), rgba(20, 29, 32, 0.9));
  color: #ffeeb5;
}

.art-slot-chip.is-sub {
  border-style: solid;
  border-color: #54b5cc;
  background: linear-gradient(180deg, rgba(24, 62, 74, 0.55), rgba(16, 26, 30, 0.9));
  color: #d4f6ff;
}

.art-slot-chip.is-empty {
  color: #77928e;
}

.slot-role {
  font-size: 11px;
  opacity: 0.85;
}

.neigong-card.is-sub-active {
  border-color: #56b9d0;
  background: linear-gradient(180deg, rgba(20, 50, 62, 0.72), rgba(14, 23, 27, 0.92));
}

.skill-loadout-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.loadout-slot-chip {
  background: rgba(14, 24, 27, 0.85);
  border: 1px dashed #395552;
  border-radius: 6px;
  padding: 6px 7px;
  text-align: center;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #77928e;
}

.loadout-slot-chip.is-filled {
  border-style: solid;
  border-color: #4eb8a3;
  background: rgba(24, 62, 58, 0.65);
  color: #dcfff7;
  cursor: pointer;
}

.loadout-slot-chip.is-filled:hover {
  border-color: #f08078;
  background: rgba(88, 34, 34, 0.65);
}

.skill-card.is-equipped-skill {
  border-color: #58bfa9;
}

.btn-jade {
  background: #1f4d47;
  border-color: #4eb8a3;
  color: #dcfff7;
}

.btn-jade:hover {
  background: #28665e;
}

.btn-gold {
  background: #4d3d1f;
  border-color: #cfa655;
  color: #fff0c4;
}

.btn-gold:hover {
  background: #634e26;
}

.btn-gold-glow {
  background: linear-gradient(135deg, #8a641f, #5e4214);
  border-color: #ffd978;
  color: #fff8de;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(255, 214, 102, 0.45);
}

.btn-muted {
  margin-left: auto;
  background: #1a2326;
  border-color: #445759;
  color: #a9bdba;
}

.btn-dark {
  background: #36254a;
  border-color: #8c64bd;
  color: #f0dbff;
}

.btn-dark:hover {
  background: #483163;
  border-color: #b78eeb;
}

.btn-danger {
  background: #592022;
  border-color: #c94e4e;
  color: #ffd9d6;
}

.btn-danger:hover {
  background: #73282b;
  border-color: #f27979;
}

.steal-pct {
  font-size: 11px;
  font-weight: bold;
  color: #d6a8ff;
}

/* ---------- 第 7 步：装备法宝五槽位面板（系统 2 扩展履靴/护符） ---------- */
.equip-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(192px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.equip-slot-card {
  background: rgba(16, 26, 29, 0.88);
  border: 1px dashed #3e5c58;
  border-radius: 7px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.equip-slot-card.has-equip {
  border-style: solid;
  border-color: #9e8247;
  background: linear-gradient(180deg, rgba(28, 42, 44, 0.92), rgba(18, 27, 30, 0.92));
}

.eq-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eq-slot-label {
  font-size: 12px;
  font-weight: bold;
  color: #8fd4c6;
}

.eq-slot-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eq-bonus-txt {
  font-size: 11px;
  color: #9be8d8;
  line-height: 1.4;
}

.eq-empty-slot {
  font-size: 13px;
  color: #708a86;
  text-align: center;
  padding: 12px 0;
}

/* ---------- 系统 2：装备品阶视觉区分（凡品 / 灵品 / 玄阶 / 地阶） ---------- */
.item-row.rarity-common {
  border-left: 3px solid #667880;
}
.item-row.rarity-spirit {
  border-left: 3px solid #379e77;
}
.item-row.rarity-xuan {
  border-left: 3px solid #7a58b8;
}
.item-row.rarity-earth {
  border-left: 3px solid #c78e2c;
  box-shadow: 0 0 7px rgba(245, 193, 86, 0.16);
}

.item-row.rarity-common .item-name {
  color: #c3ced2;
}
.item-row.rarity-spirit .item-name {
  color: #5ce0a8;
}
.item-row.rarity-xuan .item-name {
  color: #b688ff;
}
.item-row.rarity-earth .item-name {
  color: #f5c156;
}

.item-row.rarity-common .fav-tag {
  color: #b8c4c8;
  border-color: #667880;
  background: rgba(102, 120, 128, 0.18);
}
.item-row.rarity-spirit .fav-tag {
  color: #5ce0a8;
  border-color: #379e77;
  background: rgba(55, 158, 119, 0.16);
}
.item-row.rarity-xuan .fav-tag {
  color: #b688ff;
  border-color: #7a58b8;
  background: rgba(122, 88, 184, 0.18);
}
.item-row.rarity-earth .fav-tag {
  color: #f5c156;
  border-color: #c78e2c;
  background: rgba(199, 142, 44, 0.16);
}

.equip-slot-card.rarity-common {
  border-color: #667880;
}
.equip-slot-card.rarity-spirit {
  border-color: #379e77;
}
.equip-slot-card.rarity-xuan {
  border-color: #7a58b8;
}
.equip-slot-card.rarity-earth {
  border-color: #c78e2c;
  box-shadow: 0 0 8px rgba(245, 193, 86, 0.18);
}

.equip-slot-card.rarity-common .item-name {
  color: #c3ced2;
}
.equip-slot-card.rarity-spirit .item-name {
  color: #5ce0a8;
}
.equip-slot-card.rarity-xuan .item-name {
  color: #b688ff;
}
.equip-slot-card.rarity-earth .item-name {
  color: #f5c156;
}

.equip-slot-card.rarity-earth .fav-tag {
  color: #f5c156;
  border-color: #c78e2c;
  background: rgba(199, 142, 44, 0.16);
}

/* ---------- 阶段 2：新增 天阶 / 仙品 品质视觉（元婴阶神兵法宝） ---------- */
.item-row.rarity-sky {
  border-left: 3px solid #d06a26;
  box-shadow: 0 0 8px rgba(255, 157, 92, 0.2);
}
.item-row.rarity-immortal {
  border-left: 3px solid #3fa8c9;
  box-shadow: 0 0 10px rgba(127, 233, 255, 0.24);
}
.item-row.rarity-sky .item-name {
  color: #ff9d5c;
}
.item-row.rarity-immortal .item-name {
  color: #7fe9ff;
}
.item-row.rarity-sky .fav-tag {
  color: #ff9d5c;
  border-color: #d06a26;
  background: rgba(208, 106, 38, 0.16);
}
.item-row.rarity-immortal .fav-tag {
  color: #7fe9ff;
  border-color: #3fa8c9;
  background: rgba(63, 168, 201, 0.18);
}

.equip-slot-card.rarity-sky {
  border-color: #d06a26;
  box-shadow: 0 0 9px rgba(255, 157, 92, 0.22);
}
.equip-slot-card.rarity-immortal {
  border-color: #3fa8c9;
  box-shadow: 0 0 12px rgba(127, 233, 255, 0.26);
}
.equip-slot-card.rarity-sky .item-name {
  color: #ff9d5c;
}
.equip-slot-card.rarity-immortal .item-name {
  color: #7fe9ff;
}
.equip-slot-card.rarity-sky .fav-tag {
  color: #ff9d5c;
  border-color: #d06a26;
  background: rgba(208, 106, 38, 0.16);
}
.equip-slot-card.rarity-immortal .fav-tag {
  color: #7fe9ff;
  border-color: #3fa8c9;
  background: rgba(63, 168, 201, 0.18);
}

/* ---------- 系统 2：穿戴前属性对比预览 ---------- */
.equip-compare-line {
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(12, 20, 22, 0.6);
  border: 1px dashed #35514e;
  font-size: 12px;
  line-height: 1.55;
  color: #a8c2bc;
}

.equip-compare-line .cmp-prefix {
  color: #9ec8c0;
}
.equip-compare-line .cmp-sep {
  color: #5d7a76;
}
.equip-compare-line .cmp-up {
  color: #6ee7a8;
  font-weight: bold;
}
.equip-compare-line .cmp-down {
  color: #f08c86;
  font-weight: bold;
}
.equip-compare-line .cmp-same {
  color: #93a9a5;
}
.equip-compare-line .cmp-set-gain {
  color: #ffd979;
  margin-left: 6px;
}
.equip-compare-line .cmp-set-loss {
  color: #e8a05c;
  margin-left: 6px;
}

/* ---------- 系统 2：套装共鸣展示区 ---------- */
.equip-set-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.equip-set-card {
  background: rgba(16, 26, 29, 0.88);
  border: 1px dashed #3e5c58;
  border-radius: 7px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.equip-set-card.is-active {
  border-style: solid;
  border-color: #d8b45e;
  background: linear-gradient(180deg, rgba(44, 38, 20, 0.85), rgba(17, 27, 29, 0.92));
}

.equip-set-card.is-idle {
  opacity: 0.86;
}

.equip-set-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.equip-set-name {
  font-size: 14px;
  font-weight: bold;
  color: #f2e2ba;
}

.equip-set-status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid;
  flex-shrink: 0;
}

.equip-set-status.on {
  color: #7df5d4;
  border-color: #3d9f88;
  background: rgba(29, 80, 70, 0.6);
}

.equip-set-status.off {
  color: #8b9c98;
  border-color: #465f5c;
  background: rgba(30, 42, 44, 0.6);
}

.equip-set-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.set-piece {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #3b5754;
}

.set-piece.is-worn {
  color: #ffeeb5;
  border-color: #c9a459;
  background: rgba(84, 64, 22, 0.45);
}

.set-piece.is-missing {
  color: #7d938f;
  border-style: dashed;
}

.equip-set-tier {
  font-size: 12px;
  line-height: 1.5;
}

.equip-set-tier.is-on {
  color: #7df5d4;
}

.equip-set-tier.is-off {
  color: #788e8a;
}

.equip-set-total {
  font-size: 12px;
  color: #ffe08a;
  border-top: 1px dashed #4b625d;
  padding-top: 4px;
}

.set-mini-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(84, 64, 22, 0.5);
  border: 1px solid #b6913f;
  color: #ffdf95;
  white-space: nowrap;
}

/* ---------- 系统 2：储物袋分类筛选标签栏 ---------- */
.bag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.bag-filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #3c5754;
  background: rgba(16, 26, 29, 0.85);
  color: #9fc3bd;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bag-filter-btn:hover {
  border-color: #5fa79a;
  color: #dcfff7;
}

.bag-filter-btn.is-active {
  background: linear-gradient(180deg, rgba(35, 74, 68, 0.95), rgba(20, 38, 36, 0.95));
  border-color: #e6be63;
  color: #ffeeb5;
  box-shadow: 0 0 6px rgba(230, 190, 99, 0.25);
}

.karma-card-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #cfe0d8;
  background: rgba(20, 32, 36, 0.78);
  border: 1px solid #304a48;
  border-radius: 5px;
  padding: 7px 10px;
}

/* ---------- 物品行样式（丹坊货架 / 赠礼 / 储物袋共用） ---------- */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(24, 36, 40, 0.85);
  border: 1px solid #375250;
  border-radius: 6px;
  padding: 9px 11px;
}

.item-seal {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 235, 180, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 19px;
  font-weight: bold;
  color: #fff9eb;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  row-gap: 3px;
  margin-bottom: 2px;
}

.item-name {
  font-size: 15px;
  font-weight: bold;
  color: #f5ebd2;
}

.item-owned {
  font-size: 12px;
  color: #8fd4c6;
}

.fav-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(217, 159, 54, 0.25);
  border: 1px solid #e0b458;
  color: #ffe399;
}

.item-desc {
  font-size: 12px;
  color: #b4c7c2;
  line-height: 1.45;
}

.mini-btn {
  padding: 6px 11px;
  border-radius: 5px;
  border: 1px solid #59857d;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.mini-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.empty-tip {
  text-align: center;
  padding: 20px 10px;
  font-size: 14px;
  color: #9cb2ae;
}

/* ---------- 储物袋 / 功法与修为弹窗 ---------- */
.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: rgba(13, 21, 24, 0.92);
  border-bottom: 1px solid #3c5754;
}

.menu-tabs {
  display: flex;
  gap: 9px;
}

.menu-tab {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid #415e5b;
  background: #1a272a;
  color: #aec4bf;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.menu-tab.active {
  background: #24524c;
  border-color: #77dbc8;
  color: #e8fff9;
  font-weight: bold;
}

.menu-body {
  padding: 16px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.cultivator-card {
  background: rgba(12, 19, 22, 0.72);
  border: 1px solid #3c5a57;
  border-radius: 7px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cultivator-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-chip {
  background: #1a282c;
  border: 1px solid #36524f;
  border-radius: 5px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-chip span {
  font-size: 12px;
  color: #96b5af;
}

.stat-chip strong {
  font-size: 15px;
  color: #f5e6bf;
}

.exp-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a9c7c1;
}

.exp-track {
  height: 8px;
  background: #0b1113;
  border: 1px solid #3c5e59;
  border-radius: 4px;
  overflow: hidden;
}

.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #329e8d, #92f5e3);
}

.aff-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.aff-mini-item {
  background: rgba(24, 38, 42, 0.75);
  border: 1px solid #2f4947;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  color: #d7e8e3;
}

/* 功法卡片与 5x5 攻击范围预览 */
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.skill-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(20, 32, 36, 0.85);
  border: 1px solid #3f5d5a;
  border-radius: 7px;
  padding: 11px 13px;
}

.skill-legend {
  border-color: #cca24c;
  background: linear-gradient(135deg, rgba(31, 56, 56, 0.9), rgba(48, 40, 22, 0.8));
}

.skill-locked {
  border-style: dashed;
  opacity: 0.78;
}

.skill-meta {
  flex: 1;
}

.skill-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.skill-name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
  font-weight: bold;
  color: #fae8b8;
}

.skill-rank {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #233a3d;
  border: 1px solid #59948b;
  color: #9bf0df;
}

.skill-cost {
  font-size: 12px;
  color: #79d8e6;
}

.skill-tags {
  font-size: 12px;
  color: #9ad1c6;
  margin-bottom: 4px;
}

.skill-desc {
  font-size: 13px;
  color: #d2e0dc;
  line-height: 1.5;
}

.range-preview {
  display: grid;
  grid-template-columns: repeat(5, 14px);
  grid-template-rows: repeat(5, 14px);
  gap: 2px;
  padding: 5px;
  background: #0d1517;
  border: 1px solid #3c5957;
  border-radius: 5px;
  flex-shrink: 0;
}

.rg-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #1a272a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.rg-self {
  background: #2f8c7a;
  color: #ffffff;
  font-weight: bold;
}

.rg-hit {
  background: #e6b853;
  box-shadow: 0 0 4px rgba(242, 200, 94, 0.7);
}

/* ---------- 互动式【御剑斗法 · 战斗教学】棋盘 ---------- */
.tutorial-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tutorial-board {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  grid-template-rows: repeat(5, 30px);
  gap: 3px;
  padding: 6px;
  background: #0c1416;
  border: 1px solid #496e6a;
  border-radius: 6px;
  flex-shrink: 0;
}

.tb-cell {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: #1a292d;
  border: 1px solid #2b4246;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #88aba5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tb-move {
  background: rgba(45, 130, 175, 0.45);
  border-color: #66ccf2;
  color: #d6f5ff;
  box-shadow: inset 0 0 6px rgba(102, 204, 242, 0.55);
}

.tb-beam {
  background: rgba(232, 184, 72, 0.28);
  border-color: #f2c96b;
  color: #ffe7a3;
}

.tb-hero {
  background: linear-gradient(135deg, #2d9685, #1b5c58);
  border-color: #9ff7e8;
  color: #ffffff;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
}

.tb-enemy {
  background: linear-gradient(135deg, #993932, #5e201e);
  border-color: #f08275;
  color: #ffe8e5;
}

.tb-broken {
  background: linear-gradient(135deg, #d97a2b, #8f311b);
  border-color: #ffe08a;
  color: #fff7d6;
  transform: scale(1.06);
  box-shadow: 0 0 8px rgba(255, 204, 92, 0.75);
}

.tutorial-guide {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tut-step-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 12px;
  background: rgba(217, 168, 66, 0.2);
  border: 1px solid #d9b059;
  color: #fae19e;
  font-size: 11px;
  font-weight: bold;
}

.tut-step-text {
  font-size: 12px;
  line-height: 1.55;
  color: #e4f0ec;
}

.tut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 11px;
  color: #9cb8b2;
}

.tut-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lg-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.lg-hero { background: #2d9685; }
.lg-move { background: #52b8e0; }
.lg-beam { background: #e8b848; }
.lg-enemy { background: #b5453d; }

.tut-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 妖敌遭遇战弹窗 ---------- */
.encounter-card {
  border-color: #a8524b;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(242, 118, 102, 0.25);
}

.enc-header {
  background: linear-gradient(90deg, rgba(48, 22, 24, 0.94), rgba(22, 24, 30, 0.94));
  border-bottom-color: #6b3838;
}

.enc-avatar {
  border-color: #e87a6b;
}

.enc-source-tag {
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(186, 56, 48, 0.3);
  border: 1px solid #e06d63;
  color: #ffd5cf;
  font-size: 12px;
  font-weight: bold;
}

.enc-text {
  border-left-color: #d96459;
}

/* ---------- 第 4 步：6×6 仙侠格子战棋战场 ---------- */
.battle-overlay {
  /* 战棋对局铺满浏览器视口：1120px 宽的战场才能完整放下，
     也不会被上方主画布的高度裁掉棋盘底部与操作区 */
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 12, 0.86);
  padding: 16px;
  z-index: 30;
}

.battle-arena {
  width: 100%;
  max-width: 1120px;
  max-height: 100%;
  background: linear-gradient(180deg, #1b282c 0%, #121b1e 100%);
  border: 2px solid #8c7a52;
  border-radius: 10px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(126, 224, 206, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #213238, #182328);
  border-bottom: 1px solid #3c5d58;
  flex-wrap: wrap;
}

.battle-title {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 21px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fae5b0;
}

.battle-turn-tag {
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(45, 138, 122, 0.3);
  border: 1px solid #63d9c5;
  color: #d6fff7;
  font-size: 13px;
  font-weight: bold;
}

.battle-main {
  display: grid;
  /* 左棋盘 540px（随窗口收窄可缩），右侧操作区自适应剩余宽度 */
  grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  align-items: start;
  min-height: 0;
  overflow-y: auto;
}

.battle-board-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.battle-cam-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(12, 20, 23, 0.85);
  border: 1px solid #3b5856;
  border-radius: 6px;
  font-size: 13px;
}

.b-cam-badge {
  color: #fae5b0;
  font-weight: bold;
  white-space: nowrap;
}

.b-cam-hint {
  color: #9ec9c0;
  font-size: 12px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b-cam-btns {
  display: flex;
  gap: 5px;
}

.b-cam-btn {
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid #4e7d75;
  background: rgba(34, 62, 62, 0.85);
  color: #d6fff7;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.b-cam-btn:hover {
  background: rgba(54, 102, 98, 0.92);
  border-color: #79f2df;
}

.b-cam-btn.is-active {
  background: rgba(74, 152, 136, 0.95);
  border-color: #ffe066;
  color: #fff6d6;
}

.b-insp-neigong {
  font-size: 12px;
  color: #9efcf0;
  background: rgba(32, 74, 72, 0.45);
  border: 1px solid rgba(116, 236, 220, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* 原图 448 × 448，按视口高度与容器宽度自适应，始终保持正方形 */
#battle-canvas {
  display: block;
  width: min(540px, 100%, 60dvh);
  height: auto;
  aspect-ratio: 1 / 1;
  border: 2px solid #59857d;
  border-radius: 6px;
  background: #24402d;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.battle-hover-tip {
  min-height: 44px;
  background: rgba(12, 20, 23, 0.85);
  border: 1px solid #3f635e;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.45;
  color: #d6f5ed;
}

.battle-ctrl-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.b-hero-card {
  background: rgba(12, 20, 23, 0.78);
  border: 1px solid #3b5856;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.b-hero-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.b-bar-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #cfe0d8;
}

.b-track {
  flex: 1;
  width: auto;
  height: 11px;
}

.b-bar-row strong {
  min-width: 64px;
  text-align: right;
  font-size: 12px;
  color: #f0e8d2;
}

.b-status-hint {
  font-size: 12px;
  color: #8fd4c6;
  border-top: 1px dashed #2e4745;
  padding-top: 5px;
}

/* ---------- 战棋双层状态栏与敌方详情检视面板（系统 3） ---------- */
.b-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.b-status-empty {
  font-size: 12px;
  color: #7c9b97;
}

.b-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(24, 38, 42, 0.9);
  color: #e6f5f1;
  cursor: default;
}

.b-status-pill.is-terrain {
  border-style: dashed;
}

.b-enemy-inspector {
  background: rgba(12, 20, 23, 0.88);
  border: 1px solid #3f635e;
  border-radius: 7px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #d7eae4;
}

.b-insp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.b-insp-tab {
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid #3e5b59;
  background: #172529;
  color: #b7d2cc;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.b-insp-tab:hover {
  border-color: #7ee0ce;
  color: #effaf7;
}

.b-insp-tab.is-active {
  background: #274946;
  border-color: #7ee8d6;
  color: #ffffff;
  font-weight: bold;
}

.b-insp-tab.is-boss {
  border-color: #b85c48;
  color: #ffd3c4;
}

.b-insp-tab.is-boss.is-active {
  background: #52231e;
  border-color: #ff9c75;
  color: #fff2eb;
}

.b-insp-preview-tag {
  margin-left: auto;
  font-size: 11px;
  color: #ffd97d;
  opacity: 0.9;
}

.b-insp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.b-insp-name-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.b-insp-name {
  font-size: 14px;
  font-weight: bold;
  color: #fae6b8;
}

.b-insp-realm {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(58, 90, 92, 0.55);
  color: #c2ebe2;
}

.b-insp-suppress {
  font-size: 11px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(186, 46, 46, 0.35);
  border: 1px solid #ff6b6b;
  color: #ffb3b3;
}

.b-insp-stats {
  font-size: 12px;
  color: #a6cfc6;
}

.b-insp-elem-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.b-elem-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.b-insp-poise-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.b-poise-box {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: bold;
  color: #f5d882;
}

.b-poise-pip {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  border: 1px solid #d4aa4c;
  background: rgba(20, 26, 28, 0.85);
}

.b-poise-pip.is-filled {
  background: linear-gradient(180deg, #ffe27a, #d99b26);
  box-shadow: 0 0 4px rgba(255, 215, 102, 0.5);
}

.b-poise-broken {
  color: #ffe066;
  background: rgba(255, 210, 77, 0.2);
  border: 1px solid #ffd54f;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 12px;
}

.b-insp-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 1px dashed #2e4745;
  padding-top: 5px;
}

.b-insp-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: rgba(23, 38, 42, 0.9);
  border: 1px solid #355250;
  color: #d4ebe6;
}

.b-insp-skill-chip .sk-cd-ready {
  color: #7ef5b8;
  font-weight: bold;
}

.b-insp-skill-chip .sk-cd-wait {
  color: #93aba8;
}

.battle-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.b-util-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.b-util-btn {
  padding: 6px 5px;
  border-radius: 5px;
  border: 1px solid #4c6d6b;
  background: #1d2f34;
  color: #e6f5f1;
  font-size: 12px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.b-util-btn:hover:not(:disabled) {
  background: #2a444b;
  border-color: #86dfd0;
}

.b-util-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.b-util-btn.is-selected {
  border-color: #8ef7e5 !important;
  background: #254f4b !important;
  box-shadow: 0 0 8px rgba(114, 240, 218, 0.35);
}

.b-facing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(14, 24, 27, 0.72);
  border: 1px solid #354e4c;
  font-size: 11px;
  color: #a9ccc4;
}

.b-facing-label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.b-facing-cur {
  color: #f3d68b;
  font-weight: bold;
}

.b-facing-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.b-face-btn {
  min-width: 26px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #446260;
  background: #1a2a2f;
  color: #d7ebe6;
  font-size: 11px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.b-face-btn:hover:not(:disabled) {
  background: #284249;
  border-color: #86dfd0;
}

.b-face-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.b-face-btn.is-selected {
  border-color: #e8c36c;
  background: linear-gradient(180deg, #3a2f1c 0%, #221b10 100%);
  color: #ffe8a6;
  box-shadow: 0 0 6px rgba(232, 195, 108, 0.3);
}

.b-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.b-btn-crimson {
  background: #4f1f29;
  border-color: #b84255;
}

.b-btn-purple {
  background: #35244a;
  border-color: #8b62bd;
}

/* ---------- 主修心法内功卡片 ---------- */
.neigong-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.neigong-card {
  background: rgba(18, 29, 33, 0.88);
  border: 1px solid #3c5856;
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.neigong-card.is-active {
  border-color: #e0b85c;
  background: linear-gradient(135deg, rgba(28, 52, 52, 0.92), rgba(54, 43, 18, 0.82));
  box-shadow: 0 0 10px rgba(232, 192, 92, 0.2);
}

.ng-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.battle-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.b-act-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #4c6d6b;
  background: #203338;
  color: #eef7f4;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.b-act-btn:hover:not(:disabled) {
  background: #2b454c;
  border-color: #86dfd0;
  transform: translateY(-1px);
}

.b-act-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.b-act-btn.is-selected {
  border-color: #8ef7e5 !important;
  box-shadow: 0 0 0 1px #8ef7e5, 0 0 12px rgba(114, 240, 218, 0.35);
  background: #254f4b !important;
}

.b-act-title {
  font-size: 14px;
  font-weight: bold;
  color: #faf0d4;
}

/* 招式标题旁的灵属微徽章（系统 3）：颜色取自 ELEMENTS 五灵字典 */
.b-act-elem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 4px;
  margin-right: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  line-height: 14px;
  vertical-align: 1px;
}

/* 克制当前查看敌人的招式：翠金亮边，一眼看出该出哪招（系统 3） */
.b-act-btn.is-weak-counter {
  border-color: #f5d06a;
  box-shadow: 0 0 0 1px rgba(245, 208, 106, 0.5), 0 0 10px rgba(255, 214, 102, 0.26);
}

.b-act-btn.is-weak-counter:hover:not(:disabled) {
  border-color: #ffe28a;
  background: #2f4238;
}

.b-act-btn.is-weak-counter.is-selected {
  border-color: #8ef7e5 !important;
  box-shadow: 0 0 0 1px #8ef7e5, 0 0 12px rgba(114, 240, 218, 0.35);
}

.b-act-sub {
  font-size: 11px;
  color: #9ec4bc;
}

.b-btn-gold {
  background: #42351b;
  border-color: #b89146;
}

.b-btn-jade {
  background: #1c423d;
  border-color: #489e8c;
}

.b-btn-undo {
  background: #2a3d4f;
  border-color: #6ea8d9;
}

.b-btn-muted {
  background: #182124;
  border-color: #3f5254;
}

.b-btn-span2 {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.battle-pill-drawer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: rgba(11, 18, 20, 0.85);
  border: 1px solid #4c7c74;
  border-radius: 6px;
}

.pill-chip-btn {
  padding: 5px 9px;
  border-radius: 5px;
  border: 1px solid #599489;
  background: #1f3c3a;
  color: #e6fff9;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.pill-chip-btn:hover {
  background: #2b5450;
}

.pill-empty {
  font-size: 12px;
  color: #9eb5b0;
}

.battle-result-box {
  background: rgba(74, 56, 20, 0.42);
  border: 1px solid #e6be63;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.result-heading {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  font-weight: bold;
  color: #ffe79e;
}

.result-text {
  font-size: 13px;
  line-height: 1.5;
  color: #fff4d4;
}

.battle-log-box {
  flex: 1;
  background: rgba(10, 16, 18, 0.78);
  border: 1px solid #304746;
  border-radius: 7px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.b-log-title {
  font-size: 12px;
  font-weight: bold;
  color: #88bfb5;
}

.battle-log-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.b-log-line {
  font-size: 12px;
  line-height: 1.45;
  color: #9eb5b0;
}

.b-log-line.latest {
  color: #f5ebd0;
  font-weight: bold;
}

/* 窄屏 / 分屏：战棋改为竖排，棋盘在上、操作区在下 */
@media (max-width: 1000px) {
  .battle-main {
    grid-template-columns: minmax(0, 1fr);
  }
  #battle-canvas {
    width: min(540px, 100%);
    margin: 0 auto;
  }
}

/* ---------- 第 5 步：古风标题封面与通关画卷 ---------- */
.title-overlay {
  background: radial-gradient(circle at center, rgba(16, 30, 34, 0.78) 0%, rgba(7, 12, 14, 0.92) 78%);
  z-index: 40;
}

.title-scroll {
  width: 100%;
  max-width: 520px;
  padding: 30px 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(25, 39, 43, 0.96) 0%, rgba(16, 25, 28, 0.98) 100%);
  border: 2px solid #b59454;
  border-radius: 12px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(132, 232, 214, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
}

.title-seal,
.ending-seal {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2b8a7d, #153c40);
  border: 2px solid #e6c26e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 22px;
  font-weight: bold;
  color: #fff3d1;
  box-shadow: 0 4px 16px rgba(92, 232, 210, 0.3);
}

.title-main {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 46px;
  letter-spacing: 8px;
  color: #fae6b4;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7);
}

.title-sub {
  font-size: 14px;
  color: #93dbd0;
  letter-spacing: 1px;
}

.title-save-info {
  font-size: 13px;
  color: #ffe39e;
  background: rgba(94, 72, 24, 0.35);
  border: 1px solid #a88640;
  border-radius: 14px;
  padding: 4px 13px;
}

.title-btn-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  max-width: 280px;
  margin-top: 6px;
}

.title-btn {
  width: 100%;
  padding: 11px 18px;
  font-size: 15px;
}

.title-tips {
  margin-top: 6px;
  font-size: 12px;
  color: #8ca8a3;
}

.ending-overlay {
  background: radial-gradient(circle at center, rgba(28, 38, 36, 0.84) 0%, rgba(7, 11, 13, 0.94) 80%);
  z-index: 45;
}

.ending-card {
  max-width: 660px;
  border-color: #d9b259;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(242, 200, 94, 0.22);
}

.ending-banner {
  padding: 20px 22px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(64, 50, 20, 0.65), rgba(20, 30, 34, 0.9));
  border-bottom: 1px solid #7c683d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ending-seal {
  background: linear-gradient(135deg, #b88224, #6b4111);
}

.ending-title {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 30px;
  letter-spacing: 3px;
  color: #ffe7a1;
}

.ending-sub {
  font-size: 13px;
  color: #9be0d2;
}

.ending-story {
  border-left-color: #e6be63;
}

.ending-actions {
  justify-content: center;
}

.ending-actions .btn-muted {
  margin-left: 0;
}

/* ---------- 底部按键栏 ---------- */
.controls-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 16px;
  background: #121a1d;
  border-top: 1px solid #2e4544;
  font-size: 13px;
  color: #9cb8b2;
  flex-wrap: wrap;
}

.control-hints {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 2px;
  font-family: inherit;
  font-size: 12px;
  color: #e4f7f2;
  background: #213236;
  border: 1px solid #4e7772;
  border-radius: 4px;
  box-shadow: 0 1px 0 #0a1012;
}

.step-tag {
  color: #ebd082;
  font-weight: bold;
}

/* ---------- 第 2 步：聚灵打坐修炼面板 ---------- */
.meditate-spot-card {
  background: linear-gradient(135deg, rgba(24, 52, 56, 0.85), rgba(14, 24, 28, 0.94));
  border: 1px solid #59a89d;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meditate-spot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.meditate-mult-pill {
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(74, 180, 162, 0.22);
  border: 1px solid #6bf0dc;
  color: #9efcf0;
  font-size: 13px;
  font-weight: bold;
}

.meditate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.meditate-card {
  background: rgba(14, 22, 26, 0.88);
  border: 1px solid #3c5d5a;
  border-radius: 8px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.meditate-card.is-stone {
  border-color: #c9a14a;
  background: linear-gradient(180deg, rgba(48, 38, 18, 0.45), rgba(14, 22, 26, 0.92));
}

.meditate-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.meditate-preview {
  font-size: 12px;
  color: #8ee8d8;
  background: rgba(20, 44, 46, 0.72);
  border: 1px solid #366360;
  border-radius: 5px;
  padding: 6px 9px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .meditate-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   【暗黑水墨 · 古风像素仙侠】视觉主题覆盖层
   —— 仅覆盖配色 / 材质 / 字体 / 圆角 / 微交互，
      不改动任何布局尺寸、ID 绑定与 JS 交互逻辑。
   想回到旧版外观：删除本注释以下全部内容即可。
   ========================================================= */

:root {
  --ink-0: #0a0d0e;            /* 最深墨 */
  --ink-1: #10161a;            /* 底墨 */
  --ink-2: #161f23;            /* 黛青面 */
  --ink-3: #1d2a2e;            /* 浅黛青 */
  --gold-dk: #8c734b;          /* 暗金（外描边） */
  --gold-lt: #c5a059;          /* 亮金（内描边/角饰） */
  --gold-soft: rgba(197, 160, 89, 0.28);
  --jade: #6fa79a;             /* 墨青点缀 */
  --cinnabar: #a8392c;         /* 朱砂 */
  --paper: #e9e0c9;            /* 宣纸白文字 */
  --paper-dim: #b3ab96;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "KaiTi", "STKaiti", serif;
  --font-sans: "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-num: "Cascadia Mono", "Consolas", "SF Mono", "Menlo", monospace;
  --r: 3px;
}

/* ---------- 1. 配色与材质：深墨 / 黛青微渐变 ---------- */
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(52, 72, 70, 0.35) 0%, transparent 60%),
    linear-gradient(180deg, #121a1d 0%, #0b0f11 100%);
  color: var(--paper);
}

.game-shell {
  background: linear-gradient(180deg, #131b1e 0%, #0e1416 100%);
  border: 1px solid var(--gold-dk);
  box-shadow:
    inset 0 0 0 1px #07090a,
    inset 0 0 0 2px var(--gold-soft);
}

.hud-bar {
  background:
    linear-gradient(180deg, rgba(197, 160, 89, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #1a2427 0%, #12191c 100%);
  border-bottom: 1px solid var(--gold-dk);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6), inset 0 -1px 0 rgba(197, 160, 89, 0.12);
}

.quest-bar {
  background: linear-gradient(180deg, #11181a 0%, #0e1416 100%);
  border-bottom: 1px solid rgba(140, 115, 75, 0.45);
  color: #d4ccb6;
}

.stage-wrapper {
  background:
    radial-gradient(ellipse at center, #121a1c 0%, #080b0c 85%);
}

#game-canvas {
  border: 1px solid var(--gold-dk);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px #07090a,
    0 0 0 2px rgba(197, 160, 89, 0.22),
    0 8px 28px rgba(0, 0, 0, 0.75);
}

#battle-canvas {
  border: 1px solid var(--gold-dk);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px #07090a,
    0 0 0 2px rgba(197, 160, 89, 0.2),
    0 6px 20px rgba(0, 0, 0, 0.6);
}

.controls-bar {
  background: linear-gradient(180deg, #0f1517 0%, #0b1012 100%);
  border-top: 1px solid rgba(140, 115, 75, 0.5);
  color: var(--paper-dim);
}

/* 头像 / 印章：暗金描边方印 */
.hero-avatar,
.npc-avatar,
.title-seal,
.ending-seal {
  border-radius: 2px;
  border: 1px solid var(--gold-lt);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(197, 160, 89, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-avatar,
.title-seal {
  background: linear-gradient(135deg, #2a4a47 0%, #142426 100%);
}

.item-seal {
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}

/* 小徽章 / 胶囊：圆角统一收敛为 2~4px */
.stat-pill,
.location-tag,
.time-pill,
.karma-pill,
.quest-badge,
.coord-badge,
.affinity-rank,
.fav-tag,
.fusion-pill,
.equip-set-status,
.set-mini-tag,
.tut-step-badge,
.enc-source-tag,
.battle-turn-tag,
.title-save-info,
.meditate-mult-pill,
.b-status-pill,
.skill-rank,
.set-piece,
.npc-skill-pill,
.b-insp-realm,
.b-insp-suppress,
.b-elem-badge,
.b-insp-skill-chip,
.b-insp-neigong,
.b-poise-broken {
  border-radius: var(--r);
}

.stat-pill,
.location-tag,
.time-pill,
.karma-pill,
.coord-badge {
  background: linear-gradient(180deg, rgba(26, 34, 36, 0.92), rgba(12, 17, 19, 0.92));
  border-color: rgba(140, 115, 75, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.05);
}

.stat-pill {
  color: #e6d3a2;
}

.time-pill {
  color: #d9cfae;
}

.location-tag {
  color: #f0dcae;
}

.location-dot {
  background: var(--gold-lt);
  box-shadow: 0 0 6px rgba(197, 160, 89, 0.8);
}

.quest-badge {
  background: linear-gradient(180deg, #3d2f19, #261d10);
  border-color: var(--gold-dk);
  color: #f0d495;
  font-family: var(--font-serif);
  letter-spacing: 1px;
}

.toast-box {
  background: linear-gradient(180deg, rgba(20, 27, 29, 0.94), rgba(10, 14, 16, 0.94));
  border: 1px solid var(--gold-dk);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 0 0 2px rgba(197, 160, 89, 0.16),
    0 8px 22px rgba(0, 0, 0, 0.6);
  color: #ece3cb;
  font-family: var(--font-serif);
}

/* ---------- 主弹窗：暗金双层内描边 + 四角金边角饰 ---------- */
.modal-overlay {
  background: rgba(4, 6, 7, 0.76);
}

.modal-card,
.battle-arena,
.title-scroll {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(197, 160, 89, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #172124 0%, #0f1517 100%);
  border: 1px solid var(--gold-dk);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px #06090a,
    inset 0 0 0 2px rgba(197, 160, 89, 0.38),
    0 20px 48px rgba(0, 0, 0, 0.8);
}

/* 四角 L 形金边角饰（一个伪元素用 8 段渐变画出四个角） */
.modal-card::before,
.battle-arena::before,
.title-scroll::before {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  z-index: 5;
  --c: var(--gold-lt);
  --l: 16px;
  --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l) no-repeat;
  filter: drop-shadow(0 0 2px rgba(197, 160, 89, 0.35));
}

/* 角饰内侧的小方点，增加一点古风回纹感 */
.modal-card::after,
.battle-arena::after,
.title-scroll::after {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  z-index: 5;
  --d: rgba(197, 160, 89, 0.75);
  background:
    linear-gradient(var(--d), var(--d)) top left / 3px 3px no-repeat,
    linear-gradient(var(--d), var(--d)) top right / 3px 3px no-repeat,
    linear-gradient(var(--d), var(--d)) bottom left / 3px 3px no-repeat,
    linear-gradient(var(--d), var(--d)) bottom right / 3px 3px no-repeat;
}

/* 遭遇战 / 结局：同样的金框，但带一点朱砂或金辉气息 */
.encounter-card {
  border-color: #8a4a3a;
  box-shadow:
    inset 0 0 0 1px #06090a,
    inset 0 0 0 2px rgba(168, 57, 44, 0.4),
    0 20px 48px rgba(0, 0, 0, 0.85);
}

.encounter-card::before {
  --c: #c0624c;
}

.ending-card {
  box-shadow:
    inset 0 0 0 1px #06090a,
    inset 0 0 0 2px rgba(197, 160, 89, 0.5),
    0 24px 64px rgba(0, 0, 0, 0.85),
    0 0 26px rgba(197, 160, 89, 0.16);
}

.dialog-header,
.menu-header {
  background:
    linear-gradient(180deg, rgba(197, 160, 89, 0.07) 0%, transparent 70%),
    rgba(11, 16, 18, 0.92);
  border-bottom: 1px solid rgba(140, 115, 75, 0.6);
}

.enc-header {
  background: linear-gradient(90deg, rgba(56, 22, 20, 0.94), rgba(16, 20, 22, 0.94));
  border-bottom-color: rgba(168, 57, 44, 0.6);
}

.battle-header {
  background:
    linear-gradient(180deg, rgba(197, 160, 89, 0.07) 0%, transparent 70%),
    linear-gradient(90deg, #172124, #111819);
  border-bottom: 1px solid rgba(140, 115, 75, 0.6);
}

.dialog-actions {
  background: linear-gradient(180deg, rgba(10, 14, 16, 0.94), rgba(14, 19, 21, 0.94));
  border-top: 1px solid rgba(140, 115, 75, 0.45);
}

.ending-banner {
  background: linear-gradient(180deg, rgba(70, 54, 24, 0.55), rgba(15, 21, 23, 0.92));
  border-bottom: 1px solid var(--gold-dk);
}

/* 弹窗内的各类面板卡片：收敛圆角，墨底 + 细线 */
.dialog-text,
.dialog-feedback,
.menu-feedback,
.dialog-subpanel,
.npc-warn-banner,
.equip-confirm-bar,
.art-slot-chip,
.loadout-slot-chip,
.equip-slot-card,
.equip-compare-line,
.equip-set-card,
.karma-card-row,
.item-row,
.cultivator-card,
.stat-chip,
.aff-mini-item,
.skill-card,
.range-preview,
.tutorial-board,
.tb-cell,
.battle-cam-bar,
.battle-hover-tip,
.b-hero-card,
.b-enemy-inspector,
.battle-pill-drawer,
.battle-result-box,
.battle-log-box,
.neigong-card,
.meditate-spot-card,
.meditate-card,
.meditate-preview {
  border-radius: var(--r);
}

.dialog-subpanel,
.cultivator-card,
.b-hero-card,
.b-enemy-inspector,
.battle-hover-tip,
.battle-cam-bar,
.battle-log-box,
.battle-pill-drawer,
.meditate-card {
  background: linear-gradient(180deg, rgba(20, 28, 31, 0.82), rgba(10, 14, 16, 0.88));
  border-color: rgba(98, 112, 104, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.03);
}

.item-row,
.skill-card,
.neigong-card,
.stat-chip,
.aff-mini-item {
  background: linear-gradient(180deg, rgba(24, 32, 35, 0.88), rgba(15, 20, 22, 0.9));
  border-color: rgba(98, 112, 104, 0.42);
}

.dialog-text {
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.05), rgba(8, 12, 13, 0.55) 30%);
  border-left: 2px solid var(--gold-lt);
  color: #efe6cf;
}

.subpanel-title {
  color: #d8bf86;
  font-family: var(--font-serif);
  letter-spacing: 1px;
}

/* ---------- 2. 字体层级：衬线古风 vs. 清晰数值 ---------- */
.hero-name,
.npc-name,
.dialog-text,
.title-main,
.ending-title,
.battle-title,
.result-heading,
.skill-name,
.equip-set-name,
.item-name,
.b-insp-name,
.b-act-title,
.location-tag,
.hero-avatar,
.npc-avatar,
.item-seal,
.title-seal,
.ending-seal,
.menu-tab,
.ending-story,
.enc-text,
.result-text,
.title-sub,
.ending-sub,
.npc-title,
.hero-title {
  font-family: var(--font-serif);
}

.hero-name,
.npc-name {
  color: #f0dcae;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

.title-main {
  color: #ecd49a;
  text-shadow:
    0 1px 0 #3a2c14,
    0 3px 16px rgba(0, 0, 0, 0.8);
}

.battle-title,
.result-heading,
.ending-title,
.skill-name {
  color: #ecd49a;
}

.hero-title,
.npc-title {
  color: #a9b8a8;
  letter-spacing: 1px;
}

/* 数值、血条读数、坐标、快捷键：等宽无衬线，读数不跳动 */
.stat-num,
#stones-text,
.affinity-num,
.exp-row,
.art-mastery-meta,
.b-bar-row strong,
.coord-badge,
.steal-pct,
.stat-chip strong,
.skill-cost,
.b-poise-box,
kbd {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.stat-num,
.b-bar-row strong {
  color: #e2d8bf;
}

kbd {
  color: #f0dcae;
  background: linear-gradient(180deg, #232c2e, #151b1d);
  border: 1px solid var(--gold-dk);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 1px 0 #050708;
}

.step-tag {
  color: #d8bf86;
}

/* ---------- 3. 滚动条：4px 暗金半透明 ---------- */
* {
  scrollbar-width: thin;                                       /* Firefox */
  scrollbar-color: rgba(197, 160, 89, 0.45) rgba(8, 11, 12, 0.6);
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 11, 12, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.42);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.7);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* ---------- 4. 按钮：暗墨底 + 微弱内高光 + 悬停微亮 + 点击微缩 ---------- */
.hud-btn,
.action-btn,
.mini-btn,
.menu-tab,
.bag-filter-btn,
.modal-close,
.b-cam-btn,
.b-insp-tab,
.b-util-btn,
.b-act-btn,
.pill-chip-btn {
  border-radius: var(--r);
  background: linear-gradient(180deg, #1f2b2d 0%, #141c1e 100%);
  border: 1px solid #3f5754;
  color: #d9e3dc;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4);
  transition:
    filter 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.08s ease;
}

.hud-btn,
.action-btn,
.menu-tab {
  font-family: var(--font-serif);
  letter-spacing: 1px;
}

/* 悬停：整体微亮，不再上下跳动 */
.hud-btn:hover,
.action-btn:hover:not(:disabled),
.mini-btn:hover:not(:disabled),
.menu-tab:hover,
.bag-filter-btn:hover,
.modal-close:hover,
.b-cam-btn:hover,
.b-insp-tab:hover,
.b-util-btn:hover:not(:disabled),
.b-act-btn:hover:not(:disabled),
.pill-chip-btn:hover {
  filter: brightness(1.18);
  transform: none;
  border-color: #6f8f88;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 8px rgba(197, 160, 89, 0.12);
}

/* 点击：轻微缩放 */
.hud-btn:active,
.action-btn:active:not(:disabled),
.mini-btn:active:not(:disabled),
.menu-tab:active,
.bag-filter-btn:active,
.modal-close:active,
.b-cam-btn:active,
.b-insp-tab:active,
.b-util-btn:active:not(:disabled),
.b-act-btn:active:not(:disabled),
.pill-chip-btn:active {
  transform: scale(0.96);
  filter: brightness(0.95);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hud-btn:focus-visible,
.action-btn:focus-visible,
.mini-btn:focus-visible,
.menu-tab:focus-visible,
.b-act-btn:focus-visible {
  outline: 1px solid var(--gold-lt);
  outline-offset: 1px;
}

.hud-btn-subtle {
  background: linear-gradient(180deg, #172022 0%, #101618 100%);
  border-color: #33433f;
  color: #a9b6ad;
}

.hud-btn-subtle.is-muted {
  color: #6c7873;
  border-color: #2a3432;
}

.modal-close {
  color: #c9b98f;
  border-color: rgba(140, 115, 75, 0.6);
}

.modal-close:hover {
  color: #f0dcae;
  background: linear-gradient(180deg, #2a2418, #18140d);
}

/* 选项卡 / 筛选标签激活态：暗金 */
.menu-tab.active,
.bag-filter-btn.is-active,
.b-insp-tab.is-active,
.b-cam-btn.is-active {
  background: linear-gradient(180deg, #3a2f1c 0%, #221b10 100%);
  border-color: var(--gold-lt);
  color: #f6e2b0;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 6px rgba(197, 160, 89, 0.22);
}

.bag-filter-btn {
  color: #a9b6ad;
}

.b-insp-tab.is-boss {
  border-color: #7d4038;
  color: #f0c2b6;
}

.b-insp-tab.is-boss.is-active {
  background: linear-gradient(180deg, #4a1c17, #2c100d);
  border-color: #c0624c;
  color: #ffe6dc;
}

/* —— 常规：墨青 —— */
.btn-jade,
.b-btn-jade {
  background: linear-gradient(180deg, #1f3634 0%, #142321 100%);
  border-color: #4d7d74;
  color: #d6ece5;
}

.btn-jade:hover:not(:disabled),
.b-btn-jade:hover:not(:disabled) {
  background: linear-gradient(180deg, #1f3634 0%, #142321 100%);
  border-color: #79a99e;
}

.btn-muted,
.b-btn-muted {
  background: linear-gradient(180deg, #192022 0%, #111618 100%);
  border-color: #34403f;
  color: #a2ada7;
}

.b-btn-undo {
  background: linear-gradient(180deg, #1d2a33 0%, #131c22 100%);
  border-color: #4c6a80;
}

/* —— 特殊：暗金 —— */
.btn-gold,
.b-btn-gold {
  background: linear-gradient(180deg, #3a2f1c 0%, #241d11 100%);
  border-color: var(--gold-dk);
  color: #f0dcae;
}

.btn-gold:hover:not(:disabled),
.b-btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #3a2f1c 0%, #241d11 100%);
  border-color: var(--gold-lt);
}

.btn-gold-glow {
  background: linear-gradient(180deg, #5a4520 0%, #33260f 100%);
  border-color: var(--gold-lt);
  color: #fff1cc;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 10px rgba(197, 160, 89, 0.3);
}

.btn-gold-glow:hover:not(:disabled) {
  border-color: #e3c27d;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 14px rgba(197, 160, 89, 0.42);
}

/* —— 高危：朱砂红（袭杀 / 抢劫 / 丢弃）—— */
.btn-danger,
.b-btn-crimson {
  background: linear-gradient(180deg, #4a1914 0%, #2c0e0b 100%);
  border-color: #9e3b2f;
  color: #ffd9cf;
}

.btn-danger:hover:not(:disabled),
.b-btn-crimson:hover:not(:disabled) {
  background: linear-gradient(180deg, #4a1914 0%, #2c0e0b 100%);
  border-color: #cf5a46;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 190, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 0 8px rgba(168, 57, 44, 0.35);
}

/* 暗取偷窃等灰色手段：低饱和暗朱，与正式袭杀区分 */
.btn-dark,
.b-btn-purple {
  background: linear-gradient(180deg, #33201f 0%, #1e1313 100%);
  border-color: #6e3f38;
  color: #ecc9bf;
}

.btn-dark:hover:not(:disabled),
.b-btn-purple:hover:not(:disabled) {
  background: linear-gradient(180deg, #33201f 0%, #1e1313 100%);
  border-color: #9a5a4e;
}

.steal-pct {
  color: #e0a291;
}

/* 战斗内“选中”与“克制”状态：保留可读性，换成金系 */
.b-util-btn.is-selected,
.b-act-btn.is-selected,
.b-act-btn.is-weak-counter.is-selected {
  border-color: var(--gold-lt) !important;
  background: linear-gradient(180deg, #3a2f1c 0%, #221b10 100%) !important;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.6), 0 0 12px rgba(197, 160, 89, 0.3);
}

.b-act-btn.is-weak-counter {
  border-color: #b8944f;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.35), 0 0 8px rgba(197, 160, 89, 0.2);
}

.b-act-title {
  color: #efe2bf;
}

/* ---------- 5. 血条 / 灵力 / 修为：微渐变 + 光泽 ---------- */
.bar-track,
.exp-track,
.affinity-track {
  background: linear-gradient(180deg, #050708 0%, #0d1214 100%);
  border: 1px solid rgba(140, 115, 75, 0.55);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.bar-fill,
.exp-fill,
.affinity-fill {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.hp-fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg, #6e1a16 0%, #a8392c 55%, #d0573f 100%);
}

.mp-fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg, #1a4c55 0%, #2f7d84 55%, #5fb3ad 100%);
}

.exp-fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg, #6b5427 0%, #a8853f 55%, #dcbc72 100%);
}

.stat-label {
  color: #cdbf9a;
  font-family: var(--font-serif);
}

/* 灵石小菱形：换成暗金 */
.stone-dot {
  background: linear-gradient(135deg, #f3dca0, #a8853f);
  box-shadow: 0 0 5px rgba(197, 160, 89, 0.7);
}

/* ---------- 阶段 1 新增：词条汇总栏 / 淬炼高亮 / 圆满质变徽章 / 宗门锁提示 ---------- */
.sect-lock-banner {
  margin: 6px 0 10px;
  padding: 8px 11px;
  background: linear-gradient(180deg, rgba(84, 28, 24, 0.78), rgba(42, 14, 12, 0.9));
  border: 1px solid #a8493c;
  border-radius: 3px;
  color: #ffd8cf;
  font-size: 12px;
  line-height: 1.5;
}

.affix-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  margin: 6px 0 10px;
  background: rgba(16, 26, 30, 0.85);
  border: 1px solid rgba(197, 160, 89, 0.42);
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.affix-bar-title {
  color: #f0d794;
  font-weight: bold;
}

.affix-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(25, 42, 46, 0.85);
  border: 1px solid #487370;
  color: #ccebe4;
  font-size: 11px;
}

.affix-pill.is-stones {
  border-color: #a8853f;
  color: #ffe39b;
}

.affix-inline {
  color: #8ee8d8;
}

.reforge-pill {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #5e3818, #38200d);
  border: 1px solid #d98d45;
  color: #ffe2b0;
  font-size: 11px;
  font-weight: bold;
}

.reforge-inline {
  color: #ffb870;
}

.skill-traits-row {
  margin-top: 4px;
  font-size: 12px;
  color: #9ee8ff;
  line-height: 1.4;
}

.max-trait-badge {
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px dashed rgba(140, 115, 75, 0.55);
  background: rgba(24, 24, 18, 0.6);
  color: #9e9682;
  font-size: 11px;
  line-height: 1.4;
}

.max-trait-badge.is-unlocked {
  border-style: solid;
  border-color: #d9b15f;
  background: linear-gradient(180deg, rgba(78, 59, 22, 0.62), rgba(38, 28, 12, 0.8));
  color: #ffe7a3;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(197, 160, 89, 0.25);
}

/* =========================================================
   第 3 阶段：同伴入队战棋 · 魔道黑市 · 江湖奇遇样式
   ========================================================= */
.companion-pill {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #48b89b;
  background: linear-gradient(180deg, rgba(24, 68, 62, 0.92), rgba(14, 42, 39, 0.96));
  color: #a4f5df;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.companion-pill:hover {
  border-color: #88f7da;
  box-shadow: 0 0 8px rgba(72, 184, 155, 0.38);
  transform: translateY(-1px);
}

.b-companion-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(18, 40, 38, 0.94), rgba(12, 24, 24, 0.96));
  border: 1px solid #3c7a6e;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.b-hero-card.is-active-ally,
.b-companion-card.is-active-ally {
  border-color: #f0ca6e;
  box-shadow: 0 0 10px rgba(240, 202, 110, 0.35);
}

.b-companion-card.is-fallen {
  opacity: 0.62;
  border-color: #6b4343;
}

.b-comp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.b-comp-name {
  font-size: 13px;
  font-weight: bold;
  color: #9bf5df;
}

.b-comp-mode-btn {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #59a896;
  background: rgba(25, 58, 54, 0.92);
  color: #dffcf4;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.b-comp-mode-btn:hover {
  border-color: #f0ca6e;
  color: #ffe9a8;
}

.b-comp-mode-btn.is-manual {
  border-color: #e6b853;
  background: rgba(82, 60, 22, 0.92);
  color: #ffe8a6;
}

.comp-hp-fill {
  background: linear-gradient(90deg, #2d9e7e, #66e6bd);
}

.adv-choices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.adv-choice-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #486a66;
  background: linear-gradient(180deg, rgba(24, 38, 40, 0.92), rgba(16, 25, 27, 0.96));
  color: #f0e8d5;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.adv-choice-btn:hover {
  border-color: #e3bc66;
  background: linear-gradient(180deg, rgba(44, 52, 34, 0.94), rgba(24, 30, 22, 0.98));
  transform: translateY(-1px);
}

.adv-choice-label {
  font-size: 14px;
  font-weight: bold;
  color: #fbe6b0;
}

.adv-choice-hint {
  font-size: 12px;
  color: #9ec6bf;
}

.adv-tag-danger {
  border-color: #d94c66 !important;
  background: rgba(128, 22, 46, 0.72) !important;
  color: #ffc2ce !important;
}

.adv-tag-fortune {
  border-color: #48c994 !important;
  background: rgba(24, 88, 62, 0.72) !important;
  color: #c2ffdf !important;
}

.adv-tag-rare {
  border-color: #b47aff !important;
  background: rgba(84, 34, 138, 0.78) !important;
  color: #edd8ff !important;
}

.adv-merchant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.adv-merchant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid #486a66;
  background: rgba(16, 26, 29, 0.92);
}

.adv-merchant-row.is-sold {
  opacity: 0.56;
}

.evil-market-banner {
  margin: 10px 0 6px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #b83a58;
  background: linear-gradient(90deg, rgba(84, 18, 34, 0.85), rgba(40, 12, 22, 0.9));
  color: #ffb8c6;
  font-size: 12px;
  font-weight: bold;
}

.pref-hint-banner {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #4c736b;
  background: rgba(20, 38, 36, 0.78);
  color: #b7ebe0;
  font-size: 12px;
}

.rumor-note {
  margin-top: 6px;
  padding: 6px 9px;
  border-left: 3px solid #d9b15f;
  background: rgba(46, 38, 20, 0.65);
  color: #f5dfaa;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- P1：稀有任务品阶徽章 + 四大境界阶段玩法导览 ---------- */
.quest-rarity-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid transparent;
}
.quest-rarity-pill.rarity-normal {
  color: #7ee8ab;
  border-color: rgba(110, 232, 158, 0.45);
  background: rgba(45, 138, 104, 0.22);
}
.quest-rarity-pill.rarity-rare {
  color: #d9b8ff;
  border-color: rgba(164, 114, 240, 0.72);
  background: rgba(110, 62, 178, 0.34);
  box-shadow: 0 0 6px rgba(164, 114, 240, 0.22);
}
.quest-rarity-pill.rarity-epic {
  color: #ffe285;
  border-color: rgba(245, 193, 86, 0.85);
  background: linear-gradient(90deg, rgba(168, 110, 22, 0.45), rgba(112, 72, 14, 0.45));
  box-shadow: 0 0 8px rgba(245, 193, 86, 0.28);
}

.quest-limited-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  color: #ffbe8e;
  border: 1px solid rgba(232, 134, 72, 0.65);
  background: rgba(154, 64, 26, 0.28);
}

.stage-guide-card {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #486b66;
  background: linear-gradient(180deg, rgba(20, 34, 36, 0.92), rgba(14, 22, 24, 0.96));
}

.stage-guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #f0e6cf;
}

.stage-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stage-pill {
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid #48605c;
  color: #8ea6a2;
  background: rgba(20, 30, 32, 0.7);
}
.stage-pill.is-unlocked {
  color: #7ef5b8;
  border-color: rgba(92, 224, 168, 0.5);
  background: rgba(34, 92, 72, 0.35);
}
.stage-pill.is-current {
  color: #ffe07a;
  font-weight: bold;
  border-color: rgba(245, 203, 105, 0.8);
  background: rgba(138, 96, 22, 0.4);
}

.stage-guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 720px) {
  .stage-guide-cols {
    grid-template-columns: 1fr;
  }
}

.stage-guide-col {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid rgba(72, 107, 102, 0.55);
  background: rgba(14, 24, 26, 0.65);
}

.stage-guide-col.is-active {
  border-color: rgba(92, 224, 168, 0.45);
}

.stage-guide-col.is-next {
  border-color: rgba(245, 203, 105, 0.35);
}

.stage-col-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stage-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: #c9dbd7;
}

.stage-list li {
  margin-bottom: 3px;
}

.stage-next-hint {
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(124, 88, 22, 0.24);
  border-left: 3px solid #e6ba5c;
  color: #f7dfb0;
  font-size: 12px;
}

.stage-unlock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.stage-unlock-item {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(24, 42, 40, 0.8);
  border: 1px solid rgba(92, 224, 168, 0.35);
  font-size: 12.5px;
  color: #e4f2ee;
  line-height: 1.45;
}

.stage-next-tip {
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 4px;
  background: rgba(126, 92, 22, 0.28);
  border: 1px solid rgba(245, 203, 105, 0.45);
  font-size: 12px;
  color: #fbe5ae;
}

/* ---------- P2：好感卡阶瓶颈标签 & 每日送礼上限 & 结缘任务标签 ---------- */
.affinity-lock-tag {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  padding: 2px 6px;
  border-radius: 3px;
  text-align: center;
}
.affinity-lock-tag.locked {
  color: #ffd982;
  background: rgba(140, 82, 18, 0.38);
  border: 1px solid rgba(245, 193, 86, 0.72);
  font-weight: bold;
}
.affinity-lock-tag.unlocked {
  color: #9ed4cb;
  background: rgba(24, 48, 46, 0.55);
  border: 1px solid rgba(82, 138, 128, 0.45);
}
.daily-gift-banner {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #49756d;
  background: rgba(18, 36, 35, 0.85);
  color: #cfece6;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.daily-gift-banner.exhausted {
  border-color: #a66a35;
  background: rgba(68, 40, 18, 0.55);
  color: #ffdaa8;
}
.quest-rarity-pill.pill-cap {
  color: #ffd982;
  border-color: rgba(245, 193, 86, 0.78);
  background: rgba(145, 92, 20, 0.36);
}
.quest-rarity-pill.pill-bond {
  color: #9bf5d0;
  border-color: rgba(92, 224, 168, 0.72);
  background: rgba(28, 112, 82, 0.36);
}
.quest-rarity-pill.pill-side {
  color: #9cd4ff;
  border-color: rgba(102, 178, 240, 0.65);
  background: rgba(30, 82, 128, 0.32);
}

/* ---------- P5：顶栏称号徽章 + 盛会跑马灯 + 流派双卡片 + 称号阁 + 盛会擂台 ---------- */
.hero-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-title-badge {
  cursor: pointer;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  background: rgba(24, 38, 42, 0.9);
  border: 1px solid #d9b86c;
  color: #f5cb69;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.hero-title-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(245, 203, 105, 0.45);
}

.time-pill-btn {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.time-pill-btn:hover {
  border-color: #79e8d3;
  background: rgba(32, 62, 60, 0.9);
}

.event-pill {
  cursor: pointer;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #d9a84e;
  background: rgba(94, 62, 14, 0.65);
  color: #ffe49c;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.event-pill:hover {
  transform: translateY(-1px);
}

.event-pill.is-active {
  border-color: #ffd97d;
  background: linear-gradient(90deg, rgba(160, 98, 20, 0.85), rgba(112, 66, 14, 0.85));
  color: #fff3c4;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.45);
}

.event-pill.is-upcoming {
  border-color: #e69d45;
  background: rgba(110, 58, 16, 0.72);
  color: #ffd9a8;
}

.event-pill.is-privilege {
  border-color: #5ee8a8;
  background: rgba(22, 84, 62, 0.75);
  color: #b7ffdf;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.branch-card {
  padding: 9px 10px;
  border-radius: 5px;
  border: 1px solid #3f6660;
  background: rgba(18, 30, 32, 0.85);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.branch-card.is-selected {
  border-color: #ffd97d;
  background: rgba(48, 42, 22, 0.78);
  box-shadow: 0 0 8px rgba(255, 217, 125, 0.25);
}

.branch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.branch-card-title {
  font-weight: bold;
  font-size: 13.5px;
}

.minor-perk-card {
  padding: 9px 11px;
  border-radius: 5px;
  border: 1px solid #d9a05b;
  background: rgba(46, 36, 22, 0.75);
  margin-bottom: 10px;
  font-size: 12.5px;
  color: #f6e7cb;
  line-height: 1.5;
}

.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.title-card {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #395c57;
  background: rgba(16, 28, 30, 0.86);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title-card.is-locked {
  opacity: 0.68;
  border-style: dashed;
}

.title-card.is-equipped {
  border-color: #ffd97d;
  background: rgba(54, 45, 20, 0.8);
  box-shadow: 0 0 8px rgba(255, 217, 125, 0.28);
}

.title-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.title-card-name {
  font-weight: bold;
  font-size: 13px;
}

.tournament-card {
  max-width: 780px;
}

.tournament-priv-banner {
  padding: 8px 11px;
  border-radius: 5px;
  border: 1px solid #497e74;
  background: rgba(18, 40, 38, 0.85);
  color: #d4f0e8;
  font-size: 12.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tournament-priv-banner.is-active {
  border-color: #6ee89e;
  background: rgba(20, 68, 48, 0.82);
}

.tournament-event-card {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #416863;
  background: rgba(18, 30, 32, 0.88);
  margin-bottom: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tournament-event-card.is-open {
  border-color: #ffd97d;
  background: rgba(46, 38, 18, 0.84);
}

.tournament-event-card.is-upcoming {
  border-color: #e69d45;
}

.tournament-bracket {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.round-step {
  padding: 8px 9px;
  border-radius: 5px;
  border: 1px solid #3c5f5a;
  background: rgba(16, 26, 28, 0.85);
  font-size: 12px;
}

.round-step.is-current {
  border-color: #ffd97d;
  background: rgba(58, 46, 18, 0.82);
}

.round-step.is-cleared {
  border-color: #6ee89e;
  background: rgba(20, 60, 44, 0.78);
}

/* =========================================================
   V1A：大地图全屏沉浸 HUD + 十二时辰古风罗盘 + 立绘槽 + 《魔塔》风词条卡
   ========================================================= */

.game-shell {
  width: 100vw;
  height: 100dvh;
  border: none;
  box-shadow: none;
}

.stage-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #090e10;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #0b1215;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------- 统一立绘槽（本地立绘平滑显示，像素肖像锐利放大） ---------- */
.portrait-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: #0b1114;
}

.portrait-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transition: opacity 0.2s ease;
}

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: auto;
  z-index: 2;
}

.portrait-stage.has-custom-portrait .portrait-canvas {
  opacity: 0;
}

.portrait-slot,
.modal-portrait-frame {
  padding: 0 !important;
  overflow: hidden;
}

/* ---------- 左上悬浮 HUD（《大侠立志传》风） ---------- */
.hud-top-left {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: min(360px, calc(100vw - 280px));
  pointer-events: none;
}

.hud-top-left > * {
  pointer-events: auto;
}

.hud-hero-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 9px 11px;
  background: linear-gradient(165deg, rgba(19, 28, 31, 0.88), rgba(10, 15, 17, 0.88));
  border: 1px solid rgba(197, 160, 89, 0.72);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(7, 10, 11, 0.8),
    inset 0 0 0 2px rgba(197, 160, 89, 0.14),
    0 10px 26px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
}

.hero-avatar-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 3px;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.hero-avatar-btn:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.45));
}

.hero-avatar-btn .hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 3px;
  border: 1px solid var(--gold-lt);
}

.hero-status-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 196px;
}

.hud-hero-card .hero-name {
  font-size: 16px;
  letter-spacing: 1px;
}

.hero-realm-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-hero-card .hero-title {
  font-size: 11.5px;
  color: #9de0d1;
  line-height: 1.25;
}

.hud-exp-track {
  width: 100%;
  height: 4px;
  background: rgba(8, 13, 15, 0.9);
  border: 1px solid rgba(140, 115, 75, 0.45);
  border-radius: 2px;
  overflow: hidden;
}

.hud-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #b88a34, #ffe084);
  transition: width 0.25s ease;
}

.hud-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-bars-stack .stat-item {
  gap: 6px;
  font-size: 11.5px;
}

.hud-bars-stack .stat-label {
  width: 14px;
  font-size: 11px;
  color: #d6cbb0;
}

.hud-bars-stack .bar-track {
  flex: 1;
  width: auto;
  min-width: 96px;
  height: 9px;
}

.hud-bars-stack .stat-num {
  min-width: 58px;
  font-size: 11px;
  text-align: right;
  font-family: var(--font-num);
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.hero-meta-row .stat-pill {
  padding: 2px 7px;
  font-size: 11.5px;
}

.hero-meta-row .karma-pill {
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 3px;
}

/* 可折叠【当前仙缘追踪】浮卡 */
.hud-quest-card {
  width: 100%;
  max-width: 344px;
  background: linear-gradient(170deg, rgba(16, 24, 27, 0.84), rgba(10, 15, 17, 0.86));
  border: 1px solid rgba(140, 115, 75, 0.58);
  border-radius: 4px;
  padding: 6px 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.quest-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quest-head-label {
  font-family: var(--font-serif);
  font-size: 12px;
  color: #e6cf98;
  letter-spacing: 1px;
  flex: 1;
}

.quest-collapse-btn {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(140, 115, 75, 0.55);
  background: rgba(20, 31, 34, 0.9);
  color: #e9d9b2;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.quest-collapse-btn:hover {
  border-color: var(--gold-lt);
  color: #fff3d1;
}

.quest-card-body {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: #d6e4dc;
}

.hud-quest-card.is-collapsed .quest-card-body {
  display: none;
}

.hud-dynamic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- 右上悬浮 HUD（地点 + 十二时辰罗盘 + 紧凑功能阵） ---------- */
.hud-top-right {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.hud-top-right > * {
  pointer-events: auto;
}

.hud-compass-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-loc-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.hud-loc-stack .location-tag {
  background: rgba(14, 21, 24, 0.88);
  border: 1px solid rgba(197, 160, 89, 0.68);
  padding: 5px 12px;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
}

.hud-loc-subrow {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hud-top-right .coord-badge {
  position: static;
  background: rgba(13, 21, 24, 0.86);
  border: 1px solid rgba(89, 133, 125, 0.65);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-family: var(--font-num);
  color: #ccebe3;
  pointer-events: auto;
}

.vein-badge {
  background: rgba(13, 23, 26, 0.86);
  border: 1px solid rgba(111, 167, 154, 0.55);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 11.5px;
  color: #a9dcd2;
  backdrop-filter: blur(4px);
}

.vein-badge.is-rich {
  border-color: rgba(126, 245, 184, 0.72);
  color: #93f7c8;
  background: rgba(16, 42, 36, 0.88);
}

.vein-badge.is-denied {
  border-color: rgba(224, 109, 99, 0.72);
  color: #ffb8b0;
  background: rgba(54, 20, 22, 0.88);
}

/* 圆形十二时辰罗盘控件 */
.shichen-compass-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 6px;
  border-radius: 10px;
  border: 1px solid rgba(197, 160, 89, 0.68);
  background: linear-gradient(180deg, rgba(18, 27, 30, 0.9), rgba(10, 15, 18, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    0 10px 26px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  color: var(--paper);
  backdrop-filter: blur(5px);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.shichen-compass-btn:hover {
  transform: translateY(-1px);
  border-color: #f0cf80;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(197, 160, 89, 0.32),
    0 12px 26px rgba(0, 0, 0, 0.7);
}

.shichen-compass-btn.is-night {
  border-color: rgba(122, 174, 222, 0.7);
}

.shichen-compass-canvas {
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 50%;
}

.compass-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.2;
}

.compass-date-text {
  font-size: 10.5px;
  color: #b7c8c2;
  font-family: var(--font-num);
}

.compass-shichen-text {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: bold;
  color: #f3dc9e;
  letter-spacing: 0.5px;
}

/* 紧凑古风图标按钮阵 */
.hud-icon-dock {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  gap: 4px;
  padding: 5px;
  background: rgba(13, 20, 23, 0.85);
  border: 1px solid rgba(140, 115, 75, 0.55);
  border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
}

.hud-icon-btn {
  position: relative;
  width: 40px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(140, 115, 75, 0.5);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(28, 42, 46, 0.92), rgba(16, 24, 27, 0.94));
  color: #f0e4c8;
  cursor: pointer;
  padding: 2px;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.hud-icon-btn:hover {
  transform: translateY(-1px);
  border-color: #e6c26e;
  background: linear-gradient(180deg, rgba(42, 62, 66, 0.95), rgba(22, 34, 38, 0.95));
}

.hud-icon-btn.hud-btn-subtle {
  border-color: rgba(88, 118, 114, 0.5);
  background: linear-gradient(180deg, rgba(22, 32, 35, 0.88), rgba(14, 20, 22, 0.92));
  color: #c2dad3;
}

.hud-icon-btn.is-active {
  border-color: #6fe8c8;
  background: linear-gradient(180deg, rgba(28, 72, 66, 0.94), rgba(16, 40, 38, 0.94));
  color: #a8ffeb;
  box-shadow: 0 0 10px rgba(111, 232, 200, 0.35);
}

.hud-icon-btn.is-muted {
  opacity: 0.62;
  color: #889e9a;
}

.hud-ic-glyph {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
}

.hud-ic-lbl {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.5px;
}

.hud-ic-key {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0 3px;
  margin: 0;
  font-size: 9px;
  line-height: 1.2;
  border-radius: 2px;
  background: rgba(8, 12, 14, 0.85);
  border: 1px solid rgba(197, 160, 89, 0.45);
  color: #e8cf8e;
  box-shadow: none;
}

/* ---------- 底部居中悬浮操作坞 + 自动淡出 Toast ---------- */
.toast-box {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translate(-50%, 10px);
  width: auto;
  min-width: 280px;
  max-width: min(760px, calc(100vw - 40px));
  padding: 8px 18px;
  font-size: 13.5px;
  opacity: 0;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast-box.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hud-bottom-dock {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  background: linear-gradient(180deg, rgba(18, 27, 30, 0.9), rgba(10, 15, 17, 0.92));
  border: 1px solid rgba(197, 160, 89, 0.68);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    0 12px 28px rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

.quick-slots-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-slot-btn {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 2px 2px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.65);
  background: linear-gradient(180deg, rgba(26, 38, 42, 0.94), rgba(14, 21, 24, 0.96));
  color: #f3ead0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.quick-slot-btn:hover {
  transform: translateY(-2px);
  border-color: #ffd778;
}

.quick-slot-btn.is-empty {
  opacity: 0.48;
  border-style: dashed;
}

.quick-slot-btn.is-pinned {
  border-color: #6fe8c8;
  box-shadow: inset 0 0 0 1px rgba(111, 232, 200, 0.28);
}

.quick-slot-btn.is-pulse {
  animation: quickSlotPulse 0.36s ease;
}

@keyframes quickSlotPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(126, 245, 184, 0); }
  50% { transform: scale(1.08); box-shadow: 0 0 14px rgba(126, 245, 184, 0.65); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(126, 245, 184, 0); }
}

.quick-slot-key {
  position: absolute;
  top: 2px;
  left: 3px;
  padding: 0 3px;
  margin: 0;
  font-size: 9px;
  line-height: 1.2;
  background: rgba(8, 12, 14, 0.88);
  border: 1px solid rgba(197, 160, 89, 0.45);
  color: #f3d485;
  box-shadow: none;
}

.quick-slot-badge {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid rgba(217, 184, 108, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: bold;
  color: #fff6dc;
}

.quick-slot-name {
  font-size: 10px;
  color: #dceae4;
  line-height: 1.1;
  max-width: 48px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-slot-count {
  position: absolute;
  right: 3px;
  top: 2px;
  font-size: 9.5px;
  font-family: var(--font-num);
  font-weight: bold;
  color: #93f5d6;
}

.dock-sep {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(197, 160, 89, 0.55), transparent);
}

.dock-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid rgba(111, 167, 154, 0.65);
  background: linear-gradient(180deg, rgba(28, 52, 54, 0.92), rgba(16, 30, 32, 0.95));
  color: #e4f7f1;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease;
}

.dock-action-btn:hover {
  transform: translateY(-1px);
  border-color: #8bf0da;
}

.dock-action-btn kbd {
  font-size: 10px;
  padding: 1px 4px;
}

.dock-help-wrap {
  position: relative;
}

.dock-help-btn {
  width: 30px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.58);
  background: rgba(20, 28, 31, 0.92);
  color: #ebd08c;
  font-weight: bold;
  cursor: pointer;
}

.dock-help-btn:hover {
  border-color: var(--gold-lt);
}

.dock-help-popover {
  position: absolute;
  right: 0;
  bottom: 44px;
  width: 268px;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid var(--gold-lt);
  background: rgba(12, 18, 21, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #dce9e3;
}

.dock-help-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: bold;
  color: #f3d794;
  border-bottom: 1px solid rgba(140, 115, 75, 0.4);
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.dock-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ---------- 《魔塔》风双栏弹窗立绘槽 & 彩色图标化词条系统 ---------- */
.modal-overlay {
  z-index: 25;
}

.npc-dialog-card {
  max-width: 860px;
}

.encounter-card {
  max-width: 820px;
}

.modal-portrait-layout {
  display: flex;
  align-items: stretch;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.modal-portrait-rail {
  width: 174px;
  flex-shrink: 0;
  padding: 14px 12px;
  background: linear-gradient(180deg, rgba(11, 17, 19, 0.95), rgba(15, 23, 26, 0.92));
  border-right: 1px solid rgba(140, 115, 75, 0.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  overflow-y: auto;
}

.enc-portrait-rail {
  background: linear-gradient(180deg, rgba(30, 14, 16, 0.95), rgba(16, 15, 19, 0.94));
  border-right-color: rgba(168, 57, 44, 0.48);
}

.modal-portrait-frame {
  width: 144px;
  height: 160px;
  border-radius: 4px;
  border: 2px solid var(--gold-lt);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    0 8px 22px rgba(0, 0, 0, 0.68);
  flex-shrink: 0;
}

.enc-avatar.modal-portrait-frame {
  border-color: #e07668;
}

.portrait-meta-stack {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.modal-content-rail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-content-rail .dialog-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* 《魔塔》风主角展示卡与四色属性格 */
.mota-hero-showcase {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.55);
  background: linear-gradient(160deg, rgba(22, 34, 37, 0.92), rgba(12, 18, 21, 0.94));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.mota-hero-showcase.is-compact {
  margin-bottom: 6px;
}

.mota-showcase-portrait {
  width: 100px;
  height: 112px;
  border-radius: 4px;
  border: 1.5px solid var(--gold-lt);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.mota-showcase-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mota-showcase-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mota-showcase-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: bold;
  color: #f3ddb0;
  letter-spacing: 1px;
}

.mota-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mota-stat-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid rgba(98, 120, 114, 0.45);
  background: rgba(14, 21, 24, 0.85);
  font-size: 12px;
}

.mota-stat-cell span {
  color: #bed3cd;
}

.mota-stat-cell strong {
  font-family: var(--font-num);
}

.mota-stat-cell.is-crimson strong { color: #ff9c88; }
.mota-stat-cell.is-cyan strong { color: #7fe9ff; }
.mota-stat-cell.is-jade strong { color: #83f5bc; }
.mota-stat-cell.is-purple strong { color: #d8a6ff; }

/* 《魔塔》风彩色图标词条徽章 */
.mota-trait-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.mota-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.3;
  border: 1px solid rgba(197, 160, 89, 0.55);
  background: rgba(52, 42, 18, 0.42);
  color: #ffe7a8;
  white-space: nowrap;
}

.mota-badge i {
  font-style: normal;
  font-size: 11px;
}

.mota-badge--gold {
  border-color: rgba(235, 192, 92, 0.65);
  background: rgba(86, 62, 18, 0.42);
  color: #ffe39c;
}

.mota-badge--jade {
  border-color: rgba(92, 224, 168, 0.6);
  background: rgba(20, 74, 54, 0.44);
  color: #a6f7d2;
}

.mota-badge--cyan {
  border-color: rgba(96, 206, 242, 0.6);
  background: rgba(20, 62, 82, 0.46);
  color: #aeefff;
}

.mota-badge--crimson {
  border-color: rgba(236, 108, 98, 0.65);
  background: rgba(92, 26, 24, 0.48);
  color: #ffc2ba;
}

.mota-badge--purple {
  border-color: rgba(182, 136, 255, 0.65);
  background: rgba(64, 34, 96, 0.48);
  color: #e4ccff;
}

/* ---------- 响应式自适应（中小屏幕与窄窗不溢屏不遮挡） ---------- */
@media (max-width: 960px) {
  .hud-top-left {
    top: 8px;
    left: 8px;
    max-width: min(300px, calc(100vw - 230px));
  }
  .hud-hero-card {
    padding: 7px 8px;
    gap: 8px;
  }
  .hero-avatar-btn .hero-avatar {
    width: 52px;
    height: 52px;
  }
  .hero-status-col {
    min-width: 156px;
  }
  .hud-top-right {
    top: 8px;
    right: 8px;
  }
  .shichen-compass-canvas {
    width: 76px;
    height: 76px;
  }
  .hud-icon-dock {
    grid-template-columns: repeat(5, 38px);
    gap: 4px;
    padding: 4px;
  }
  .hud-icon-btn {
    width: 38px;
    height: 38px;
  }
  .hud-bottom-dock {
    bottom: 8px;
    padding: 5px 8px;
    gap: 6px;
  }
  .quick-slot-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 720px) {
  .modal-portrait-layout {
    flex-direction: column;
  }
  .modal-portrait-rail {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid rgba(140, 115, 75, 0.48);
    padding: 10px 12px;
  }
  .modal-portrait-frame {
    width: 82px;
    height: 92px;
  }
  .portrait-meta-stack {
    justify-content: flex-start;
  }
  .mota-hero-showcase {
    flex-direction: column;
    align-items: flex-start;
  }
  .mota-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hud-quest-card {
    display: none;
  }
  .dock-action-btn kbd {
    display: none;
  }
}


/* =========================================================
   阶段 V1B：《逸剑风云决》风全屏宽屏战棋界面样式
   ========================================================= */
#battle-overlay {
  position: fixed;
  inset: 0;
  padding: 0;
  background: #070c0e;
  z-index: 30;
  display: block;
  overflow: hidden;
}

.battle-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#battle-overlay #battle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #070c0e;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
  display: block;
  cursor: pointer;
}

/* 左上角极简战场信息浮卡 */
.battle-hud-tl {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 12;
  max-width: min(410px, calc(100vw - 380px));
  pointer-events: none;
}

.b-tl-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px;
  background: linear-gradient(165deg, rgba(16, 25, 28, 0.86), rgba(8, 13, 15, 0.88));
  border: 1px solid rgba(197, 160, 89, 0.65);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(6, 9, 10, 0.8),
    inset 0 0 0 2px rgba(197, 160, 89, 0.14),
    0 10px 26px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.b-tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.battle-hud-tl .battle-title {
  font-family: var(--font-serif, "KaiTi", "STKaiti", serif);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #fae5b0;
  line-height: 1.25;
}

.battle-hud-tl .battle-turn-tag {
  padding: 2px 9px;
  font-size: 11px;
  border-radius: 3px;
  background: rgba(38, 120, 108, 0.34);
  border: 1px solid rgba(99, 217, 197, 0.65);
  color: #d9fff7;
}

.b-tl-objectives {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(9, 15, 17, 0.72);
  border: 1px solid rgba(110, 148, 142, 0.28);
}

.b-obj-win {
  color: #8bf5be;
  font-weight: bold;
}

.b-obj-sep {
  color: #627d79;
}

.b-obj-lose {
  color: #f3c19d;
}

.battle-hud-tl .battle-cam-bar {
  padding: 4px 7px;
  background: rgba(9, 15, 17, 0.68);
  border: 1px solid rgba(72, 108, 104, 0.42);
  border-radius: 3px;
  font-size: 11.5px;
}

.battle-hud-tl .b-cam-badge {
  font-size: 11.5px;
}

.battle-hud-tl .b-cam-hint {
  font-size: 11px;
}

.battle-hud-tl .b-cam-btn {
  padding: 2px 7px;
  font-size: 11px;
}

/* 右上角敌阵快速胶囊 + 平时隐藏的《魔塔》风敌方详情浮卡 */
.battle-hud-tr {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 14;
  width: min(370px, calc(100vw - 440px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  pointer-events: none;
}

.b-enemy-quickbar {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: rgba(12, 20, 22, 0.82);
  border: 1px solid rgba(168, 134, 76, 0.55);
  border-radius: 4px;
  backdrop-filter: blur(5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.b-eq-label {
  font-size: 11px;
  font-weight: bold;
  color: #d8be85;
  margin-right: 2px;
}

.b-eq-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(90, 128, 122, 0.55);
  background: rgba(20, 33, 37, 0.88);
  color: #dceee9;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.b-eq-chip:hover {
  border-color: #82ece0;
  background: rgba(31, 56, 60, 0.94);
}

.b-eq-chip.is-active,
.b-eq-chip.is-pinned {
  border-color: #f3ce6c;
  background: rgba(58, 44, 18, 0.92);
  color: #fff2c4;
}

.b-eq-chip.is-boss {
  border-color: rgba(212, 92, 72, 0.72);
  color: #ffd5c8;
}

.b-eq-hp {
  font-size: 10px;
  color: #ff9c88;
  font-weight: bold;
}

.battle-hud-tr .b-enemy-inspector {
  pointer-events: auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 9px;
  padding: 9px 10px;
  background: linear-gradient(165deg, rgba(16, 24, 27, 0.92), rgba(9, 13, 15, 0.94));
  border: 1px solid rgba(197, 160, 89, 0.72);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(6, 9, 10, 0.85),
    0 14px 32px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(7px);
}

.b-insp-portrait {
  width: 68px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.78);
  background: #0b1114;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65);
}

.b-insp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.b-insp-head-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.b-insp-close {
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 16px;
  text-align: center;
  border-radius: 3px;
  border: 1px solid rgba(140, 120, 82, 0.6);
  background: rgba(24, 34, 38, 0.9);
  color: #e6d5ad;
  font-size: 13px;
  cursor: pointer;
}

.b-insp-close:hover {
  border-color: #ff9c82;
  color: #ffd9ce;
}

.b-insp-hp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #f3dfd5;
}

.b-insp-hp-row .bar-track {
  height: 8px;
}

.b-insp-hp-row strong {
  min-width: 56px;
  text-align: right;
  font-size: 11px;
  color: #ffd5cb;
}

.enemy-hp-fill {
  background: linear-gradient(90deg, #b8322c, #f0624d);
}

.b-insp-mota-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.b-mota-chip {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: bold;
  background: rgba(22, 34, 38, 0.9);
  border: 1px solid rgba(90, 118, 114, 0.48);
  color: #d9ece7;
}

.b-mota-chip.is-crimson { color: #ff9c88; border-color: rgba(214, 88, 72, 0.55); }
.b-mota-chip.is-cyan { color: #7fe9ff; border-color: rgba(82, 186, 214, 0.52); }
.b-mota-chip.is-jade { color: #83f5bc; border-color: rgba(82, 198, 146, 0.52); }
.b-mota-chip.is-purple { color: #d8a6ff; border-color: rgba(162, 108, 224, 0.55); }

/* 右侧边缘可折叠【斗法战报】浮窗 */
.battle-log-dock {
  position: absolute;
  right: 14px;
  bottom: 184px;
  z-index: 11;
  width: min(320px, 27vw);
  pointer-events: none;
}

.battle-log-dock .battle-log-box {
  pointer-events: auto;
  padding: 7px 9px;
  background: linear-gradient(165deg, rgba(13, 20, 22, 0.80), rgba(8, 12, 14, 0.84));
  border: 1px solid rgba(140, 115, 75, 0.58);
  border-radius: 4px;
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.b-log-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.b-log-preview {
  display: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #efe1bc;
}

.b-log-toggle-btn {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(140, 115, 75, 0.6);
  background: rgba(24, 36, 40, 0.88);
  color: #e2cfa1;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.b-log-toggle-btn:hover {
  border-color: #7ee8d6;
  color: #d6fff7;
}

.battle-log-dock .battle-log-list {
  max-height: 116px;
  margin-top: 4px;
}

.battle-log-dock.is-collapsed .battle-log-list {
  display: none;
}

.battle-log-dock.is-collapsed .b-log-preview {
  display: block;
}

/* 棋盘正下方轻量战术悬停提示条 */
.battle-stage .battle-hover-tip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 162px;
  z-index: 13;
  min-height: 0;
  max-width: min(760px, calc(100vw - 380px));
  padding: 5px 14px;
  background: rgba(10, 17, 19, 0.86);
  border: 1px solid rgba(140, 168, 158, 0.55);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.38;
  color: #dcf7f0;
  text-align: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

/* 底部居中横排技能操控坞 */
.battle-bottom-dock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  z-index: 15;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.battle-bottom-dock.is-battle-over {
  opacity: 0.45;
  pointer-events: none;
}

.b-dock-row {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  gap: 9px;
  padding: 8px 11px;
  background: linear-gradient(180deg, rgba(17, 26, 29, 0.90), rgba(9, 14, 16, 0.93));
  border: 1px solid rgba(197, 160, 89, 0.72);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 1px rgba(6, 9, 10, 0.82),
    inset 0 0 0 2px rgba(197, 160, 89, 0.14),
    0 14px 34px rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(7px);
}

/* 左侧主角卡片 */
.b-dock-row .b-hero-card {
  width: 266px;
  flex-shrink: 0;
  padding: 7px 9px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.b-hero-portrait {
  width: 58px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.8);
  background: #0b1114;
}

.b-hero-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.b-hero-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.b-hero-name {
  font-family: var(--font-serif, "KaiTi", "STKaiti", serif);
  font-size: 13.5px;
  font-weight: bold;
  color: #f8e3ae;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b-hero-realm {
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10.5px;
  background: rgba(45, 118, 106, 0.34);
  border: 1px solid rgba(102, 212, 192, 0.55);
  color: #b8fff0;
  white-space: nowrap;
}

.b-dock-row .b-bar-row {
  gap: 5px;
  font-size: 11px;
}

.b-dock-row .b-bar-row strong {
  min-width: 52px;
  font-size: 10.5px;
}

.b-dock-row .b-track {
  height: 8px;
}

.b-dock-row .b-status-hint {
  font-size: 10.5px;
  padding-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b-dock-row .b-status-bar {
  min-height: 16px;
}

.b-dock-row .b-status-pill {
  font-size: 10.5px;
  padding: 0 5px;
}

/* 右侧同伴微卡 */
.b-dock-row .b-companion-card {
  width: 244px;
  flex-shrink: 0;
  padding: 7px 9px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(18, 30, 32, 0.86), rgba(10, 16, 18, 0.90));
  border: 1px solid rgba(92, 178, 158, 0.56);
  border-radius: 4px;
  cursor: pointer;
}

.b-comp-portrait {
  width: 52px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1px solid rgba(114, 216, 194, 0.72);
  background: #0b1114;
}

.b-comp-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.b-dock-row .b-comp-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b-dock-row .b-comp-mode-btn {
  padding: 1px 6px;
  font-size: 10.5px;
  flex-shrink: 0;
}

/* 中间操控坞：上方走位与朝向条 + 下方横排普攻/6技能槽/功能键 */
.b-dock-row .battle-actions-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.b-dock-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.b-dock-move-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.b-dock-move-group .b-util-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.b-dock-top-strip .b-facing-row {
  padding: 2px 6px;
  gap: 5px;
}

.b-dock-top-strip .b-face-btn {
  min-width: 24px;
  padding: 2px 5px;
}

.b-dock-slots-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.b-skill-slots-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.b-dock-slot-sep {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(197, 160, 89, 0.55), transparent);
  margin: 0 2px;
}

.b-skill-slot-wrap {
  position: relative;
}

.b-skill-slot {
  position: relative;
  width: 68px;
  height: 68px;
  padding: 4px 3px 3px;
  border-radius: 4px;
  border: 1px solid rgba(132, 152, 146, 0.55);
  background: linear-gradient(180deg, #213237 0%, #131d20 100%);
  color: #f3eee0;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.b-skill-slot:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: #8bf2e0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
}

.b-skill-slot:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.b-skill-slot.b-slot-basic {
  background: linear-gradient(180deg, #283a40 0%, #152125 100%);
  border-color: rgba(154, 188, 184, 0.6);
}

.b-skill-slot.b-slot-gold {
  background: linear-gradient(180deg, #3f3219 0%, #20190c 100%);
  border-color: rgba(196, 152, 72, 0.72);
}

.b-skill-slot.b-slot-jade {
  background: linear-gradient(180deg, #1b3f3a 0%, #0f2422 100%);
  border-color: rgba(82, 178, 156, 0.72);
}

.b-skill-slot.b-slot-crimson {
  background: linear-gradient(180deg, #4a1e26 0%, #260f14 100%);
  border-color: rgba(194, 78, 92, 0.74);
}

.b-skill-slot.b-slot-purple {
  background: linear-gradient(180deg, #322245 0%, #1b1227 100%);
  border-color: rgba(148, 102, 198, 0.74);
}

.b-skill-slot.is-weak-counter {
  border-color: #f6d36b;
  box-shadow: 0 0 10px rgba(246, 211, 107, 0.34);
}

.b-skill-slot.is-selected {
  transform: translateY(-3px);
  border-color: #8ef7e5 !important;
  box-shadow: 0 0 0 1px #8ef7e5, 0 0 14px rgba(114, 240, 218, 0.48) !important;
}

.b-skill-slot.is-empty {
  background: rgba(14, 21, 24, 0.62);
  border: 1px dashed rgba(96, 120, 116, 0.42);
  color: #627a76;
  cursor: default;
  justify-content: center;
}

.b-slot-key {
  position: absolute;
  top: 2px;
  left: 3px;
  padding: 0 3px;
  border-radius: 2px;
  background: rgba(8, 13, 15, 0.78);
  border: 1px solid rgba(168, 148, 102, 0.42);
  font-size: 9.5px;
  font-weight: bold;
  color: #e8d29c;
  line-height: 12px;
}

.b-slot-elem {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0 3px;
  border-radius: 2px;
  background: rgba(8, 13, 15, 0.82);
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: bold;
  line-height: 12px;
}

.b-slot-weak-tag {
  position: absolute;
  top: 15px;
  right: 2px;
  padding: 0 2px;
  border-radius: 2px;
  background: #b8841e;
  color: #fff6d4;
  font-size: 8.5px;
  font-weight: bold;
  line-height: 11px;
}

.b-slot-glyph {
  margin-top: 8px;
  font-family: var(--font-serif, "KaiTi", "STKaiti", serif);
  font-size: 20px;
  font-weight: bold;
  line-height: 1.05;
  color: #fae8b8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.b-slot-name {
  width: 100%;
  font-size: 10.5px;
  font-weight: bold;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  color: #f4efe2;
}

.b-slot-meta {
  font-size: 9.5px;
  color: #a6cfc6;
  line-height: 1.1;
  white-space: nowrap;
}

.b-slot-empty-txt {
  font-size: 11px;
  color: #617a76;
}

.b-slot-cd-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #ffd388;
  text-shadow: 0 2px 6px #000;
}

.b-slot-cd-mask.is-mp {
  font-size: 11px;
  color: #82d4ff;
  background: rgba(6, 12, 18, 0.56);
  align-items: flex-end;
  padding-bottom: 16px;
}

.b-dock-func-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  min-width: 82px;
}

.b-func-btn {
  flex: 1;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid #4c6d6b;
  background: #1b2d32;
  color: #e6f5f1;
  font-size: 11px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.b-func-btn:hover:not(:disabled) {
  background: #28424a;
  border-color: #86dfd0;
}

.b-func-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.b-func-btn.is-selected {
  border-color: #8ef7e5;
  background: #234d49;
}

/* 悬停招式详情浮窗 + 丹药浮层（绝对定位悬于操控坞上方，不撑高 dock 防棋盘跳动） */
.battle-skill-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  width: min(440px, 90vw);
  padding: 10px 13px;
  background: linear-gradient(165deg, rgba(16, 25, 28, 0.96), rgba(9, 13, 15, 0.97));
  border: 1px solid rgba(212, 174, 96, 0.8);
  border-radius: 4px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 26;
}

.b-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.b-pop-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.b-pop-name {
  font-family: var(--font-serif, "KaiTi", "STKaiti", serif);
  font-size: 15px;
  font-weight: bold;
  color: #fae5b0;
}

.b-pop-lv,
.b-pop-rank {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10.5px;
  background: rgba(48, 76, 74, 0.65);
  color: #cbeee6;
}

.b-pop-elem {
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: bold;
}

.b-pop-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  font-weight: bold;
  color: #8ceee0;
}

.b-pop-desc {
  font-size: 12px;
  line-height: 1.42;
  color: #e4ded0;
}

.b-pop-trait {
  font-size: 11.5px;
  color: #9ff7c4;
}

.b-pop-trait.is-max {
  color: #ffd97d;
  font-weight: bold;
}

.b-pop-weak {
  font-size: 11.5px;
  font-weight: bold;
  color: #ffe072;
}

.b-pop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.b-pop-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  background: rgba(114, 72, 168, 0.28);
  border: 1px solid rgba(190, 140, 245, 0.55);
  color: #e4c8ff;
}

.battle-bottom-dock .battle-pill-drawer {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  max-width: min(620px, 90vw);
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 24;
}

/* 居中战果画卷弹窗 */
.battle-result-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 10, 0.62);
  backdrop-filter: blur(4px);
}

.battle-result-backdrop .battle-result-box {
  width: min(520px, 92vw);
  padding: 20px 24px;
  background: linear-gradient(175deg, rgba(24, 34, 37, 0.96), rgba(12, 18, 20, 0.98));
  border: 1px solid rgba(212, 174, 96, 0.85);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 1px #06090a,
    inset 0 0 0 2px rgba(197, 160, 89, 0.34),
    0 24px 60px rgba(0, 0, 0, 0.88);
  text-align: center;
  gap: 12px;
}

/* 笔记本/窄窗自适应 */
@media (max-width: 1200px) {
  .b-dock-row .b-hero-card {
    width: 224px;
  }
  .b-hero-portrait {
    width: 48px;
    height: 54px;
  }
  .b-dock-row .b-companion-card {
    width: 208px;
  }
  .b-comp-portrait {
    width: 44px;
    height: 50px;
  }
  .b-skill-slot {
    width: 56px;
    height: 60px;
  }
  .b-slot-glyph {
    font-size: 17px;
  }
  .battle-log-dock {
    width: 260px;
    bottom: 174px;
  }
  .battle-stage .battle-hover-tip {
    bottom: 152px;
    max-width: calc(100vw - 300px);
  }
}

@media (max-height: 690px) {
  .battle-hud-tl {
    top: 8px;
    left: 10px;
  }
  .battle-hud-tr {
    top: 8px;
    right: 10px;
  }
  .battle-bottom-dock {
    bottom: 6px;
  }
  .b-skill-slot {
    width: 58px;
    height: 58px;
  }
  .b-slot-glyph {
    font-size: 17px;
    margin-top: 6px;
  }
  .battle-stage .battle-hover-tip {
    bottom: 138px;
    padding: 3px 10px;
    font-size: 11.5px;
  }
  .battle-log-dock {
    bottom: 164px;
  }
}

/* =========================================================
   阶段 V2：《大侠立志传》式集气行动条 + 水墨大招横幅 + 蓄力警报
   ========================================================= */
.battle-ctb-dock {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  width: min(468px, calc(100vw - 810px));
  min-width: 280px;
  padding: 6px 11px 5px;
  background: linear-gradient(170deg, rgba(14, 23, 26, 0.88), rgba(7, 12, 14, 0.90));
  border: 1px solid rgba(197, 160, 89, 0.68);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 1px rgba(6, 9, 10, 0.85),
    0 10px 26px rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.ctb-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctb-end-lbl {
  font-size: 10.5px;
  font-weight: bold;
  color: #9ec0b9;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ctb-gate-lbl {
  font-size: 10.5px;
  font-weight: bold;
  color: #ffe38e;
  text-shadow: 0 0 8px rgba(255, 214, 96, 0.55);
  flex-shrink: 0;
}

.ctb-track {
  position: relative;
  flex: 1;
  height: 26px;
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(16, 28, 32, 0.96) 0%, rgba(25, 45, 48, 0.96) 72%, rgba(56, 48, 22, 0.95) 100%);
  border: 1px solid rgba(128, 174, 164, 0.45);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.72);
  overflow: visible;
}

.ctb-track-fill {
  position: absolute;
  inset: 2px 4px;
  border-radius: 10px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 24px,
    rgba(197, 160, 89, 0.14) 24px,
    rgba(197, 160, 89, 0.14) 25px
  );
  pointer-events: none;
}

.ctb-track::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff0a8, #e6a83a);
  box-shadow: 0 0 10px rgba(255, 218, 108, 0.85);
}

.ctb-tokens-layer {
  position: absolute;
  inset: 0 12px;
}

.ctb-token {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #f4fffc;
  border: 2px solid #82ece0;
  background: radial-gradient(circle at 35% 30%, #28796f, #0d2b28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.78);
  transition: left 0.08s linear, transform 0.16s ease;
  cursor: pointer;
  user-select: none;
}

.ctb-token.is-hero {
  border-color: #ffe384;
  background: radial-gradient(circle at 35% 30%, #2d9689, #103b36);
  box-shadow: 0 0 10px rgba(114, 246, 224, 0.55);
  z-index: 4;
}

.ctb-token.is-companion {
  border-color: #7df5b6;
  background: radial-gradient(circle at 35% 30%, #2d875c, #113625);
  z-index: 3;
}

.ctb-token.is-enemy {
  border-color: #ff7a6b;
  background: radial-gradient(circle at 35% 30%, #992e28, #3b100e);
  color: #ffe8e2;
  z-index: 2;
}

.ctb-token.is-boss {
  width: 26px;
  height: 26px;
  border-color: #ffbd4a;
  background: radial-gradient(circle at 35% 30%, #b3221c, #3d0909);
  color: #fff0c2;
  box-shadow: 0 0 10px rgba(255, 102, 68, 0.6);
  z-index: 3;
}

.ctb-token.is-acting {
  transform: translate(-50%, -50%) scale(1.22);
  box-shadow: 0 0 14px rgba(255, 224, 110, 0.95);
  z-index: 6;
}

.ctb-token.is-charging {
  border-color: #ff4b3a;
  box-shadow: 0 0 12px rgba(255, 68, 48, 0.92);
  animation: ctbChargePulse 0.8s ease-in-out infinite alternate;
}

.ctb-token-charge-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 10px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px #000);
}

@keyframes ctbChargePulse {
  from {
    box-shadow: 0 0 6px rgba(255, 72, 52, 0.72);
  }
  to {
    box-shadow: 0 0 15px rgba(255, 134, 66, 1);
  }
}

.ctb-queue-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  font-size: 10.5px;
}

.ctb-q-lbl {
  color: #a9c4be;
  flex-shrink: 0;
  margin-right: 2px;
}

.ctb-q-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(90, 128, 122, 0.48);
  background: rgba(18, 30, 34, 0.85);
  color: #dceee9;
  white-space: nowrap;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctb-q-pill.is-hero {
  border-color: rgba(114, 246, 224, 0.65);
  color: #b8fff2;
  background: rgba(18, 54, 50, 0.86);
}

.ctb-q-pill.is-companion {
  border-color: rgba(118, 240, 174, 0.65);
  color: #c2ffd9;
  background: rgba(20, 52, 36, 0.86);
}

.ctb-q-pill.is-enemy {
  border-color: rgba(235, 102, 84, 0.55);
  color: #ffd5cd;
  background: rgba(56, 20, 18, 0.82);
}

.ctb-q-pill.is-first {
  border-color: #f6d36b;
  box-shadow: 0 0 6px rgba(246, 211, 107, 0.35);
}

.ctb-q-pill.is-charging {
  border-color: #ff5844;
  color: #ffe2b8;
  background: rgba(98, 18, 14, 0.92);
}

/* 水墨招式大横幅 */
.battle-ink-banner {
  position: absolute;
  top: 98px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  pointer-events: none;
  min-width: min(460px, 84vw);
  padding: 9px 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: inkBannerSweep 1.18s cubic-bezier(0.16, 0.84, 0.32, 1) forwards;
}

.battle-ink-banner .ink-banner-brush {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(9, 15, 18, 0.88) 18%,
    rgba(12, 21, 25, 0.95) 50%,
    rgba(9, 15, 18, 0.88) 82%,
    transparent 100%
  );
  border-top: 1px solid rgba(224, 188, 104, 0.75);
  border-bottom: 1px solid rgba(224, 188, 104, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.72);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.battle-ink-banner.is-enemy .ink-banner-brush {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(42, 10, 12, 0.88) 18%,
    rgba(62, 14, 16, 0.95) 50%,
    rgba(42, 10, 12, 0.88) 82%,
    transparent 100%
  );
  border-top-color: rgba(255, 120, 92, 0.85);
  border-bottom-color: rgba(255, 120, 92, 0.85);
}

.battle-ink-banner.is-charge .ink-banner-brush {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(78, 12, 10, 0.90) 18%,
    rgba(116, 18, 14, 0.96) 50%,
    rgba(78, 12, 10, 0.90) 82%,
    transparent 100%
  );
  border-top: 2px solid #ff5844;
  border-bottom: 2px solid #ffb95a;
}

.battle-ink-banner .ink-banner-inner {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 14px rgba(246, 212, 114, 0.38);
}

.ink-banner-actor {
  font-size: 14px;
  font-weight: bold;
  color: #9efcf0;
}

.battle-ink-banner.is-enemy .ink-banner-actor,
.battle-ink-banner.is-charge .ink-banner-actor {
  color: #ffc2b0;
}

.ink-banner-sep {
  color: #caa966;
  font-size: 15px;
}

.ink-banner-skill {
  font-family: var(--font-serif, "KaiTi", "STKaiti", serif);
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff2be;
}

.battle-ink-banner.is-charge .ink-banner-skill {
  color: #ffde8a;
}

.ink-banner-tag {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  color: #fff3cf;
  background: rgba(212, 158, 62, 0.28);
  border: 1px solid rgba(242, 202, 108, 0.6);
}

.battle-ink-banner.is-charge .ink-banner-tag {
  background: rgba(235, 56, 38, 0.42);
  border-color: #ff7e66;
  color: #ffe8d2;
}

@keyframes inkBannerSweep {
  0% {
    opacity: 0;
    transform: translate(-50%, -8px) scaleX(0.86);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, 0) scaleX(1.02);
  }
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -6px) scaleX(1.04);
  }
}

/* 敌方详情卡蓄力警报条 */
.b-insp-charge-alert {
  padding: 4px 7px;
  border-radius: 3px;
  border: 1px solid #ff5c48;
  background: linear-gradient(90deg, rgba(138, 22, 18, 0.92), rgba(74, 16, 16, 0.92));
  color: #ffe3c4;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .battle-hud-tl {
    max-width: min(350px, 44vw);
  }
  .battle-hud-tr {
    width: min(330px, 44vw);
  }
  .battle-ctb-dock {
    top: 102px;
    width: min(460px, 68vw);
  }
  .battle-ink-banner {
    top: 168px;
  }
}

@media (max-height: 690px) {
  .battle-ctb-dock {
    top: 6px;
    padding: 4px 9px;
    gap: 3px;
  }
  .ctb-track {
    height: 22px;
  }
  .ctb-token {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }
  .battle-ink-banner {
    top: 84px;
  }
}

/* ==================== 阶段 V4：右上小地图与九州大世界总览图 ==================== */
.hud-minimap-card {
  width: 248px;
  background: rgba(11, 18, 21, 0.86);
  border: 1px solid rgba(197, 160, 89, 0.58);
  border-radius: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  background: linear-gradient(90deg, rgba(24, 42, 46, 0.92), rgba(14, 24, 27, 0.9));
  border-bottom: 1px solid rgba(140, 115, 75, 0.42);
}

.minimap-title {
  font-size: 11.5px;
  font-weight: bold;
  color: #f3dc9e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.minimap-head-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.minimap-mini-btn,
.minimap-collapse-btn {
  border: 1px solid rgba(140, 115, 75, 0.55);
  border-radius: 3px;
  background: rgba(24, 38, 42, 0.92);
  color: #dff5ed;
  font-size: 10.5px;
  padding: 2px 6px;
  cursor: pointer;
  line-height: 1.25;
}

.minimap-mini-btn:hover,
.minimap-collapse-btn:hover {
  border-color: #f2cf66;
  color: #ffe8a3;
}

.minimap-canvas-wrap {
  padding: 6px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-minimap-card.is-collapsed .minimap-canvas-wrap {
  display: none;
}

.minimap-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid rgba(94, 234, 212, 0.25);
  cursor: crosshair;
  image-rendering: pixelated;
}

.minimap-legend {
  font-size: 10px;
  color: #a4bfb9;
  text-align: center;
  letter-spacing: 0.2px;
}

.mm-dot-portal { color: #5eead4; }
.mm-dot-npc { color: #48e08a; }
.mm-dot-chest { color: #ffd966; }
.mm-dot-event { color: #ffae38; font-weight: bold; }
.mm-dot-enemy { color: #ff665c; }

.world-overview-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.world-overview-canvas-box {
  background: #0d1619;
  border: 1px solid rgba(197, 160, 89, 0.58);
  border-radius: 5px;
  padding: 6px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.world-overview-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  cursor: pointer;
}

.world-dossier-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 14px;
  background: linear-gradient(160deg, rgba(20, 32, 36, 0.94), rgba(11, 18, 20, 0.95));
  border: 1px solid rgba(197, 160, 89, 0.58);
  border-radius: 5px;
}

.world-dossier-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-dossier-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.world-dossier-name {
  font-size: 16px;
  font-weight: bold;
  color: #f5deb0;
  font-family: var(--font-serif);
}

.world-fit-badge {
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.world-dossier-desc {
  font-size: 12.5px;
  color: #cbe0da;
  line-height: 1.5;
  margin: 0;
}

.world-dossier-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.world-stat-chip {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(16, 28, 31, 0.85);
  border: 1px solid rgba(89, 133, 125, 0.45);
  color: #d6efe8;
}

.world-dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

@media (max-width: 960px), (max-height: 700px) {
  .hud-minimap-card {
    width: 214px;
  }
  .minimap-legend {
    display: none;
  }
}

/* ---------- 阶段 W1：境界感知迷雾、门派江湖传闻、古传送阵弹窗 ---------- */
.fog-banner {
  padding: 9px 12px;
  border-radius: 5px;
  border: 1px dashed rgba(114, 198, 214, 0.45);
  background: rgba(16, 30, 36, 0.78);
  color: #a9d5de;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.b-insp-neigong.is-veiled,
.b-insp-skill-chip.is-veiled {
  color: #8ba5ad;
  background: rgba(24, 34, 40, 0.72);
  border-color: rgba(116, 152, 166, 0.3);
  border-style: dashed;
}

.sect-rumor-card {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(197, 160, 89, 0.42);
  background: linear-gradient(160deg, rgba(22, 34, 38, 0.92), rgba(12, 20, 24, 0.94));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sect-rumor-lead {
  font-size: 13px;
  font-weight: bold;
  color: #f4dca8;
}

.sect-rumor-body {
  font-size: 12.5px;
  color: #d2e4de;
  line-height: 1.6;
}

.sect-rumor-note {
  font-size: 11.5px;
  color: #93bab2;
  padding-top: 6px;
  border-top: 1px dashed rgba(147, 186, 178, 0.28);
}

.teleport-card {
  max-width: 680px;
  width: 94vw;
}

.tp-access-banner {
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 10px;
  border: 1px solid rgba(104, 240, 255, 0.38);
  background: rgba(18, 42, 48, 0.78);
  color: #cff6fa;
}

.tp-access-banner.is-blocked {
  border-color: rgba(235, 102, 118, 0.5);
  background: rgba(54, 20, 28, 0.78);
  color: #ffd0d6;
}

.tp-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.tp-status-badge.is-active {
  color: #68f0ff;
  background: rgba(22, 62, 72, 0.5);
}

.tp-status-badge.is-locked {
  color: #9aaeb0;
  background: rgba(34, 42, 46, 0.55);
}

.tp-status-badge.is-blocked {
  color: #ff8093;
  background: rgba(68, 22, 32, 0.55);
}

/* ---------- W3：年岁寿元、可破境按钮、破境仪式弹窗 & 闭关洞府 ---------- */
.lifespan-pill {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(114, 186, 166, 0.52);
  background: rgba(16, 32, 34, 0.9);
  color: #a9efe0;
  font-size: 11.5px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
}

.lifespan-pill.is-warn {
  border-color: #e6a844;
  background: rgba(68, 44, 14, 0.9);
  color: #ffd98a;
}

.lifespan-pill.is-critical {
  border-color: #ef636b;
  background: rgba(74, 18, 24, 0.92);
  color: #ffb0b5;
  box-shadow: 0 0 8px rgba(239, 99, 107, 0.45);
}

.hero-meta-row .lifespan-pill {
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 3px;
}

.breakthrough-pill {
  cursor: pointer;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #ffd56e;
  background: linear-gradient(90deg, rgba(165, 106, 22, 0.92), rgba(102, 56, 16, 0.92));
  color: #fff3c4;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(255, 213, 110, 0.45);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.breakthrough-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 226, 132, 0.7);
}

.breakthrough-pill.is-pending {
  border-color: #7caea6;
  background: rgba(24, 52, 50, 0.85);
  color: #c5f0e8;
  box-shadow: none;
}

.bt-modal-card {
  max-width: 720px;
  width: 94vw;
  border-color: #cfa756;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.82), 0 0 24px rgba(207, 167, 86, 0.16);
}

.bt-banner {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(207, 167, 86, 0.48);
  background: linear-gradient(155deg, rgba(38, 30, 16, 0.9), rgba(14, 24, 28, 0.92));
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.bt-stage-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bt-realm-flow {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: bold;
  color: #ffe9ad;
}

.bt-quality-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bt-quality-tier {
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid rgba(114, 146, 144, 0.35);
  background: rgba(14, 22, 26, 0.82);
  font-size: 11.5px;
  color: #9bb8b3;
}

.bt-quality-tier.is-active {
  border-color: var(--tier-color, #ffd97d);
  background: rgba(42, 34, 16, 0.9);
  color: #fff6dc;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.24);
}

.bt-section-box {
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid rgba(70, 114, 108, 0.45);
  background: rgba(14, 24, 27, 0.88);
  margin-bottom: 10px;
}

.bt-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bt-slot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bt-slot-box {
  min-height: 62px;
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px dashed rgba(130, 164, 158, 0.45);
  background: rgba(10, 17, 20, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  color: #88a8a2;
  cursor: pointer;
}

.bt-slot-box.is-filled {
  border-style: solid;
  border-color: rgba(236, 194, 102, 0.75);
  background: rgba(34, 30, 18, 0.88);
  color: #f8e8be;
}

.bt-mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.bt-mat-card {
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px solid rgba(80, 126, 120, 0.45);
  background: rgba(17, 29, 32, 0.88);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bt-mat-card.is-selected {
  border-color: #f5cd70;
  background: rgba(44, 36, 18, 0.92);
}

.bt-chance-panel {
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid rgba(198, 158, 82, 0.55);
  background: rgba(24, 31, 30, 0.92);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bt-chance-bar {
  height: 9px;
  border-radius: 5px;
  background: rgba(10, 16, 18, 0.95);
  border: 1px solid rgba(110, 145, 138, 0.35);
  overflow: hidden;
}

.bt-chance-fill {
  height: 100%;
  background: linear-gradient(90deg, #43b59b, #f3ca64);
  transition: width 0.2s ease;
}

.seclusion-panel {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(90, 158, 145, 0.52);
  background: linear-gradient(160deg, rgba(18, 34, 37, 0.94), rgba(11, 20, 24, 0.95));
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
}

.seclusion-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seclusion-mode-btn {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid rgba(94, 148, 138, 0.45);
  background: rgba(16, 28, 32, 0.9);
  color: #b7dad3;
}

.seclusion-mode-btn.is-active {
  border-color: #6fe9d3;
  background: rgba(24, 72, 66, 0.9);
  color: #e9fff9;
  box-shadow: 0 0 8px rgba(111, 233, 211, 0.25);
}

.seclusion-config-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #cde6e0;
}

.seclusion-month-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.seclusion-preview-card {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid rgba(112, 168, 155, 0.4);
  background: rgba(12, 22, 25, 0.86);
  font-size: 12.5px;
  line-height: 1.55;
  color: #d6ebe5;
}

.seclusion-wild-warn {
  padding: 6px 9px;
  border-radius: 4px;
  border: 1px solid rgba(235, 132, 82, 0.55);
  background: rgba(62, 28, 16, 0.8);
  color: #ffd3b3;
  font-size: 12px;
}

.seclusion-sub-divider {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(118, 160, 152, 0.35);
}

.bt-record-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.bt-record-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  border: 1px solid currentColor;
  background: rgba(16, 24, 28, 0.85);
}

/* ---------- 阶段 W6：天南拍卖行 / 天机阁双榜 / 暗影阁杀手组织 ---------- */
.org-pill {
  cursor: pointer;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #c5a059;
  background: rgba(58, 42, 18, 0.78);
  color: #f9e19f;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.org-pill:hover {
  transform: translateY(-1px);
}

.org-pill.is-claim {
  border-color: #ffd97d;
  background: linear-gradient(90deg, rgba(160, 104, 24, 0.88), rgba(108, 66, 16, 0.88));
  color: #fff6cf;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.45);
}

.org-pill.is-auction {
  border-color: #f0b856;
  background: rgba(102, 66, 18, 0.82);
  color: #ffebb0;
}

.org-pill.is-shadow {
  border-color: #a96bf0;
  background: rgba(74, 30, 92, 0.82);
  color: #f0d6ff;
}

.org-card {
  max-width: 860px;
  width: min(94vw, 860px);
}

.org-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 4px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.28);
}

.org-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.45);
  background: rgba(16, 24, 28, 0.88);
  font-size: 12.5px;
  color: #e4ded2;
}

.org-status-banner.is-open {
  border-color: rgba(232, 184, 82, 0.72);
  background: linear-gradient(90deg, rgba(58, 42, 16, 0.75), rgba(20, 28, 30, 0.9));
}

.org-status-banner.is-shadow {
  border-color: rgba(148, 92, 214, 0.55);
  background: linear-gradient(90deg, rgba(46, 24, 66, 0.78), rgba(18, 22, 28, 0.92));
}

.org-status-banner.is-warn {
  border-color: rgba(220, 96, 86, 0.65);
  background: rgba(58, 22, 22, 0.78);
}

.org-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 10px;
}

.org-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.org-card-box {
  padding: 10px 11px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.42);
  background: rgba(14, 21, 24, 0.9);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.org-card-box.is-highlight {
  border-color: rgba(235, 191, 96, 0.8);
  box-shadow: 0 0 12px rgba(235, 191, 96, 0.16);
}

.org-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.org-card-title-col {
  flex: 1;
  min-width: 0;
}

.org-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f3e8d2;
}

.org-card-foot {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed rgba(140, 115, 75, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.org-live-stage {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.org-seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
}

.org-seat-card {
  padding: 7px 9px;
  border-radius: 4px;
  border: 1px solid rgba(120, 136, 146, 0.35);
  background: rgba(18, 25, 29, 0.88);
}

.org-seat-card.is-leading {
  border-color: #f0b856;
  background: rgba(68, 46, 16, 0.72);
}

.org-seat-card.is-folded {
  opacity: 0.55;
}

.org-seat-name {
  font-size: 12.5px;
  font-weight: bold;
  color: #eadcc0;
}

.org-log-box {
  max-height: 185px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.35);
  background: rgba(10, 15, 18, 0.92);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.org-log-line {
  font-size: 12px;
  line-height: 1.45;
  color: #d6d0c4;
  border-bottom: 1px dashed rgba(140, 115, 75, 0.16);
  padding-bottom: 3px;
}

.org-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.org-search-input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.55);
  background: rgba(12, 18, 22, 0.95);
  color: #efe9dc;
  font-size: 12.5px;
}

.org-select {
  flex: 1;
  min-width: 220px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(140, 115, 75, 0.55);
  background: rgba(12, 18, 22, 0.95);
  color: #efe9dc;
  font-size: 12.5px;
}

.org-chip-btn {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid rgba(130, 146, 154, 0.42);
  background: rgba(16, 24, 28, 0.9);
  color: #c2d4d9;
}

.org-chip-btn.is-active {
  border-color: #e6ba62;
  background: rgba(74, 54, 22, 0.86);
  color: #fff0c4;
}

.org-rank-badge {
  min-width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid rgba(140, 115, 75, 0.4);
  background: rgba(20, 28, 32, 0.9);
  color: #d9d0bd;
}

.org-rank-badge.is-top3 {
  border-color: #ffd873;
  background: rgba(78, 56, 18, 0.86);
  color: #ffe799;
}

.item-row.is-hero-rank-row {
  border-color: rgba(242, 198, 98, 0.72);
  background: rgba(54, 42, 16, 0.55);
}

/* =========================================================================
   阶段 W7 & 多阶灵石货币系统样式
   ========================================================================= */
.stone-tier {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  white-space: nowrap;
}

.stone-tier.is-extreme {
  color: #ffd86b;
  text-shadow: 0 0 6px rgba(255, 216, 107, 0.52);
}

.stone-tier.is-high {
  color: #d69eff;
  text-shadow: 0 0 5px rgba(199, 142, 255, 0.45);
}

.stone-tier.is-mid {
  color: #6ee8a8;
}

.stone-tier.is-low {
  color: #7ce8dd;
}

.wallet-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: linear-gradient(90deg, rgba(20, 30, 36, 0.92), rgba(34, 28, 18, 0.88));
  font-size: 12.5px;
}

.wallet-strip-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.wallet-strip-title {
  font-weight: 700;
  color: #fae6b4;
}

.wallet-rate-hint {
  font-size: 11px;
  color: #9bb5b0;
}

.wallet-tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-tier-badge,
.wallet-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 18, 22, 0.82);
}

.wallet-tier-lbl {
  font-size: 11.5px;
  opacity: 0.9;
}

.wallet-tier-badge.is-extreme {
  border-color: rgba(255, 216, 107, 0.65);
  color: #ffd86b;
}

.wallet-tier-badge.is-high {
  border-color: rgba(199, 142, 255, 0.6);
  color: #d69eff;
}

.wallet-tier-badge.is-mid {
  border-color: rgba(110, 232, 168, 0.55);
  color: #6ee8a8;
}

.wallet-tier-badge.is-low {
  border-color: rgba(124, 232, 221, 0.48);
  color: #7ce8dd;
}

.karma-alert-pill {
  cursor: pointer;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #d47b8c;
  background: rgba(68, 24, 34, 0.82);
  color: #ffdce3;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.karma-alert-pill:hover {
  transform: translateY(-1px);
}

.karma-alert-pill.is-witness {
  border-color: #ff5c6c;
  background: linear-gradient(90deg, rgba(168, 24, 38, 0.92), rgba(112, 14, 24, 0.92));
  color: #fff2f4;
  box-shadow: 0 0 10px rgba(255, 92, 108, 0.65);
  animation: w7WitnessPulse 1.2s ease-in-out infinite;
}

.karma-alert-pill.is-pursuit {
  border-color: #ff9a42;
  background: linear-gradient(90deg, rgba(132, 62, 16, 0.9), rgba(88, 36, 14, 0.9));
  color: #ffe8cf;
  box-shadow: 0 0 8px rgba(255, 154, 66, 0.45);
}

@keyframes w7WitnessPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 92, 108, 0.45);
  }
  50% {
    box-shadow: 0 0 14px rgba(255, 92, 108, 0.95);
  }
}

.scene-recon-banner {
  margin: 6px 0 8px;
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid rgba(180, 160, 120, 0.4);
  background: rgba(16, 24, 28, 0.86);
}

.scene-recon-banner.is-public {
  border-color: rgba(255, 96, 112, 0.72);
  background: rgba(74, 22, 28, 0.78);
  color: #ffd9de;
}

.scene-recon-banner.is-witnessed {
  border-color: rgba(246, 174, 70, 0.78);
  background: rgba(74, 48, 14, 0.78);
  color: #ffe8bf;
}

.scene-recon-banner.is-covert {
  border-color: rgba(132, 198, 164, 0.68);
  background: rgba(18, 46, 38, 0.78);
  color: #d3fbe4;
}

.revenge-modal-card {
  max-width: 560px;
  width: min(92vw, 560px);
  border-color: rgba(235, 94, 108, 0.78);
  box-shadow: 0 0 28px rgba(178, 32, 48, 0.48);
}

.revenge-evidence-banner {
  margin: 8px 16px 0;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.48;
  border: 1px solid rgba(255, 118, 92, 0.65);
  background: rgba(78, 26, 24, 0.78);
  color: #ffe1d6;
}

.revenge-evidence-banner.is-circumstantial {
  border-color: rgba(230, 186, 98, 0.55);
  background: rgba(62, 46, 18, 0.72);
  color: #ffefc4;
}

.crime-ledger-card {
  border: 1px solid rgba(210, 102, 124, 0.42);
  background: linear-gradient(180deg, rgba(34, 18, 24, 0.76), rgba(18, 22, 26, 0.85));
}

/* ==================== 阶段 S1：创角 / 多玉简存档 / 百晓手札 / 设置 / 战棋倍速托管 ==================== */
.b-ctrl-speed.is-active,
.b-ctrl-auto.is-active {
  background: linear-gradient(180deg, #4b391a 0%, #2b200d 100%);
  border-color: #ffd86b;
  color: #fff2be;
  box-shadow: 0 0 8px rgba(255, 216, 107, 0.35);
}

.char-create-card {
  width: min(96vw, 920px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.cc-body {
  max-height: 64vh;
  overflow-y: auto;
  padding: 12px 16px;
}

.cc-reinc-banner {
  margin: 8px 16px 0;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #d8f8ff;
  border: 1px solid rgba(110, 216, 255, 0.65);
  background: linear-gradient(90deg, rgba(22, 54, 72, 0.85), rgba(32, 30, 66, 0.85));
}

.cc-top-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}

.cc-identity-box,
.cc-root-box {
  background: rgba(14, 22, 26, 0.82);
  border: 1px solid rgba(128, 162, 150, 0.35);
  border-radius: 6px;
  padding: 10px 12px;
}

.cc-identity-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cc-preview-wrap {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(206, 174, 104, 0.55);
  background: radial-gradient(circle at 50% 45%, rgba(44, 78, 76, 0.85), rgba(14, 22, 24, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-preview-canvas {
  image-rendering: pixelated;
}

.cc-name-col {
  flex: 1;
  min-width: 0;
}

.cc-field-lbl {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #e2cfa1;
  margin-bottom: 5px;
}

.cc-name-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cc-name-input {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 4px;
  border: 1px solid rgba(154, 184, 172, 0.55);
  background: rgba(10, 16, 18, 0.92);
  color: #f4efe0;
  font-size: 13.5px;
  outline: none;
}

.cc-name-input:focus {
  border-color: #ffd86b;
  box-shadow: 0 0 0 2px rgba(255, 216, 107, 0.2);
}

.cc-appearance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.cc-swatch-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid rgba(112, 144, 136, 0.42);
  background: rgba(20, 31, 34, 0.85);
  color: #d6e6e1;
  font-size: 11.5px;
  cursor: pointer;
}

.cc-swatch-btn.is-selected {
  border-color: #ffd86b;
  background: rgba(54, 44, 22, 0.85);
  color: #fff2c4;
}

.cc-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex: 0 0 auto;
}

.cc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cc-root-qualities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.cc-root-q-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 5px;
  border: 1px solid rgba(116, 148, 140, 0.4);
  background: rgba(18, 28, 32, 0.9);
  color: #cfe0db;
  font-size: 11px;
  cursor: pointer;
}

.cc-root-q-btn.is-selected {
  border-color: var(--q-color, #ffd86b);
  background: rgba(34, 48, 52, 0.95);
  box-shadow: 0 0 8px rgba(255, 216, 107, 0.18);
}

.cc-root-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.cc-elem-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 14px;
  border: 1px solid rgba(120, 146, 140, 0.42);
  background: rgba(18, 26, 30, 0.9);
  color: #b5c9c4;
  font-size: 12px;
  cursor: pointer;
}

.cc-elem-chip.is-selected {
  background: rgba(34, 52, 54, 0.96);
  font-weight: 700;
}

.cc-root-summary {
  font-size: 12px;
  line-height: 1.48;
  color: #d4e4de;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(10, 17, 20, 0.72);
}

.cc-root-desc {
  color: #a6c0b8;
  margin-top: 2px;
}

.cc-origins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.cc-origin-card {
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid rgba(124, 152, 144, 0.36);
  background: rgba(15, 23, 27, 0.9);
  color: #dceae5;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s;
}

.cc-origin-card:hover {
  border-color: rgba(212, 182, 114, 0.7);
}

.cc-origin-card.is-selected {
  border-color: #ffd86b;
  background: linear-gradient(180deg, rgba(44, 38, 22, 0.85), rgba(18, 28, 30, 0.94));
  box-shadow: 0 0 10px rgba(255, 216, 107, 0.2);
}

.cc-org-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-org-badge {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #10171a;
  flex: 0 0 auto;
}

.cc-org-title-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cc-org-title-col small {
  font-size: 11px;
  color: #9bb5ae;
}

.cc-org-effects {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  line-height: 1.42;
}

.cc-org-pro {
  display: flex;
  gap: 4px;
  color: #8cf2b8;
}

.cc-org-con {
  display: flex;
  gap: 4px;
  color: #ff9c9c;
}

.cc-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cc-slot-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #d9cfa9;
}

.cc-slot-select {
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid rgba(140, 168, 158, 0.55);
  background: rgba(12, 20, 23, 0.94);
  color: #f0ead6;
  font-size: 12px;
}

.cc-footer-btns {
  display: flex;
  gap: 8px;
}

.save-slots-card {
  width: min(94vw, 760px);
}

.ss-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(128, 152, 144, 0.25);
  background: rgba(12, 19, 22, 0.65);
}

.ss-import-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ss-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.ss-slot-card {
  border-radius: 6px;
  border: 1px solid rgba(126, 154, 146, 0.38);
  background: rgba(16, 25, 28, 0.9);
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ss-slot-card.is-active {
  border-color: rgba(255, 216, 107, 0.72);
  background: rgba(26, 36, 36, 0.94);
}

.ss-slot-card.is-empty {
  border-style: dashed;
  opacity: 0.9;
}

.ss-slot-main {
  flex: 1 1 360px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ss-slot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #f4ead2;
  font-size: 14px;
}

.ss-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(130, 160, 150, 0.45);
  color: #a9c4bc;
}

.ss-tag.is-active {
  border-color: #7ee8c4;
  color: #8ff7d4;
}

.ss-tag.is-gold {
  border-color: #ffd86b;
  color: #ffe391;
}

.ss-slot-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #c5ded6;
}

.ss-slot-meta,
.ss-slot-time {
  font-size: 11.5px;
  color: #8aa6a0;
}

.ss-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.handbook-card {
  width: min(94vw, 780px);
}

.hb-body {
  max-height: 62vh;
  overflow-y: auto;
}

.hb-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #f3d997;
  margin-bottom: 10px;
}

.hb-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.hb-card {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(124, 158, 146, 0.34);
  background: rgba(15, 24, 28, 0.88);
}

.hb-card-head {
  font-size: 13.5px;
  font-weight: 700;
  color: #8ff2d4;
  margin-bottom: 4px;
}

.hb-card-body {
  font-size: 12.5px;
  line-height: 1.58;
  color: #d6e6e0;
}

.settings-card {
  width: min(92vw, 600px);
}

.st-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 66vh;
  overflow-y: auto;
}

.st-group {
  border: 1px solid rgba(126, 154, 146, 0.34);
  border-radius: 6px;
  background: rgba(14, 23, 27, 0.88);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #eed69a;
}

.st-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.st-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 240px;
}

.st-label strong {
  font-size: 13px;
  color: #eaf3ef;
}

.st-label small {
  font-size: 11.5px;
  color: #93afa8;
}

.st-ctrl {
  display: flex;
  align-items: center;
  gap: 7px;
}

.st-slider {
  width: 110px;
  accent-color: #6ee8c0;
}

.st-footer {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 780px) {
  .cc-top-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   手机横屏与触屏全面适配（不影响桌面端原版排版与交互）
   ========================================================= */
html,
body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

#game-canvas,
#battle-canvas {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.hud-mobile-bar {
  display: none;
}

body.is-touch-device kbd,
body.is-touch-device .b-slot-key,
body.is-touch-device .hud-ic-key,
body.is-touch-device .quick-slot-key {
  display: none !important;
}

/* ---------- 手机竖屏引导横屏遮罩 ---------- */
.mobile-rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 95;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(18, 34, 38, 0.94), rgba(6, 10, 12, 0.97));
  backdrop-filter: blur(8px);
}

body.is-mobile-ui.is-portrait:not(.portrait-dismissed) .mobile-rotate-overlay {
  display: flex;
}

.mobile-rotate-card {
  width: min(92vw, 390px);
  padding: 22px 20px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 98, 0.72);
  background: linear-gradient(170deg, rgba(17, 27, 31, 0.96), rgba(9, 14, 17, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 168, 0.14),
    0 20px 46px rgba(0, 0, 0, 0.85);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mobile-rotate-icon {
  font-size: 38px;
  line-height: 1;
  color: #f4dca8;
  animation: mobileRotateHint 2.2s ease-in-out infinite;
}

@keyframes mobileRotateHint {
  0%, 100% {
    transform: rotate(0deg);
  }
  45%, 65% {
    transform: rotate(-90deg);
  }
}

.mobile-rotate-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  color: #f6e1ad;
  letter-spacing: 1px;
}

.mobile-rotate-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #bdd4ce;
}

.mobile-rotate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

/* ---------- 手机端虚拟方向摇杆与互动按钮 ---------- */
.mobile-controls {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.mobile-controls.hidden {
  display: none !important;
}

.mobile-dpad-wrap {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(10px, env(safe-area-inset-bottom));
  pointer-events: auto;
}

.mobile-dpad-wrap.is-hidden {
  display: none;
}

.mobile-dpad {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 34, 38, 0.72), rgba(10, 16, 19, 0.82));
  border: 1px solid rgba(197, 160, 89, 0.56);
  box-shadow:
    inset 0 0 12px rgba(72, 168, 142, 0.14),
    0 8px 20px rgba(0, 0, 0, 0.55);
  touch-action: none;
}

.dpad-btn {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(140, 115, 75, 0.48);
  border-radius: 8px;
  background: rgba(24, 40, 44, 0.86);
  color: #e8dcc0;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.08s ease, background 0.1s ease, border-color 0.1s ease;
}

.dpad-up {
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.dpad-down {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.dpad-left {
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.dpad-right {
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.dpad-btn.is-active {
  background: linear-gradient(180deg, rgba(64, 158, 134, 0.92), rgba(32, 92, 78, 0.94));
  border-color: #8ff2d4;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(110, 242, 200, 0.45);
}

.dpad-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: rgba(15, 25, 28, 0.88);
  pointer-events: none;
}

.mobile-action-cluster {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.mobile-mini-btn {
  border: 1px solid rgba(140, 115, 75, 0.58);
  border-radius: 14px;
  background: rgba(13, 21, 24, 0.86);
  color: #d7e8e2;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.mobile-mini-btn.is-active {
  border-color: rgba(110, 232, 192, 0.65);
  color: #9ff5dc;
}

.mobile-interact-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 98, 0.85);
  background: radial-gradient(circle at 35% 30%, rgba(56, 128, 110, 0.94), rgba(18, 44, 40, 0.96));
  color: #fdf2d4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 180, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
}

.mobile-interact-btn:active {
  transform: scale(0.93);
  box-shadow: 0 0 16px rgba(116, 242, 204, 0.55);
}

.mobile-interact-glyph {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}

.mobile-interact-lbl {
  font-size: 10px;
  color: #ccebe0;
  line-height: 1;
}

/* ---------- 手机端大地图紧凑 HUD（横屏优先） ---------- */
body.is-mobile-ui .hud-top-left {
  top: max(6px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  gap: 5px;
  max-width: min(295px, calc(100vw - 210px));
}

body.is-mobile-ui .hud-hero-card {
  padding: 5px 7px;
  gap: 7px;
}

body.is-mobile-ui .hero-avatar-btn .hero-avatar {
  width: 40px;
  height: 40px;
}

body.is-mobile-ui .hero-status-col {
  min-width: 136px;
  gap: 2px;
}

body.is-mobile-ui .hero-name {
  font-size: 12.5px;
}

body.is-mobile-ui .hero-title-badge {
  font-size: 10px;
  padding: 1px 5px;
}

body.is-mobile-ui .hero-title {
  font-size: 10.5px;
}

body.is-mobile-ui .hud-bars-stack {
  gap: 2px;
}

body.is-mobile-ui .stat-item {
  gap: 4px;
}

body.is-mobile-ui .stat-label,
body.is-mobile-ui .stat-num {
  font-size: 10.5px;
}

body.is-mobile-ui .bar-track {
  height: 7px;
}

body.is-mobile-ui .hero-meta-row {
  gap: 4px;
}

body.is-mobile-ui .hero-meta-row .stat-pill,
body.is-mobile-ui .hero-meta-row .karma-pill,
body.is-mobile-ui .lifespan-pill {
  font-size: 10px;
  padding: 1px 5px;
}

body.is-mobile-ui .hud-quest-card {
  display: block;
  max-width: 248px;
  padding: 4px 8px;
}

body.is-mobile-ui .quest-head-label {
  font-size: 11px;
}

body.is-mobile-ui .quest-card-body {
  font-size: 11px;
  max-height: 72px;
  overflow-y: auto;
}

body.is-mobile-ui .hud-dynamic-pills {
  gap: 4px;
}

body.is-mobile-ui .companion-pill,
body.is-mobile-ui .breakthrough-pill,
body.is-mobile-ui .event-pill,
body.is-mobile-ui .org-pill,
body.is-mobile-ui .karma-alert-pill {
  font-size: 10.5px;
  padding: 3px 7px;
}

body.is-mobile-ui .hud-top-right {
  top: max(6px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  gap: 5px;
}

body.is-mobile-ui .hud-compass-cluster {
  gap: 6px;
}

body.is-mobile-ui .hud-loc-stack .location-tag {
  padding: 3px 8px;
  font-size: 12.5px;
}

body.is-mobile-ui .hud-top-right .coord-badge,
body.is-mobile-ui .vein-badge {
  padding: 2px 5px;
  font-size: 10px;
}

body.is-mobile-ui .shichen-compass-btn {
  padding: 3px 5px 4px;
  gap: 2px;
}

body.is-mobile-ui .shichen-compass-canvas {
  width: 46px;
  height: 46px;
}

body.is-mobile-ui .compass-date-text {
  font-size: 9.5px;
}

body.is-mobile-ui .compass-shichen-text {
  font-size: 10.5px;
}

body.is-mobile-ui .hud-mobile-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

body.is-mobile-ui .hud-mobile-pill {
  border: 1px solid rgba(197, 160, 89, 0.65);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(22, 34, 38, 0.92), rgba(11, 18, 20, 0.94));
  color: #f3e2b5;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(5px);
}

body.is-mobile-ui .hud-mobile-pill.is-active {
  border-color: #79f2cf;
  color: #a8fae2;
}

body.is-mobile-ui .hud-icon-dock {
  display: none;
  position: relative;
  grid-template-columns: repeat(4, 48px);
  gap: 5px;
  padding: 7px;
  z-index: 25;
}

body.is-mobile-ui .hud-icon-dock.is-mobile-open {
  display: grid;
}

body.is-mobile-ui .hud-icon-btn {
  width: 48px;
  height: 46px;
}

body.is-mobile-ui .hud-minimap-card {
  width: 176px;
}

body.is-mobile-ui .hud-minimap-card.is-collapsed {
  width: auto;
}

body.is-mobile-ui .minimap-head {
  padding: 4px 6px;
}

body.is-mobile-ui .minimap-legend {
  display: none;
}

body.is-mobile-ui .hud-bottom-dock {
  bottom: max(6px, env(safe-area-inset-bottom));
  padding: 4px 6px;
  gap: 5px;
  max-width: calc(100vw - 236px);
}

body.is-mobile-ui .quick-slot-btn {
  width: 38px;
  height: 38px;
  padding: 2px;
}

body.is-mobile-ui .quick-slot-badge {
  font-size: 11px;
}

body.is-mobile-ui .quick-slot-name {
  font-size: 9px;
}

body.is-mobile-ui .quick-slot-count {
  font-size: 9px;
}

body.is-mobile-ui .dock-action-btn {
  padding: 5px 7px;
  font-size: 11px;
}

body.is-mobile-ui .dock-action-btn kbd {
  display: none;
}

body.is-mobile-ui .dock-help-wrap {
  display: none;
}

body.is-mobile-ui .toast-box {
  bottom: calc(56px + env(safe-area-inset-bottom));
  max-width: min(440px, calc(100vw - 236px));
  font-size: 11.5px;
  padding: 5px 10px;
}

/* ---------- 手机端战棋战场紧凑横屏排版 ---------- */
body.is-mobile-ui #battle-overlay .battle-hud-tl {
  top: max(4px, env(safe-area-inset-top));
  left: max(6px, env(safe-area-inset-left));
  max-width: min(260px, 34vw);
}

body.is-mobile-ui #battle-overlay .b-tl-card {
  padding: 5px 8px;
  gap: 3px;
}

body.is-mobile-ui #battle-overlay .battle-title {
  font-size: 12px;
}

body.is-mobile-ui #battle-overlay .battle-turn-tag {
  font-size: 10.5px;
  padding: 1px 6px;
}

body.is-mobile-ui #battle-overlay .b-tl-objectives {
  display: none;
}

body.is-mobile-ui #battle-overlay .b-cam-badge,
body.is-mobile-ui #battle-overlay .b-cam-hint {
  font-size: 10px;
}

body.is-mobile-ui #battle-overlay .b-cam-btn {
  padding: 3px 7px;
  font-size: 10.5px;
}

body.is-mobile-ui #battle-overlay .battle-ctb-dock {
  top: max(4px, env(safe-area-inset-top));
  width: min(300px, 32vw);
  min-width: 190px;
  padding: 4px 8px;
  gap: 3px;
}

body.is-mobile-ui #battle-overlay .ctb-track {
  height: 20px;
}

body.is-mobile-ui #battle-overlay .battle-hud-tr {
  top: max(4px, env(safe-area-inset-top));
  right: max(6px, env(safe-area-inset-right));
  max-width: 32vw;
}

body.is-mobile-ui #battle-overlay .b-enemy-inspector {
  max-width: min(260px, 40vw);
  max-height: calc(100dvh - 132px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.is-mobile-ui #battle-overlay .battle-log-dock {
  right: max(6px, env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: 224px;
}

body.is-mobile-ui #battle-overlay .battle-log-dock.is-collapsed {
  width: auto;
  max-width: 210px;
}

body.is-mobile-ui #battle-overlay .battle-hover-tip {
  bottom: calc(88px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 240px);
  font-size: 10.5px;
  padding: 3px 9px;
}

body.is-mobile-ui #battle-overlay .battle-bottom-dock {
  bottom: max(4px, env(safe-area-inset-bottom));
  width: calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right));
  max-width: 100%;
  gap: 4px;
}

body.is-mobile-ui #battle-overlay .b-dock-row {
  width: 100%;
  padding: 5px 7px;
  gap: 6px;
  align-items: center;
}

body.is-mobile-ui #battle-overlay .b-hero-card {
  width: 148px;
  padding: 4px 6px;
  gap: 5px;
}

body.is-mobile-ui #battle-overlay .b-hero-portrait {
  width: 34px;
  height: 38px;
}

body.is-mobile-ui #battle-overlay .b-hero-name {
  font-size: 11px;
}

body.is-mobile-ui #battle-overlay .b-hero-realm {
  font-size: 9.5px;
}

body.is-mobile-ui #battle-overlay .b-bar-row {
  font-size: 9.5px;
  gap: 4px;
}

body.is-mobile-ui #battle-overlay .b-companion-card {
  width: 132px;
  padding: 4px 6px;
  gap: 5px;
}

body.is-mobile-ui #battle-overlay .b-comp-portrait {
  width: 30px;
  height: 34px;
}

body.is-mobile-ui #battle-overlay .battle-actions-wrap {
  flex: 1 1 auto;
  min-width: 0;
  gap: 3px;
}

body.is-mobile-ui #battle-overlay .b-dock-top-strip {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 4px;
}

body.is-mobile-ui #battle-overlay .b-dock-top-strip::-webkit-scrollbar,
body.is-mobile-ui #battle-overlay .b-skill-slots-group::-webkit-scrollbar {
  display: none;
}

body.is-mobile-ui #battle-overlay .b-util-btn,
body.is-mobile-ui #battle-overlay .b-face-btn {
  padding: 3px 6px;
  font-size: 10.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

body.is-mobile-ui #battle-overlay .b-dock-slots-row {
  gap: 5px;
  min-width: 0;
}

body.is-mobile-ui #battle-overlay .b-skill-slots-group {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 4px;
}

body.is-mobile-ui #battle-overlay .b-skill-slot {
  width: 48px;
  height: 50px;
  flex-shrink: 0;
}

body.is-mobile-ui #battle-overlay .b-slot-glyph {
  font-size: 15px;
  margin-top: 2px;
}

body.is-mobile-ui #battle-overlay .b-slot-name {
  font-size: 9.5px;
}

body.is-mobile-ui #battle-overlay .b-slot-meta {
  font-size: 8.5px;
}

body.is-mobile-ui #battle-overlay .b-func-btn {
  padding: 4px 6px;
  font-size: 10.5px;
  white-space: nowrap;
}

body.is-mobile-ui #battle-overlay .battle-skill-popover {
  pointer-events: auto;
  cursor: pointer;
  max-width: min(360px, 88vw);
  font-size: 11.5px;
  padding: 7px 10px;
}

body.is-mobile-ui #battle-overlay .battle-skill-popover::after {
  content: "轻点此卡片可收起";
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #88a8a0;
  text-align: right;
}

@media (max-height: 440px) {
  body.is-mobile-ui .hud-hero-card .hero-meta-row,
  body.is-mobile-ui #battle-overlay .b-cam-hint,
  body.is-mobile-ui #battle-overlay .ctb-queue-row,
  body.is-mobile-ui #battle-overlay .b-status-hint {
    display: none;
  }
  body.is-mobile-ui #battle-overlay .battle-hover-tip {
    display: none;
  }
}

/* ---------- 手机端所有弹窗、菜单与标题页触屏滚动适配 ---------- */
body.is-mobile-ui .modal-overlay {
  padding: 6px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
}

body.is-mobile-ui .modal-card,
body.is-mobile-ui .menu-card,
body.is-mobile-ui .npc-dialog-card,
body.is-mobile-ui .encounter-card,
body.is-mobile-ui .char-create-card,
body.is-mobile-ui .save-slots-card,
body.is-mobile-ui .tournament-card,
body.is-mobile-ui .teleport-card,
body.is-mobile-ui .org-card,
body.is-mobile-ui .handbook-card,
body.is-mobile-ui .settings-card {
  width: min(96vw, 760px);
  max-height: calc(100dvh - 12px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.is-mobile-ui .menu-body,
body.is-mobile-ui .dialog-body,
body.is-mobile-ui .cc-body,
body.is-mobile-ui .ss-slots-list,
body.is-mobile-ui .hb-body,
body.is-mobile-ui .st-body {
  max-height: none;
}

body.is-mobile-ui .menu-tabs,
body.is-mobile-ui .org-tabs-bar {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.is-mobile-ui .menu-tab {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
}

body.is-mobile-ui .modal-portrait-layout {
  flex-direction: row;
  align-items: flex-start;
}

body.is-mobile-ui .modal-portrait-rail {
  width: 108px;
  padding: 8px;
  border-right: 1px solid rgba(140, 115, 75, 0.48);
  border-bottom: none;
}

body.is-mobile-ui .modal-portrait-frame {
  width: 78px;
  height: 86px;
}

body.is-mobile-ui.is-portrait .modal-portrait-layout {
  flex-direction: column;
}

body.is-mobile-ui.is-portrait .modal-portrait-rail {
  width: 100%;
  flex-direction: row;
  border-right: none;
  border-bottom: 1px solid rgba(140, 115, 75, 0.48);
}

body.is-mobile-ui .title-scroll {
  width: min(92vw, 560px);
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  padding: 16px 20px;
  gap: 8px;
}

body.is-mobile-ui .title-seal {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

body.is-mobile-ui .title-main {
  font-size: 28px;
}

body.is-mobile-ui .title-sub {
  font-size: 12px;
}

body.is-mobile-ui .title-btn-group {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

body.is-mobile-ui .title-btn {
  width: auto;
  min-width: 160px;
  padding: 8px 14px;
  font-size: 13px;
}

body.is-mobile-ui .title-tips {
  display: none;
}



/* ==========================================================================
   开始游戏界面 v2：全屏动态像素山水 + 金色题字 + 玉牌菜单（配合 js/title_screen.js）
   ========================================================================== */
.title-overlay.ts-v2 {
  padding: 0;
  background: #060b14;
  backdrop-filter: none;
  overflow: hidden;
  z-index: 40;
  animation: ts-fade-in 0.9s ease-out both;
}

.title-overlay.ts-v2 .ts-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 0;
}

.title-overlay.ts-v2 .ts-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 35%, rgba(3, 6, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(3, 6, 10, 0.35) 0%, transparent 22%, transparent 70%, rgba(3, 6, 10, 0.55) 100%);
}

/* 两侧竖排对联 */
.title-overlay.ts-v2 .ts-couplet {
  position: absolute;
  top: 50%;
  z-index: 2;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  font-family: "KaiTi", "STKaiti", var(--font-serif);
  font-size: 22px;
  letter-spacing: 10px;
  color: rgba(236, 212, 154, 0.78);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 18px rgba(197, 160, 89, 0.25);
  padding: 16px 8px;
  border-top: 1px solid rgba(197, 160, 89, 0.45);
  border-bottom: 1px solid rgba(197, 160, 89, 0.45);
  pointer-events: none;
  animation: ts-rise 1.4s 0.6s ease-out both;
}
.title-overlay.ts-v2 .ts-couplet-left { left: 4%; }
.title-overlay.ts-v2 .ts-couplet-right { right: 4%; }

.title-overlay.ts-v2 .ts-layout {
  position: relative;
  z-index: 3;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vh, 34px);
  padding: 20px 16px 56px;
}

/* 题字 */
.title-overlay.ts-v2 .ts-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: ts-rise 1.2s 0.15s ease-out both;
}

.title-overlay.ts-v2 .ts-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.title-overlay.ts-v2 .ts-title {
  margin: 0;
  font-family: "KaiTi", "STKaiti", var(--font-serif);
  font-size: clamp(44px, 9vw, 92px);
  font-weight: bold;
  letter-spacing: 0.18em;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff4d2 0%, #f1d38c 45%, #b98a3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 0 #2a1d0a) drop-shadow(0 0 18px rgba(240, 200, 110, 0.35));
  animation: ts-glow 4.5s ease-in-out infinite;
}

.title-overlay.ts-v2 .ts-seal {
  width: clamp(34px, 4.4vw, 50px);
  height: clamp(34px, 4.4vw, 50px);
  margin-top: 0.4em;
  font-size: clamp(13px, 1.7vw, 19px);
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  color: #ffe9e0;
  background: linear-gradient(135deg, #b8322a 0%, #7d1c16 100%);
  border: 1px solid #e3a86a;
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(200, 60, 40, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.2);
  transform: rotate(6deg);
  flex-shrink: 0;
}

.title-overlay.ts-v2 .ts-sub {
  margin: 0;
  font-size: clamp(12px, 1.6vw, 16px);
  letter-spacing: 0.5em;
  color: #a6e3d8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* 菜单面板 */
.title-overlay.ts-v2 .ts-menu {
  width: min(340px, 92vw);
  max-width: none;
  padding: 18px 20px 16px;
  gap: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(197, 160, 89, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, rgba(14, 24, 28, 0.82) 0%, rgba(8, 13, 16, 0.88) 100%);
  backdrop-filter: blur(3px);
  animation: ts-rise 1.2s 0.45s ease-out both;
}

.title-overlay.ts-v2 .title-save-info {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #ffe39e;
  background: rgba(94, 72, 24, 0.3);
  border: 1px solid rgba(168, 134, 64, 0.7);
  padding: 6px 10px;
}

.title-overlay.ts-v2 .ts-btn-group {
  max-width: none;
  margin: 0;
  gap: 10px;
}

.title-overlay.ts-v2 .ts-menu-btn.hidden { display: none; }

.title-overlay.ts-v2 .title-btn {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px 9px;
  font-size: 15px;
  cursor: pointer;
  color: #e9e0c9;
  background: linear-gradient(180deg, rgba(38, 52, 56, 0.92) 0%, rgba(20, 29, 32, 0.95) 100%);
  border: 1px solid rgba(140, 115, 75, 0.8);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 240, 200, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.title-overlay.ts-v2 .title-btn::before,
.title-overlay.ts-v2 .title-btn::after {
  content: "◆";
  position: absolute;
  top: 50%;
  font-size: 9px;
  color: var(--gold-lt);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, left 0.2s ease, right 0.2s ease;
}
.title-overlay.ts-v2 .title-btn::before { left: 18px; }
.title-overlay.ts-v2 .title-btn::after { right: 18px; }

.title-overlay.ts-v2 .ts-btn-main {
  font-family: "KaiTi", "STKaiti", var(--font-serif);
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  line-height: 1.2;
}

.title-overlay.ts-v2 .ts-btn-sub {
  font-size: 11px;
  letter-spacing: 1px;
  color: #93aaa5;
}

.title-overlay.ts-v2 .ts-btn-jade {
  border-color: #3f9c8c;
  background: linear-gradient(180deg, rgba(34, 92, 84, 0.92) 0%, rgba(15, 46, 44, 0.96) 100%);
}
.title-overlay.ts-v2 .ts-btn-jade .ts-btn-main { color: #d9fff6; }
.title-overlay.ts-v2 .ts-btn-jade .ts-btn-sub { color: #9fd8cc; }

.title-overlay.ts-v2 .ts-btn-gold {
  border-color: #c9a35a;
  background: linear-gradient(180deg, rgba(104, 78, 30, 0.92) 0%, rgba(52, 38, 14, 0.96) 100%);
}
.title-overlay.ts-v2 .ts-btn-gold .ts-btn-main { color: #fff0c8; }
.title-overlay.ts-v2 .ts-btn-gold .ts-btn-sub { color: #dcc38c; }

.title-overlay.ts-v2 .title-btn:hover,
.title-overlay.ts-v2 .title-btn:focus-visible,
.title-overlay.ts-v2 .title-btn:focus {
  transform: translateY(-1px) scale(1.02);
  border-color: #f0cf85;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(240, 207, 133, 0.35),
    0 0 18px rgba(240, 200, 110, 0.35);
}
.title-overlay.ts-v2 .title-btn:hover::before,
.title-overlay.ts-v2 .title-btn:focus::before { opacity: 1; left: 12px; }
.title-overlay.ts-v2 .title-btn:hover::after,
.title-overlay.ts-v2 .title-btn:focus::after { opacity: 1; right: 12px; }
.title-overlay.ts-v2 .title-btn:active { transform: translateY(1px) scale(0.99); }

.title-overlay.ts-v2 .ts-mini-row {
  display: flex;
  gap: 10px;
}

.title-overlay.ts-v2 .ts-mini-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  color: #c9bfa5;
  background: rgba(12, 18, 20, 0.7);
  border: 1px solid rgba(140, 115, 75, 0.55);
  border-radius: 3px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  outline: none;
}
.title-overlay.ts-v2 .ts-mini-btn:hover,
.title-overlay.ts-v2 .ts-mini-btn:focus {
  color: #f6e3b0;
  border-color: #d8b56c;
  background: rgba(40, 32, 16, 0.75);
}

.title-overlay.ts-v2 .ts-tips {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  width: max-content;
  max-width: 92vw;
  margin: 0;
  transform: translateX(-50%);
  font-size: 12px;
  text-align: center;
  color: rgba(190, 210, 205, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.title-overlay.ts-v2 .ts-footer {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  width: max-content;
  max-width: 92vw;
  transform: translateX(-50%);
  font-size: 11px;
  text-align: center;
  color: rgba(160, 175, 170, 0.55);
  animation: ts-breathe 3s ease-in-out infinite;
}

/* 从封面点开「设置 / 手札」时，弹窗需要盖在封面之上 */
body.ts-title-active #settings-overlay,
body.ts-title-active #handbook-overlay {
  z-index: 50;
}

@keyframes ts-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ts-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.title-overlay.ts-v2 .ts-couplet {
  animation-name: ts-rise-couplet;
}
@keyframes ts-rise-couplet {
  from { opacity: 0; transform: translateY(-46%); }
  to { opacity: 1; transform: translateY(-50%); }
}
@keyframes ts-glow {
  0%, 100% { filter: drop-shadow(0 2px 0 #2a1d0a) drop-shadow(0 0 14px rgba(240, 200, 110, 0.25)); }
  50% { filter: drop-shadow(0 2px 0 #2a1d0a) drop-shadow(0 0 26px rgba(240, 200, 110, 0.5)); }
}
@keyframes ts-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* 窄屏：隐藏对联 */
@media (max-width: 860px) {
  .title-overlay.ts-v2 .ts-couplet { display: none; }
}

/* 矮屏 / 手机横屏：题字与菜单左右并排，压缩高度 */
@media (max-height: 560px) {
  .title-overlay.ts-v2 .ts-layout {
    flex-direction: row;
    gap: clamp(18px, 5vw, 60px);
    padding: 12px 16px 40px;
  }
  .title-overlay.ts-v2 .ts-title { font-size: clamp(36px, 7vw, 64px); }
  .title-overlay.ts-v2 .ts-sub { letter-spacing: 0.25em; }
  .title-overlay.ts-v2 .ts-menu { width: min(300px, 46vw); padding: 12px 14px; gap: 8px; }
  .title-overlay.ts-v2 .ts-btn-group { gap: 7px; }
  .title-overlay.ts-v2 .title-btn { padding: 6px 12px; }
  .title-overlay.ts-v2 .ts-btn-main { font-size: 17px; }
  .title-overlay.ts-v2 .ts-btn-sub { font-size: 10px; }
  .title-overlay.ts-v2 .ts-mini-btn { padding: 5px 6px; font-size: 12px; }
  .title-overlay.ts-v2 .ts-tips { display: none; }
  .title-overlay.ts-v2 .ts-footer { bottom: 6px; }
}

/* 手机端：键盘操作提示没意义，直接隐藏 */
body.is-mobile-ui .title-overlay.ts-v2 .ts-tips { display: none; }
body.is-mobile-ui .title-overlay.ts-v2 .ts-key-hint { display: none; }
body.is-mobile-ui .title-overlay.ts-v2 .ts-couplet { display: none; }

@media (prefers-reduced-motion: reduce) {
  .title-overlay.ts-v2,
  .title-overlay.ts-v2 * {
    animation: none !important;
  }
}

/* ==================== 阶段 S2：生活百艺与功法融合炉弹窗样式 ==================== */
.crafting-card {
  width: min(920px, 94vw);
  max-height: 90vh;
}
.crafting-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.craft-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(14, 24, 27, 0.85);
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 4px;
}
.craft-stats-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 12px;
  color: #d6ebe6;
  white-space: nowrap;
}
.craft-sub {
  font-size: 12px;
  color: #9dc2bc;
  margin-top: 2px;
}
.craft-split {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 10px;
  min-height: 290px;
}
.craft-list-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 4px;
}
.craft-recipe-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(90, 128, 122, 0.48);
  background: rgba(16, 28, 32, 0.86);
  color: #e4f2ee;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.craft-recipe-btn:hover {
  border-color: #c5a059;
  background: rgba(26, 42, 46, 0.94);
}
.craft-recipe-btn.is-active {
  border-color: #ffd97d;
  background: rgba(54, 42, 18, 0.92);
}
.craft-recipe-btn.is-locked {
  opacity: 0.62;
}
.cr-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.cr-tier {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.6);
  color: #ffd97d;
}
.cr-sub {
  font-size: 11px;
  color: #9fc2bc;
  margin-top: 2px;
}
.craft-detail-card {
  padding: 12px 14px;
  background: rgba(12, 20, 23, 0.88);
  border: 1px solid rgba(140, 115, 75, 0.55);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.craft-detail-card h3 {
  margin: 0;
  font-size: 16px;
  color: #fae4af;
}
.craft-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #cde3de;
}
.craft-mats-row,
.craft-opts-row,
.craft-odds-bar,
.craft-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.craft-mat-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  border: 1px solid rgba(90, 128, 122, 0.5);
  background: rgba(18, 30, 34, 0.85);
}
.craft-mat-chip.is-ok {
  border-color: rgba(91, 214, 156, 0.6);
  color: #8ef5c4;
}
.craft-mat-chip.is-lack {
  border-color: rgba(224, 112, 92, 0.65);
  color: #ffa699;
}
.craft-odds-bar {
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(18, 30, 34, 0.78);
  border: 1px solid rgba(95, 132, 126, 0.35);
}
.craft-warn {
  font-size: 12px;
  color: #ffad94;
}
.craft-sublist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 8px 10px;
  background: rgba(12, 20, 22, 0.72);
  border-radius: 4px;
}
.craft-fusion-preview {
  padding: 10px 12px;
  border-radius: 4px;
  background: rgba(22, 30, 38, 0.88);
  border: 1px solid rgba(197, 160, 89, 0.55);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cfp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #ffe299;
}
.craft-fused-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(12, 20, 23, 0.85);
  border: 1px solid rgba(140, 115, 75, 0.45);
  border-radius: 4px;
}
.craft-fused-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: rgba(18, 28, 32, 0.85);
  border-radius: 3px;
  border: 1px solid rgba(90, 128, 122, 0.4);
}
@media (max-width: 720px), (max-height: 520px) {
  .craft-split {
    grid-template-columns: 1fr;
  }
  .craft-list-col {
    max-height: 150px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .craft-recipe-btn {
    flex: 1 1 46%;
  }
}

/* ==================== 阶段 S3：个人洞府与道侣双修 ==================== */
.bond-pill {
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(235, 146, 184, 0.72);
  background: linear-gradient(180deg, rgba(66, 26, 46, 0.92), rgba(34, 14, 24, 0.94));
  color: #ffd6e7;
  font-size: 11.5px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: transform 0.12s ease, filter 0.14s ease;
}
.bond-pill:hover {
  filter: brightness(1.14);
  transform: translateY(-1px);
}
.bond-pill.is-alert {
  border-color: #ff6b6b;
  background: linear-gradient(180deg, rgba(104, 22, 30, 0.95), rgba(56, 11, 16, 0.96));
  color: #ffd0d0;
  animation: pulseBadge 1.5s infinite;
}
.bond-pill.is-letter {
  border-color: #f4c96b;
  background: linear-gradient(180deg, rgba(72, 54, 18, 0.94), rgba(40, 29, 10, 0.95));
  color: #ffe8a8;
}
.bond-pill.is-harvest {
  border-color: #5ee6a8;
  background: linear-gradient(180deg, rgba(20, 62, 46, 0.94), rgba(11, 35, 26, 0.95));
  color: #b4ffe0;
}
.estate-bonds-card {
  width: min(880px, 95vw);
}
.eb-hero-banner {
  padding: 12px 14px;
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(20, 35, 39, 0.9), rgba(11, 18, 21, 0.94));
  border: 1px solid rgba(197, 160, 89, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eb-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.eb-banner-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eb-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
}
.eb-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.eb-array-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.eb-step-chip {
  padding: 6px 4px;
  text-align: center;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid rgba(90, 128, 122, 0.45);
  background: rgba(14, 24, 28, 0.78);
  color: #88a8a2;
}
.eb-step-chip.is-done {
  border-color: rgba(110, 232, 198, 0.72);
  background: rgba(20, 52, 48, 0.88);
  color: #dffcf3;
}
.eb-crop-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.eb-plots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.eb-plot-card {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid rgba(92, 128, 122, 0.5);
  background: rgba(14, 24, 27, 0.88);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.eb-plot-card.is-ready {
  border-color: #ffd97d;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.22);
}
.eb-plot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.eb-plot-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(34, 52, 54, 0.8);
  color: #b7ded6;
}
.eb-rack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eb-rack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.55);
  background: rgba(22, 30, 34, 0.9);
  font-size: 12.5px;
}
@media (max-width: 720px), (max-height: 520px) {
  .eb-two-col,
  .eb-plots-grid {
    grid-template-columns: 1fr;
  }
  .eb-array-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== 阶段 S4：得道飞升主线 · 心魔雷劫 · 九州编年史画卷 ==================== */
.ascension-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 122, 0.72);
  background: linear-gradient(135deg, rgba(46, 34, 72, 0.92), rgba(22, 42, 60, 0.92));
  color: #ffe89e;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.28);
}
.ascension-pill.is-ready {
  border-color: #7df5ff;
  color: #9bf7ff;
  box-shadow: 0 0 14px rgba(125, 245, 255, 0.45);
}
.asc-banner-card {
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.55);
  background: rgba(14, 22, 28, 0.9);
  margin-bottom: 10px;
}
.asc-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.asc-pct-badge {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 217, 125, 0.7);
  background: rgba(34, 28, 52, 0.9);
  color: #ffe28a;
  font-size: 12px;
  font-weight: bold;
}
.asc-stages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.asc-stage-card {
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid rgba(82, 114, 120, 0.45);
  background: rgba(12, 20, 24, 0.86);
}
.asc-stage-card.is-done {
  border-color: rgba(110, 232, 158, 0.55);
  background: rgba(16, 32, 28, 0.88);
}
.asc-stage-card.is-current {
  border-color: #ffd97d;
  box-shadow: 0 0 10px rgba(255, 217, 125, 0.24);
}
.asc-stage-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.asc-stage-seal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  flex-shrink: 0;
}
.asc-trib-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.asc-trib-chip {
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid rgba(112, 134, 178, 0.45);
  background: rgba(18, 20, 36, 0.88);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}
.asc-trib-chip small {
  color: #a9c4c2;
  font-size: 11px;
}
.asc-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}
.chr-hero-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chr-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}
.chr-hero-name {
  margin: 0;
  color: #ffe48e;
  font-size: 18px;
}
.chr-block {
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid rgba(128, 118, 86, 0.42);
  background: rgba(12, 18, 22, 0.86);
}
.chr-block-title {
  font-weight: bold;
  color: #f3d792;
  font-size: 13px;
  margin-bottom: 6px;
}
.chr-boss-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chr-boss-pill {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11.5px;
  background: rgba(24, 34, 38, 0.85);
  border: 1px solid rgba(92, 118, 118, 0.45);
  color: #9cb2ae;
}
.chr-boss-pill.is-dead {
  border-color: rgba(126, 245, 184, 0.6);
  color: #7ef5b8;
}
.chr-partner-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 12.5px;
  color: #ffbad9;
  cursor: pointer;
}
.quest-asc-banner {
  padding: 9px 12px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.55);
  background: linear-gradient(135deg, rgba(24, 28, 44, 0.92), rgba(14, 28, 30, 0.92));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 720px), (max-height: 520px) {
  .asc-stages-grid,
  .asc-trib-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   阶段 S5：高光时刻水墨视觉演出 & 大面板搜索分页栏
   ========================================================= */
.highlight-fx-layer {
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, var(--hfx-glow, rgba(247, 196, 84, 0.35)), rgba(6, 10, 14, 0.45) 68%);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.highlight-fx-layer.is-active {
  opacity: 1;
}
.highlight-fx-sparks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.highlight-fx-spark {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  animation: hfxSparkFloat 2.1s ease-out forwards;
}
@keyframes hfxSparkFloat {
  0% {
    opacity: 0;
    transform: translate(0, 10px) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), var(--dy, -48px)) scale(1.25);
  }
}
.highlight-fx-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  max-width: min(90vw, 560px);
  border-radius: 8px;
  border: 1px solid var(--hfx-accent, #f7c454);
  background: linear-gradient(135deg, rgba(16, 24, 30, 0.96), rgba(10, 15, 22, 0.96));
  box-shadow: 0 0 36px var(--hfx-glow, rgba(247, 196, 84, 0.35)), 0 14px 34px rgba(0, 0, 0, 0.65);
  animation: hfxBannerIn 0.4s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}
@keyframes hfxBannerIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.highlight-fx-seal {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #10161b;
  background: linear-gradient(135deg, var(--hfx-accent, #f7c454), #fff3cf);
  box-shadow: 0 0 18px var(--hfx-glow, rgba(247, 196, 84, 0.45));
}
.highlight-fx-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--hfx-accent, #f7c454);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
.highlight-fx-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #dce9e4;
}

.bag-toolbar-row,
.list-pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 8px;
}
.bag-toolbar-row .org-search-input {
  flex: 1 1 180px;
  min-width: 140px;
}
.list-pager-bar {
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(15, 23, 27, 0.72);
  border: 1px solid rgba(90, 120, 120, 0.35);
  font-size: 12.5px;
  color: #b7cbc4;
}
.list-pager-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================== 阶段 R1：分支对话树 / 统一交易 / 低调江湖手段菜单 ==================== */
.ds-back-btn {
  margin-bottom: 8px;
}

.ds-choice-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ds-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  border-radius: 5px;
  border: 1px solid rgba(154, 130, 86, 0.35);
  background: linear-gradient(135deg, rgba(18, 28, 32, 0.92), rgba(11, 17, 20, 0.95));
  color: #e6dfd0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.ds-choice-btn:hover:not(:disabled) {
  transform: translateX(2px);
  border-color: rgba(217, 184, 108, 0.72);
  background: linear-gradient(135deg, rgba(28, 42, 46, 0.96), rgba(16, 25, 29, 0.98));
}

.ds-choice-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ds-choice-btn.tone-gold {
  border-color: rgba(217, 184, 108, 0.58);
}

.ds-choice-btn.tone-jade {
  border-color: rgba(74, 168, 146, 0.52);
}

.ds-choice-btn.tone-danger {
  border-color: rgba(196, 78, 72, 0.52);
  background: linear-gradient(135deg, rgba(36, 16, 19, 0.9), rgba(18, 11, 14, 0.95));
}

.ds-choice-btn.tone-dark {
  border-color: rgba(132, 104, 176, 0.45);
}

.ds-choice-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.ds-choice-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ds-choice-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f3ead6;
}

.ds-choice-sub {
  font-size: 11.5px;
  color: #9cb2ab;
  line-height: 1.35;
}

.ds-choice-arrow {
  flex: 0 0 auto;
  font-size: 16px;
  color: rgba(217, 184, 108, 0.7);
}

.ds-trial-card,
.ds-outing-banner {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 5px;
  border: 1px solid rgba(217, 184, 108, 0.4);
  background: rgba(14, 23, 27, 0.9);
  font-size: 12.5px;
  line-height: 1.55;
  color: #dfd6c3;
}

.ds-outing-banner {
  border-color: rgba(84, 184, 148, 0.55);
  background: linear-gradient(135deg, rgba(16, 36, 32, 0.94), rgba(10, 20, 21, 0.95));
}

.ds-trial-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #f0c975;
}

.ds-trade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(154, 130, 86, 0.28);
}

.ds-trade-tab {
  padding: 5px 11px;
  border-radius: 4px;
  border: 1px solid rgba(154, 130, 86, 0.38);
  background: rgba(15, 24, 28, 0.88);
  color: #c7d1cb;
  font-size: 12px;
  cursor: pointer;
}

.ds-trade-tab.active {
  border-color: var(--gold-lt);
  background: linear-gradient(135deg, rgba(68, 52, 24, 0.94), rgba(36, 28, 15, 0.96));
  color: #ffe8ad;
  font-weight: 700;
}

.ds-dark-menu-wrap {
  position: relative;
  display: inline-flex;
}

.ds-dark-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 158px;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid rgba(170, 95, 90, 0.55);
  background: rgba(14, 18, 22, 0.98);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ds-dark-item {
  width: 100%;
  padding: 7px 10px;
  text-align: left;
  border-radius: 4px;
  border: 1px solid rgba(120, 120, 130, 0.25);
  background: rgba(24, 30, 36, 0.92);
  color: #dce3df;
  font-size: 12.5px;
  cursor: pointer;
}

.ds-dark-item:hover {
  background: rgba(42, 48, 56, 0.98);
}

.ds-dark-item.is-danger {
  border-color: rgba(185, 68, 62, 0.42);
  color: #ffb8b2;
}

body.is-mobile-ui .ds-choice-btn {
  min-height: 40px;
  padding: 9px 10px;
}

body.is-mobile-ui .dialog-actions {
  flex-wrap: wrap;
  gap: 6px;
}

body.is-mobile-ui .ds-dark-popover {
  right: auto;
  left: 0;
  max-width: 70vw;
}

/* ==================== 阶段 R2：逸剑×大侠风全套 UI 美学翻新 ==================== */
/* 1. 左上主角状态卡：逸剑斜切墨迹血灵条 + 精雕鎏金玉框头像 */
.hud-hero-card {
  background: linear-gradient(155deg, rgba(14, 21, 24, 0.92), rgba(7, 11, 13, 0.92));
  border: 1px solid rgba(212, 174, 98, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 232, 168, 0.14),
    0 12px 30px rgba(0, 0, 0, 0.68);
}

.hero-avatar-btn .hero-avatar {
  width: 68px;
  height: 76px;
  border-radius: 4px;
  border: 1.5px solid #e6c26e;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.75),
    0 4px 12px rgba(0, 0, 0, 0.6);
}

.hud-bars-stack .bar-track,
.hud-exp-track {
  transform: skewX(-12deg);
  border-radius: 2px;
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: rgba(6, 10, 12, 0.92);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.75);
}

.hud-bars-stack .hp-fill {
  background: linear-gradient(90deg, #8e2420 0%, #d4453c 65%, #f27466 100%);
}

.hud-bars-stack .mp-fill {
  background: linear-gradient(90deg, #1b6970 0%, #2caaa3 65%, #6cf2e0 100%);
}

.hud-exp-fill {
  background: linear-gradient(90deg, #8f6820 0%, #d4a64a 65%, #ffe58f 100%);
}

/* 2. 右上功能图标阵：逸剑菱形/八角古风玄墨玉牌徽章 */
.hud-icon-dock {
  background: linear-gradient(160deg, rgba(11, 17, 20, 0.88), rgba(7, 11, 13, 0.92));
  border: 1px solid rgba(197, 160, 89, 0.56);
  padding: 6px;
  gap: 5px;
}

.hud-icon-btn {
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.46);
  background: linear-gradient(160deg, rgba(24, 36, 40, 0.94), rgba(11, 17, 20, 0.96));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.hud-icon-btn:hover {
  border-color: #f7d988;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 12px rgba(217, 184, 108, 0.28);
}

/* 3. NPC 对话与全游戏玄墨鎏金弹窗：放大立体立绘槽 + 温润宣纸卷轴对白 */
.npc-dialog-card {
  max-width: 900px;
}

.modal-portrait-rail {
  width: 186px;
  padding: 15px 13px;
  background:
    radial-gradient(circle at 50% 24%, rgba(197, 160, 89, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(10, 15, 18, 0.97), rgba(13, 20, 23, 0.96));
  border-right: 1px solid rgba(197, 160, 89, 0.42);
}

.modal-portrait-frame {
  width: 156px;
  height: 182px;
  border-radius: 4px;
  border: 2px solid #e0be70;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    0 10px 26px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(197, 160, 89, 0.14);
}

.dialog-text {
  background:
    linear-gradient(135deg, rgba(235, 220, 186, 0.08), rgba(14, 21, 24, 0.72) 48%),
    rgba(12, 18, 20, 0.75);
  border: 1px solid rgba(197, 160, 89, 0.32);
  border-left: 3px solid #d9b468;
  color: #f5edd9;
  padding: 13px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06);
}

.modal-card,
.menu-card {
  border-color: rgba(197, 160, 89, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(197, 160, 89, 0.07), transparent 52%),
    linear-gradient(180deg, #162024 0%, #0d1316 100%);
  box-shadow:
    inset 0 0 0 1px rgba(6, 9, 10, 0.92),
    inset 0 0 0 2px rgba(197, 160, 89, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.86);
}

.menu-tab {
  border-radius: 3px;
  border-color: rgba(140, 115, 75, 0.36);
  background: rgba(16, 24, 27, 0.88);
}

.menu-tab.active {
  border-color: #e6c26e;
  background: linear-gradient(180deg, rgba(72, 55, 24, 0.95), rgba(38, 29, 13, 0.96));
  color: #fff0c4;
}

.item-row,
.skill-card,
.neigong-card,
.stat-chip,
.aff-mini-item {
  border: 1px solid rgba(140, 115, 75, 0.34);
  background: linear-gradient(180deg, rgba(20, 29, 32, 0.9), rgba(12, 18, 20, 0.94));
}

body.is-mobile-ui .hud-hero-card .hero-avatar {
  width: 50px;
  height: 56px;
}

body.is-mobile-ui .modal-portrait-rail {
  width: 108px;
  padding: 8px;
}

body.is-mobile-ui .modal-portrait-frame {
  width: 78px;
  height: 88px;
}



