/* 本地中文字体子集（Noto Sans/Serif SC，OFL），保证无系统字体环境也能正常显示 */
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/font-NotoSansSC-400.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/font-NotoSansSC-600.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/font-NotoSansSC-700.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/font-NotoSansSC-800.woff2") format("woff2"); }
@font-face { font-family: "Noto Serif SC"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/font-NotoSerifSC-700.woff2") format("woff2"); }
@font-face { font-family: "Noto Serif SC"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/font-NotoSerifSC-900.woff2") format("woff2"); }

/* =========================================================
   暗夜谜踪 · 月夜老宅首页 / 背包
   16:9 横版 · 移动端自适应 · 主色 #FF8A3D
   ========================================================= */

:root {
  --u: min(1vw, 1.7778vh);
  --font-ui: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  --hh-amber: #ff8a3d;
  --hh-amber-2: #ffb877;
  --hh-amber-3: #ffd9b4;
  --hh-panel: rgba(8, 10, 14, .72);
  --hh-line: rgba(255, 168, 98, .28);
  --hh-line-soft: rgba(255, 194, 144, .14);
}

html, body {
  height: 100%;
  background: #020304;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  background: url("images/gen/bg-night.jpg") center 34% / cover no-repeat;
  filter: blur(44px) brightness(.4) saturate(.92);
  opacity: .9;
  pointer-events: none;
}

/* 16:9 舞台；竖屏时改为整屏竖版布局 */
.app {
  position: relative;
  z-index: 1;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
  background: #050608;
  overflow: hidden;
}

@media (min-width: 900px) and (orientation: landscape) {
  .app {
    border-radius: 22px;
    border: 1px solid rgba(255, 190, 140, .12);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .75);
  }
}

.screen-home {
  padding: 0;
  overflow: hidden;
}

/* ---------------- 场景背景 ---------------- */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #040608;
}

.scene-bg {
  position: absolute;
  inset: 0;
  background-image: url("images/gen/bg-night.jpg");
  background-repeat: no-repeat;
  background-size: 159.2% auto;
  background-position: 0% 27%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.012);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  filter: saturate(1.06) contrast(1.035) brightness(.95);
  will-change: transform;
}

.scene-fog {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: 2%;
  height: 46%;
  pointer-events: none;
  background: radial-gradient(ellipse at 42% 52%, rgba(151, 176, 193, .16) 0%, rgba(92, 114, 129, .06) 44%, rgba(0, 0, 0, 0) 72%);
  filter: blur(26px);
  mix-blend-mode: screen;
  animation: hhFog 28s ease-in-out infinite alternate;
}
.scene-fog.fog-b {
  bottom: -8%;
  height: 54%;
  opacity: .72;
  animation-duration: 41s;
  animation-direction: alternate-reverse;
  background: radial-gradient(ellipse at 58% 50%, rgba(123, 148, 168, .12) 0%, rgba(70, 88, 104, .04) 48%, rgba(0, 0, 0, 0) 74%);
}
@keyframes hhFog {
  0% { transform: translate3d(-5%, 0, 0) scale(1); }
  50% { transform: translate3d(4%, -2%, 0) scale(1.1); }
  100% { transform: translate3d(9%, 1%, 0) scale(.97); }
}

.scene-grain {
  position: absolute;
  inset: 0;
  opacity: .055;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".82" numOctaves="2"/></filter><rect width="160" height="160" filter="url(%23n)" opacity=".75"/></svg>');
}

.scene-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 54% 42%, rgba(0, 0, 0, 0) 28%, rgba(2, 3, 5, .38) 72%, rgba(1, 2, 3, .78) 100%),
    linear-gradient(180deg, rgba(2, 3, 5, .88) 0%, rgba(2, 3, 5, .54) 5%, rgba(2, 3, 5, .12) 15%, rgba(2, 3, 5, 0) 34%, rgba(2, 3, 5, 0) 73%, rgba(2, 3, 5, .66) 93%, #020304 100%),
    linear-gradient(90deg, rgba(2, 3, 5, .55) 0%, rgba(2, 3, 5, .1) 19%, rgba(2, 3, 5, 0) 68%, rgba(2, 3, 5, .35) 100%);
}

.embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.embers i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffb16a;
  box-shadow: 0 0 8px rgba(255, 145, 65, .9), 0 0 16px rgba(255, 120, 40, .35);
  opacity: 0;
  animation: hhEmber linear infinite;
}
@keyframes hhEmber {
  0% { opacity: 0; transform: translate3d(0, 16px, 0) scale(.6); }
  12% { opacity: .85; }
  70% { opacity: .55; }
  100% { opacity: 0; transform: translate3d(var(--dx, 22px), -120px, 0) scale(1.15); }
}

/* ---------------- 顶部玩家 / 资源 ---------------- */
.hh-top {
  position: absolute;
  z-index: 8;
  left: 2.2%;
  right: 10.5%;
  top: 2.5%;
  display: flex;
  align-items: flex-start;
  gap: 1.8%;
}

.hh-profile {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * .95);
  max-width: 34%;
  padding: calc(var(--u) * .55) calc(var(--u) * 1.35) calc(var(--u) * .6) calc(var(--u) * .55);
  border-radius: calc(var(--u) * 1.45);
  border: 1px solid rgba(255, 170, 100, .26);
  background:
    linear-gradient(135deg, rgba(30, 24, 19, .72), rgba(7, 9, 12, .62)),
    radial-gradient(ellipse at 10% 0%, rgba(255, 138, 61, .14), transparent 55%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.hh-profile:active { transform: scale(.987); border-color: rgba(255, 184, 119, .5); }

.hh-avatar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(42px, calc(var(--u) * 6.35), 112px);
  height: clamp(42px, calc(var(--u) * 6.35), 112px);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 26%, #4a3022, #160f0b 70%);
  box-shadow: 0 0 0 2px rgba(255, 174, 104, .62), 0 0 22px rgba(255, 138, 61, .28);
}
.hh-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(.92) contrast(1.02);
}
.hh-avatar-letter {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: clamp(18px, calc(var(--u) * 2.6), 44px);
  color: #ffe0bf;
  background: radial-gradient(circle at 35% 28%, #503421 0%, #241811 52%, #0b0c0f 100%);
}
.hh-avatar.is-fallback img { display: none; }
.hh-avatar.is-fallback .hh-avatar-letter { display: grid; }
.hh-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 150, .22);
  pointer-events: none;
}

.hh-id { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hh-name-line { display: flex; align-items: center; gap: calc(var(--u) * .55); min-width: 0; }
.hh-name-line b {
  min-width: 0;
  max-width: calc(var(--u) * 13);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(15px, calc(var(--u) * 1.95), 34px);
  font-weight: 800;
  letter-spacing: .04em;
  color: #fbf1e4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}
.hh-lv {
  flex: 0 0 auto;
  padding: calc(var(--u) * .12) calc(var(--u) * .42);
  border-radius: 999px;
  font-style: normal;
  font-size: clamp(8px, calc(var(--u) * .82), 14px);
  font-weight: 800;
  letter-spacing: .04em;
  color: #2a1205;
  background: linear-gradient(180deg, #ffc384, #ff8a3d);
  box-shadow: 0 0 12px rgba(255, 138, 61, .35);
}
.hh-status {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(8px, calc(var(--u) * .92), 15px);
  color: #a99b87;
  letter-spacing: .04em;
}
.hh-status .live-dot { width: 5px; height: 5px; flex: 0 0 auto; }
.hh-xp {
  position: relative;
  display: block;
  width: min(100%, calc(var(--u) * 14));
  height: clamp(3px, calc(var(--u) * .34), 6px);
  margin-top: calc(var(--u) * .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8);
}
.hh-xp i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b34912, #ff8a3d 62%, #ffd29c);
  box-shadow: 0 0 10px rgba(255, 138, 61, .8);
}
.hh-edit {
  flex: 0 0 auto;
  width: clamp(11px, calc(var(--u) * 1.15), 19px);
  height: clamp(11px, calc(var(--u) * 1.15), 19px);
  color: #7d7366;
}

.hh-wallet {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.15);
  padding-top: calc(var(--u) * .42);
}
.hh-cur {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * .55);
  height: clamp(30px, calc(var(--u) * 4.35), 62px);
  min-width: clamp(82px, calc(var(--u) * 11.5), 212px);
  padding: 0 calc(var(--u) * .55) 0 calc(var(--u) * .4);
  border-radius: 999px;
  border: 1px solid rgba(255, 196, 126, .28);
  background: linear-gradient(180deg, rgba(34, 26, 19, .74), rgba(8, 10, 13, .66));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .15s ease, border-color .15s ease;
}
.hh-cur:active { transform: scale(.97); border-color: rgba(255, 196, 126, .6); }
.hh-cur-ico {
  width: clamp(19px, calc(var(--u) * 2.45), 44px);
  height: clamp(19px, calc(var(--u) * 2.45), 44px);
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 8px rgba(255, 170, 70, .35));
}
.hh-cur b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(12px, calc(var(--u) * 1.65), 29px);
  font-weight: 800;
  letter-spacing: .02em;
  color: #f8e9d4;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
.hh-plus {
  flex: 0 0 auto;
  width: clamp(15px, calc(var(--u) * 1.7), 31px);
  height: clamp(15px, calc(var(--u) * 1.7), 31px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #241005;
  background: linear-gradient(180deg, #ffc07c, #ff8a3d);
  box-shadow: 0 0 10px rgba(255, 138, 61, .35);
  margin-left: auto;
}
.hh-plus .mp-icon { width: 62%; height: 62%; }
.hh-gem { border-color: rgba(139, 185, 255, .28); }
.hh-gem .hh-plus { background: linear-gradient(180deg, #bcd8ff, #7fb0ec); }
.hh-gem .hh-cur-ico { filter: drop-shadow(0 0 9px rgba(110, 170, 255, .45)); }

.hh-tools {
  position: absolute;
  z-index: 9;
  right: 2.2%;
  top: 2.8%;
  display: flex;
  gap: calc(var(--u) * .75);
}
.hh-tool {
  width: clamp(30px, calc(var(--u) * 3.35), 58px);
  height: clamp(30px, calc(var(--u) * 3.35), 58px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 190, 140, .2);
  color: #ded0bd;
  background: linear-gradient(180deg, rgba(28, 24, 20, .62), rgba(7, 9, 12, .58));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .15s ease, color .15s ease, border-color .15s ease;
}
.hh-tool .mp-icon { width: 52%; height: 52%; }
.hh-tool:active { transform: scale(.92); color: #ffd4aa; border-color: rgba(255, 175, 105, .55); }

/* ---------------- 左侧每日 / 活动 ---------------- */
.hh-rail {
  position: absolute;
  z-index: 6;
  left: 2.2%;
  top: 14.6%;
  width: 11.8%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1.05);
}
.hh-rail-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * .32);
  padding: calc(var(--u) * .8) calc(var(--u) * .5) calc(var(--u) * .95);
  border-radius: calc(var(--u) * 1.4);
  border: 1px solid rgba(255, 168, 95, .3);
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 138, 61, .13), transparent 58%),
    linear-gradient(180deg, rgba(25, 20, 16, .54), rgba(6, 8, 11, .68));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.hh-rail-btn::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -22%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 138, 61, .24), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.hh-rail-btn:active { transform: scale(.975); border-color: rgba(255, 190, 125, .6); }
.hh-rail-art {
  position: relative;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(255, 138, 61, .22), inset 0 0 0 1px rgba(255, 190, 130, .18);
}
.hh-rail-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.08);
  filter: saturate(1.08) contrast(1.04);
}
.hh-rail-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}
.hh-rail-copy b {
  font-size: clamp(9px, calc(var(--u) * 1.28), 23px);
  font-weight: 800;
  letter-spacing: .06em;
  color: #f5e8d6;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}
.hh-rail-copy small {
  font-size: clamp(8px, calc(var(--u) * 1.02), 18px);
  letter-spacing: .03em;
  color: #ffb877;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px #000;
}
.hh-badge {
  position: absolute;
  z-index: 2;
  top: 5%;
  right: 5%;
  width: max(7px, calc(var(--u) * .78));
  height: max(7px, calc(var(--u) * .78));
  border-radius: 50%;
  border: 1px solid rgba(255, 225, 205, .7);
  background: #e5362d;
  box-shadow: 0 0 10px rgba(229, 54, 45, .85);
}
.hh-badge.is-off { display: none; }
.hh-event-flame {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: 5%;
  width: max(8px, calc(var(--u) * .9));
  height: max(8px, calc(var(--u) * .9));
  border-radius: 56% 44% 60% 40%;
  background: linear-gradient(160deg, #ffcf7d, #ff6b25 62%, #a92a0c);
  box-shadow: 0 0 12px rgba(255, 120, 40, .7);
  transform: rotate(12deg);
  animation: hhFlame 2.4s ease-in-out infinite;
}
@keyframes hhFlame {
  0%, 100% { transform: rotate(12deg) scale(1); opacity: .92; }
  50% { transform: rotate(4deg) scale(1.14); opacity: 1; }
}

/* ---------------- 右侧玩法卡 ---------------- */
.hh-main {
  position: absolute;
  z-index: 6;
  right: 2.2%;
  top: 25%;
  bottom: 11.8%;
  width: 31.7%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * .95);
}

.hh-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--u) * 1.25);
  border: 1px solid rgba(255, 150, 82, .4);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 34px rgba(255, 92, 40, .06);
  text-align: left;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), border-color .18s ease, box-shadow .18s ease;
}
.hh-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, .34);
}
.hh-card-solo {
  flex: 1.56 1 0;
  background: linear-gradient(103deg, #430c0c 0%, #761718 44%, #2a0708 100%);
  border-color: rgba(255, 122, 92, .52);
}
.hh-card-multi {
  flex: 1.02 1 0;
  background: linear-gradient(103deg, #07131f 0%, #123349 46%, #071018 100%);
  border-color: rgba(132, 189, 255, .32);
}
.hh-card-art {
  position: absolute;
  z-index: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 58%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: .94;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 26%, #000 54%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 26%, #000 54%);
  transform: scale(1.02);
}
.art-solo { background-image: url("images/gen/ui/art_single.png"); }
.art-multi { background-image: url("images/gen/ui/art_multi.png"); }
.hh-card-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 5%, rgba(255, 198, 150, .22), transparent 48%),
    linear-gradient(90deg, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 32%, rgba(0, 0, 0, .42));
}
.hh-card-multi .hh-card-glow {
  background:
    radial-gradient(ellipse at 18% 2%, rgba(156, 208, 255, .2), transparent 50%),
    linear-gradient(90deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 34%, rgba(0, 0, 0, .45));
}
.hh-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 5.5% 7.5%;
  width: 72%;
}
.hh-card-top { display: flex; align-items: center; gap: calc(var(--u) * .55); margin-bottom: calc(var(--u) * .12); }
.hh-card-icon {
  width: clamp(18px, calc(var(--u) * 2.65), 46px);
  height: clamp(18px, calc(var(--u) * 2.65), 46px);
  color: #fff4e7;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .65));
}
.hh-card-kicker {
  font-size: clamp(6.5px, calc(var(--u) * .72), 13px);
  font-weight: 800;
  letter-spacing: .22em;
  color: rgba(255, 222, 194, .68);
  text-indent: .22em;
}
.hh-card-title {
  display: block;
  font-size: clamp(20px, calc(var(--u) * 2.85), 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: .07em;
  color: #fff7ec;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 22px rgba(255, 116, 60, .32);
}
.hh-card-multi .hh-card-title { font-size: clamp(18px, calc(var(--u) * 2.45), 44px); }
.hh-card-sub {
  display: block;
  margin-top: calc(var(--u) * .32);
  font-size: clamp(8px, calc(var(--u) * 1.05), 19px);
  letter-spacing: .05em;
  color: rgba(242, 223, 203, .78);
  text-shadow: 0 1px 4px #000;
}
.hh-card-arrow {
  position: absolute;
  z-index: 3;
  right: 3.2%;
  bottom: 7%;
  width: clamp(20px, calc(var(--u) * 2.25), 40px);
  height: clamp(20px, calc(var(--u) * 2.25), 40px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 205, .28);
  color: #ffe4c8;
  background: rgba(8, 8, 10, .5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hh-card-arrow .mp-icon { width: 58%; height: 58%; }

.hh-small-row {
  flex: 0 0 20.5%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.2%;
}
.hh-mini {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--u) * 1.05);
  border: 1px solid rgba(255, 155, 92, .3);
  background:
    radial-gradient(ellipse at 14% 0%, rgba(255, 150, 80, .12), transparent 52%),
    linear-gradient(160deg, rgba(38, 27, 18, .94), rgba(7, 9, 13, .97));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .08);
  text-align: left;
  padding: 8% 9%;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.hh-mini:active { transform: scale(.98); border-color: rgba(255, 190, 125, .56); }
.hh-mini-art {
  position: absolute;
  z-index: 0;
  right: -6%;
  top: 0;
  bottom: 0;
  width: 66%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: .56;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 38%, #000 76%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 38%, #000 76%);
}
.art-puzzle { background-image: url("images/gen/ui/art_puzzle.png"); }
.art-team { background-image: url("images/gen/ui/art_team.png"); }
.hh-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .35);
  border-radius: inherit;
}
.hh-mini-top { position: relative; z-index: 1; display: flex; align-items: center; gap: calc(var(--u) * .38); }
.hh-mini-top .mp-icon {
  width: clamp(14px, calc(var(--u) * 1.65), 29px);
  height: clamp(14px, calc(var(--u) * 1.65), 29px);
  color: #ffbb82;
  filter: drop-shadow(0 0 7px rgba(255, 138, 61, .35));
}
.hh-mini-top b {
  font-size: clamp(10px, calc(var(--u) * 1.45), 26px);
  font-weight: 800;
  letter-spacing: .05em;
  color: #f6e8d6;
  text-shadow: 0 1px 5px #000;
}
.hh-mini-sub {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: calc(var(--u) * .3);
  font-size: clamp(7px, calc(var(--u) * .84), 15px);
  letter-spacing: .03em;
  color: #aa9c88;
  text-shadow: 0 1px 3px #000;
}
.hh-mini-arrow {
  position: absolute;
  z-index: 1;
  right: 7%;
  bottom: 12%;
  width: clamp(12px, calc(var(--u) * 1.35), 24px);
  height: clamp(12px, calc(var(--u) * 1.35), 24px);
  color: #ffcf9f;
  opacity: .8;
}

/* ---------------- 背包按钮 / 底部 ---------------- */
.hh-bag {
  position: absolute;
  z-index: 7;
  left: 2.2%;
  bottom: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * .32);
}
.hh-bag-ring {
  width: clamp(48px, calc(var(--u) * 6.35), 112px);
  height: clamp(48px, calc(var(--u) * 6.35), 112px);
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 108, .55);
  background: radial-gradient(circle at 50% 40%, #2c1e13, #07090c 72%);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, .07), 0 0 28px rgba(255, 138, 61, .22), 0 12px 28px rgba(0, 0, 0, .6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hh-bag-ring img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.02); }
.hh-bag:active .hh-bag-ring { transform: scale(.94); box-shadow: 0 0 0 4px rgba(255, 138, 61, .16), 0 0 34px rgba(255, 138, 61, .4); }
.hh-bag-label {
  font-size: clamp(10px, calc(var(--u) * 1.18), 21px);
  letter-spacing: .14em;
  text-indent: .14em;
  color: #f3e5d2;
  text-shadow: 0 1px 4px #000;
}
.hh-bag-badge {
  position: absolute;
  top: -2%;
  right: -7%;
  min-width: clamp(15px, calc(var(--u) * 1.55), 29px);
  height: clamp(15px, calc(var(--u) * 1.55), 29px);
  padding: 0 calc(var(--u) * .28);
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: clamp(8px, calc(var(--u) * .82), 14px);
  font-weight: 800;
  color: #2a1105;
  background: linear-gradient(180deg, #ffc17d, #ff8a3d);
  box-shadow: 0 0 12px rgba(255, 138, 61, .5);
}

.hh-bottom {
  position: absolute;
  z-index: 5;
  left: 14.2%;
  right: 36.5%;
  bottom: 4.7%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.hh-quote {
  font-family: var(--font-serif);
  font-size: clamp(9px, calc(var(--u) * 1.12), 21px);
  letter-spacing: .06em;
  color: rgba(229, 211, 190, .6);
  text-shadow: 0 1px 5px #000;
}
.hh-record {
  font-size: clamp(7px, calc(var(--u) * .82), 14px);
  letter-spacing: .04em;
  color: rgba(155, 139, 119, .52);
}

.hh-toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 13%;
  transform: translate(-50%, 10px);
  max-width: 74%;
  padding: clamp(8px, calc(var(--u) * .95), 16px) clamp(14px, calc(var(--u) * 1.9), 30px);
  border-radius: 999px;
  border: 1px solid rgba(255, 158, 86, .42);
  background: rgba(7, 9, 13, .94);
  color: #ffe0c2;
  font-size: clamp(10px, calc(var(--u) * 1.12), 19px);
  line-height: 1.5;
  letter-spacing: .04em;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 14px 42px rgba(0, 0, 0, .72), 0 0 28px rgba(255, 138, 61, .1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
.hh-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 背包 / 组队浮层 ---------------- */
.hh-bag-overlay,
.hh-team-overlay {
  align-items: center;
  padding: 4%;
  background: radial-gradient(ellipse at 50% 38%, rgba(62, 30, 15, .26) 0%, rgba(2, 3, 4, .86) 68%);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.hh-panel {
  position: relative;
  width: min(92%, 840px);
  padding: clamp(20px, calc(var(--u) * 2.9), 42px);
  border-radius: clamp(18px, calc(var(--u) * 1.9), 28px);
  border: 1px solid rgba(255, 160, 92, .36);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(255, 138, 61, .1), transparent 46%),
    linear-gradient(150deg, rgba(25, 19, 15, .985), rgba(7, 9, 13, .995));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, .9),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 60px rgba(255, 138, 61, .07);
  overflow: hidden;
  animation: hhPanelRise .34s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes hhPanelRise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hh-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("images/gen/ui/art_puzzle.png") center / cover no-repeat;
  opacity: .08;
  filter: blur(2px) saturate(.8);
  pointer-events: none;
}
.hh-panel::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -30%;
  height: 46%;
  z-index: 0;
  background: radial-gradient(ellipse, rgba(255, 138, 61, .14), transparent 70%);
  filter: blur(16px);
  pointer-events: none;
}
.hh-panel > * { position: relative; z-index: 1; }

.hh-close {
  position: absolute;
  z-index: 4;
  top: clamp(12px, calc(var(--u) * 1.5), 20px);
  right: clamp(12px, calc(var(--u) * 1.5), 20px);
  width: clamp(32px, calc(var(--u) * 3.1), 46px);
  height: clamp(32px, calc(var(--u) * 3.1), 46px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 150, .18);
  color: #c7b8a4;
  background: rgba(255, 255, 255, .035);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.hh-close .mp-icon { width: 56%; height: 56%; }
.hh-close:active { transform: scale(.9); background: rgba(255, 138, 61, .14); color: #ffd6ae; }

.hh-kicker {
  margin: 0 0 clamp(6px, calc(var(--u) * .7), 10px);
  font-size: clamp(8px, calc(var(--u) * .88), 13px);
  font-weight: 800;
  letter-spacing: .3em;
  text-indent: .3em;
  color: rgba(255, 165, 96, .9);
}
.hh-panel h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, calc(var(--u) * 3.7), 50px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: .07em;
  color: #f7ebda;
  text-shadow: 0 2px 0 #000, 0 0 28px rgba(255, 138, 61, .16);
}
.hh-lead {
  margin: clamp(8px, calc(var(--u) * 1), 14px) 0 0;
  max-width: 90%;
  font-size: clamp(10px, calc(var(--u) * 1.02), 16px);
  line-height: 1.75;
  color: #9d917f;
  letter-spacing: .02em;
}

/* 背包 */
.bag-panel { width: min(92%, 820px); }
.bag-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bag-cap {
  flex: 0 0 auto;
  padding: calc(var(--u) * .28) calc(var(--u) * .8);
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 110, .25);
  background: rgba(255, 138, 61, .07);
  font-size: clamp(9px, calc(var(--u) * .95), 15px);
  letter-spacing: .12em;
  color: #d8b18b;
  font-variant-numeric: tabular-nums;
}
.bag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, calc(var(--u) * 1.3), 20px);
  margin-top: clamp(14px, calc(var(--u) * 2.1), 32px);
}
.bag-slot {
  position: relative;
  aspect-ratio: 1 / 1.06;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, calc(var(--u) * 1.1), 16px);
  border-radius: clamp(14px, calc(var(--u) * 1.5), 24px);
  border: 1px solid rgba(255, 164, 96, .32);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 138, 61, .18) 0%, rgba(255, 138, 61, .035) 46%, rgba(0, 0, 0, 0) 70%),
    linear-gradient(165deg, #11151c 0%, #080a0e 100%);
  box-shadow:
    inset 0 0 34px rgba(255, 138, 61, .05),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 12px 30px rgba(0, 0, 0, .45);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bag-slot::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: inherit;
  border: 1px solid rgba(255, 190, 135, .08);
  pointer-events: none;
}
.bag-slot::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 8%;
  height: 18%;
  background: radial-gradient(ellipse, rgba(255, 138, 61, .18), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.bag-slot:active { transform: scale(.975); border-color: rgba(255, 196, 140, .7); box-shadow: inset 0 0 40px rgba(255, 138, 61, .14), 0 0 26px rgba(255, 138, 61, .18); }
.bag-num {
  position: absolute;
  top: 9%;
  left: 11%;
  font-size: clamp(8px, calc(var(--u) * .8), 13px);
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(255, 190, 140, .38);
}
.bag-icon {
  position: relative;
  z-index: 1;
  width: 44%;
  aspect-ratio: 1;
  color: #ffd0a0;
  filter: drop-shadow(0 0 16px rgba(255, 138, 61, .42)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
}
.bag-icon svg { width: 100%; height: 100%; display: block; }
.bag-name {
  position: relative;
  z-index: 1;
  font-size: clamp(12px, calc(var(--u) * 1.45), 24px);
  font-weight: 700;
  letter-spacing: .16em;
  text-indent: .16em;
  color: #ecdbc6;
  text-shadow: 0 1px 4px #000;
}

/* 组队 */
.team-panel { width: min(92%, 780px); }
.team-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, calc(var(--u) * 1.2), 18px);
  margin-top: clamp(14px, calc(var(--u) * 2), 30px);
}
.team-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, calc(var(--u) * .55), 8px);
  padding: clamp(12px, calc(var(--u) * 1.6), 24px) 10px;
  border-radius: clamp(13px, calc(var(--u) * 1.3), 21px);
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  transition: all .18s ease;
}
.team-choice b { font-size: clamp(12px, calc(var(--u) * 1.4), 23px); letter-spacing: .06em; color: #e9dccb; }
.team-choice small { font-size: clamp(8px, calc(var(--u) * .78), 13px); letter-spacing: .06em; color: #8e8475; }
.team-avatars { display: flex; align-items: flex-end; gap: 0; margin-bottom: calc(var(--u) * .15); }
.team-avatars .mp-icon {
  width: clamp(20px, calc(var(--u) * 2.2), 36px);
  height: clamp(20px, calc(var(--u) * 2.2), 36px);
  color: #a89a87;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .5));
}
.team-avatars .mp-icon + .mp-icon { margin-left: -18%; }
.team-avatars.three .mp-icon:nth-child(2) { color: #c8b49b; }
.team-choice.is-on {
  border-color: rgba(255, 160, 92, .62);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 138, 61, .18), transparent 70%),
    linear-gradient(165deg, rgba(255, 138, 61, .1), rgba(255, 138, 61, .025));
  box-shadow: inset 0 0 24px rgba(255, 138, 61, .06), 0 0 22px rgba(255, 138, 61, .1);
}
.team-choice.is-on .team-avatars .mp-icon { color: #ffbd87; }
.team-choice.is-on b { color: #fff0df; }
.team-cta, .hh-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-height: clamp(42px, calc(var(--u) * 4.6), 64px);
  margin-top: clamp(12px, calc(var(--u) * 1.7), 26px);
  padding: clamp(8px, calc(var(--u) * .9), 14px) 14px;
  border-radius: clamp(12px, calc(var(--u) * 1.2), 18px);
  border: 1px solid rgba(255, 206, 160, .55);
  background: linear-gradient(180deg, #ffa65c 0%, #ff8a3d 46%, #d65b18 100%);
  box-shadow: 0 12px 32px rgba(255, 108, 35, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #231006;
  transition: transform .15s ease, filter .15s ease;
}
.hh-cta:active { transform: translateY(1px) scale(.995); filter: brightness(.95); }
.hh-cta span { font-size: clamp(13px, calc(var(--u) * 1.45), 24px); font-weight: 800; letter-spacing: .06em; }
.hh-cta small { font-size: clamp(8px, calc(var(--u) * .8), 13px); font-weight: 600; letter-spacing: .05em; color: rgba(38, 17, 5, .62); }

/* 资源数值跳动 */
.hh-cur.bump b { animation: hhBump .42s cubic-bezier(.2, .9, .3, 1); }
@keyframes hhBump {
  0% { transform: scale(1); color: #f8e9d4; }
  35% { transform: scale(1.16); color: #ffce96; }
  100% { transform: scale(1); color: #f8e9d4; }
}

/* 桌面端悬停 */
@media (hover: hover) and (pointer: fine) {
  .hh-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 190, 125, .72);
    box-shadow: 0 22px 52px rgba(0, 0, 0, .6), 0 0 38px rgba(255, 120, 55, .14), inset 0 1px 0 rgba(255, 255, 255, .16);
  }
  .hh-card-multi:hover { border-color: rgba(160, 205, 255, .55); box-shadow: 0 22px 52px rgba(0, 0, 0, .6), 0 0 38px rgba(90, 160, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .16); }
  .hh-mini:hover { transform: translateY(-1px); border-color: rgba(255, 190, 125, .52); }
  .hh-profile:hover { border-color: rgba(255, 184, 119, .5); }
  .hh-rail-btn:hover { transform: translateY(-1px); border-color: rgba(255, 190, 125, .6); box-shadow: 0 16px 38px rgba(0, 0, 0, .48), 0 0 22px rgba(255, 138, 61, .12); }
  .bag-slot:hover { transform: translateY(-2px); border-color: rgba(255, 190, 130, .6); box-shadow: inset 0 0 36px rgba(255, 138, 61, .1), 0 14px 32px rgba(0, 0, 0, .5); }
}

/* ---------------- 竖屏：整屏竖版，不要求横屏 ---------------- */
@media (orientation: portrait) {
  .app {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .scene-bg {
    background-size: auto 112%;
    background-position: 30% 43%;
    transform: none;
  }
  .scene-vignette {
    background:
      radial-gradient(ellipse at 50% 36%, rgba(0, 0, 0, 0) 22%, rgba(2, 3, 5, .4) 74%, rgba(1, 2, 3, .82) 100%),
      linear-gradient(180deg, rgba(2, 3, 5, .93) 0%, rgba(2, 3, 5, .58) 7%, rgba(2, 3, 5, .12) 18%, rgba(2, 3, 5, 0) 38%, rgba(2, 3, 5, .2) 68%, rgba(2, 3, 5, .85) 94%, #020304 100%);
  }
  .scene-fog { opacity: .8; }

  .hh-top {
    left: 14px;
    right: 14px;
    top: calc(10px + env(safe-area-inset-top, 0px));
    gap: 7px;
    align-items: center;
  }
  .hh-profile {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    gap: 8px;
    padding: 6px 9px 6px 6px;
    border-radius: 16px;
  }
  .hh-avatar { width: 46px; height: 46px; }
  .hh-avatar-ring { inset: -3px; }
  .hh-name-line { gap: 5px; }
  .hh-name-line b { max-width: 100px; font-size: 17px; }
  .hh-lv { padding: 2px 5px; font-size: 9px; }
  .hh-status { font-size: 9px; }
  .hh-xp { width: 100%; max-width: 150px; height: 3px; margin-top: 3px; }
  .hh-edit { display: none; }

  .hh-wallet { flex: 0 0 auto; gap: 5px; padding-top: 0; }
  .hh-cur {
    width: 71px;
    min-width: 0;
    height: 31px;
    padding: 0 5px;
    gap: 4px;
    border-radius: 11px;
  }
  .hh-cur-ico { width: 19px; height: 19px; }
  .hh-cur b { font-size: 11.5px; }
  .hh-plus { width: 15px; height: 15px; }
  .hh-plus .mp-icon { width: 10px; height: 10px; }

  .hh-tools {
    right: 14px;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    gap: 7px;
  }
  .hh-tool { width: 40px; height: 40px; }

  .hh-rail {
    left: 14px;
    right: 14px;
    top: calc(72px + env(safe-area-inset-top, 0px));
    width: auto;
    flex-direction: row;
    gap: 8px;
  }
  .hh-rail-btn {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 14px;
  }
  .hh-rail-art { width: 44px; flex: 0 0 auto; }
  .hh-rail-copy { align-items: flex-start; text-align: left; gap: 1px; }
  .hh-rail-copy b { font-size: 12px; }
  .hh-rail-copy small { font-size: 10px; }
  .hh-badge { top: 3px; right: 4px; width: 8px; height: 8px; }

  .hh-main {
    left: 14px;
    right: 14px;
    top: calc(146px + env(safe-area-inset-top, 0px));
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: auto;
    gap: 8px;
  }
  .hh-card { border-radius: 16px; }
  .hh-card-solo { flex: 1.28 1 0; }
  .hh-card-multi { flex: 1 1 0; }
  .hh-card-body { width: 68%; padding: 10px 13px; }
  .hh-card-top { gap: 6px; }
  .hh-card-icon { width: 24px; height: 24px; }
  .hh-card-kicker { font-size: 7px; letter-spacing: .18em; }
  .hh-card-title { font-size: 25px; }
  .hh-card-multi .hh-card-title { font-size: 22px; }
  .hh-card-sub { font-size: 9.5px; margin-top: 3px; }
  .hh-card-art { width: 54%; }
  .hh-card-arrow { width: 23px; height: 23px; right: 8px; bottom: 8px; }

  .hh-small-row { flex: 0 0 82px; gap: 8px; }
  .hh-mini { border-radius: 14px; padding: 8px 9px; }
  .hh-mini-top { gap: 4px; }
  .hh-mini-top .mp-icon { width: 17px; height: 17px; }
  .hh-mini-top b { font-size: 13.5px; }
  .hh-mini-sub { font-size: 8px; margin-top: 2px; }
  .hh-mini-arrow { width: 13px; height: 13px; right: 7px; bottom: 8px; }
  .hh-mini-art { width: 62%; }

  .hh-bag {
    left: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
  }
  .hh-bag-ring { width: 48px; height: 48px; }
  .hh-bag-label { font-size: 11px; letter-spacing: .1em; text-indent: .1em; }
  .hh-bag-badge { min-width: 16px; height: 16px; font-size: 9px; right: -6px; }

  .hh-bottom { display: none; }

  .hh-toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: 84%;
    max-width: 84%;
    font-size: 12px;
    border-radius: 16px;
  }

  .hh-panel {
    width: 92%;
    padding: 22px 18px;
    border-radius: 20px;
  }
  .hh-panel h3 { font-size: 28px; }
  .hh-lead { font-size: 10.5px; max-width: 100%; }
  .bag-grid { gap: 8px; margin-top: 14px; }
  .bag-slot { border-radius: 14px; gap: 6px; }
  .bag-icon { width: 42%; }
  .bag-name { font-size: 13px; letter-spacing: .1em; text-indent: .1em; }
  .bag-num { font-size: 8px; }
  .bag-cap { font-size: 10px; }
  .team-choice { padding: 12px 8px; border-radius: 13px; }
  .team-choice b { font-size: 14px; }
  .team-choice small { font-size: 9px; }
  .team-avatars .mp-icon { width: 24px; height: 24px; }
  .hh-cta { min-height: 48px; margin-top: 14px; }
  .hh-cta span { font-size: 15px; }
  .hh-cta small { font-size: 9px; }
  .hh-close { width: 34px; height: 34px; top: 12px; right: 12px; }
}

/* 竖屏小高度压缩 */
@media (orientation: portrait) and (max-height: 700px) {
  .hh-top { top: calc(7px + env(safe-area-inset-top, 0px)); }
  .hh-avatar { width: 40px; height: 40px; }
  .hh-profile { padding: 5px 7px 5px 5px; }
  .hh-name-line b { font-size: 15.5px; max-width: 88px; }
  .hh-cur { width: 66px; height: 29px; }
  .hh-cur b { font-size: 10.5px; }
  .hh-rail { top: calc(62px + env(safe-area-inset-top, 0px)); }
  .hh-rail-art { width: 38px; }
  .hh-rail-copy b { font-size: 11px; }
  .hh-rail-copy small { font-size: 9px; }
  .hh-main { top: calc(128px + env(safe-area-inset-top, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); gap: 7px; }
  .hh-card-title { font-size: 22px; }
  .hh-card-multi .hh-card-title { font-size: 20px; }
  .hh-card-sub { font-size: 8.5px; }
  .hh-small-row { flex-basis: 74px; }
  .hh-bag-ring { width: 44px; height: 44px; }
  .bag-grid { margin-top: 10px; }
  .hh-panel { padding: 18px 15px; }
  .hh-panel h3 { font-size: 24px; }
  .team-choices { margin-top: 10px; }
}

/* ---------------- 横屏游戏页：左右分栏，保持可玩 ---------------- */
@media (orientation: landscape) {
  .screen-game.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(210px, .82fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 9px 13px;
  }
  .screen-game .game-hud { grid-column: 1 / -1; }
  .screen-game .chips { grid-column: 1 / -1; }
  .screen-game .board-wrap { grid-column: 1; grid-row: 3 / 5; min-height: 0; }
  .screen-game .narrator { grid-column: 2; grid-row: 3; align-self: start; }
  .screen-game .game-controls {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
  }
  .screen-game .dpad { width: 146px; height: 132px; }
  .screen-game .action-col { width: 100%; max-width: 250px; }
  .screen-game .action-btn { min-height: 64px; }

  .screen-result { padding: 14px 20px; }
  .result-inner { max-width: 720px; }
  .result-stats { max-width: 520px; margin: 12px auto 8px; }
  .result-actions { max-width: 420px; margin: 10px auto 0; }
  .result-players { max-width: 520px; margin-left: auto; margin-right: auto; }
}

/* ---------------- 无障碍 / 减弱动画 ---------------- */
button:focus-visible {
  outline: 2px solid rgba(255, 174, 105, .9);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .scene-fog,
  .scene-bg,
  .embers i,
  .hh-event-flame,
  .hh-panel,
  .hh-toast,
  .hh-cur.bump b {
    animation: none !important;
    transition: none !important;
  }
}

/* 领取与点击态 */
.hh-rail-btn.is-claimed .hh-rail-art { filter: grayscale(.4) brightness(.72); }
.hh-rail-btn.is-claimed .hh-rail-copy small { color: #8f8474; }
.bag-slot.is-lit {
  border-color: rgba(255, 198, 140, .88);
  box-shadow:
    inset 0 0 48px rgba(255, 138, 61, .22),
    0 0 34px rgba(255, 138, 61, .28),
    0 14px 30px rgba(0, 0, 0, .45);
  transform: translateY(-2px);
}

/* =========================================================
   画面修整
   ========================================================= */

@media (orientation: portrait) {
  /* 顶部与资源栏压暗，遮住背景里不需要的元素 */
  .screen-home::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: 0;
    height: calc(156px + env(safe-area-inset-top, 0px));
    pointer-events: none;
    background: linear-gradient(180deg,
      rgba(2, 3, 5, .96) 0%,
      rgba(2, 3, 5, .82) 38%,
      rgba(2, 3, 5, .42) 72%,
      rgba(2, 3, 5, 0) 100%);
  }

  .hh-cur {
    width: 82px;
    padding: 0 5px;
    gap: 4px;
  }
  .hh-cur-ico { width: 18px; height: 18px; }
  .hh-cur b { font-size: 11px; }
  .hh-plus { width: 14px; height: 14px; }
  .hh-plus .mp-icon { width: 9px; height: 9px; }

  .hh-rail-btn {
    background:
      radial-gradient(ellipse at 50% 16%, rgba(255, 138, 61, .14), transparent 58%),
      linear-gradient(180deg, rgba(18, 15, 13, .88), rgba(5, 7, 10, .92));
  }
}

@media (orientation: portrait) and (max-width: 360px) {
  .hh-plus { display: none; }
  .hh-cur { width: 68px; }
  .hh-cur b { font-size: 10.5px; }
  .hh-name-line b { max-width: 86px; }
}

/* 横屏游戏页：棋盘按 9:11 居中，侧栏不把棋盘撑出屏幕 */
@media (orientation: landscape) {
  .screen-game.is-active {
    grid-template-rows: auto auto minmax(0, 1fr);
  }
  .screen-game .board-wrap {
    grid-row: 3;
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 9 / 11;
    justify-self: center;
    align-self: stretch;
    min-height: 0;
  }
  .screen-game .narrator { grid-row: 3; }
  .screen-game .game-controls { grid-row: 3; }
}

/* 竖屏顶部尺寸最终修整 */
@media (orientation: portrait) {
  .hh-profile {
    gap: 7px;
    padding: 5px 7px 5px 5px;
  }
  .hh-avatar { width: 44px; height: 44px; }
  .hh-name-line b { max-width: 104px; font-size: 16px; }
  .hh-lv { font-size: 8.5px; padding: 2px 4px; }
  .hh-cur { width: 90px; }
  .hh-cur-ico { width: 17px; height: 17px; }
  .hh-cur b { font-size: 11px; }
  .hh-plus { width: 13px; height: 13px; }
  .hh-plus .mp-icon { width: 9px; height: 9px; }
}
@media (orientation: portrait) and (max-width: 360px) {
  .hh-plus { display: none; }
  .hh-cur { width: 72px; }
}
@media (orientation: portrait) and (max-width: 340px) {
  .hh-lv { display: none; }
  .hh-name-line b { max-width: 96px; font-size: 15px; }
}

/* 资料区允许昵称占满剩余宽度 */
.hh-id { flex: 1 1 auto; width: 100%; }
@media (orientation: portrait) and (max-height: 700px) {
  .hh-main { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* 底部记录只作数据保留，不在首页展示（严格按本轮页面清单） */
.hh-record { display: none; }
@media (orientation: portrait) and (max-width: 360px) {
  .hh-cur { width: 78px; }
  .hh-cur b { font-size: 10.5px; }
  .hh-cur-ico { width: 16px; height: 16px; }
}

/* =========================================================
   等级经验 / 背包取存 / 宝箱 / 结算（本轮新增）
   ========================================================= */

.hh-xp-line {
  display: flex;
  align-items: center;
  gap: clamp(4px, calc(var(--u) * .45), 7px);
  width: 100%;
  margin-top: calc(var(--u) * .3);
}
.hh-xp-line .hh-xp {
  flex: 1 1 auto;
  width: auto;
  min-width: 42px;
  margin-top: 0;
}
.hh-xp-txt {
  flex: 0 0 auto;
  font-style: normal;
  font-size: clamp(8px, calc(var(--u) * .78), 13px);
  font-weight: 700;
  letter-spacing: .02em;
  color: #d9b08a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px #000;
}

.relic-box.is-complete .relic-txt b { color: #ffd7a8; text-shadow: 0 0 10px rgba(255, 138, 61, .7); }
.relic-box.is-complete .relic-pip.on { animation: relicPulse 1.4s ease-in-out infinite alternate; }
@keyframes relicPulse {
  from { box-shadow: 0 0 8px rgba(255, 138, 61, .55); }
  to { box-shadow: 0 0 18px rgba(255, 170, 100, .95); }
}

.bag-panel {
  width: min(94%, 900px);
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 138, 61, .36) transparent;
}
.bag-panel::-webkit-scrollbar { width: 4px; }
.bag-panel::-webkit-scrollbar-thumb { background: rgba(255, 138, 61, .34); border-radius: 4px; }
.bag-context {
  margin: clamp(5px, calc(var(--u) * .6), 9px) 0 0;
  font-size: clamp(8.5px, calc(var(--u) * .9), 14px);
  line-height: 1.55;
  color: #9b8d7a;
  letter-spacing: .02em;
}
.bag-grid { grid-template-columns: repeat(3, 1fr); }
.bag-slot.is-filled { cursor: pointer; }
.bag-slot.is-empty {
  border-style: dashed;
  border-color: rgba(255, 190, 135, .14);
  background: linear-gradient(165deg, rgba(16, 18, 22, .64), rgba(6, 7, 10, .76));
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .32);
  opacity: .82;
}
.bag-slot.is-empty::after { display: none; }
.bag-slot.is-selected {
  border-color: rgba(255, 205, 155, .95);
  box-shadow:
    inset 0 0 42px rgba(255, 138, 61, .18),
    0 0 0 1px rgba(255, 190, 130, .35),
    0 0 26px rgba(255, 138, 61, .24);
  transform: translateY(-2px);
}
.bag-slot.is-filled .bag-icon { color: #ffd1a2; }
.bag-slot.is-filled .bag-icon .mp-icon { width: 100%; height: 100%; }
.bag-tag {
  position: absolute;
  top: 8%;
  right: 9%;
  z-index: 1;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 130, .2);
  background: rgba(255, 138, 61, .09);
  font-size: clamp(6.5px, calc(var(--u) * .68), 11px);
  letter-spacing: .04em;
  color: #d4a678;
}
.bag-empty-ico {
  position: relative;
  z-index: 1;
  width: 30%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed rgba(255, 190, 140, .18);
  color: rgba(255, 190, 140, .3);
}
.bag-empty-ico .mp-icon { width: 58%; height: 58%; }
.bag-slot.is-empty .bag-name { color: rgba(226, 207, 184, .34); }

.bag-scene {
  margin-top: clamp(9px, calc(var(--u) * 1.2), 17px);
  padding: clamp(8px, calc(var(--u) * 1.1), 15px);
  border-radius: clamp(12px, calc(var(--u) * 1.2), 19px);
  border: 1px solid rgba(255, 190, 130, .12);
  background: linear-gradient(150deg, rgba(255, 138, 61, .045), rgba(255, 255, 255, .012));
}
.bag-scene-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: clamp(9px, calc(var(--u) * .95), 15px);
  color: #d9c2a8;
}
.bag-scene-head > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; letter-spacing: .05em; }
.bag-scene-head .mp-icon { width: 1.2em; height: 1.2em; color: #ff9c57; }
.bag-scene-head small { font-size: .86em; color: #8c8173; font-weight: 400; }
.bag-scene-list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(5px, calc(var(--u) * .65), 10px);
  margin-top: clamp(6px, calc(var(--u) * .75), 11px);
}
.bag-scene-empty {
  font-size: clamp(8.5px, calc(var(--u) * .88), 14px);
  color: #776f63;
  letter-spacing: .02em;
}
.bag-scene-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: clamp(28px, calc(var(--u) * 3.1), 44px);
  padding: 4px clamp(7px, calc(var(--u) * .85), 13px);
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 110, .34);
  background: linear-gradient(180deg, rgba(255, 138, 61, .14), rgba(255, 138, 61, .05));
  color: #f0d8bd;
  transition: transform .14s ease, border-color .14s ease;
}
.bag-scene-item .mp-icon { width: 1.45em; height: 1.45em; color: #ffc184; }
.bag-scene-item b { font-size: clamp(9px, calc(var(--u) * .92), 15px); font-weight: 700; }
.bag-scene-item small { font-size: clamp(7px, calc(var(--u) * .72), 12px); color: #c29162; }
.bag-scene-item:active { transform: scale(.96); border-color: rgba(255, 210, 160, .8); }

.bag-detail {
  margin-top: clamp(9px, calc(var(--u) * 1.2), 17px);
  padding: clamp(10px, calc(var(--u) * 1.25), 17px);
  border-radius: clamp(13px, calc(var(--u) * 1.35), 20px);
  border: 1px solid rgba(255, 168, 98, .22);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(255, 138, 61, .1), transparent 55%),
    linear-gradient(160deg, rgba(24, 18, 14, .9), rgba(8, 10, 14, .94));
}
.bag-detail-main { display: flex; align-items: flex-start; gap: clamp(8px, calc(var(--u) * 1.1), 15px); }
.bag-detail-icon {
  flex: 0 0 auto;
  width: clamp(42px, calc(var(--u) * 5), 72px);
  height: clamp(42px, calc(var(--u) * 5), 72px);
  display: grid;
  place-items: center;
  border-radius: clamp(11px, calc(var(--u) * 1.1), 18px);
  border: 1px solid rgba(255, 190, 130, .3);
  background: radial-gradient(circle at 50% 35%, rgba(255, 138, 61, .22), rgba(10, 11, 14, .9) 74%);
  color: #ffd0a0;
  box-shadow: inset 0 0 22px rgba(255, 138, 61, .12), 0 0 16px rgba(255, 138, 61, .1);
}
.bag-detail-icon .mp-icon { width: 58%; height: 58%; }
.bag-detail-copy { min-width: 0; }
.bag-detail-copy small {
  display: block;
  font-size: clamp(7.5px, calc(var(--u) * .78), 12px);
  letter-spacing: .08em;
  color: #b9865a;
}
.bag-detail-copy b {
  display: block;
  margin-top: 2px;
  font-size: clamp(14px, calc(var(--u) * 1.55), 25px);
  letter-spacing: .04em;
  color: #f4e6d4;
}
.bag-detail-copy p {
  margin: clamp(3px, calc(var(--u) * .4), 6px) 0 0;
  font-size: clamp(8.5px, calc(var(--u) * .9), 14px);
  line-height: 1.6;
  color: #a99b88;
}
.bag-detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(7px, calc(var(--u) * .85), 12px);
  margin-top: clamp(9px, calc(var(--u) * 1.1), 15px);
}
.bag-detail-actions .btn-primary,
.bag-detail-actions .btn-line { min-height: clamp(40px, calc(var(--u) * 4.7), 60px); padding-top: 8px; padding-bottom: 8px; }
.bag-store { gap: 5px; }
.bag-store .mp-icon { width: 1.3em; height: 1.3em; }
.bag-detail-tip {
  min-height: 1.4em;
  margin: clamp(6px, calc(var(--u) * .7), 10px) 0 0;
  font-size: clamp(8px, calc(var(--u) * .82), 13px);
  line-height: 1.55;
  color: #8f8372;
  letter-spacing: .02em;
}
button:disabled { opacity: .38; cursor: default; }
button:disabled:active { transform: none !important; filter: none !important; }

/* 宝箱物品展示 */
.loot-modal { width: min(94%, 520px); }
.loot-lead {
  margin: clamp(5px, calc(var(--u) * .7), 10px) 0 0;
  font-size: clamp(10px, calc(var(--u) * 1.05), 16px);
  line-height: 1.65;
  color: #a89a87;
}
.loot-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, calc(var(--u) * 1.4), 20px);
  margin-top: clamp(12px, calc(var(--u) * 1.5), 22px);
  padding: clamp(12px, calc(var(--u) * 1.5), 22px);
  border-radius: clamp(15px, calc(var(--u) * 1.5), 24px);
  border: 1px solid rgba(255, 190, 130, .3);
  background:
    radial-gradient(ellipse at 16% 0%, rgba(255, 138, 61, .16), transparent 58%),
    linear-gradient(160deg, rgba(26, 19, 14, .96), rgba(7, 9, 13, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 16px 40px rgba(0, 0, 0, .5);
}
.loot-icon {
  flex: 0 0 auto;
  width: clamp(58px, calc(var(--u) * 7.2), 104px);
  height: clamp(58px, calc(var(--u) * 7.2), 104px);
  display: grid;
  place-items: center;
  border-radius: clamp(14px, calc(var(--u) * 1.5), 24px);
  border: 1px solid rgba(255, 196, 136, .45);
  background: radial-gradient(circle at 50% 36%, rgba(255, 166, 90, .28), rgba(8, 10, 13, .96) 74%);
  color: #ffd3a6;
  box-shadow: 0 0 26px rgba(255, 138, 61, .2), inset 0 0 24px rgba(255, 138, 61, .12);
}
.loot-icon .mp-icon { width: 58%; height: 58%; filter: drop-shadow(0 0 12px rgba(255, 138, 61, .55)); }
.loot-copy { min-width: 0; }
.loot-tag {
  display: block;
  font-style: normal;
  font-size: clamp(8px, calc(var(--u) * .82), 13px);
  letter-spacing: .08em;
  color: #c78f5f;
}
.loot-copy h3 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, calc(var(--u) * 2.3), 34px);
  letter-spacing: .06em;
  color: #f8eddd;
  text-shadow: 0 2px 0 #000;
}
.loot-copy p {
  margin: clamp(4px, calc(var(--u) * .5), 8px) 0 0;
  font-size: clamp(9px, calc(var(--u) * .95), 15px);
  line-height: 1.65;
  color: #ad9e8a;
}
.loot-tip {
  min-height: 1.4em;
  margin: clamp(7px, calc(var(--u) * .9), 13px) 0 0;
  font-size: clamp(8.5px, calc(var(--u) * .86), 13px);
  line-height: 1.55;
  color: #bd8b5c;
}
.loot-actions { display: flex; flex-direction: column; gap: 7px; margin-top: clamp(9px, calc(var(--u) * 1.1), 15px); }

/* 结算 · 信物与等级 */
.result-loot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 9px;
}
.result-loot-label {
  width: 100%;
  margin-bottom: 1px;
  font-size: 8.5px;
  letter-spacing: .16em;
  color: #8f8372;
}
.result-loot-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 110, .24);
  background: rgba(255, 138, 61, .075);
  font-size: 9.5px;
  color: #e4cbb0;
}
.result-loot-item .mp-icon { width: 13px; height: 13px; color: #ffbc7f; }
.result-progress {
  min-height: 1.4em;
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: .04em;
  color: #c79366;
  font-variant-numeric: tabular-nums;
}

@media (orientation: portrait) {
  .bag-panel { padding: 20px 14px 16px; }
  .bag-detail-actions { grid-template-columns: 1fr; }
  .bag-detail-actions .btn-line { order: 2; }
  .loot-card { align-items: flex-start; }
}
@media (max-height: 620px) and (orientation: landscape) {
  .bag-panel { max-height: 94dvh; padding: 14px 20px; }
  .bag-grid { margin-top: 8px; gap: 7px; }
  .bag-slot { aspect-ratio: 1 / .82; }
  .bag-scene { margin-top: 7px; padding: 6px 9px; }
  .bag-detail { margin-top: 7px; padding: 8px 10px; }
  .bag-detail-actions { margin-top: 7px; }
  .bag-detail-actions .btn-primary,
  .bag-detail-actions .btn-line { min-height: 38px; }
  .bag-detail-copy p { line-height: 1.45; }
  .loot-card { margin-top: 8px; padding: 10px; }
  .loot-copy p { line-height: 1.5; }
  .loot-actions { margin-top: 8px; }
}

@media (orientation: landscape) {
  /* 横版背包：六格一行，取存区与详情一屏可见 */
  .bag-grid { grid-template-columns: repeat(6, 1fr); gap: clamp(5px, calc(var(--u) * .8), 13px); }
  .bag-slot { aspect-ratio: 1 / 1.1; }
  .bag-slot .bag-name { letter-spacing: .1em; text-indent: .1em; }
}

.quest-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(4px, calc(var(--u) * .55), 9px);
  margin-top: clamp(7px, calc(var(--u) * .9), 13px);
}
.quest-track-label {
  flex: 0 0 auto;
  font-size: clamp(7px, calc(var(--u) * .74), 12px);
  letter-spacing: .1em;
  color: #8f806e;
}
.quest-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px clamp(5px, calc(var(--u) * .6), 9px);
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 130, .12);
  background: rgba(255, 255, 255, .015);
  font-size: clamp(7.5px, calc(var(--u) * .78), 12px);
  color: #7e7568;
  white-space: nowrap;
}
.quest-chip .mp-icon { width: 1.15em; height: 1.15em; opacity: .62; }
.quest-chip b { margin-left: 2px; font-weight: 700; font-size: .82em; color: #6d665b; }
.quest-chip.is-owned {
  border-color: rgba(255, 176, 110, .42);
  background: rgba(255, 138, 61, .1);
  color: #f2d2ae;
  box-shadow: 0 0 10px rgba(255, 138, 61, .1);
}
.quest-chip.is-owned .mp-icon { color: #ffb877; opacity: 1; }
.quest-chip.is-owned b { color: #ffb877; }

/* =========================================================
   被抓后的广告复活
   ========================================================= */

.revive-overlay {
  z-index: 58;
  align-items: center;
  padding: 4%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(108, 22, 16, .3) 0%, rgba(4, 4, 6, .9) 62%),
    rgba(2, 3, 4, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.revive-modal {
  width: min(92%, 530px);
  max-height: min(92dvh, 780px);
  overflow-y: auto;
  padding: clamp(18px, calc(var(--u) * 2.4), 34px);
  text-align: center;
  border-color: rgba(214, 82, 48, .34);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(178, 42, 24, .18), transparent 52%),
    radial-gradient(ellipse at 50% 112%, rgba(255, 138, 61, .1), transparent 58%),
    linear-gradient(165deg, rgba(24, 15, 13, .99), rgba(6, 7, 10, .995));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, .94),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 0 60px rgba(190, 48, 28, .12);
}
.revive-modal h3 {
  margin: clamp(6px, calc(var(--u) * .8), 12px) 0 0;
  font-family: var(--font-serif);
  font-size: clamp(25px, calc(var(--u) * 3.2), 44px);
  letter-spacing: .1em;
  color: #f7e8d8;
  text-shadow: 0 2px 0 #000, 0 0 28px rgba(190, 40, 28, .3);
}
.revive-lead {
  margin: clamp(5px, calc(var(--u) * .7), 10px) auto 0;
  max-width: 92%;
  font-size: clamp(9.5px, calc(var(--u) * 1), 15px);
  line-height: 1.7;
  color: #a89a89;
}
.revive-hero {
  position: relative;
  width: clamp(62px, calc(var(--u) * 8), 108px);
  height: clamp(62px, calc(var(--u) * 8), 108px);
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.revive-hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(210, 70, 48, .4);
  box-shadow: 0 0 28px rgba(180, 36, 24, .3), inset 0 0 26px rgba(180, 36, 24, .18);
  animation: reviveRing 2.2s ease-out infinite;
}
.revive-hero-ring::after {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  border: 1px solid rgba(255, 138, 61, .25);
}
@keyframes reviveRing {
  0% { transform: scale(.9); opacity: .85; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
.revive-hero-core {
  position: relative;
  z-index: 1;
  width: 66%;
  height: 66%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 176, 110, .42);
  background: radial-gradient(circle at 42% 32%, rgba(255, 138, 61, .3), rgba(22, 9, 8, .96) 72%);
  color: #ffb877;
  box-shadow: 0 0 22px rgba(255, 110, 54, .24), inset 0 0 20px rgba(255, 110, 54, .16);
}
.revive-hero-core .mp-icon { width: 46%; height: 46%; filter: drop-shadow(0 0 8px rgba(255, 120, 72, .8)); }

.revive-ad {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(7px, calc(var(--u) * .9), 13px);
  margin: clamp(12px, calc(var(--u) * 1.5), 20px) 0 0;
  padding: clamp(9px, calc(var(--u) * 1.1), 15px);
  border-radius: clamp(12px, calc(var(--u) * 1.25), 18px);
  border: 1px solid rgba(255, 166, 100, .22);
  background: linear-gradient(150deg, rgba(255, 138, 61, .08), rgba(255, 255, 255, .018));
  text-align: left;
  overflow: hidden;
}
.revive-ad-ico {
  flex: 0 0 auto;
  width: clamp(32px, calc(var(--u) * 3.8), 52px);
  height: clamp(32px, calc(var(--u) * 3.8), 52px);
  display: grid;
  place-items: center;
  border-radius: clamp(9px, calc(var(--u) * .95), 14px);
  border: 1px solid rgba(255, 176, 110, .3);
  background: rgba(255, 138, 61, .1);
  color: #ffc184;
}
.revive-ad-ico .mp-icon { width: 60%; height: 60%; }
.revive-ad-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.revive-ad-copy b {
  font-size: clamp(10px, calc(var(--u) * 1.05), 16px);
  font-weight: 700;
  letter-spacing: .03em;
  color: #f0d8bd;
}
.revive-ad-copy small {
  font-size: clamp(8px, calc(var(--u) * .84), 13px);
  line-height: 1.45;
  color: #a18f7b;
}
.revive-ad-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .05);
}
.revive-ad-bar em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b34218, #ff8a3d 62%, #ffd8ab);
  box-shadow: 0 0 10px rgba(255, 138, 61, .65);
}
.revive-modal.is-playing .revive-ad-bar em { animation: reviveAdFill 1.9s linear forwards; }
.revive-modal.is-playing .revive-ad { border-color: rgba(255, 188, 128, .48); box-shadow: inset 0 0 30px rgba(255, 138, 61, .1); }
@keyframes reviveAdFill { from { width: 0; } to { width: 100%; } }

.revive-tip {
  min-height: 1.4em;
  margin: clamp(7px, calc(var(--u) * .85), 12px) 0 0;
  font-size: clamp(8.5px, calc(var(--u) * .88), 13px);
  line-height: 1.55;
  color: #b58a63;
}
.revive-actions { display: flex; flex-direction: column; gap: 7px; margin-top: clamp(9px, calc(var(--u) * 1.1), 15px); }
.revive-actions .btn-primary { min-height: clamp(48px, calc(var(--u) * 5.8), 72px); }
.revive-actions .btn-line { min-height: clamp(39px, calc(var(--u) * 4.4), 56px); }
.revive-foot {
  margin: clamp(7px, calc(var(--u) * .8), 11px) 0 0;
  font-size: clamp(7.5px, calc(var(--u) * .76), 11px);
  letter-spacing: .05em;
  color: #746a5e;
}

.chip.downed { border-color: rgba(205, 66, 46, .42); background: rgba(150, 28, 20, .16); }
.chip.downed em { color: #e59a87; }

@media (max-height: 620px) and (orientation: landscape) {
  .revive-modal { max-height: 94dvh; padding: 12px 22px 13px; }
  .revive-hero { width: 50px; height: 50px; }
  .revive-modal h3 { font-size: 23px; margin-top: 2px; }
  .revive-lead { line-height: 1.45; margin-top: 3px; }
  .revive-ad { margin-top: 6px; padding: 6px 9px; }
  .revive-tip { margin-top: 4px; line-height: 1.4; }
  .revive-actions { margin-top: 6px; gap: 5px; }
  .revive-actions .btn-primary { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
  .revive-actions .btn-line { min-height: 33px; padding: 6px 12px; }
  .revive-foot { margin-top: 4px; }
}
