/* ============================================================
   Project: NOVA · 模块 2-70：《🏛️ 神迹荣誉殿堂 (Hall of Miracles)》
   各玩法专属 6 阶 3D 精雕徽章（1/1千 ➔ 1/1亿）+ 方案 B 连胜神迹累乘仪 + 投入星币含金权重 W
   遵循铁律：
   1. 3D 无字精雕黑曜鎏金底座贴图 + 本地 SIL OFL 开源商用游戏字体（NovaMonument / NovaNumeral）
   2. 紧凑 32px 游戏内蓄力条 + 竖屏自适应神迹殿堂弹窗 + 同桌徽章权重碾压展示
   3. 纯净特效防呆门禁（data-no-astrolabe-vfx="1"）+ 零现实货币符号
   ============================================================ */

@font-face {
  font-family: 'NovaMonument';
  src: url('../assets/fonts/nova-monument-core.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NovaMonumentI18n';
  src: url('../assets/fonts/nova-monument-i18n.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NovaNumeral';
  src: url('../assets/fonts/nova-numeral.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.mh-gold-relief {
  font-family: 'NovaMonument', 'NovaMonumentI18n', 'Noto Sans SC', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', serif;
  color: #fde68a;
  text-shadow: 0 1px 0 #78350f, 0 2px 6px rgba(0, 0, 0, 0.88);
  letter-spacing: 0.03em;
}

.mh-num {
  font-family: 'NovaNumeral', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* ==================== 1. 游戏内 32px 紧凑【🔥 连胜神迹累乘仪】胶囊条 ==================== */
.mh-streak-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 33px;
  height: 33px;
  padding: 0 13px;
  margin: 4px 0 6px;
  border-radius: 9px;
  border: 1px solid rgba(245, 158, 11, 0.48);
  background-color: #090d18;
  background-image:
    url('../assets/ui/miracles/miracle_bar_bg.png'),
    linear-gradient(180deg, rgba(20, 26, 44, 0.96), rgba(7, 10, 19, 0.98));
  background-size: 100% 100%, 100% 100%;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(254, 243, 199, 0.16);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mh-streak-bar:hover {
  border-color: rgba(253, 224, 71, 0.8);
}

.mh-streak-bar:active {
  transform: scale(0.988);
}

.mh-streak-bar.is-hot {
  border-color: rgba(251, 191, 36, 0.88);
  box-shadow: 0 3px 14px rgba(245, 158, 11, 0.28), inset 0 0 12px rgba(245, 158, 11, 0.14);
}

.mh-sb-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-shrink: 0;
}

.mh-sb-flame {
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.65));
}

.mh-streak-bar.is-hot .mh-sb-flame {
  animation: mhFlamePulse 1.3s ease-in-out infinite;
}

@keyframes mhFlamePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.7)); }
  50% { transform: scale(1.16); filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.95)); }
}

.mh-sb-lbl {
  font-family: 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: 11.5px;
  font-weight: 900;
  color: #fde68a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.mh-sb-mult {
  font-family: 'NovaNumeral', monospace;
  font-size: 13px;
  font-weight: 900;
  color: #e2e8f0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.mh-streak-bar.is-hot .mh-sb-mult {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.55), 0 1px 2px #000;
}

.mh-sb-chain-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde047;
  white-space: nowrap;
}

.mh-sb-mid {
  flex: 1 1 50px;
  min-width: 36px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mh-sb-prog-track {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.28);
  overflow: hidden;
}

.mh-sb-prog-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f59e0b 0%, #fde047 65%, #fffbeb 100%);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.75);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mh-sb-target {
  font-size: 9.5px;
  line-height: 1;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-sb-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.mh-sb-next-ico {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}

.mh-sb-hall-pill {
  font-family: 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.26), rgba(180, 83, 9, 0.36));
  border: 1px solid rgba(253, 224, 71, 0.58);
  color: #fef3c7;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .mh-streak-bar {
    padding: 0 9px;
    gap: 5px;
  }
  .mh-sb-lbl {
    font-size: 10.5px;
  }
  .mh-sb-target {
    display: none;
  }
}

/* 跑马机/轮盘/探索装置/老虎机全屏舞台模式下隐藏探索厅外层蓄力条，改用舞台顶栏内嵌超紧凑神迹入口 */
body.nova-in-fruit-stage #mhBarArcade,
body.nova-in-jp-stage #mhBarArcade,
body.in-classic-stage #mhBarArcade,
body.in-subgame-stage #mhBarArcade {
  display: none !important;
}

/* 硬锁神迹弹窗、庆典与连胜条内所有 3D 星币图标尺寸，严防 512px 原图撑爆界面 */
.mh-modal-shell img.coin-icon,
.mh-ceremony-layer img.coin-icon,
.mh-streak-bar img.coin-icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  object-fit: contain !important;
  vertical-align: -2px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* 四大旗舰皮肤同步神迹连胜条与神迹荣誉殿堂弹窗 */
body[data-nova-skin="qianli"] .mh-streak-bar {
  border-color: #d4af37 !important;
  background-image: linear-gradient(90deg, rgba(8, 42, 38, 0.92), rgba(20, 78, 70, 0.9), rgba(8, 42, 38, 0.92)) !important;
}
body[data-nova-skin="royal"] .mh-streak-bar {
  border-color: #f59e0b !important;
  background-image: linear-gradient(90deg, rgba(46, 6, 14, 0.94), rgba(86, 12, 26, 0.9), rgba(46, 6, 14, 0.94)) !important;
}
body[data-nova-skin="starry"] .mh-streak-bar {
  border-color: #fbbf24 !important;
  background-image: linear-gradient(90deg, rgba(10, 24, 62, 0.94), rgba(24, 54, 122, 0.9), rgba(10, 24, 62, 0.94)) !important;
}

body[data-nova-skin] .mh-modal-shell {
  border: 2px solid var(--nv-skin-border-bright, #fde68a) !important;
  background-color: var(--nv-skin-bg, #090d18) !important;
  background-image:
    linear-gradient(180deg, rgba(8, 12, 22, 0.84), rgba(8, 12, 22, 0.92)),
    var(--nv-skin-panel-img) !important;
  background-size: 100% 100% !important;
}
body[data-nova-skin="qianli"] .mh-modal-shell {
  background-image:
    linear-gradient(180deg, rgba(8, 40, 36, 0.85), rgba(5, 24, 22, 0.93)),
    var(--nv-skin-panel-img) !important;
}
body[data-nova-skin="qianli"] .mh-sovereign-strip {
  background: rgba(9, 44, 39, 0.88) !important;
  border-bottom-color: rgba(212, 175, 55, 0.4) !important;
}
body[data-nova-skin="qianli"] .mh-tabs {
  background: rgba(6, 32, 29, 0.94) !important;
}
body[data-nova-skin="qianli"] .mh-tab:not(.active) {
  background: linear-gradient(180deg, #fffdf7 0%, #ede3cc 100%) !important;
  border-color: #c59b27 !important;
  color: #103029 !important;
}
body[data-nova-skin="qianli"] .mh-tab:not(.active) .mh-tab-cnt {
  color: #265348 !important;
}
body[data-nova-skin="qianli"] .mh-tab.active {
  background: url("../assets/ui/jackpot_wheel/btn_qianli_cinnabar.jpg") center / 100% 100% no-repeat !important;
  border-color: #fef08a !important;
  color: #fffbeb !important;
}
body[data-nova-skin="qianli"] .mh-rule-note {
  background: linear-gradient(180deg, #fffdf7 0%, #f1e8d4 100%) !important;
  border: 1px solid #c59b27 !important;
  color: #103029 !important;
}
body[data-nova-skin="qianli"] .mh-rule-note b {
  color: #991b1b !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint {
  background: linear-gradient(180deg, #fffdf7 0%, #f0e6cf 72%, #ddd0b3 100%) !important;
  border-color: #c59b27 !important;
  color: #103029 !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 10px rgba(0, 0, 0, 0.25) !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-badge-name,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-badge-name {
  color: #103029 !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-badge-weight-line,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-badge-weight-line {
  color: #265348 !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-badge-sub-line,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-badge-sub-line,
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-badge-sub-line *,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-badge-sub-line * {
  color: #991b1b !important;
  font-weight: 800 !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-tier-roman,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-tier-roman {
  background: #134e48 !important;
  color: #fef08a !important;
}
body[data-nova-skin="qianli"] .mh-badge-card.grade-locked .mh-prob-pill,
body[data-nova-skin="qianli"] .mh-badge-card.grade-imprint .mh-prob-pill {
  background: rgba(16, 48, 41, 0.1) !important;
  border-color: rgba(197, 155, 39, 0.55) !important;
  color: #103029 !important;
}
body[data-nova-skin="royal"] .mh-modal-shell {
  background-image:
    linear-gradient(180deg, rgba(44, 6, 14, 0.86), rgba(22, 3, 7, 0.93)),
    var(--nv-skin-panel-img) !important;
}
body[data-nova-skin="royal"] .mh-badge-card.grade-locked,
body[data-nova-skin="royal"] .mh-rule-note {
  background: linear-gradient(180deg, rgba(66, 9, 20, 0.88), rgba(28, 4, 9, 0.95)) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}
body[data-nova-skin="starry"] .mh-modal-shell {
  background-image:
    linear-gradient(180deg, rgba(10, 24, 62, 0.86), rgba(5, 12, 32, 0.93)),
    var(--nv-skin-panel-img) !important;
}
body[data-nova-skin="starry"] .mh-badge-card.grade-locked,
body[data-nova-skin="starry"] .mh-rule-note {
  background: linear-gradient(180deg, rgba(22, 50, 114, 0.88), rgba(8, 19, 48, 0.95)) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
}

.fm-miracle-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: calc(24 * var(--fm-u, 1px));
  padding: 0 calc(6 * var(--fm-u, 1px));
  border-radius: 99px;
  border: 1px solid rgba(251, 191, 36, 0.65);
  background: linear-gradient(180deg, rgba(42, 26, 8, 0.94), rgba(16, 10, 4, 0.96));
  color: #fde68a;
  font-family: 'NovaNumeral', 'NovaMonument', sans-serif;
  font-size: calc(10.5 * var(--fm-u, 1px));
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.fm-miracle-top-btn img {
  width: calc(15 * var(--fm-u, 1px));
  height: calc(15 * var(--fm-u, 1px));
  object-fit: contain;
}
.fm-miracle-top-btn.is-hot {
  border-color: #fde047;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.45);
  color: #fffbeb;
}

/* ==================== 2. 竖屏独立弹窗《🏛️ 神迹荣誉殿堂》 ==================== */
.mh-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
  background: rgba(3, 6, 14, 0.84);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.mh-modal-backdrop.show {
  display: flex;
}

.mh-modal-shell {
  width: 100%;
  max-width: 442px;
  max-height: calc(100vh - 18px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(var(--app-vh, 100vh) - 18px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 18px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1.5px solid rgba(245, 158, 11, 0.66);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(245, 158, 11, 0.13), transparent 62%),
    linear-gradient(180deg, #111729 0%, #090d18 52%, #060912 100%);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(254, 243, 199, 0.14) inset,
    0 0 28px rgba(245, 158, 11, 0.16);
  overflow: hidden;
  color: #f8fafc;
}

/* 顶部精雕标题栏 */
.mh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(30, 24, 16, 0.86), rgba(11, 15, 28, 0.92));
  flex-shrink: 0;
}

.mh-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: rgba(15, 23, 42, 0.85);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mh-close-x {
  width: 32px;
  padding: 0;
  font-size: 14px;
}

.mh-head-title {
  font-size: 16.5px;
  font-weight: 900;
  text-align: center;
  line-height: 1.2;
}

/* 当前镇场佩戴与总权重条 */
.mh-sovereign-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  flex-shrink: 0;
}

.mh-sov-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.mh-sov-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}

.mh-sov-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mh-sov-eyebrow {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.15;
}

.mh-sov-name {
  font-size: 12px;
  font-weight: 900;
  color: #fef3c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-sov-right {
  text-align: right;
  flex-shrink: 0;
}

.mh-sov-w-lbl {
  display: block;
  font-size: 9.5px;
  color: #cbd5e1;
}

.mh-sov-w-val {
  font-family: 'NovaNumeral', monospace;
  font-size: 13.5px;
  font-weight: 900;
  color: #fde047;
}

/* 5大玩法横向分页栏 */
.mh-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 7px 10px;
  background: rgba(8, 12, 22, 0.95);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  flex-shrink: 0;
}

.mh-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 2px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mh-tab.active {
  border-color: rgba(251, 191, 36, 0.85);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.55), rgba(30, 22, 12, 0.92));
  color: #fef3c7;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.24);
}

.mh-tab-title {
  font-family: 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mh-tab-cnt {
  font-family: 'NovaNumeral', monospace;
  font-size: 9.5px;
  color: #cbd5e1;
}

.mh-tab.active .mh-tab-cnt {
  color: #fde047;
}

.mh-tab-dot {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb923c;
  box-shadow: 0 0 6px #fb923c;
}

/* 可滚动主体 */
.mh-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 主视觉：3D 黑曜鎏金【🔥 连胜神迹累乘仪】座盘 */
.mh-hero-plaque {
  position: relative;
  padding: 13px 16px 12px;
  border-radius: 13px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background-color: #080b14;
  background-image:
    url('../assets/ui/miracles/miracle_hero_plaque.png'),
    linear-gradient(180deg, rgba(20, 24, 38, 0.96), rgba(8, 11, 20, 0.98));
  background-size: 100% 100%, 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.mh-hp-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mh-hp-series {
  font-family: 'NovaMonument', 'NovaMonumentI18n', serif;
  font-size: 12.5px;
  font-weight: 900;
  color: #fde68a;
}

.mh-hp-best {
  font-size: 10.5px;
  color: #94a3b8;
}

.mh-hp-best b {
  font-family: 'NovaNumeral', monospace;
  color: #f8fafc;
}

.mh-hp-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 7px;
}

.mh-hp-mult-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.mh-hp-mult-val {
  font-family: 'NovaNumeral', monospace;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 45%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.92));
}

.mh-hp-stake-box {
  text-align: right;
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.mh-hp-stake-box b {
  color: #fef3c7;
  font-family: 'NovaNumeral', monospace;
}

.mh-hp-prog-bar {
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.35);
  overflow: hidden;
}

.mh-hp-prog-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 55%, #fef9c3 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
  transition: width 0.35s ease;
}

.mh-hp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  font-size: 10.5px;
  color: #cbd5e1;
}

.mh-rule-note {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
}

.mh-rule-note b {
  color: #fde68a;
}

/* ==================== 3. 2×3 六阶 3D 徽章陈列墙 ==================== */
.mh-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mh-badge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 9px 8px 9px;
  border-radius: 13px;
  border: 1.5px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(20, 29, 49, 0.88), rgba(9, 13, 24, 0.96));
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mh-badge-card:active {
  transform: scale(0.98);
}

.mh-badge-card.is-selected {
  outline: 2px solid #fde047;
  outline-offset: 1px;
}

/* 五阶成色材质边框（虚影拓印 / 青铜 / 秘银 / 曜金 / 暗物质神座） */
.mh-badge-card.grade-locked {
  border-color: rgba(100, 116, 139, 0.28);
  background: linear-gradient(180deg, rgba(15, 21, 36, 0.78), rgba(7, 10, 18, 0.94));
}

.mh-badge-card.grade-imprint {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: inset 0 0 12px rgba(148, 163, 184, 0.12);
}

.mh-badge-card.grade-bronze {
  border-color: rgba(217, 119, 6, 0.72);
  background: linear-gradient(180deg, rgba(48, 28, 14, 0.72), rgba(12, 14, 24, 0.96));
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.22);
}

.mh-badge-card.grade-silver {
  border-color: rgba(56, 189, 248, 0.78);
  background: linear-gradient(180deg, rgba(18, 42, 66, 0.74), rgba(10, 15, 28, 0.96));
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.22);
}

.mh-badge-card.grade-gold {
  border-color: rgba(250, 204, 21, 0.92);
  background: linear-gradient(180deg, rgba(66, 44, 10, 0.78), rgba(14, 14, 24, 0.97));
  box-shadow: 0 5px 18px rgba(245, 158, 11, 0.32), inset 0 0 14px rgba(251, 191, 36, 0.14);
}

.mh-badge-card.grade-darkmatter {
  border-color: #f0abfc;
  background:
    radial-gradient(circle at 50% 34%, rgba(192, 132, 252, 0.28), transparent 65%),
    linear-gradient(180deg, rgba(46, 16, 72, 0.86), rgba(9, 10, 22, 0.98));
  box-shadow: 0 6px 22px rgba(192, 132, 252, 0.42), 0 0 12px rgba(250, 204, 21, 0.28) inset;
}

.mh-card-top-tags {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
}

.mh-tier-roman {
  font-family: 'NovaMonument', serif;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
}

.mh-prob-pill {
  font-family: 'NovaNumeral', monospace;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.mh-badge-art-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 5px;
}

.mh-badge-art {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.mh-badge-card.grade-locked .mh-badge-art {
  filter: grayscale(0.84) brightness(0.56) contrast(1.12) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  opacity: 0.84;
}

.mh-badge-card.grade-imprint .mh-badge-art {
  filter: grayscale(0.65) contrast(1.08) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
}

.mh-badge-card.grade-darkmatter .mh-badge-art {
  filter: drop-shadow(0 0 10px rgba(232, 121, 249, 0.65)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.mh-equipped-ribbon {
  position: absolute;
  bottom: -2px;
  padding: 1px 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, #b45309, #f59e0b, #b45309);
  border: 1px solid #fef08a;
  color: #fffbeb;
  font-size: 9.5px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.mh-badge-name {
  font-family: 'NovaMonument', 'NovaMonumentI18n', serif;
  font-size: 12.5px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.22;
  margin-bottom: 3px;
}

.mh-badge-card.grade-locked .mh-badge-name {
  color: #94a3b8;
}

.mh-badge-weight-line {
  font-family: 'NovaNumeral', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #fde047;
  line-height: 1.25;
}

.mh-badge-card.grade-locked .mh-badge-weight-line {
  color: #64748b;
  font-family: inherit;
  font-size: 10.5px;
}

.mh-badge-sub-line {
  font-size: 10px;
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.3;
}

/* ==================== 4. 徽章黑匣子铭牌详情卡 ==================== */
.mh-detail-card {
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(180deg, rgba(24, 31, 52, 0.95), rgba(10, 14, 26, 0.98));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-det-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mh-det-art {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85));
}

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

.mh-det-title {
  font-family: 'NovaMonument', 'NovaMonumentI18n', serif;
  font-size: 14.5px;
  font-weight: 900;
  color: #fef3c7;
}

.mh-det-prob {
  font-size: 11px;
  color: #fbbf24;
  margin-top: 2px;
}

.mh-det-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.42;
}

.mh-det-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mh-det-kv {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(8, 12, 22, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 10.5px;
  color: #94a3b8;
}

.mh-det-kv b {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #f8fafc;
}

.mh-equip-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(253, 224, 71, 0.85);
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  color: #fffbeb;
  font-family: 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.45);
}

.mh-equip-btn:disabled {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(30, 41, 59, 0.75);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==================== 5. 顶部非阻塞【神迹授勋 / 重铸升阶】庆典横幅 ==================== */
.mh-ceremony-layer {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  width: min(94vw, 400px);
  pointer-events: none;
}

.mh-ceremony-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1.5px solid #fde047;
  background:
    radial-gradient(circle at 18% 50%, rgba(251, 191, 36, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(28, 22, 10, 0.97), rgba(10, 13, 24, 0.98));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 22px rgba(250, 204, 21, 0.38);
  cursor: pointer;
  animation: mhCeremonyIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mhCeremonyIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mh-cer-art {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(253, 224, 71, 0.65));
}

.mh-cer-body {
  flex: 1;
  min-width: 0;
}

.mh-cer-tag {
  font-size: 10.5px;
  font-weight: 900;
  color: #fde047;
}

.mh-cer-name {
  font-family: 'NovaMonument', 'NovaMonumentI18n', serif;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  margin: 1px 0 2px;
}

.mh-cer-meta {
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.35;
}

.mh-cer-bonus {
  margin-top: 3px;
  font-family: 'NovaNumeral', monospace;
  font-size: 12.5px;
  font-weight: 900;
  color: #34d399;
}

/* ==================== 6. 同舱学者列表 / 挖宝结算榜 / 战报【徽章权重压制】 ==================== */
.mh-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 3px;
  margin-left: 4px;
  border-radius: 99px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(20, 24, 38, 0.9);
  font-family: 'NovaNumeral', sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: #fde68a;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
}

.mh-inline-badge img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: middle;
}

.mh-inline-badge.grade-silver {
  border-color: rgba(56, 189, 248, 0.7);
  color: #bae6fd;
}
.mh-inline-badge.grade-gold {
  border-color: rgba(250, 204, 21, 0.92);
  background: linear-gradient(90deg, rgba(66, 42, 8, 0.92), rgba(28, 20, 8, 0.95));
  color: #fef08a;
}
.mh-inline-badge.grade-darkmatter {
  border-color: #e879f9;
  background: linear-gradient(90deg, rgba(59, 17, 84, 0.94), rgba(20, 14, 38, 0.96));
  color: #f5d0fe;
  box-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
}

.crew-row.mh-sovereign-row,
.dig-settle-row.mh-sovereign-row {
  border-color: rgba(250, 204, 21, 0.78) !important;
  box-shadow: inset 0 0 12px rgba(250, 204, 21, 0.16);
}

.mh-sov-crown-tag {
  font-size: 9.5px;
  font-weight: 900;
  color: #fde047;
  margin-left: 3px;
}
