/* ============================================================
   闪杀对决 · 首页 v3
   暖金三国战场 / 三将主视觉 / 双模式入口 / 卡牌快捷入口
   ============================================================ */
#screen-home.screen-home-v3 {
  background: #120a06;
  color: #f5e8cf;
  overflow: hidden;
}

.hv3-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #120a06;
}
.hv3-bg::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 112%;
  height: 70%;
  transform: translateX(-50%);
  background: url('images/gen/home_heroes_v3.jpg') center top / cover no-repeat;
  filter: saturate(1.04) contrast(1.03);
}
.hv3-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 9, 5, .22) 0%, transparent 16%, transparent 38%, rgba(16, 9, 5, .58) 58%, #120a06 80%),
    radial-gradient(90% 50% at 50% 34%, transparent 42%, rgba(8, 4, 2, .42) 100%);
}
.hv3-bg-glow {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 92%;
  height: 44%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 178, 82, .16), transparent 66%);
  filter: blur(26px);
  animation: hv3Aura 7s ease-in-out infinite;
}
@keyframes hv3Aura {
  0%, 100% { opacity: .65; transform: translateX(-50%) scale(.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.04); }
}
.hv3-bg-embers {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 198, 110, .86) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 122, 58, .65) 0 1px, transparent 1.5px);
  background-size: 121px 167px, 177px 213px;
  background-position: 24px 44px, 93px 129px;
  opacity: .58;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 76%);
  mask-image: linear-gradient(to top, #000 0%, transparent 76%);
  animation: hv3Embers 15s linear infinite;
}
@keyframes hv3Embers {
  from { background-position: 24px 44px, 93px 129px; }
  to { background-position: 24px -123px, 93px -84px; }
}
.hv3-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 4, 2, .45), transparent 16%, transparent 84%, rgba(8, 4, 2, .45)),
    linear-gradient(180deg, rgba(8, 4, 2, .34), transparent 18%, transparent 74%, rgba(8, 4, 2, .68));
}

/* ---------------- 顶栏 ---------------- */
.hv3-top {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: calc(7px + var(--safe-top)) 10px 10px;
  background: linear-gradient(180deg, rgba(19, 11, 7, .96) 0%, rgba(19, 11, 7, .72) 62%, transparent 100%);
}
.hv3-profile {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
}
.hv3-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(145deg, #f4d795, #a86e24 55%, #5b360f);
  box-shadow: 0 4px 11px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 233, 178, .16);
}
.hv3-avatar::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 236, 188, .28);
  pointer-events: none;
}
.hv3-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}
.hv3-lv-badge {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  z-index: 2;
  height: 15px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffe4a6, #d9a64b 55%, #9a631f);
  color: #321b06;
  border: 1px solid rgba(255, 241, 199, .72);
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .45);
}
.hv3-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 52px;
  max-width: 74px;
}
.hv3-profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f6e3bb;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-shadow: 0 1px 3px #000;
}
.hv3-xp {
  position: relative;
  display: block;
  height: 5px;
  border-radius: 99px;
  background: rgba(8, 4, 2, .72);
  border: 1px solid rgba(224, 187, 121, .35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.hv3-xp i {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d99a37, #ffe4a2);
  box-shadow: 0 0 5px rgba(255, 191, 81, .6);
  transition: width .35s ease;
}
.hv3-wallet {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.hv3-coin, .hv3-gem {
  min-width: 0;
  height: 27px;
  padding: 0 7px 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(46, 29, 16, .9), rgba(19, 11, 7, .92));
  border: 1px solid rgba(215, 173, 103, .38);
  box-shadow: inset 0 1px 0 rgba(255, 235, 188, .13), 0 3px 8px rgba(0, 0, 0, .32);
  color: #f7e7c4;
}
.hv3-coin:active, .hv3-gem:active { transform: scale(.96); }
.hv3-coin-ic, .hv3-gem-ic {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.hv3-coin-ic {
  background: radial-gradient(circle at 34% 26%, #ffe9a9, #e0aa3e 54%, #8f5b17);
  color: #5b380b;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 210, .55), 0 1px 3px rgba(0, 0, 0, .45);
}
.hv3-gem-ic {
  background: radial-gradient(circle at 34% 26%, #f8fbff, #c3d0e2 48%, #71849e);
  color: #354a62;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72), 0 1px 3px rgba(0, 0, 0, .45);
}
.hv3-coin-ic .mp-icon, .hv3-gem-ic .mp-icon { width: 15px; height: 15px; }
.hv3-coin b, .hv3-gem b {
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  text-shadow: 0 1px 2px #000;
}
.hv3-coin em, .hv3-gem em {
  color: #e5bd72;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-.5px);
}
.hv3-gear {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(55, 34, 18, .94), rgba(18, 10, 6, .96));
  border: 1px solid rgba(220, 180, 108, .55);
  color: #e9cb8e;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 236, 190, .18);
}
.hv3-gear .mp-icon { width: 19px; height: 19px; }
.hv3-gear:active { transform: scale(.9); }

/* ---------------- 右侧活动 / 任务 ---------------- */
.hv3-side {
  position: absolute;
  z-index: 26;
  top: calc(78px + var(--safe-top));
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-items: center;
}
.hv3-side-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #f0dcba;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #000;
}
.hv3-side-item:active .hv3-side-ic { transform: scale(.92); }
.hv3-side-ic {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #ffe5a2 0%, #e1b056 32%, #b57a2a 64%, #704211 100%);
  border: 1px solid rgba(255, 229, 162, .78);
  box-shadow:
    0 4px 11px rgba(0, 0, 0, .5),
    inset 0 0 0 2px rgba(66, 34, 9, .3),
    inset 0 1px 0 rgba(255, 247, 210, .6);
  color: #3e2508;
  transition: transform .16s ease;
}
.hv3-side-ic .mp-icon { width: 22px; height: 22px; filter: drop-shadow(0 1px 0 rgba(255, 240, 196, .4)); }
.hv3-side-ic.task { color: #4a2b0c; }
.hv3-dot {
  position: absolute;
  top: -1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef5a3f;
  border: 1px solid #ffe3bb;
  box-shadow: 0 0 7px rgba(255, 78, 48, .8);
}
.hv3-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffdf9c, #cb8b27);
  border: 1px solid rgba(255, 246, 215, .8);
  color: #3a2207;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
}

/* ---------------- 主内容 ---------------- */
.hv3-main {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  padding: 60px 11px calc(66px + var(--safe-bottom));
  pointer-events: none;
}
.hv3-main > * { pointer-events: auto; }
.hv3-hero-space {
  flex: 1 1 auto;
  min-height: 112px;
}
.hv3-modes {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  height: 184px;
  height: clamp(148px, 23vh, 194px);
}
.hv3-mode {
  position: relative;
  display: block;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(232, 193, 122, .75);
  background: #27180d;
  text-align: left;
  box-shadow:
    0 9px 18px rgba(0, 0, 0, .52),
    0 0 0 1px rgba(48, 26, 10, .8),
    inset 0 0 0 1px rgba(255, 231, 176, .1);
  transition: transform .16s ease, filter .16s ease;
}
.hv3-mode::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 3px;
  border: 1px solid rgba(255, 225, 163, .28);
  border-radius: 3px;
  pointer-events: none;
}
.hv3-mode:active { transform: scale(.975); filter: brightness(.94); }
.hv3-mode-solo {
  background:
    linear-gradient(180deg, rgba(18, 10, 5, .02) 0%, rgba(18, 10, 5, .08) 44%, rgba(18, 10, 5, .92) 100%),
    url('images/gen/home_mode_solo.jpg') center 18% / cover no-repeat,
    linear-gradient(160deg, #6b4625, #1b0f08);
}
.hv3-mode-online {
  background:
    linear-gradient(180deg, rgba(8, 13, 24, .02) 0%, rgba(8, 13, 24, .08) 44%, rgba(7, 11, 21, .94) 100%),
    url('images/gen/home_mode_online.jpg') center 18% / cover no-repeat,
    linear-gradient(160deg, #27456f, #0a1424);
}
.hv3-mode-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(72% 58% at 50% 24%, transparent 34%, rgba(8, 4, 2, .2) 100%),
    linear-gradient(180deg, rgba(8, 4, 2, .16), transparent 30%);
}
.hv3-mode-online .hv3-mode-veil {
  background:
    radial-gradient(72% 58% at 50% 24%, transparent 34%, rgba(4, 8, 16, .3) 100%),
    linear-gradient(180deg, rgba(4, 8, 16, .1), transparent 30%);
}
.hv3-mode-badge {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 19px;
  padding: 0 7px 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(20, 12, 7, .86), rgba(10, 6, 4, .82));
  border: 1px solid rgba(239, 207, 148, .46);
  color: #f4e3c1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.hv3-mode-badge .mp-icon { width: 12px; height: 12px; color: #f2d69b; }
.hv3-mode-title {
  position: absolute;
  z-index: 3;
  left: 10px;
  right: 8px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f7dfa9;
  font-family: var(--serif);
  font-size: 22px;
  font-size: clamp(19px, 5.4vw, 27px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, .98),
    0 0 2px rgba(0, 0, 0, .95),
    0 0 16px rgba(247, 190, 91, .32);
}
.hv3-mode-title b {
  flex: 0 0 auto;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  line-height: 1;
  color: #f4d18b;
  transform: translateY(-2px);
}
.hv3-mode-online .hv3-mode-title {
  color: #d9ecff;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .98), 0 0 16px rgba(101, 170, 255, .45);
}
.hv3-mode-online .hv3-mode-title b { color: #a9d4ff; }

/* ---------------- 卡牌快捷入口 ---------------- */
.hv3-quick {
  flex: 0 0 auto;
  height: 104px;
  height: clamp(82px, 13vh, 112px);
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.hv3-quick-card {
  position: relative;
  display: block;
  height: 100%;
  padding: 0;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .42));
  transition: transform .15s ease, filter .15s ease;
}
.hv3-quick-card:active { transform: translateY(2px) scale(.96); filter: brightness(.94) drop-shadow(0 3px 5px rgba(0, 0, 0, .42)); }
.hv3-qc-frame {
  position: absolute;
  inset: 0;
  clip-path: polygon(8% 0, 92% 0, 100% 9%, 100% 90%, 92% 100%, 8% 100%, 0 90%, 0 9%);
  background: linear-gradient(180deg, #f6dda1 0%, #bc8c44 54%, #6f451b 100%);
}
.hv3-qc-body {
  position: absolute;
  inset: 2px;
  clip-path: polygon(8% 0, 92% 0, 100% 9%, 100% 90%, 92% 100%, 8% 100%, 0 90%, 0 9%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background:
    radial-gradient(70% 58% at 50% 44%, rgba(255, 255, 255, .62), transparent 72%),
    linear-gradient(180deg, #f8efd9 0%, #eddfc2 48%, #dcc39a 100%);
  color: #3c2913;
  overflow: hidden;
}
.hv3-qc-body::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(120, 84, 37, .36);
  clip-path: polygon(8% 0, 92% 0, 100% 9%, 100% 90%, 92% 100%, 8% 100%, 0 90%, 0 9%);
}
.hv3-qc-body::after {
  content: "";
  position: absolute;
  left: -30%;
  top: -30%;
  width: 90%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .38), transparent 68%);
  transform: rotate(-18deg);
  pointer-events: none;
}
.hv3-qc-icon {
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #442c12;
}
.hv3-qc-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hv3-qc-name {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-size: 16px;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  color: #38250f;
  text-shadow: 0 1px 0 rgba(255, 250, 232, .7);
}
.hv3-qc-name small {
  display: block;
  margin-top: 2px;
  font-family: var(--font);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #8a6b3e;
}

/* ---------------- 底部导航 ---------------- */
.hv3-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: calc(58px + var(--safe-bottom));
  padding: 4px 6px calc(4px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background:
    linear-gradient(180deg, rgba(26, 16, 10, .97) 0%, rgba(11, 7, 5, .99) 60%, #080504 100%);
  border-top: 1px solid rgba(214, 171, 98, .3);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.hv3-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #94836c;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px #000;
}
.hv3-nav-ic {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: transform .15s ease;
}
.hv3-nav-ic .mp-icon { width: 23px; height: 23px; }
.hv3-nav-item:active .hv3-nav-ic { transform: scale(.9); }
.hv3-nav-item.is-active { color: #f3d18b; }
.hv3-nav-item.is-active .hv3-nav-ic {
  color: #ffd67e;
  background: radial-gradient(circle at 50% 42%, rgba(255, 196, 88, .24), transparent 68%);
  filter: drop-shadow(0 0 6px rgba(255, 190, 80, .42));
}
.hv3-nav-item.is-active::before {
  content: "";
  position: absolute;
  top: -5px;
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #f6d18a, transparent);
  box-shadow: 0 0 7px rgba(246, 209, 138, .55);
}
.hv3-nav-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 209, 138, .5), transparent);
}

/* ---------------- 排行弹层 ---------------- */
.ranking-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  max-height: 78dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 17px 16px;
  border-radius: 20px;
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(143, 91, 41, .32), transparent 64%),
    linear-gradient(165deg, #2c1a11, #120b07 70%);
  border: 1px solid rgba(214, 171, 98, .42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 231, 178, .14);
  color: #f3e3c4;
  animation: cardIn .24s cubic-bezier(.2, .8, .3, 1);
}
.ranking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ranking-kicker { display: block; color: #b99767; font-size: 8px; font-weight: 700; letter-spacing: 2.4px; }
.ranking-head h3 { margin: 3px 0 0; font-family: var(--serif); font-size: 22px; letter-spacing: 3px; color: #f4dba8; }
.ranking-head p { margin: 4px 0 0; font-size: 9.5px; line-height: 1.5; color: #b9a78c; }
.ranking-list { margin-top: 13px; overflow-y: auto; scrollbar-width: none; }
.ranking-list::-webkit-scrollbar { display: none; }
.ranking-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(207, 168, 100, .13);
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-row.is-me {
  margin: 3px 0;
  border: 1px solid rgba(236, 194, 114, .48);
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(126, 83, 33, .28), rgba(54, 32, 16, .18));
  box-shadow: inset 0 1px 0 rgba(255, 230, 178, .1);
}
.ranking-no {
  width: 23px;
  flex: 0 0 auto;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: #a99a82;
}
.ranking-row:nth-child(1) .ranking-no { color: #ffd979; }
.ranking-row:nth-child(2) .ranking-no { color: #dfe8ff; }
.ranking-row:nth-child(3) .ranking-no { color: #e8b27b; }
.ranking-face {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: #fff6df;
  border: 1px solid rgba(230, 190, 116, .5);
  background: linear-gradient(145deg, var(--g1, #5b96ff), var(--g2, #2254d4));
  box-shadow: inset 0 0 0 1px rgba(14, 8, 4, .42);
}
.ranking-tx { flex: 1; min-width: 0; }
.ranking-tx strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #f4e6cc; }
.ranking-tx small { display: block; margin-top: 1px; font-size: 8px; color: #a99476; }
.ranking-score { flex: 0 0 auto; font-family: Georgia, serif; font-size: 12.5px; font-weight: 700; color: #e8c77f; }
.ranking-score small { font-family: var(--font); font-size: 7px; color: #9d8867; font-weight: 400; }
.ranking-note { margin-top: 10px; font-size: 8.5px; line-height: 1.5; color: #9d8b70; text-align: center; }

/* ---------------- 短屏适配 ---------------- */
@media (max-height: 740px) {
  .hv3-modes { height: 150px; height: clamp(132px, 21vh, 168px); }
  .hv3-quick { height: 88px; height: clamp(74px, 12vh, 96px); }
  .hv3-side { top: calc(70px + var(--safe-top)); gap: 8px; }
  .hv3-side-ic { width: 36px; height: 36px; }
  .hv3-side-ic .mp-icon { width: 19px; height: 19px; }
  .hv3-avatar { width: 43px; height: 43px; }
  .hv3-main { padding-top: 56px; }
}
@media (max-height: 650px) {
  .hv3-modes { height: 126px; }
  .hv3-quick { height: 68px; }
  .hv3-mode-title { font-size: 18px; }
  .hv3-mode-title b { font-size: 19px; }
  .hv3-qc-icon { width: 29px; height: 29px; }
  .hv3-qc-name { font-size: 13px; }
  .hv3-side-item { font-size: 9px; }
  .hv3-nav { height: calc(52px + var(--safe-bottom)); }
  .hv3-nav-ic .mp-icon { width: 20px; height: 20px; }
  .hv3-main { padding-bottom: calc(58px + var(--safe-bottom)); }
}
@media (max-width: 350px) {
  .hv3-profile-meta { display: none; }
  .hv3-wallet { gap: 4px; }
  .hv3-coin b, .hv3-gem b { max-width: 38px; font-size: 10px; }
  .hv3-mode-title { font-size: 17px; }
  .hv3-qc-name { font-size: 12px; }
}

/* ---------------- 武将头像 / 图鉴卡面 ---------------- */
.hero-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
  border-radius: inherit;
}
.codex-card-face {
  width: 58px;
  height: 74px;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid rgba(212, 172, 103, .5);
  background: #1b0f08;
  box-shadow: 0 4px 9px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(255, 231, 178, .12);
}
.codex-card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  transform: scale(1.01);
}
.ranking-face { overflow: hidden; }
.ranking-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
}
@media (max-width: 360px) {
  .codex-card-face { width: 52px; height: 66px; }
}

.hv3-badge[hidden], .hv3-dot[hidden] { display: none !important; }

.hv3-lv-text {
  display: block;
  color: #f4d99f;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .3px;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(244, 190, 95, .25);
}

/* 旧内核兼容：inset 不支持时也能铺满 */
#screen-home.screen-home-v3,
.hv3-bg,
.hv3-bg-embers,
.hv3-bg-vignette,
.hv3-main,
.hv3-mode-veil,
.hv3-qc-frame {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.hv3-bg::after { top: 0; right: 0; bottom: 0; left: 0; }
.hv3-mode::after { top: 3px; right: 3px; bottom: 3px; left: 3px; }
.hv3-qc-body { top: 2px; right: 2px; bottom: 2px; left: 2px; }
.hv3-qc-body::before { top: 4px; right: 4px; bottom: 4px; left: 4px; }

/* 全局屏幕定位兼容 + 触控焦点样式 */
.screen {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.hv3-nav-item:focus,
.hv3-mode:focus,
.hv3-quick-card:focus,
.hv3-coin:focus,
.hv3-gem:focus,
.hv3-gear:focus,
.hv3-side-item:focus,
.hv3-profile:focus {
  outline: none;
}

.pick-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  border-radius: inherit;
}
