/* 山海吞噬录 · H5 */
:root {
  --ink: #05090b;
  --ink-2: #0a1415;
  --jade: #1c4a42;
  --jade-2: #2b6a5c;
  --gold: #e7b55e;
  --gold-2: #f6d79a;
  --gold-3: #c9932f;
  --gold-dark: #5b3a16;
  --amber: #ff8a3d;
  --amber-2: #ffb35f;
  --paper: #f3e7cf;
  --muted: #b9ac91;
  --danger: #ff6b45;
  --ok: #86e0a5;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: #030708;
  color: var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; }
.is-hidden { display: none !important; }

#app {
  position: fixed;
  inset: 0;
  max-width: 540px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.mp-icon { display: inline-block; width: 1em; height: 1em; background: currentColor; }

/* ---------- 战场底图 ---------- */
.arena {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #061012;
}
.arena-art {
  position: absolute;
  inset: -2%;
  background-image: url("images/gen/scene.jpg");
  background-repeat: no-repeat;
  background-size: auto 118%;
  background-position: 72% 56%;
  filter: blur(1.4px) saturate(1.14) brightness(.7) contrast(1.05);
  transform: scale(1.04);
  opacity: .98;
  animation: arenaDrift 38s ease-in-out infinite alternate;
}
.arena-rays {
  position: absolute;
  inset: -22%;
  z-index: 1;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: screen;
  background: repeating-conic-gradient(from 18deg at 50% 34%,
    rgba(255, 224, 164, 0) 0deg 9deg,
    rgba(255, 224, 164, .085) 10deg 12.5deg,
    rgba(255, 224, 164, 0) 13.5deg 27deg);
  -webkit-mask-image: radial-gradient(circle at 50% 34%, #000 0%, rgba(0, 0, 0, .55) 34%, transparent 64%);
  mask-image: radial-gradient(circle at 50% 34%, #000 0%, rgba(0, 0, 0, .55) 34%, transparent 64%);
  animation: raysDrift 46s linear infinite;
}
.arena-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 72% 40% at 50% 40%, rgba(255, 210, 138, .14), transparent 62%),
    radial-gradient(ellipse 96% 62% at 50% 34%, rgba(20, 44, 48, .04), rgba(4, 10, 12, .3) 72%, rgba(2, 7, 9, .78) 100%),
    linear-gradient(90deg, rgba(3, 8, 10, .34) 0%, rgba(3, 8, 10, .04) 20%, rgba(3, 8, 10, 0) 58%, rgba(3, 8, 10, .2) 82%, rgba(3, 8, 10, .38) 100%),
    linear-gradient(180deg, rgba(4, 10, 12, .62) 0%, rgba(4, 10, 12, .1) 18%, rgba(4, 10, 12, .02) 42%, rgba(3, 8, 10, .34) 68%, rgba(2, 7, 9, .82) 88%, #04090b 100%);
}
.mist {
  position: absolute;
  z-index: 3;
  width: 150%;
  height: 40%;
  left: -25%;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: .26;
  background: radial-gradient(ellipse at center, rgba(190, 228, 216, .22), rgba(166, 208, 200, .06) 45%, transparent 70%);
  animation: mistDrift 26s ease-in-out infinite alternate;
}
.mist.m1 { top: 38%; }
.mist.m2 { top: 66%; height: 30%; opacity: .2; animation-duration: 34s; animation-direction: alternate-reverse; }

#game {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.arena-frame {
  position: absolute;
  inset: 9px;
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(231, 181, 94, .13);
  border-radius: 20px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 18%, transparent 72%, #000 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 18%, transparent 72%, #000 100%);
}
.arena-frame::before, .arena-frame::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(231, 181, 94, .38);
  border-style: solid;
}
.arena-frame::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; border-top-left-radius: 20px; }
.arena-frame::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; border-bottom-right-radius: 20px; }

.hit-flash, .gold-flash {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.hit-flash {
  background:
    radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(146, 91, 27, .28) 68%, rgba(54, 74, 27, .62) 100%),
    radial-gradient(circle at 50% 42%, rgba(124, 153, 60, .22), transparent 58%);
  mix-blend-mode: screen;
}
.gold-flash {
  background: radial-gradient(circle at 50% 55%, rgba(255, 220, 150, .75), rgba(255, 168, 72, .18) 42%, transparent 72%);
  mix-blend-mode: screen;
}
.hit-flash.on { opacity: 1; transition-duration: .05s; }
.gold-flash.on { opacity: 1; transition-duration: .05s; }

/* ---------- 顶部 HUD ---------- */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  padding: calc(9px + var(--safe-top)) 13px 0;
  pointer-events: none;
  animation: hudIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.hero-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 6px 18px 9px 6px;
  border-radius: 18px 8px 22px 18px;
  background:
    linear-gradient(180deg, rgba(255, 219, 154, .12), transparent 24%),
    linear-gradient(100deg, rgba(28, 18, 12, .92), rgba(17, 16, 15, .62) 66%, rgba(9, 12, 13, 0));
  box-shadow: inset 0 0 0 1px rgba(240, 198, 126, .22), 0 7px 24px rgba(0, 0, 0, .34);
  backdrop-filter: blur(5px);
}
.hero-panel::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 28px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(231, 181, 94, .5), rgba(231, 181, 94, .04));
  pointer-events: none;
}
.avatar-frame {
  position: relative;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 210deg, #8f6a2e, #ffe6ae, #c99433, #fff0c4, #8a5b24, #f5d18a, #8f6a2e);
  box-shadow:
    0 0 0 1px rgba(8, 12, 12, .95),
    0 0 0 4px rgba(231, 181, 94, .08),
    0 3px 14px rgba(0, 0, 0, .5),
    0 0 22px rgba(255, 172, 74, .24);
}
.avatar-frame::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 219, 154, .28);
  animation: avatarSpin 26s linear infinite;
  pointer-events: none;
}
.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(12, 28, 25, .9);
  background: #10211f;
}
.avatar-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(246, 215, 154, .2);
  pointer-events: none;
}
.lvl-badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  min-width: 42px;
  height: 18px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 9px;
  background: linear-gradient(180deg, #1a2a27, #08110f);
  border: 1px solid rgba(231, 181, 94, .7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .55);
  line-height: 1;
}
.lvl-badge em { font-style: normal; font-size: 7px; color: var(--gold); letter-spacing: .04em; }
.lvl-badge b { font-size: 10px; color: #fff1cf; font-weight: 700; }

.hero-stats { min-width: 0; padding-top: 2px; width: min(44vw, 178px); }
.name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hero-name {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff4de;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .86), 0 0 16px rgba(255, 193, 108, .2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 108px;
}
.realm-short {
  flex: none;
  font-size: 8px;
  line-height: 1;
  padding: 3px 5px;
  color: #b9f0dc;
  border: 1px solid rgba(127, 208, 179, .4);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(38, 96, 81, .55), rgba(12, 40, 35, .55));
  letter-spacing: .08em;
}
.power-line { display: flex; align-items: baseline; gap: 5px; margin-top: 0; }
.power-label {
  font-size: 9px;
  color: #e2c28a;
  letter-spacing: .12em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.power-line b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #fff8dd 6%, #ffdf9d 42%, #ffb04f 78%, #df7a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .85)) drop-shadow(0 0 10px rgba(255, 158, 64, .4));
}
.xp-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.xp-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(5, 10, 10, .88);
  box-shadow: inset 0 0 0 1px rgba(231, 181, 94, .3), inset 0 1px 3px rgba(0, 0, 0, .8);
}
.xp-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a9611c, #ffb14c 45%, #ffe2a2);
  box-shadow: 0 0 9px rgba(255, 145, 51, .75);
  transition: width .28s ease;
}
.xp-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 55%);
  pointer-events: none;
}
.xp-txt { flex: none; font-size: 8px; color: #d8c49a; min-width: 24px; text-align: right; }

.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.sound-btn {
  pointer-events: auto;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f4dda9;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 238, 197, .22), transparent 42%),
    linear-gradient(160deg, rgba(39, 31, 22, .92), rgba(8, 12, 13, .92));
  border: 1px solid rgba(231, 181, 94, .45);
  box-shadow: 0 0 0 3px rgba(231, 181, 94, .06), 0 3px 12px rgba(0, 0, 0, .45), inset 0 1px 1px rgba(255, 240, 205, .18);
  transition: transform .15s, opacity .15s;
}
.sound-btn .mp-icon { width: 16px; height: 16px; }
.sound-btn:active { transform: scale(.92); }
.sound-btn.muted { color: #8d948a; border-color: rgba(180, 180, 160, .2); }
.kill-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 10px 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(40, 30, 18, .9), rgba(10, 14, 14, .86));
  border: 1px solid rgba(231, 181, 94, .38);
  box-shadow: inset 0 1px 1px rgba(255, 233, 188, .16), 0 3px 10px rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
}
.kill-pill .mp-icon {
  width: 13px;
  height: 13px;
  color: #ffd184;
  filter: drop-shadow(0 0 5px rgba(255, 174, 74, .65));
}
.kill-pill b {
  font-size: 13px;
  font-weight: 700;
  color: #ffe4b1;
  font-family: "Songti SC", "STSong", serif;
  min-width: 9px;
  text-align: center;
}
.kill-pill small { font-size: 8px; color: #b4a17d; }

.hud-sub {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 22, 14, .84), rgba(6, 12, 13, .72));
  border: 1px solid rgba(231, 181, 94, .28);
  box-shadow: inset 0 1px 1px rgba(255, 230, 180, .1), 0 3px 10px rgba(0, 0, 0, .32);
  backdrop-filter: blur(4px);
}
.hp-label { font-size: 9px; color: #d8bd8c; letter-spacing: .14em; margin-right: 3px; font-family: "Songti SC", "STSong", serif; }
.pip {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(180deg, #ffe6a6, #ff9b42 58%, #d15517);
  box-shadow: 0 0 8px rgba(255, 142, 58, .8), inset 0 1px 1px rgba(255, 249, 220, .7);
  transition: .25s ease;
}
.pip.off {
  background: #26312d;
  box-shadow: none;
  opacity: .45;
  transform: rotate(45deg) scale(.72);
}
.realm-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 22, 14, .84), rgba(6, 12, 13, .72));
  border: 1px solid rgba(231, 181, 94, .28);
  box-shadow: inset 0 1px 1px rgba(255, 230, 180, .1), 0 3px 10px rgba(0, 0, 0, .32);
  backdrop-filter: blur(4px);
}
.realm-gem {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: linear-gradient(180deg, #bff7e4, #42a78f);
  box-shadow: 0 0 8px rgba(78, 220, 184, .65);
}
.realm-chip span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  color: #e9dcc0;
  letter-spacing: .04em;
}
.realm-chip small { font-size: 8px; color: #9fb3a6; }

/* ---------- 操作区 ---------- */
.controls {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  animation: ctrlIn .6s .08s ease both;
}
.joy-zone {
  position: absolute;
  left: 16px;
  bottom: calc(18px + var(--safe-bottom));
  width: 124px;
  height: 124px;
  pointer-events: auto;
  touch-action: none;
  border-radius: 50%;
}
.joy-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.joy-ring.r1 {
  inset: 0;
  border: 1px solid rgba(255, 217, 152, .48);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 236, 196, .16), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(22, 34, 33, .46), rgba(4, 10, 11, .62));
  box-shadow:
    inset 0 0 0 4px rgba(231, 181, 94, .07),
    inset 0 0 26px rgba(0, 0, 0, .52),
    0 0 0 1px rgba(0, 0, 0, .45),
    0 5px 20px rgba(0, 0, 0, .3),
    0 0 22px rgba(255, 178, 87, .1);
}
.joy-ring.r2 {
  inset: 9px;
  border: 1px dashed rgba(255, 220, 160, .28);
}
.joy-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px;
  background: linear-gradient(180deg, #ffe6b1, #c78b34);
  box-shadow: 0 0 5px rgba(255, 190, 98, .65);
  transform: rotate(45deg);
  pointer-events: none;
}
.joy-tick.t1 { transform: translateY(-51px) rotate(45deg); }
.joy-tick.t2 { transform: translateY(51px) rotate(45deg); }
.joy-tick.t3 { transform: translateX(-51px) rotate(45deg); }
.joy-tick.t4 { transform: translateX(51px) rotate(45deg); }
.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 170, .75);
  background:
    radial-gradient(circle at 36% 26%, rgba(255, 245, 215, .42), transparent 38%),
    radial-gradient(circle at 50% 58%, #5a6456, #252e29 55%, #0b1210 100%);
  box-shadow:
    0 5px 16px rgba(0, 0, 0, .6),
    0 0 0 4px rgba(231, 181, 94, .06),
    inset 0 1px 2px rgba(255, 240, 205, .35),
    inset 0 -6px 10px rgba(0, 0, 0, .4);
  transform: translate(var(--jx, 0px), var(--jy, 0px));
  transition: transform .06s linear;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.knob-core {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(231, 181, 94, .45);
  background: radial-gradient(circle at 40% 32%, #d8c592, #7c653a 55%, #3b2e18);
  box-shadow: inset 0 2px 4px rgba(255, 248, 220, .35), 0 1px 5px rgba(0, 0, 0, .55);
}
.knob-mark {
  position: absolute;
  top: 6px;
  width: 12px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 225, 168, .65);
  box-shadow: 0 0 6px rgba(255, 197, 103, .55);
}

.action-cluster {
  position: absolute;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  width: clamp(176px, 55vw, 216px);
  height: clamp(166px, 52vw, 202px);
  pointer-events: none;
}
.action-cluster > .act-btn { position: absolute; pointer-events: auto; }
.act-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffe9c4;
  touch-action: manipulation;
  transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.act-btn:active { transform: scale(.93); filter: brightness(1.12); }
.act-btn .mp-icon { position: relative; z-index: 2; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.act-label {
  position: relative;
  z-index: 2;
  font-family: "Songti SC", "STSong", serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.act-sub { position: relative; z-index: 2; font-size: 8px; letter-spacing: .06em; color: rgba(255, 238, 205, .64); }
.cooldown {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: conic-gradient(rgba(3, 8, 9, .7) var(--cd, 0deg), transparent 0);
}
.act-btn.cooling .cooldown { opacity: 1; }

.devour-btn {
  right: 0;
  bottom: 0;
  width: clamp(88px, 28vw, 112px);
  height: clamp(88px, 28vw, 112px);
  border: 1px solid rgba(255, 235, 184, .95);
  background:
    radial-gradient(circle at 38% 24%, rgba(255, 250, 226, .62), transparent 24%),
    radial-gradient(circle at 50% 46%, #ffd07a 0%, #ff8a3d 40%, #c94f15 74%, #661f07 100%);
  box-shadow:
    0 0 0 3px rgba(59, 32, 10, .72),
    0 0 0 5px rgba(255, 204, 120, .8),
    0 0 0 7px rgba(59, 32, 10, .5),
    0 0 32px rgba(255, 148, 54, .6),
    0 9px 26px rgba(0, 0, 0, .6),
    inset 0 2px 5px rgba(255, 249, 218, .7),
    inset 0 -8px 14px rgba(89, 28, 6, .55);
}
.devour-btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(120, 48, 10, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 195, .22);
  pointer-events: none;
}
.devour-btn .mp-icon { width: 29px; height: 29px; color: #fff5dd; margin-top: -1px; }
.devour-btn .act-label { font-size: 16px; margin-top: -1px; letter-spacing: .12em; }
.devour-btn .act-sub { font-size: 8px; color: rgba(255, 245, 219, .8); }
.devour-halo {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 203, 133, .3);
  animation: haloPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
.devour-claw { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .55; }
.devour-claw i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  margin: -37px;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 232, 187, .65);
}
.devour-claw i:nth-child(1) { transform: rotate(-24deg) scale(.92); }
.devour-claw i:nth-child(2) { transform: rotate(24deg) scale(.92); }
.devour-claw i:nth-child(3) { transform: rotate(0deg) scale(1.02); border-top-color: transparent; border-left: 1px solid rgba(255, 232, 187, .45); }
.devour-btn.active {
  filter: brightness(1.14);
  box-shadow: 0 0 0 5px rgba(255, 193, 102, .15), 0 0 38px rgba(255, 150, 56, .65), 0 8px 24px rgba(0, 0, 0, .55), inset 0 2px 4px rgba(255, 244, 208, .55);
}
.devour-btn.active .devour-halo { animation-duration: .7s; }

.dash-btn {
  right: 4px;
  top: 2px;
  width: clamp(54px, 17vw, 68px);
  height: clamp(54px, 17vw, 68px);
  border: 1px solid rgba(196, 243, 255, .7);
  background:
    radial-gradient(circle at 38% 26%, rgba(230, 255, 255, .45), transparent 30%),
    radial-gradient(circle at 50% 50%, #4b9aa6, #1d5260 58%, #061a24 100%);
  box-shadow:
    0 0 0 3px rgba(8, 24, 30, .7),
    0 0 0 4px rgba(156, 216, 226, .5),
    0 0 20px rgba(68, 183, 196, .3),
    0 5px 16px rgba(0, 0, 0, .5),
    inset 0 1px 2px rgba(218, 255, 255, .45);
}
.dash-btn .mp-icon { width: 19px; height: 19px; color: #e3fdff; }
.dash-btn .act-label { font-size: 10px; margin-top: 1px; letter-spacing: .1em; }

.evolve-btn {
  left: 0;
  bottom: 4px;
  width: clamp(66px, 21vw, 84px);
  height: clamp(66px, 21vw, 84px);
  border: 1px solid rgba(231, 181, 94, .5);
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 243, 205, .24), transparent 32%),
    radial-gradient(circle at 50% 55%, #4a6553, #1a352c 62%, #071310 100%);
  box-shadow:
    0 0 0 3px rgba(6, 14, 12, .68),
    0 0 0 4px rgba(231, 181, 94, .34),
    0 4px 16px rgba(0, 0, 0, .5),
    inset 0 1px 2px rgba(255, 240, 207, .22);
  opacity: .68;
}
.evolve-btn .mp-icon { width: 21px; height: 21px; color: #e3cd95; }
.evolve-btn .act-label { font-size: 11px; margin-top: 1px; color: #ead9ae; letter-spacing: .1em; }
.evolve-btn .act-sub { font-size: 7px; color: rgba(226, 211, 174, .62); max-width: 58px; text-align: center; }
.evolve-btn.ready {
  opacity: 1;
  border-color: rgba(255, 224, 153, .95);
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 249, 219, .7), transparent 26%),
    radial-gradient(circle at 50% 50%, #ffd581, #f39a3d 48%, #a64c13 100%);
  box-shadow: 0 0 0 4px rgba(255, 176, 72, .14), 0 0 28px rgba(255, 186, 83, .65), 0 5px 18px rgba(0, 0, 0, .45), inset 0 2px 3px rgba(255, 248, 217, .6);
  animation: evolvePulse 1.5s ease-in-out infinite;
}
.evolve-btn.ready .mp-icon, .evolve-btn.ready .act-label { color: #fff6de; }
.evolve-btn.ready .act-sub { color: rgba(255, 248, 224, .85); }
.act-rings {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
}
.evolve-btn.ready .act-rings { border-color: rgba(255, 218, 146, .4); animation: haloPulse 1.4s ease-in-out infinite; }

/* ---------- 提示 ---------- */
.toast {
  position: absolute;
  left: 50%;
  top: calc(140px + var(--safe-top));
  transform: translate(-50%, -8px);
  z-index: 12;
  max-width: calc(100% - 30px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(5, 15, 15, .82);
  border: 1px solid rgba(231, 181, 94, .26);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  color: #f1dfbc;
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tut-line {
  position: absolute;
  left: 50%;
  top: calc(158px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 11;
  max-width: calc(100% - 40px);
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(32, 24, 15, .88), rgba(4, 11, 12, .84));
  border: 1px solid rgba(231, 181, 94, .3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 1px 1px rgba(255, 230, 180, .1);
  color: #e4d2b0;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
.tut-line.show { opacity: 1; }
.tut-line b { color: #ffcb80; font-weight: 700; }

.feed {
  position: absolute;
  left: 14px;
  bottom: calc(168px + var(--safe-bottom));
  z-index: 11;
  width: min(64%, 252px);
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}
.feed li {
  position: relative;
  padding: 4px 10px 4px 10px;
  border-radius: 4px 10px 10px 4px;
  border-left: 2px solid rgba(231, 181, 94, .72);
  background: linear-gradient(90deg, rgba(7, 12, 13, .82), rgba(7, 12, 13, .5) 74%, rgba(7, 12, 13, 0));
  color: rgba(238, 224, 198, .9);
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  animation: feedIn .28s ease both;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.feed li b { color: #ffcf86; font-weight: 700; }
.feed li.good { border-left-color: rgba(134, 224, 165, .8); }
.feed li.bad { border-left-color: rgba(255, 107, 69, .85); }
.feed li.bad b { color: #ffb08e; }
.feed li.out { animation: feedOut .4s ease both; }
.feed:empty { display: none; }

.combo {
  position: absolute;
  left: 50%;
  top: 27%;
  z-index: 11;
  transform: translate(-50%, 6px) scale(.8);
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 4px 13px 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(70, 34, 10, .9), rgba(26, 12, 5, .88));
  border: 1px solid rgba(255, 206, 128, .7);
  box-shadow: 0 0 22px rgba(255, 148, 54, .42), inset 0 1px 1px rgba(255, 236, 195, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, 1.4, .4, 1);
}
.combo.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.combo b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
  line-height: 1;
  color: #ffe2a0;
  text-shadow: 0 0 12px rgba(255, 150, 50, .7);
}
.combo span { font-size: 10px; letter-spacing: .16em; color: #ffc37c; }

.evolve-hint {
  position: absolute;
  left: 50%;
  bottom: calc(278px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(46, 35, 16, .9), rgba(14, 20, 17, .9));
  border: 1px solid rgba(255, 208, 126, .45);
  box-shadow: 0 0 20px rgba(255, 168, 61, .2);
  pointer-events: none;
  animation: hintFloat 2s ease-in-out infinite;
}
.evolve-hint .mp-icon { width: 12px; height: 12px; color: #ffd489; }
.evolve-hint span { font-size: 9px; color: #ffe1a9; letter-spacing: .18em; }
.evolve-hint b { font-size: 10px; color: #fff5de; font-weight: 700; }

/* ---------- 开始界面 ---------- */
.intro {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #050a0c;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.intro.leaving { opacity: 0; transform: scale(1.035); pointer-events: none; }
.intro-art {
  position: absolute;
  inset: -2%;
  background: url("images/gen/hero.jpg") 50% 47% / cover no-repeat;
  transform: scale(1.04);
  animation: kenburns 22s ease-in-out infinite alternate;
  filter: saturate(1.05) contrast(1.03);
}
.intro-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 8, 10, .84) 0%, rgba(3, 8, 10, .44) 18%, rgba(3, 8, 10, .08) 38%, rgba(3, 8, 10, .02) 48%, rgba(3, 8, 10, .44) 66%, rgba(3, 8, 10, .94) 84%, #04090b 100%),
    radial-gradient(ellipse 90% 64% at 50% 42%, transparent 40%, rgba(3, 9, 10, .5) 100%);
}
.intro-grain {
  position: absolute;
  inset: 0;
  opacity: .18;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, .35) .5px, transparent .5px),
    radial-gradient(rgba(0, 0, 0, .4) .5px, transparent .5px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 2px;
}
.intro-frame {
  position: absolute;
  inset: 10px;
  z-index: 4;
  border: 1px solid rgba(231, 181, 94, .22);
  border-radius: 18px;
  pointer-events: none;
}
.intro-frame i {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(246, 215, 154, .62);
  border-style: solid;
}
.intro-frame i:nth-child(1) { left: -1px; top: -1px; border-width: 1px 0 0 1px; border-top-left-radius: 18px; }
.intro-frame i:nth-child(2) { right: -1px; top: -1px; border-width: 1px 1px 0 0; border-top-right-radius: 18px; }
.intro-frame i:nth-child(3) { left: -1px; bottom: -1px; border-width: 0 0 1px 1px; border-bottom-left-radius: 18px; }
.intro-frame i:nth-child(4) { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; border-bottom-right-radius: 18px; }

.ember-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.ember-layer i {
  position: absolute;
  left: var(--x);
  bottom: -12px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #ffd28a;
  opacity: var(--o);
  box-shadow: 0 0 7px 2px rgba(255, 158, 62, .45);
  animation: emberRise var(--d) linear infinite;
  animation-delay: calc(var(--d) * -.43);
}

.intro-top {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: calc(18px + var(--safe-top)) 22px 0;
}
.brand { display: flex; align-items: flex-start; gap: 9px; }
.brand-seal {
  width: 34px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 12px;
  letter-spacing: .16em;
  color: #ffe6be;
  background: linear-gradient(155deg, #9a3524, #6b1d16 62%, #46110e);
  border: 1px solid rgba(255, 214, 154, .55);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .4), inset 0 0 0 2px rgba(255, 225, 180, .08);
  border-radius: 4px;
}
.brand-line {
  margin-top: 8px;
  font-size: 7px;
  line-height: 1.4;
  letter-spacing: .18em;
  color: rgba(231, 196, 136, .72);
  max-width: 58px;
}
.intro-player {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(5, 14, 15, .55);
  border: 1px solid rgba(231, 181, 94, .22);
  backdrop-filter: blur(8px);
  max-width: 62%;
}
.mini-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(160deg, #f2d18d, #7c5a24);
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 1px solid #0a1816; }
.mini-avatar i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7fe0b7;
  border: 2px solid #07110f;
  box-shadow: 0 0 7px rgba(96, 229, 178, .7);
}
.intro-player-txt { display: flex; flex-direction: column; min-width: 0; }
.intro-player-txt b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  color: #f6ead3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 116px;
}
.intro-player-txt span { font-size: 8px; color: #b4a684; margin-top: 1px; white-space: nowrap; }

.intro-title {
  position: relative;
  z-index: 5;
  isolation: isolate;
  padding: 0 20px;
  margin-top: clamp(20px, 6.2vh, 58px);
  text-align: center;
}
.intro-title::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118%;
  height: 150%;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(3, 9, 10, .52), rgba(3, 9, 10, .2) 52%, transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 9px;
  letter-spacing: .18em;
  color: #e3c187;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.eyebrow i { width: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(231, 181, 94, .7)); }
.eyebrow i:last-child { background: linear-gradient(90deg, rgba(231, 181, 94, .7), transparent); }
.intro-title h1 {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .04em;
  font-family: "STKaiti", "KaiTi", "Songti SC", "STSong", serif;
  font-size: clamp(42px, 13.2vw, 62px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .8)) drop-shadow(0 0 22px rgba(255, 151, 58, .22));
}
.intro-title h1 span {
  background: linear-gradient(180deg, #fff8e6 0%, #ffe4ae 38%, #e7b15b 70%, #b97729 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.intro-title h1 span:last-child {
  background: linear-gradient(180deg, #fff3d4 0%, #ffd28c 34%, #ff9b45 66%, #c65b1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.title-en {
  margin: 9px 0 0;
  font-size: 7px;
  letter-spacing: .42em;
  color: rgba(255, 229, 185, .56);
  text-transform: uppercase;
}

.intro-bottom {
  position: relative;
  z-index: 5;
  margin-top: auto;
  padding: 0 20px calc(14px + var(--safe-bottom));
  text-align: center;
}
.beast-strip {
  display: flex;
  justify-content: center;
  gap: clamp(7px, 2.6vw, 13px);
  margin-bottom: 12px;
}
.beast-chip {
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  opacity: .9;
}
.beast-img {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  background:
    radial-gradient(circle at 50% 40%, rgba(92, 168, 148, .28), rgba(7, 18, 18, .9) 70%);
  border: 1px solid rgba(231, 181, 94, .3);
  box-shadow: 0 3px 11px rgba(0, 0, 0, .45), inset 0 0 12px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.beast-img::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(246, 215, 154, .16);
  pointer-events: none;
}
.beast-img img {
  width: 128%;
  height: 128%;
  object-fit: contain;
  margin: -14%;
  filter: brightness(1.06) saturate(1.04);
}
.beast-chip b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  color: #f1e4c8;
  letter-spacing: .06em;
  font-weight: 700;
  margin-top: 2px;
}
.beast-chip small { font-size: 7px; color: #a99978; letter-spacing: .08em; }

.intro-desc {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(235, 222, 198, .85);
  letter-spacing: .04em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}
.start-orb-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.orb-halo {
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 198, 112, .22);
  animation: haloPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
.orb-halo.h2 {
  inset: -25px;
  border-style: dashed;
  border-color: rgba(255, 198, 112, .13);
  animation-duration: 4.2s;
  animation-direction: reverse;
}
.start-orb {
  position: relative;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #3a1805;
  background:
    radial-gradient(circle at 37% 23%, rgba(255, 252, 235, .85), transparent 23%),
    radial-gradient(circle at 50% 46%, #ffd887 0%, #ffa04c 38%, #ef7126 66%, #a23f0d 100%);
  border: 1px solid rgba(255, 240, 202, .98);
  box-shadow:
    0 0 0 3px rgba(55, 26, 8, .8),
    0 0 0 6px rgba(255, 206, 122, .88),
    0 0 0 8px rgba(55, 26, 8, .55),
    0 0 38px rgba(255, 151, 55, .62),
    0 12px 34px rgba(0, 0, 0, .55),
    inset 0 3px 6px rgba(255, 250, 225, .75),
    inset 0 -10px 18px rgba(100, 32, 5, .55);
  transition: transform .13s ease, filter .13s ease;
  overflow: visible;
  isolation: isolate;
}
.start-orb::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(120, 48, 10, .42);
  box-shadow: inset 0 0 0 1px rgba(255, 241, 204, .28);
  pointer-events: none;
}
.start-orb::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 236, 190, 0), rgba(255, 236, 190, .5) 12%, transparent 24%, transparent 76%, rgba(255, 236, 190, .35) 88%, transparent);
  z-index: -1;
  animation: orbSpin 9s linear infinite;
  pointer-events: none;
}
.start-orb:active { transform: scale(.955); filter: brightness(1.08); }
.orb-claw { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.orb-claw i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin: -48px;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 240, 208, .7);
}
.orb-claw i:nth-child(1) { transform: rotate(-26deg) scale(.94); }
.orb-claw i:nth-child(2) { transform: rotate(26deg) scale(.94); }
.orb-claw i:nth-child(3) {
  transform: rotate(0deg) scale(1.02);
  border-top-color: transparent;
  border-left: 1px solid rgba(255, 240, 208, .45);
}
.orb-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.orb-inner b {
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .12em;
  text-indent: .12em;
  color: #3d1904;
  text-shadow: 0 1px 0 rgba(255, 245, 214, .62), 0 -1px 1px rgba(110, 40, 6, .25);
}
.orb-inner small {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: .28em;
  text-indent: .28em;
  color: rgba(71, 31, 7, .74);
}
.start-cta {
  margin: 9px 0 0;
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(255, 223, 174, .92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9), 0 0 14px rgba(255, 158, 60, .28);
}
.start-btn {
  position: relative;
  display: block;
  width: 100%;
  max-width: 372px;
  min-height: 62px;
  margin: 0 auto;
  padding: 9px 20px;
  border-radius: 999px;
  color: #2c1305;
  background:
    linear-gradient(180deg, rgba(255, 248, 224, .7), transparent 22%),
    linear-gradient(180deg, #ffc06e 0%, #ff9a45 42%, #f0742a 72%, #c64e14 100%);
  border: 1px solid rgba(255, 230, 185, .95);
  box-shadow:
    0 0 0 4px rgba(255, 138, 61, .12),
    0 10px 28px rgba(218, 87, 22, .4),
    0 2px 4px rgba(0, 0, 0, .4),
    inset 0 2px 3px rgba(255, 248, 225, .7),
    inset 0 -5px 10px rgba(115, 41, 8, .3);
  transition: transform .12s ease, filter .12s ease;
  overflow: hidden;
}
.start-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 1px solid rgba(112, 38, 7, .28);
  pointer-events: none;
}
.start-btn:active { transform: scale(.975); filter: brightness(1.07); }
.start-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.start-inner b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2em;
  text-indent: .2em;
  color: #3a1805;
  text-shadow: 0 1px 0 rgba(255, 242, 209, .5);
}
.start-inner small {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: .22em;
  text-indent: .22em;
  color: rgba(75, 33, 8, .72);
}
.start-halo {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 112, .2);
  animation: haloPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}
.intro-tips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 11px 0 0;
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(209, 193, 164, .72);
}
.intro-tips i { width: 3px; height: 3px; border-radius: 50%; background: rgba(231, 181, 94, .5); }
.intro-best {
  margin: 7px 0 0;
  font-size: 8px;
  letter-spacing: .12em;
  color: rgba(231, 181, 94, .48);
}

/* ---------- 结算 ---------- */
.end {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.end-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(17, 40, 34, .55), rgba(2, 6, 7, .94) 70%);
  backdrop-filter: blur(4px);
}
.end-card {
  position: relative;
  width: 100%;
  max-width: 356px;
  padding: 26px 20px 22px;
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(64, 106, 88, .35), transparent 52%),
    linear-gradient(165deg, rgba(17, 31, 27, .98), rgba(6, 13, 14, .99) 72%);
  border: 1px solid rgba(231, 181, 94, .38);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(255, 235, 197, .05);
  animation: cardIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.end-corners i {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(246, 215, 154, .55);
  border-style: solid;
}
.end-corners i:nth-child(1) { left: 7px; top: 7px; border-width: 1px 0 0 1px; }
.end-corners i:nth-child(2) { right: 7px; top: 7px; border-width: 1px 1px 0 0; }
.end-corners i:nth-child(3) { left: 7px; bottom: 7px; border-width: 0 0 1px 1px; }
.end-corners i:nth-child(4) { right: 7px; bottom: 7px; border-width: 0 1px 1px 0; }
.end-seal {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  color: #ffe8c5;
  background: radial-gradient(circle at 40% 30%, #b0442e, #741f18 60%, #47100e);
  border: 1px solid rgba(255, 214, 154, .7);
  box-shadow: 0 0 22px rgba(196, 62, 35, .42), inset 0 0 0 3px rgba(255, 220, 170, .08);
}
.end-kicker { margin: 0; font-size: 9px; letter-spacing: .3em; color: #b9a37a; text-indent: .3em; }
.end-card h2 {
  margin: 5px 0 8px;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 32px;
  letter-spacing: .1em;
  font-weight: 700;
  color: #ffe0a5;
  text-shadow: 0 0 22px rgba(255, 171, 72, .3);
}
.end-desc {
  margin: 0 0 18px;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(221, 208, 183, .72);
  letter-spacing: .03em;
}
.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(231, 181, 94, .14);
}
.end-stats > div {
  padding: 11px 4px 9px;
  background: rgba(7, 16, 16, .84);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.end-stats b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  line-height: 1;
  color: #ffd48b;
  font-weight: 700;
}
.end-stats span { font-size: 8px; color: #a79878; letter-spacing: .1em; }
.end-best { margin: 0 0 16px; font-size: 9px; letter-spacing: .12em; color: rgba(231, 181, 94, .58); }
.end-btn { min-height: 58px; }
.end-btn .start-inner b { font-size: 18px; }

/* ---------- 动画 ---------- */
@keyframes kenburns {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.12) translate3d(-1.4%, -1.2%, 0); }
}
@keyframes arenaDrift {
  0% { background-position: 72% 56%; }
  100% { background-position: 69% 59%; }
}
@keyframes raysDrift {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(8deg) scale(1.03); }
}
@keyframes avatarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes orbSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes feedIn {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes feedOut {
  0% { opacity: 1; max-height: 24px; }
  100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
}
@keyframes hudIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ctrlIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes mistDrift {
  0% { transform: translate3d(-4%, 0, 0) scale(1); }
  100% { transform: translate3d(5%, -3%, 0) scale(1.08); }
}
@keyframes emberRise {
  0% { transform: translate3d(0, 0, 0) scale(.7); opacity: 0; }
  12% { opacity: var(--o); }
  70% { opacity: calc(var(--o) * .7); }
  100% { transform: translate3d(18px, -104vh, 0) scale(1.15); opacity: 0; }
}
@keyframes haloPulse {
  0%, 100% { transform: scale(.97); opacity: .55; }
  50% { transform: scale(1.04); opacity: .95; }
}
@keyframes evolvePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 176, 72, .12), 0 0 20px rgba(255, 186, 83, .5), 0 5px 18px rgba(0, 0, 0, .45), inset 0 2px 3px rgba(255, 248, 217, .6); }
  50% { box-shadow: 0 0 0 7px rgba(255, 176, 72, .18), 0 0 36px rgba(255, 186, 83, .85), 0 5px 18px rgba(0, 0, 0, .45), inset 0 2px 3px rgba(255, 248, 217, .6); }
}
@keyframes hintFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}
@keyframes cardIn {
  0% { opacity: 0; transform: translateY(14px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-height: 740px) {
  .intro-title { margin-top: 14px; }
  .intro-title h1 { font-size: 42px; }
  .beast-strip { margin-bottom: 7px; }
  .beast-img { width: 40px; height: 40px; }
  .beast-chip { width: 54px; }
  .intro-desc { font-size: 11px; margin-bottom: 8px; }
  .start-orb-wrap { width: 116px; height: 116px; margin-top: 2px; }
  .start-orb { width: 110px; height: 110px; }
  .start-orb .orb-inner b { font-size: 30px; }
  .start-cta { margin-top: 7px; }
  .start-btn { min-height: 56px; }
  .start-inner b { font-size: 18px; }
  .intro-tips { margin-top: 7px; }
  .intro-best { margin-top: 4px; }
  .end-card { padding: 20px 18px 18px; }
  .end-card h2 { font-size: 27px; }
  .end-desc { margin-bottom: 12px; }
}
@media (max-height: 620px) {
  .intro-desc, .intro-tips, .intro-best, .beast-strip { display: none; }
  .intro-title { margin-top: 8px; }
  .intro-title h1 { font-size: 34px; }
  .start-orb-wrap { width: 100px; height: 100px; margin-top: 8px; }
  .start-orb { width: 94px; height: 94px; }
  .start-orb .orb-inner b { font-size: 25px; }
  .start-orb .orb-inner small { font-size: 7px; margin-top: 4px; }
  .start-cta { font-size: 9px; margin-top: 5px; }
  .start-btn { min-height: 52px; }
}
@media (max-width: 360px) {
  .hero-panel { padding-right: 8px; gap: 7px; }
  .avatar-frame { width: 52px; height: 52px; }
  .hero-stats { width: 118px; }
  .hero-name { max-width: 82px; font-size: 13px; }
  .power-line b { font-size: 21px; }
  .sound-btn { width: 33px; height: 33px; }
  .kill-pill { height: 26px; padding: 0 8px 0 6px; }
  .joy-zone { width: 108px; height: 108px; }
  .joy-knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .action-cluster { width: 176px; height: 166px; }
  .joy-tick.t1 { transform: translateY(-46px) rotate(45deg); }
  .joy-tick.t2 { transform: translateY(46px) rotate(45deg); }
  .joy-tick.t3 { transform: translateX(-46px) rotate(45deg); }
  .joy-tick.t4 { transform: translateX(46px) rotate(45deg); }
  .devour-btn { width: 88px; height: 88px; }
  .dash-btn { width: 54px; height: 54px; }
  .evolve-btn { width: 66px; height: 66px; }
  .act-btn .act-sub { display: none; }
  .feed { width: min(62%, 210px); bottom: calc(154px + var(--safe-bottom)); }
  .tut-line { top: calc(150px + var(--safe-top)); font-size: 9px; }
}
@media (min-width: 560px) {
  #app { box-shadow: 0 0 70px rgba(0, 0, 0, .9), 0 0 0 1px rgba(231, 181, 94, .1); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-art, .arena-rays, .arena-art { animation: none; }
  .hud, .controls { animation: none; }
  .avatar-frame::after, .start-orb::after { animation: none; }
  .ember-layer i, .devour-halo, .evolve-btn.ready, .start-halo, .orb-halo { animation: none; }
}

/* ============================================================
   gpt-image 成品图适配（本轮视觉升级，覆盖旧 intro 背景）
   开始页主视觉直接使用 gptimg_1795347439_look.png
   ============================================================ */
.intro-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/gen/gptimg_1795347439_look.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  transform: scale(1.03);
  animation: introKenBurns 26s ease-in-out infinite alternate;
}
@keyframes introKenBurns {
  0%   { transform: scale(1.03) translateY(0); }
  100% { transform: scale(1.1) translateY(-1.6%); }
}
/* 让成品图更通透：降低旧遮罩黑度，保留上下渐变保证文字可读 */
.intro-shade {
  background:
    linear-gradient(180deg,
      rgba(8, 5, 9, .62) 0%,
      rgba(8, 5, 9, .22) 22%,
      rgba(8, 5, 9, .08) 46%,
      rgba(8, 5, 9, .28) 68%,
      rgba(7, 4, 8, .82) 88%,
      rgba(6, 3, 7, .96) 100%) !important;
}
/* 标题区压在图上，加描边光晕，保证在成品图上清晰 */
.intro-title h1 span {
  text-shadow:
    0 2px 0 rgba(60, 26, 8, .9),
    0 4px 18px rgba(0, 0, 0, .75),
    0 0 30px rgba(255, 138, 61, .45) !important;
}
.intro-title .eyebrow,
.intro-title .title-en {
  text-shadow: 0 1px 8px rgba(0, 0, 0, .85), 0 0 14px rgba(255, 138, 61, .35);
}
/* 底部信息卡浮在成品图上：半透明深色玻璃，不遮挡画面主体 */
.intro-bottom {
  background: linear-gradient(180deg, rgba(10, 6, 10, 0) 0%, rgba(9, 5, 9, .58) 30%, rgba(7, 4, 8, .9) 100%);
}
.beast-chip {
  background: linear-gradient(180deg, rgba(46, 28, 20, .72), rgba(18, 11, 12, .78));
  border: 1px solid rgba(255, 177, 96, .32);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 220, 160, .18);
  backdrop-filter: blur(6px);
}
/* 开始按钮主色呼应 #FF8A3D */
.start-orb .orb-inner {
  background: radial-gradient(circle at 34% 28%, #ffc07a, var(--amber) 48%, #d9621c 100%) !important;
  box-shadow: 0 0 0 1px rgba(255, 226, 180, .55), 0 10px 30px rgba(255, 120, 40, .55), inset 0 2px 6px rgba(255, 240, 210, .55), inset 0 -6px 14px rgba(120, 48, 8, .55) !important;
}
.start-orb:active { transform: scale(.94); }
/* 战场底图也叠加一层暖橙主色调，和成品图统一 */
.arena-veil {
  background:
    radial-gradient(ellipse 72% 40% at 50% 38%, rgba(255, 166, 92, .16), transparent 62%),
    radial-gradient(ellipse 96% 62% at 50% 34%, rgba(40, 22, 14, .08), rgba(12, 8, 8, .32) 72%, rgba(8, 4, 5, .8) 100%),
    linear-gradient(180deg, rgba(12, 7, 8, .6) 0%, rgba(12, 7, 8, .08) 20%, rgba(10, 6, 7, .02) 44%, rgba(10, 6, 7, .36) 70%, rgba(7, 4, 5, .86) 100%) !important;
}


/* ---------- io AI 决策状态补丁（JS 动态生成 pip / 冷却遮罩） ---------- */
.pip.lost {
  background: rgba(120, 110, 92, .22) !important;
  box-shadow: none !important;
  border: 1px solid rgba(231, 181, 94, .18);
}
.act-btn .cooldown {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;
  border-radius: inherit;
  background: rgba(4, 9, 11, .62);
  pointer-events: none;
  transition: height .12s linear;
  z-index: 0;
}
.feed li.warn { border-color: rgba(255, 107, 69, .55); color: #ffb59c; }
.feed li.evolve { border-color: rgba(255, 217, 138, .6); color: #ffe9b8; }
