/* ============================================================
   闪杀对决 · 三国烽火皮肤
   首页 / 对局 / 选将面板 / 全局暖金暗色
   ============================================================ */
:root {
  --duel-bg: #120a07;
  --duel-brown: #2a1810;
  --duel-brown-2: #3c2417;
  --duel-gold: #e7c377;
  --duel-gold-2: #f7e2ab;
  --duel-gold-deep: #a97224;
  --duel-red: #b83a2c;
  --duel-green: #5e7f3a;
  --duel-ink: #f4ead6;
  --duel-muted: #b9a98f;
  --duel-line: rgba(214, 176, 108, .28);
  --duc-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   全局暖色底
   ============================================================ */
body {
  background:
    radial-gradient(800px 600px at 50% 0%, #3a2115 0%, transparent 60%),
    #080504;
  color: var(--duel-ink);
}
#app {
  background: var(--duel-bg);
  box-shadow: 0 0 100px rgba(160, 90, 30, .18);
}
.screen {
  background: var(--duel-bg);
  color: var(--duel-ink);
}
.screen h1, .screen h2, .screen h3, .screen h4, .screen strong { color: var(--duel-ink); }

/* ============================================================
   首页
   ============================================================ */
.screen-home-v2 {
  background: #130905;
  overflow: hidden;
  user-select: none;
}
.home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 4%, #7a4325 0%, #54291a 32%, #2a130d 62%, #100806 100%);
}
.home-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 36% at 50% 24%, rgba(255, 182, 88, .18), transparent 70%),
    radial-gradient(60% 40% at 10% 8%, rgba(96, 138, 60, .2), transparent 72%),
    radial-gradient(60% 40% at 92% 8%, rgba(174, 48, 36, .24), transparent 72%);
}
.home-smoke {
  position: absolute;
  border-radius: 50%;
  filter: blur(34px);
  opacity: .55;
  animation: homeSmoke 9s ease-in-out infinite alternate;
}
.smoke-a {
  left: -16%; top: 12%;
  width: 70%; height: 40%;
  background: radial-gradient(circle, rgba(255, 196, 112, .22), transparent 68%);
}
.smoke-b {
  right: -18%; top: 24%;
  width: 74%; height: 44%;
  background: radial-gradient(circle, rgba(196, 68, 36, .22), transparent 68%);
  animation-delay: -4s;
}
@keyframes homeSmoke {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .38; }
  100% { transform: translate3d(3%, -4%, 0) scale(1.12); opacity: .66; }
}
.home-horizon { display: none;
  position: absolute;
  left: -10%; right: -10%; bottom: 24%;
  height: 34%;
  background:
    linear-gradient(to top, rgba(10, 5, 3, .18), transparent 72%),
    repeating-linear-gradient(104deg, rgba(255, 188, 104, .06) 0 2px, transparent 2px 96px);
  transform: skewY(-2deg);
  opacity: .7;
}
.home-army {
  display: block;
  position: absolute;
  left: -8%; right: -8%; top: 26%;
  height: 36%;
  background: url('images/gen/city.png') center 45% / cover no-repeat;
  filter: sepia(.48) saturate(.82) brightness(.55) contrast(1.12);
  opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 50%, #000 18%, rgba(0,0,0,.7) 48%, transparent 76%), linear-gradient(to bottom, transparent 0%, #000 16%, #000 76%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 50%, #000 18%, rgba(0,0,0,.7) 48%, transparent 76%), linear-gradient(to bottom, transparent 0%, #000 16%, #000 76%, transparent 100%);
  mask-composite: intersect;
}
.home-embers {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 188, 96, .8) 0 1.1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 122, 58, .65) 0 1px, transparent 1.6px);
  background-size: 117px 163px, 173px 211px;
  background-position: 23px 40px, 91px 131px;
  opacity: .5;
  animation: emberDrift 14s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 78%);
  mask-image: linear-gradient(to top, #000 0%, transparent 78%);
}
@keyframes emberDrift {
  from { background-position: 23px 40px, 91px 131px; }
  to { background-position: 23px -123px, 91px -80px; }
}
.home-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(84% 62% at 50% 42%, transparent 36%, rgba(4, 2, 1, .58) 100%),
    linear-gradient(180deg, rgba(4, 2, 1, .35) 0%, transparent 22%, transparent 72%, rgba(4, 2, 1, .62) 100%);
}

.home-hero {
  position: absolute;
  top: 0.6%;
  z-index: 1;
  width: 60%;
  height: 31vh;
  max-height: 318px;
  object-fit: cover;
  object-position: center 18%;
  pointer-events: none;
  filter: saturate(.98) contrast(1.04) drop-shadow(0 12px 24px rgba(0, 0, 0, .5));
  -webkit-mask-image: radial-gradient(ellipse 64% 62% at 50% 42%, #000 46%, rgba(0, 0, 0, .85) 66%, transparent 88%);
  mask-image: radial-gradient(ellipse 64% 62% at 50% 42%, #000 46%, rgba(0, 0, 0, .85) 66%, transparent 88%);
}
.home-hero-left { left: -10%; object-position: 62% 18%; }
.home-body {
  position: absolute;
  z-index: 1;
  bottom: 35%;
  height: 43vh;
  width: auto;
  max-height: 410px;
  pointer-events: none;
  opacity: 1;
  filter: brightness(1.05) saturate(1.02) contrast(1.06) drop-shadow(0 8px 16px rgba(0, 0, 0, .45));
  -webkit-mask-image: radial-gradient(ellipse 70% 66% at 50% 42%, #000 48%, rgba(0,0,0,.72) 70%, transparent 92%);
  mask-image: radial-gradient(ellipse 70% 66% at 50% 42%, #000 48%, rgba(0,0,0,.72) 70%, transparent 92%);
}
.home-body-left { left: -2.5%; }
.home-body-right { right: -2.5%; }

.home-hero-right { right: -10%; object-position: 38% 18%; }

.home-gear {
  position: absolute;
  z-index: 12;
  top: calc(10px + var(--safe-top));
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f0d9a4;
  background: linear-gradient(150deg, rgba(74, 48, 25, .9), rgba(22, 12, 8, .96));
  border: 1px solid rgba(218, 178, 108, .68);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 236, 190, .22);
  transition: transform .16s ease, box-shadow .16s ease;
}
.home-gear .mp-icon { width: 22px; height: 22px; filter: drop-shadow(0 0 5px rgba(255, 196, 92, .35)); }
.home-gear:active { transform: scale(.92); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }

.home-content {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(4px + var(--safe-top)) 0 calc(10px + var(--safe-bottom));
  pointer-events: none;
}
.home-logo {
  width: min(60vw, 276px);
  margin-top: 1.4vh;
  flex: 0 0 auto;
  pointer-events: none;
  animation: logoFloat 5.5s ease-in-out infinite;
}
.home-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .58)) drop-shadow(0 0 22px rgba(214, 120, 42, .22));
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.home-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: -2px 0 0;
  width: min(70vw, 320px);
  flex: 0 0 auto;
  color: #f0d9a8;
  font-size: 11.5px;
  letter-spacing: 2.2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .85);
  opacity: .95;
}
.home-subtitle i {
  display: block;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 185, 108, .75));
}
.home-subtitle i:last-child { transform: scaleX(-1); }
.home-bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  width: 82vw;
  height: 36vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(152, 38, 24, .22), transparent 66%);
  filter: blur(16px);
  pointer-events: none;
}


.home-panel {
  position: relative;
  z-index: 6;
  width: calc(100% - 28px);
  max-width: 420px;
  margin-top: auto;
  margin-bottom: 3.4vh;
  padding: 13px 14px calc(15px + var(--safe-bottom));
  pointer-events: auto;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(52, 31, 20, .93) 0%, rgba(29, 17, 12, .97) 50%, rgba(20, 11, 8, .98) 100%);
  border: 1px solid rgba(206, 164, 96, .42);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 228, 170, .16),
    inset 0 0 0 1px rgba(10, 5, 3, .55);
}
.home-panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 10px;
  border: 1px solid rgba(207, 164, 96, .14);
  pointer-events: none;
}
.panel-corner {
  position: absolute;
  width: 13px;
  height: 13px;
  border-color: rgba(231, 195, 119, .72);
  border-style: solid;
  pointer-events: none;
}
.corner-tl { left: 5px; top: 5px; border-width: 1px 0 0 1px; border-top-left-radius: 4px; }
.corner-tr { right: 5px; top: 5px; border-width: 1px 1px 0 0; border-top-right-radius: 4px; }
.corner-bl { left: 5px; bottom: 5px; border-width: 0 0 1px 1px; border-bottom-left-radius: 4px; }
.corner-br { right: 5px; bottom: 5px; border-width: 0 1px 1px 0; border-bottom-right-radius: 4px; }
.panel-rule {
  position: absolute;
  top: 25px;
  width: 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 195, 119, .5));
}
.rule-l { left: 18px; }
.rule-r { right: 18px; transform: scaleX(-1); }

.home-panel-title {
  position: relative;
  z-index: 2;
  margin: 1px 0 11px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #f3dfb3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 0 18px rgba(228, 178, 90, .18);
}

.hero-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-pick {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: .76;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid var(--pick-frame, #c8a25e);
  background: #100906;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(0, 0, 0, .55);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.hero-pick::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 5px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 238, 190, .12), transparent 14%),
    linear-gradient(to top, rgba(6, 3, 2, .96) 0%, rgba(6, 3, 2, .44) 25%, transparent 47%);
}
.hero-pick::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 5;
  border-radius: 5px;
  border: 1px solid rgba(255, 220, 146, .28);
  pointer-events: none;
}
.hero-pick.pick-player { --pick-frame: #b9a052; }
.hero-pick.pick-enemy { --pick-frame: #b34f3e; }
.hero-pick.is-selected {
  box-shadow: 0 0 0 1px rgba(255, 230, 160, .65), 0 0 22px rgba(238, 184, 80, .35), 0 8px 18px rgba(0, 0, 0, .5);
  filter: brightness(1.06);
}
.hero-pick:active { transform: scale(.975); }
.pick-art {
  position: absolute;
  inset: 3px;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 214, 140, .16), transparent 55%),
    linear-gradient(150deg, #334f24, #15230f);
}
.hero-pick.pick-enemy .pick-art {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 170, 120, .16), transparent 55%),
    linear-gradient(150deg, #55241b, #220d0a);
}
.pick-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  display: block;
  transform: scale(1.04);
}
.pick-glyph {
  position: absolute;
  left: 0; right: 0; top: 44%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--serif);
  font-size: 74px;
  font-weight: 900;
  color: rgba(255, 240, 204, .9);
  text-shadow: 0 8px 24px rgba(0, 0, 0, .65);
}
.pick-name {
  position: absolute;
  z-index: 6;
  left: 11px;
  bottom: 9px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff9ea;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .95), 0 0 12px rgba(0, 0, 0, .6);
}
.pick-kingdom {
  position: absolute;
  z-index: 7;
  right: 9px;
  bottom: 8px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff7e2;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
}
.kd-shu { background: linear-gradient(145deg, #7fa144, #3f5e22); }
.kd-qun { background: linear-gradient(145deg, #b4593d, #6e2d1e); }
.kd-wei { background: linear-gradient(145deg, #5b73b8, #2d3f77); }
.kd-wu { background: linear-gradient(145deg, #b54a45, #73221f); }

.start-duel {
  position: relative;
  z-index: 7;
  display: block;
  width: min(64%, 240px);
  height: 52px;
  margin: 16px auto 0;
  padding: 0;
  color: #3b2408;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 5px;
  text-shadow: 0 1px 0 rgba(255, 248, 212, .7);
  background:
    linear-gradient(180deg, #fff0b7 0%, #f0cf7c 20%, #d7a643 55%, #b37a22 78%, #8a5714 100%);
  clip-path: polygon(5.5% 0, 94.5% 0, 100% 50%, 94.5% 100%, 5.5% 100%, 0 50%);
  box-shadow: inset 0 1px 0 rgba(255, 252, 230, .8), inset 0 -2px 0 rgba(90, 50, 8, .38), 0 6px 14px rgba(0, 0, 0, .42);
  transition: transform .15s ease, filter .15s ease;
  overflow: hidden;
}
.start-duel::before {
  content: "";
  position: absolute;
  inset: 4px 7%;
  border-top: 1px solid rgba(255, 246, 204, .5);
  border-bottom: 1px solid rgba(92, 52, 9, .3);
  clip-path: polygon(2% 0, 98% 0, 100% 50%, 98% 100%, 2% 100%, 0 50%);
  pointer-events: none;
}
.start-duel::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 30%;
  height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(18deg);
  animation: startShine 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes startShine {
  0%, 58% { left: -34%; opacity: 0; }
  66% { opacity: .8; }
  84%, 100% { left: 112%; opacity: 0; }
}
.start-duel:active { transform: scale(.975); filter: brightness(.94); }

/* ============================================================
   对局
   ============================================================ */
.battle-screen {
  background: #170c07;
  overflow: hidden;
  user-select: none;
}
.battle-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.battle-sky {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 27%;
  background:
    radial-gradient(64% 56% at 20% 24%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(54% 48% at 78% 20%, rgba(255, 244, 220, .34), transparent 62%),
    linear-gradient(180deg, #8fa6bb 0%, #b8c4c9 42%, #cbbca4 70%, #a17a54 100%);
}
.battle-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 90% at 18% 76%, rgba(255, 255, 255, .22), transparent 70%),
    radial-gradient(36% 80% at 66% 82%, rgba(255, 255, 255, .16), transparent 70%);
}
.battle-city {
  position: absolute;
  left: 0; right: 0; top: 15.5%;
  height: 13%;
  background: url('images/gen/city.png') center 42% / cover no-repeat;
  filter: saturate(.76) brightness(.92) contrast(1.05);
  opacity: .92;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 84%, transparent 100%);
}
.battle-table {
  position: absolute;
  left: 0; right: 0; top: 24.5%; bottom: 0;
  background:
    linear-gradient(180deg, rgba(24, 12, 7, .22), rgba(15, 8, 5, .34)),
    url('images/gen/wood_tile.png') center / 400px 270px repeat;
  border-top: 3px solid #2d190e;
  box-shadow:
    inset 0 10px 28px rgba(0, 0, 0, .45),
    inset 0 -28px 70px rgba(0, 0, 0, .5);
}
.battle-table::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14px;
  background: linear-gradient(180deg, #70492b, #3c2415 60%, #2a170d);
  box-shadow: 0 3px 7px rgba(0, 0, 0, .5);
  opacity: .9;
}
.battle-table::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 46% at 50% 34%, rgba(255, 172, 84, .13), transparent 70%),
    linear-gradient(180deg, transparent 40%, rgba(10, 5, 3, .36) 100%);
}
.battle-embers {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 194, 100, .6) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 124, 52, .45) 0 1px, transparent 1.5px);
  background-size: 131px 173px, 197px 229px;
  opacity: .38;
  animation: emberDrift 17s linear infinite;
}
.battle-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(82% 70% at 50% 44%, transparent 46%, rgba(4, 2, 1, .56) 100%),
    linear-gradient(180deg, rgba(6, 3, 2, .28), transparent 18%, transparent 80%, rgba(6, 3, 2, .35));
}

.duel-top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  padding: calc(8px + var(--safe-top)) 12px 0;
  flex: 0 0 auto;
}
.round-badge {
  padding: 5px 12px 5px 14px;
  color: #eaddc2;
  font-size: 12px;
  letter-spacing: .5px;
  background: linear-gradient(180deg, rgba(38, 23, 15, .9), rgba(18, 10, 7, .88));
  border: 1px solid rgba(207, 167, 98, .4);
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  text-shadow: 0 1px 2px #000;
}
.first-banner {
  position: absolute;
  left: 50%;
  top: calc(5px + var(--safe-top));
  transform: translateX(-50%);
  width: 176px;
  text-align: center;
  z-index: 11;
}
.first-banner b {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 7px;
  color: #f4d68c;
  text-shadow: 0 2px 0 #5d3a13, 0 4px 10px rgba(0, 0, 0, .75), 0 0 18px rgba(255, 196, 92, .22);
}
.first-banner small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: 1px;
  color: #f1e4c9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.fb-wing {
  position: absolute;
  top: 13px;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 190, 118, .8));
}
.fb-wing::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(238, 203, 137, .8);
  transform: rotate(45deg);
}
.fb-left { right: 100%; margin-right: 4px; }
.fb-right { left: 100%; margin-left: 4px; transform: scaleX(-1); }
.duel-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #e8d3a4;
  background: linear-gradient(150deg, rgba(48, 60, 50, .9), rgba(20, 26, 20, .92));
  border: 1px solid rgba(212, 176, 106, .5);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 236, 190, .2);
}
.duel-close .mp-icon { width: 18px; height: 18px; }

.duelers {
  position: relative;
  z-index: 9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px 0;
  flex: 0 0 auto;
}
.dueler {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 49%;
  min-width: 0;
}
.dueler-avatar {
  width: 47px;
  height: 47px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff6df;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  border: 2px solid #c9a45c;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 225, 160, .25), transparent 55%),
    linear-gradient(145deg, var(--g1, #5b96ff), var(--g2, #2254d4));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(20, 10, 5, .45);
  overflow: hidden;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}
.dueler-avatar span { line-height: 1; }
.side-enemy .dueler-avatar { border-color: #b35445; }
.dueler-info { flex: 1; min-width: 0; }
.side-enemy .dueler-info { text-align: right; }
.dueler-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.side-enemy .dueler-name { justify-content: flex-end; }
.dueler-name strong {
  font-size: 15px;
  font-weight: 700;
  color: #fffaf0;
  letter-spacing: .5px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .9);
  white-space: nowrap;
}
.dueler-name .kd {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff7e5;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  flex: 0 0 auto;
}
.hand-hint {
  font-size: 9px;
  color: rgba(241, 220, 184, .72);
  white-space: nowrap;
  margin-left: 2px;
}
.hp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}
.side-enemy .hp-row { justify-content: flex-end; }
.hp-bar {
  position: relative;
  display: block;
  flex: 1;
  max-width: 92px;
  height: 7px;
  border-radius: 99px;
  background: rgba(15, 8, 5, .75);
  border: 1px solid rgba(221, 186, 124, .24);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.hp-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9362b, #e2693f 58%, #f3a561);
  box-shadow: 0 0 6px rgba(235, 92, 58, .45);
  transition: width .35s ease;
}
.hp-text {
  font-size: 10.5px;
  font-weight: 700;
  color: #f2e3c8;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}
.hearts {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 13px;
  margin-top: 2px;
}
.side-enemy .hearts { justify-content: flex-end; }
.hearts .mp-icon {
  width: 12px;
  height: 12px;
  color: #e54737;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
}
.hearts .mp-icon.lost { color: rgba(82, 58, 48, .8); filter: none; }
.equip-line {
  font-size: 9px;
  line-height: 1.2;
  color: rgba(241, 211, 154, .68);
  min-height: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.equip-line:empty { display: none; }

.phase-ribbon {
  position: relative;
  z-index: 9;
  display: flex;
  margin: 8px 12px 0;
  padding: 3px;
  background: linear-gradient(180deg, rgba(35, 21, 14, .94), rgba(19, 11, 8, .94));
  border: 1px solid rgba(201, 158, 88, .38);
  border-radius: 4px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 231, 178, .1);
  gap: 2px;
}
.phase-ribbon span {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 29px;
  color: #b9a88d;
  font-size: 12.5px;
  letter-spacing: 2px;
  clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
  transition: color .2s ease, background .2s ease;
}
.phase-ribbon span b { font-weight: 600; }
.phase-ribbon span.is-done { color: #cfb98f; }
.phase-ribbon span.is-done::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 14px;
  height: 1px;
  background: rgba(212, 173, 104, .5);
}
.phase-ribbon span.is-active {
  color: #432906;
  background: linear-gradient(180deg, #ffe9ae 0%, #eccb7d 42%, #c9973d 100%);
  text-shadow: 0 1px 0 rgba(255, 248, 214, .6);
  box-shadow: 0 2px 8px rgba(255, 190, 80, .18), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.phase-ribbon span.is-active b { font-weight: 800; }

.stage-hint {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  z-index: 9;
  margin: 6px 15px 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: #ecd9b4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
  min-height: 16px;
}

.table-zone {
  position: absolute;
  left: 0; right: 0;
  top: 31%;
  bottom: 168px;
  z-index: 3;
}
.deck-pile {
  position: absolute;
  left: 11px;
  top: 1px;
  width: 47px;
  height: 70px;
  z-index: 4;
}
.deck-pile .back {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: url('images/gen/card_back_clean.png') center / cover no-repeat;
  border: 1px solid rgba(201, 164, 100, .55);
  box-shadow: 0 4px 9px rgba(0, 0, 0, .5);
}
.deck-pile .back::after,
.draw-show .back::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 224, 154, .16);
  border-radius: 3px;
}
.deck-pile b {
  position: absolute;
  right: -6px;
  bottom: -5px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: linear-gradient(180deg, #2c1a10, #100906);
  border: 1px solid rgba(219, 177, 103, .6);
  color: #f5dfb4;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.draw-show {
  position: absolute;
  left: 50%;
  top: 88px;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.draw-show.show { opacity: 1; }
.draw-show .back {
  position: relative;
  width: 68px;
  height: 100px;
  border-radius: 5px;
  background: url('images/gen/card_back_clean.png') center / cover no-repeat;
  border: 1px solid rgba(228, 190, 112, .78);
  box-shadow: 0 0 18px rgba(255, 190, 84, .55), 0 6px 12px rgba(0, 0, 0, .5);
  animation: drawGlow 1.5s ease-in-out infinite;
}
.draw-show .back:nth-child(2) { animation-delay: .35s; }
@keyframes drawGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 190, 84, .35), 0 6px 12px rgba(0, 0, 0, .5); transform: translateY(0); }
  50% { box-shadow: 0 0 26px rgba(255, 202, 100, .8), 0 6px 12px rgba(0, 0, 0, .5); transform: translateY(-3px); }
}
.limit-panel {
  position: absolute;
  right: 10px;
  top: 2px;
  width: 114px;
  padding: 8px 8px 7px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(28, 17, 11, .93), rgba(16, 9, 6, .94));
  border: 1px solid rgba(198, 158, 92, .42);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 231, 178, .12);
  color: #e8d3b0;
}
.limit-panel h4 {
  margin: 0 0 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(198, 158, 92, .22);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #f0dcb8;
  text-align: left;
}
.limit-panel div {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 19px;
  font-size: 9.5px;
  line-height: 1.1;
  color: #cdbb9f;
}
.limit-panel div .mp-icon { width: 12px; height: 12px; color: #e3c78f; flex: 0 0 auto; }
.limit-panel div span { flex: 1; }
.limit-panel div b { color: #f7e5bd; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.table-seal {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(-9deg);
  font-family: var(--serif);
  font-size: 118px;
  font-weight: 900;
  color: rgba(238, 195, 118, .075);
  text-shadow: 0 0 30px rgba(238, 195, 118, .06);
  pointer-events: none;
}

/* 手牌 */
.hand-zone {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(4px + var(--safe-bottom));
  height: 170px;
  z-index: 8;
  pointer-events: none;
}
.hand {
  position: absolute;
  left: 0; right: 48px;
  bottom: 16px;
  height: 132px;
  pointer-events: none;
}
.hand-empty {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(232, 211, 176, .62);
  white-space: nowrap;
}
.hand-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 76px;
  height: 114px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, #f8efd9 0%, #efe1c2 58%, #dfc9a3 100%);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, .5),
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 0 0 1px #a88a56;
  transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--x, 0px))) translateY(var(--y, 0px)) rotate(var(--rot, 0deg));
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  pointer-events: auto;
  overflow: hidden;
  color: #1c1710;
}
.hand-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(125, 95, 48, .38);
  border-radius: 4px;
  pointer-events: none;
}
.hand-card:active { filter: brightness(.94); }
.hand-card.is-selected {
  transform: translateX(calc(-50% + var(--x, 0px))) translateY(calc(var(--y, 0px) - 19px)) rotate(var(--rot, 0deg)) scale(1.06);
  box-shadow: 0 12px 22px rgba(0, 0, 0, .55), 0 0 0 2px #f1c96e, 0 0 24px rgba(255, 190, 80, .5);
  z-index: 5;
}
.hand-card.disabled { filter: brightness(.72) saturate(.8); }
.hand-card.discard-sel {
  transform: translateX(calc(-50% + var(--x, 0px))) translateY(calc(var(--y, 0px) - 17px)) rotate(var(--rot, 0deg));
  box-shadow: 0 0 0 2px #d95445, 0 0 20px rgba(220, 70, 55, .4);
}
.hc-corner {
  position: absolute;
  z-index: 4;
  left: 5px;
  top: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .9;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: #1d1913;
}
.hc-corner .suit { font-size: 14px; }
.hc-corner .rank { font-size: 10px; margin-top: 2px; }
.hc-corner.red { color: #bd2e28; }
.hc-title {
  position: absolute;
  z-index: 4;
  left: 24px;
  right: 4px;
  top: 4px;
  text-align: center;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  color: #18130d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.hc-title.long { left: 20px; right: 3px; font-size: 9.5px; line-height: 1.06; letter-spacing: 0; white-space: normal; word-break: break-all; }
.hc-title.longer { left: 20px; right: 3px; font-size: 8.1px; line-height: 1.08; letter-spacing: -0.35px; white-space: normal; word-break: break-all; }
.hc-art {
  position: absolute;
  z-index: 2;
  left: 4px;
  right: 4px;
  top: 31px;
  bottom: 4px;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(160deg, #5f4a33, #2e2118);
  box-shadow: inset 0 0 0 1px rgba(112, 78, 40, .3);
}
.hc-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.88) contrast(1.02);
}
.hc-art.generic {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 236, 190, .24), transparent 56%),
    linear-gradient(150deg, var(--g1, #6b4a2e), var(--g2, #24150f));
}
.hc-art.generic .mp-icon {
  width: 38px;
  height: 38px;
  color: rgba(255, 241, 210, .28);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}
.hc-art.generic b {
  position: absolute;
  bottom: 4px;
  right: 5px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  color: rgba(255, 238, 202, .17);
}
.hand-card.long-card .hc-art { top: 43px; }
.hand-card.long-card .hc-title { top: 3px; line-height: 1.02; }
.hand-card.is-trick { background: linear-gradient(180deg, #f6ecd6 0%, #eadcc0 64%, #dcc5a0 100%); }
.hand-card.is-equip { background: linear-gradient(180deg, #f5e7c9 0%, #e6d3ad 64%, #d1b98f 100%); }

.hand-count {
  position: absolute;
  left: 11px;
  bottom: 3px;
  min-width: 46px;
  height: 31px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(30, 18, 12, .92), rgba(12, 7, 5, .94));
  border: 1px solid rgba(201, 162, 96, .38);
  color: #f0dcb6;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .4);
}
.hand-count .mp-icon { width: 14px; height: 14px; color: #e8ce9b; }
.hand-count b { font-size: 13px; }
.discard-pile {
  position: absolute;
  right: 4px;
  bottom: 1px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #d8c3a0;
  font-size: 9.5px;
  text-shadow: 0 1px 2px #000;
}
.discard-pile .dp-label { letter-spacing: .5px; }
.discard-pile .back {
  position: relative;
  width: 34px;
  height: 52px;
  border-radius: 4px;
  background: url('images/gen/card_back_clean.png') center / cover no-repeat;
  border: 1px solid rgba(201, 164, 100, .45);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  opacity: .92;
}
.discard-pile b {
  position: absolute;
  right: 1px;
  bottom: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: #160d08;
  border: 1px solid rgba(213, 173, 101, .55);
  color: #f3ddb1;
  font-size: 9.5px;
}

.duel-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(176px + var(--safe-bottom));
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(30, 18, 12, .9), rgba(14, 8, 5, .92));
  border: 1px solid rgba(201, 161, 94, .36);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .4);
  transition: opacity .2s ease, transform .2s ease;
}
.duel-actions.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.act-end, .act-use {
  height: 37px;
  padding: 0 11px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .14s ease, filter .14s ease;
}
.act-end {
  color: #e8d3ab;
  background: linear-gradient(180deg, #3a2417, #1c100a);
  border: 1px solid rgba(206, 166, 98, .45);
}
.act-end .mp-icon { width: 15px; height: 15px; }
.act-limit {
  height: 37px;
  padding: 0 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: #e5cfa8;
  background: linear-gradient(180deg, #3a2417, #1c100a);
  border: 1px solid rgba(206, 166, 98, .45);
  transition: transform .14s ease, filter .14s ease, box-shadow .2s ease, border-color .2s ease;
}
.act-limit .mp-icon { width: 15px; height: 15px; }
.act-limit:disabled { opacity: .45; filter: grayscale(.35); }
.act-limit.is-ready {
  color: #3f2607;
  border-color: rgba(255, 236, 184, .85);
  background: linear-gradient(180deg, #ffe9a8, #dda94e 55%, #a97224);
  box-shadow: 0 0 14px rgba(255, 196, 92, .55), inset 0 1px 0 rgba(255, 252, 226, .8);
  animation: limitReady 1.8s ease-in-out infinite;
}
.act-limit.is-ready:active { transform: scale(.94); }
.act-use {
  margin-left: auto;
  color: #3d2507;
  background: linear-gradient(180deg, #ffe6a4, #e0b45e 55%, #b57c28);
  border: 1px solid rgba(255, 234, 180, .62);
  box-shadow: inset 0 1px 0 rgba(255, 252, 226, .65), 0 3px 8px rgba(0, 0, 0, .3);
}
.act-use:disabled { filter: grayscale(.6) brightness(.68); }
.act-end:disabled { opacity: .45; }
.act-end:active, .act-use:active { transform: scale(.96); }
.act-info {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1.25;
  color: #cdb997;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.act-info b { color: #f3ddb0; font-weight: 700; }
.act-info em { color: #e08a73; font-style: normal; }
.act-info span { color: #b7a386; }

.battle-sound { display: none !important;
  position: absolute;
  z-index: 9;
  right: 12px;
  top: calc(52px + var(--safe-top));
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(240, 218, 174, .8);
  background: rgba(22, 13, 9, .6);
  border: 1px solid rgba(201, 161, 94, .25);
}
.battle-sound .mp-icon { width: 14px; height: 14px; }
.stage-log { display: none; }
.play-flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
}
.play-flash.flash { animation: playFlash .45s ease-out; }
@keyframes playFlash {
  0% { opacity: .8; background: radial-gradient(circle at 50% 52%, rgba(255, 238, 190, .9), transparent 55%); }
  100% { opacity: 0; background: radial-gradient(circle at 50% 52%, transparent, transparent 70%); }
}

/* ============================================================
   选将面板
   ============================================================ */
.hero-sheet-modal .modal-mask { background: rgba(5, 3, 2, .72); }
.hero-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 82%;
  padding: 8px 15px calc(18px + var(--safe-bottom));
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(90, 55, 30, .6), transparent 56%),
    linear-gradient(180deg, #24150e, #120a07 82%);
  border-top: 1px solid rgba(215, 175, 105, .45);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .55);
  transform: translateY(102%);
  transition: transform .28s cubic-bezier(.22, .8, .24, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.is-open .hero-sheet { transform: translateY(0); }
.hero-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 10px;
}
.hero-sheet-head h3 { margin: 2px 0 0; font-family: var(--serif); font-size: 19px; letter-spacing: 2px; color: #f2dbaa; }
.hero-sheet-head .panel-kicker { font-size: 9px; letter-spacing: 2px; color: #b99a68; }
.hero-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.hero-sheet-card {
  position: relative;
  aspect-ratio: .78;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 100, .35);
  background: linear-gradient(150deg, var(--g1, #46321f), var(--g2, #1a100a));
  box-shadow: 0 5px 10px rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hero-sheet-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-sheet-card .hsc-glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  color: rgba(255, 240, 205, .9);
  text-shadow: 0 3px 8px rgba(0, 0, 0, .65);
}
.hero-sheet-card .hsc-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 5px 5px;
  background: linear-gradient(to top, rgba(7, 4, 2, .95), transparent);
  text-align: center;
}
.hero-sheet-card strong { display: block; font-size: 12px; color: #fff8e8; }
.hero-sheet-card small { display: block; margin-top: 1px; font-size: 8.5px; color: #cdb894; }
.hero-sheet-card.is-selected { box-shadow: 0 0 0 2px #ecc36d, 0 0 18px rgba(238, 188, 92, .4); }
.hero-sheet-card:active { transform: scale(.96); }
.hero-sheet-note {
  margin: 11px 2px 0;
  font-size: 10px;
  color: #bda98b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero-sheet-note .mp-icon { width: 13px; height: 13px; color: #c9a45c; }

/* ============================================================
   其他页面暖色覆盖
   ============================================================ */
.screen:not(.screen-home-v2):not(.battle-screen) {
  background:
    radial-gradient(100% 56% at 50% 0%, rgba(104, 61, 31, .4), transparent 62%),
    #130b08;
}
.subhead {
  background: linear-gradient(180deg, rgba(40, 24, 15, .96), rgba(19, 11, 8, .82) 78%, transparent);
  border-bottom: 1px solid rgba(201, 161, 94, .16);
}
.subhead-title h1 { color: #f3dfb4; }
.subhead-title span { color: #b59464; }
.icon-btn {
  color: #ecd8ae;
  background: rgba(37, 22, 14, .8);
  border: 1px solid rgba(201, 161, 94, .3);
}
.mode-badge, .codex-count {
  color: #e6cd9c;
  background: rgba(41, 25, 16, .8);
  border: 1px solid rgba(201, 161, 94, .3);
}
.screen-scroll { background: transparent; }
.general-card, .setting-group, .mission-card, .record-item, .codex-card,
.pick-summary, .reward-card, .result-stat, .settings-card {
  background: linear-gradient(160deg, rgba(48, 30, 19, .92), rgba(22, 13, 9, .96));
  border-color: rgba(201, 161, 94, .22);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
}
.select-tip, .select-note, .result-tip {
  background: rgba(38, 23, 15, .82);
  border-color: rgba(201, 161, 94, .2);
  color: #d7c3a2;
}
.cta {
  background: linear-gradient(180deg, #ffe4a0, #d8a94d 58%, #a97224);
  color: #3d2507;
  box-shadow: 0 8px 22px rgba(255, 180, 70, .18), inset 0 1px 0 rgba(255, 252, 226, .7);
}
.cta small, .cta strong, .cta .mp-icon { color: #3d2507; }
.ghost-btn {
  color: #e5cea4;
  background: rgba(37, 22, 14, .82);
  border: 1px solid rgba(201, 161, 94, .3);
}
.use-btn {
  color: #3d2507;
  background: linear-gradient(180deg, #ffe4a0, #d8a94d 58%, #a97224);
  border: 1px solid rgba(255, 238, 190, .55);
}
.danger-btn { color: #ffd8cf; background: rgba(94, 31, 24, .42); border-color: rgba(204, 86, 68, .4); }
.tabbar { background: rgba(19, 11, 8, .96); border-top: 1px solid rgba(201, 161, 94, .2); }
.tab-btn { color: #89755c; }
.tab-btn.is-active { color: #f0d49a; }
.settings-scroll, .missions-scroll, .codex-scroll, .records-scroll { background: transparent; }
.modal-card, .rules-sheet {
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(96, 58, 30, .32), transparent 60%),
    linear-gradient(180deg, #2a1a11, #130b08);
  border-color: rgba(201, 161, 94, .3);
}
.rules-sheet { border-radius: 18px 18px 0 0; }
.modal-card h3, .rules-sheet h3 { color: #f3dfb4; }
.modal-card p, .rules-sheet p { color: #cdbb9f; }
.sheet-handle { background: rgba(201, 161, 94, .3); }
.result-wrap { background: transparent; }
.result-badge { background: radial-gradient(circle at 34% 28%, #ffe7a8, #c08a2d 62%, #6f4312); }
.toast { background: rgba(24, 14, 9, .96); border-color: rgba(215, 177, 106, .4); color: #f4e2bd; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-height: 760px) {
  .home-logo { width: min(62vw, 280px); }
  .home-hero { height: 30vh; }
  .home-body { height: 34vh; bottom: 44%; }
  .home-panel { margin-bottom: 2.2vh; padding: 10px 12px calc(11px + var(--safe-bottom)); }
  .home-panel-title { font-size: 16px; margin-bottom: 8px; }
  .hero-picks { gap: 10px; }
  .start-duel { height: 46px; font-size: 17px; margin-top: 9px; }
  .pick-name { font-size: 18px; }
  .pick-kingdom { width: 23px; height: 23px; font-size: 11px; }
  .hand-zone { height: 154px; }
  .hand { height: 120px; }
  .hand-card { width: 68px; height: 102px; }
  .hc-title { font-size: 19px; }
  .duel-actions { bottom: calc(160px + var(--safe-bottom)); }
  .table-zone { bottom: 152px; }
}
@media (max-height: 660px) {
  .home-logo { width: min(58vw, 240px); }
  .home-hero { width: 58%; height: 28vh; top: 0; }
  .home-body { height: 30vh; bottom: 46%; }
  .home-panel { margin-bottom: 1.4vh; }
  .hero-pick { aspect-ratio: .82; }
  .start-duel { height: 42px; font-size: 15px; }
  .pick-name { font-size: 16px; }
  .hand-zone { height: 140px; }
  .hand { height: 108px; }
  .hand-card { width: 62px; height: 94px; }
  .duel-actions { bottom: calc(146px + var(--safe-bottom)); }
  .table-zone { bottom: 138px; top: 33%; }
  .limit-panel { width: 116px; padding: 6px 7px; }
  .phase-ribbon span { min-height: 26px; font-size: 11.5px; }
}
@media (max-width: 360px) {
  .home-panel { width: calc(100% - 20px); }
  .first-banner { width: 148px; }
  .first-banner b { font-size: 23px; letter-spacing: 5px; }
  .round-badge { font-size: 10px; padding: 4px 6px; }
  .duelers { padding: 2px 6px 0; }
  .dueler { gap: 4px; }
  .dueler-avatar { width: 42px; height: 42px; font-size: 21px; }
  .dueler-name strong { font-size: 14px; }
  .hand-hint { display: none; }
  .hero-picks { gap: 8px; }
  .pick-name { font-size: 17px; }
  .hand-card { width: 65px; height: 98px; }
  .hc-title { font-size: 18px; }
  .limit-panel { width: 112px; }
  .hero-sheet-grid { gap: 6px; }
}

/* ---------- 运行时修正 ---------- */
.hand { padding: 0; }
.dueler-avatar img,
.result-fighter .fighter-avatar img,
.pick-art img { display: block; }
.dueler-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.dueler.is-hit { animation: duelShake .42s ease; }
@keyframes duelShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.resp-cards { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-end; }
.resp-cards .hand-card {
  position: relative;
  left: auto;
  bottom: auto;
  width: 58px;
  height: 86px;
  transform: none !important;
  flex: 0 0 auto;
  pointer-events: none;
}
.resp-cards .hand-card .hc-title { font-size: 16px; left: 18px; }
.resp-cards .hand-card .hc-title.long { font-size: 9px; }
.resp-cards .hand-card .hc-title.longer { font-size: 8px; }
.resp-cards .hand-card .hc-corner { display: none; }
.resp-cards .hand-card .hc-art { top: 24px; }
.flash-card {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%) rotate(-7deg) scale(1.35);
  width: 78px;
  height: 116px;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .6));
  animation: flashCardIn .5s ease-out;
}
.flash-card .hand-card {
  position: relative;
  left: auto;
  bottom: auto;
  width: 78px;
  height: 116px;
  transform: none !important;
}
@keyframes flashCardIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(.6); }
  35% { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(1.3) translateY(-24px); }
}
.pick-art img[hidden], .pick-glyph[hidden] { display: none !important; }

/* ============================================================
   二级页面 · 暖金统一（对齐三国战场皮肤）
   ============================================================ */
#screen-select, #screen-result, #screen-codex, #screen-records, #screen-settings, #screen-missions {
  background:
    radial-gradient(78% 42% at 50% 0%, #3a2114 0%, transparent 64%),
    radial-gradient(56% 40% at 100% 100%, rgba(116, 38, 24, .16), transparent 62%),
    linear-gradient(180deg, #1a100a 0%, #0e0806 60%, #070403 100%);
}
.subhead {
  background: linear-gradient(180deg, rgba(26, 15, 9, .92), rgba(16, 10, 7, .55));
  border-bottom: 1px solid rgba(214, 176, 108, .14);
}
.mode-badge, .codex-count {
  color: #f0d49a;
  background: rgba(32, 20, 12, .9);
  border-color: rgba(214, 176, 108, .3);
  box-shadow: 0 4px 11px rgba(0, 0, 0, .35);
}
.icon-btn {
  background: linear-gradient(160deg, rgba(64, 41, 23, .96), rgba(22, 13, 8, .96));
  border-color: rgba(214, 176, 108, .3);
  color: #e8ce95;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 236, 190, .08);
}
.icon-btn:active { background: rgba(86, 55, 31, .98); }
.codex-tabs { background: rgba(26, 16, 10, .86); border-color: rgba(214, 176, 108, .2); }
.codex-tab { color: #a99679; }
.codex-tab.is-active {
  background: linear-gradient(180deg, rgba(96, 64, 32, .95), rgba(42, 26, 14, .98));
  color: #ffd77a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(231, 195, 119, .22);
}

.select-tip, .select-note, .record-tip, .result-tip,
.reward-card, .result-stats, .codex-general, .codex-card-row,
.record-item, .profile-card, .settings-panel, .mission-card,
.general-card, .panel {
  background: linear-gradient(160deg, rgba(48, 30, 18, .94), rgba(15, 9, 6, .98));
  border-color: rgba(214, 176, 108, .22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 236, 190, .05);
  color: var(--duel-ink);
}
.select-tip, .select-note, .record-tip, .result-tip {
  background: rgba(36, 22, 13, .82);
  border: 1px dashed rgba(214, 176, 108, .24);
}
.select-tip span, .select-note p, .record-tip p, .result-tip p { color: #c8b494; }
.select-tip .mp-icon, .select-note .mp-icon, .record-tip .mp-icon, .result-tip .mp-icon { color: #e3c78f; }
.general-card.is-selected {
  border-color: rgba(231, 195, 119, .62);
  box-shadow: 0 0 0 1px rgba(231, 195, 119, .3), 0 14px 30px rgba(0, 0, 0, .5), 0 0 22px rgba(231, 195, 119, .16);
}
.general-name span, .codex-general-info h3 span, .codex-card-info h3 span {
  color: #e9c77f;
  background: rgba(120, 82, 38, .28);
  border-color: rgba(214, 176, 108, .2);
}
.general-card .general-desc, .codex-general-info p, .codex-card-info p, .record-info p { color: #b9a98f; }
.select-dock {
  background: linear-gradient(180deg, rgba(32, 20, 12, .98), rgba(14, 9, 6, .99));
  border-top: 1px solid rgba(231, 195, 119, .18);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, .4);
}
.pick-info strong { color: #f2e6d0; }
.pick-info span, .pick-vs small { color: #a99679; }
.pick-vs span { color: #d8c39b; }

/* 成长 / 任务 / 战绩 */
.profile-card { background: linear-gradient(160deg, rgba(56, 36, 20, .96), rgba(20, 12, 8, .98)); }
.xp-bar { background: rgba(74, 52, 32, .62); }
.xp-bar span { background: linear-gradient(90deg, #f3d391, #c9973d); box-shadow: 0 0 8px rgba(231, 195, 119, .4); }
.settings-group-title { color: rgba(231, 195, 119, .64); }
.setting-row { border-bottom-color: rgba(214, 176, 108, .12); }
.setting-row:active { background: rgba(80, 52, 30, .4); }
.setting-ic { background: rgba(120, 82, 38, .28); color: #f0d49a; }
.setting-ic.gold { background: rgba(150, 104, 42, .32); color: #ffd77a; }
.setting-ic.red { background: rgba(120, 42, 32, .38); color: #ff9d90; }
.setting-ic.green { background: rgba(62, 92, 58, .4); color: #a9d89a; }
.switch { background: rgba(74, 54, 38, .7); }
.switch.on { background: linear-gradient(90deg, #e7c377, #b9822f); box-shadow: 0 0 10px rgba(231, 195, 119, .35); }
.seg { background: rgba(20, 12, 8, .9); }
.seg button { color: #a99679; }
.seg button.on { background: linear-gradient(180deg, rgba(96, 64, 32, .95), rgba(40, 25, 14, .98)); color: #ffd77a; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.danger-btn { background: rgba(94, 31, 24, .42); border-color: rgba(204, 86, 68, .4); color: #ffb3a5; }
.danger-btn:active { background: rgba(120, 40, 30, .56); }

.mission-hero, .record-hero {
  background:
    radial-gradient(120% 120% at 92% 0%, rgba(188, 74, 42, .46), transparent 55%),
    linear-gradient(130deg, #5e2a1c, #24110b 72%, #160a06);
  border: 1px solid rgba(214, 176, 108, .24);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}
.mission-hero p, .mission-hero-stats small, .mission-kicker,
.record-hero p, .record-rate span, .record-metrics small { color: rgba(238, 216, 180, .68); }
.mission-hero-stats b { color: #ffd77a; }
.mission-claim {
  background: linear-gradient(180deg, #ffe4a0, #d8a94d 58%, #a97224);
  color: #3d2507;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.mission-state { background: rgba(66, 48, 34, .6); color: #c8b494; }
.mission-state.done { background: rgba(38, 74, 54, .55); color: #8de5c1; }
.mission-state .mp-icon { color: #a99679; }
.record-mode { color: #e3c78f; background: rgba(96, 64, 32, .38); }
.record-result.win { color: #8de5c1; background: rgba(21, 74, 58, .55); }
.record-result.lose { color: #d3b7a0; background: rgba(92, 50, 38, .55); }
.empty-ic { background: rgba(120, 82, 38, .26); color: #e3c78f; }

/* 结算 */
.result-wrap h1.lose { background: linear-gradient(180deg, #e6d2c0, #a57f62); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-kicker { color: rgba(231, 195, 119, .72); }
.result-desc { color: #c8b494; }
.result-fighter small { color: #a99679; }
.result-vs { color: #d8c39b; }
.result-stats span { color: #b9a98f; }
.result-stats strong { color: #f3ddae; }
.result-stats div + div::before { background: linear-gradient(transparent, rgba(214, 176, 108, .22), transparent); }
.reward-line small { color: #b9a98f; }
.reward-line + .reward-line { border-top-color: rgba(231, 195, 119, .16); }
.reward-ic.blue { background: rgba(90, 120, 170, .18); color: #9fc0f0; }
.result-tip { background: rgba(34, 21, 13, .8); border: 1px dashed rgba(214, 176, 108, .24); }
.result-ad {
  background: linear-gradient(120deg, rgba(40, 25, 15, .96), rgba(20, 12, 8, .98));
  border-color: rgba(231, 195, 119, .28);
}
.result-ad-tx small { color: #b9a98f; }
.result-wrap .ghost-btn.wide { background: linear-gradient(160deg, rgba(48, 30, 18, .95), rgba(20, 12, 8, .98)); }
.mission-card.is-ready {
  border-color: rgba(231, 195, 119, .5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 18px rgba(231, 195, 119, .08);
}
.mission-card.is-done { background: linear-gradient(160deg, rgba(42, 28, 18, .88), rgba(14, 9, 6, .96)); opacity: .82; }
.mission-ic { background: rgba(120, 82, 38, .3); color: #e3c78f; }
.mission-ic.won { background: rgba(150, 104, 42, .38); color: #ffd77a; }
.mission-main p { color: #b9a98f; }
.mission-progress { background: rgba(74, 52, 32, .55); }
.mission-progress span { background: linear-gradient(90deg, #e7c377, #a97224); box-shadow: 0 0 6px rgba(231, 195, 119, .35); }
.mission-sub { color: #a99679; }
.mission-foot, .settings-foot { color: #8f7c64; }

/* ============================================================
   弹层 · 暖金统一
   ============================================================ */
.modal-mask { background: rgba(4, 2, 1, .74); }
.response-sheet {
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(104, 62, 30, .34), transparent 62%),
    linear-gradient(175deg, #2a1a11, #140c08 70%, #0b0604);
  border-color: rgba(214, 176, 108, .3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .62);
}
.resp-copy h3 { color: #f4ead6; }
.resp-copy p { color: #c8b494; }
.resp-kicker { color: #e7c377; }
.resp-icon { background: rgba(150, 52, 40, .24); border-color: rgba(204, 86, 68, .3); color: #ff9d90; }
.countdown { background: rgba(74, 52, 32, .55); }
.countdown span { background: linear-gradient(90deg, #e7c377, #d05a3c); }
.pause-seal { background: linear-gradient(145deg, #f6d47c, #b77c21); color: #2a1603; }
.pause-card h3, .confirm-card h3, .revive-card h3, .sheet-head h3 { color: #f3dfb4; }
.pause-card p, .confirm-card p, .revive-card > p { color: #c8b494; }
.confirm-icon { background: rgba(120, 82, 38, .28); color: #f0d49a; }
.confirm-icon.danger { background: rgba(150, 52, 40, .28); color: #ff9d90; }
.rule-block { border-bottom-color: rgba(214, 176, 108, .12); }
.rule-block h4 { color: #efdfc0; }
.rule-block p { color: #b9a98f; }
.rule-no { background: rgba(120, 82, 38, .28); color: #e3c78f; }
.rules-tip { background: rgba(70, 48, 24, .55); border-color: rgba(231, 195, 119, .22); }
.rules-tip span { color: #d6bd8e; }
.revive-icon { background: rgba(150, 52, 40, .24); border-color: rgba(204, 86, 68, .3); color: #ff9d90; }
.revive-opt { background: linear-gradient(160deg, rgba(52, 33, 20, .96), rgba(18, 11, 7, .98)); border-color: rgba(214, 176, 108, .18); }
.revive-opt.ad { background: linear-gradient(120deg, rgba(58, 37, 22, .96), rgba(20, 12, 8, .98)); border-color: rgba(214, 176, 108, .26); }
.revive-opt.coin { background: linear-gradient(120deg, rgba(82, 55, 22, .72), rgba(22, 14, 9, .98)); border-color: rgba(231, 195, 119, .28); }
.revive-opt-tx strong { color: #f0e2c8; }
.revive-opt-tx small { color: #b9a98f; }
.revive-opt-ic { background: rgba(120, 82, 38, .28); color: #f0d49a; }
.revive-opt.coin .revive-opt-ic { background: rgba(231, 195, 119, .18); color: #ffd77a; }
.revive-opt-tag { background: rgba(120, 82, 38, .28); color: #e3c78f; }
.revive-note { color: #a99679; }
.reward-preview-card { background: linear-gradient(160deg, rgba(52, 33, 20, .92), rgba(18, 11, 7, .96)); border-color: rgba(214, 176, 108, .18); }
.reward-preview-copy p, .reward-preview-note span { color: #b9a98f; }
.reward-preview-note { background: rgba(34, 21, 13, .64); border-color: rgba(214, 176, 108, .18); }
.reward-preview-ic.blue { background: rgba(90, 120, 170, .18); color: #9fc0f0; }
.ad-card { border-color: rgba(214, 176, 108, .24); }

@media (max-width: 380px) {
  .draw-show { left: 47%; gap: 9px; top: 80px; }
  .draw-show .back { width: 58px; height: 86px; }
  .limit-panel { width: 108px; }
}
@media (max-width: 340px) {
  .draw-show { left: 44%; gap: 6px; }
  .draw-show .back { width: 52px; height: 78px; }
  .limit-panel { width: 100px; }
}

/* ============================================================
   限定技按钮 / 武将语音字幕
   ============================================================ */
.limit-act {
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 99px;
  border: 1px solid rgba(216, 176, 105, .45);
  background: linear-gradient(180deg, rgba(64, 41, 22, .92), rgba(30, 17, 10, .94));
  color: #d9bd8d;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: transform .14s ease, box-shadow .2s ease, border-color .2s ease;
}
.limit-act .mp-icon { width: 11px; height: 11px; flex: 0 0 auto; }
.limit-act span { overflow: hidden; text-overflow: ellipsis; }
.limit-act:disabled { opacity: .42; filter: grayscale(.35); }
.limit-act.is-ready {
  color: #412705;
  border-color: rgba(255, 233, 175, .8);
  background: linear-gradient(180deg, #ffe9a8, #dda94e 55%, #a97224);
  box-shadow: 0 0 12px rgba(255, 196, 92, .55), inset 0 1px 0 rgba(255, 252, 226, .7);
  animation: limitReady 1.8s ease-in-out infinite;
}
.limit-act.is-ready:active { transform: scale(.94); }
@keyframes limitReady {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 196, 92, .34), inset 0 1px 0 rgba(255, 252, 226, .7); }
  50% { box-shadow: 0 0 18px rgba(255, 205, 105, .72), inset 0 1px 0 rgba(255, 252, 226, .9); }
}

.voice-line {
  position: fixed;
  left: 50%;
  bottom: calc(196px + var(--safe-bottom));
  z-index: 80;
  transform: translate(-50%, 10px);
  max-width: min(82vw, 380px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 11, 7, .96), rgba(8, 4, 3, .97));
  border: 1px solid rgba(218, 178, 108, .5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 232, 183, .12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.voice-line.is-show { opacity: 1; transform: translate(-50%, 0); }
.voice-line .vl-side {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #3b2407;
  background: linear-gradient(180deg, #ffe6a5, #d6a84f);
}
.voice-line .vl-side.is-ai { color: #ffe3d8; background: linear-gradient(180deg, #8d3429, #571a15); }
.voice-line p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #f2e3c7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* ============================================================
   限定技 · 爆发演出（竖版卡面 + 半身出框 + 残影光轨）
   ============================================================ */
.limit-burst {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(72% 58% at 50% 46%, rgba(30, 8, 40, .42), rgba(3, 2, 4, .93) 72%, #000 100%);
}
.limit-burst.is-open { display: grid; animation: lbIn .18s ease-out; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-void {
  position: absolute; inset: -20%;
  background:
    radial-gradient(42% 40% at 50% 48%, var(--lb-glow, rgba(160, 100, 255, .28)), transparent 68%),
    repeating-conic-gradient(from 0deg at 50% 48%, rgba(255, 255, 255, .03) 0deg 2deg, transparent 2deg 16deg);
  animation: lbVoid 8s linear infinite;
}
@keyframes lbVoid { to { transform: rotate(14deg) scale(1.04); } }
.lb-flash {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 58%);
  opacity: 0;
  animation: lbFlash 2.7s ease-out forwards;
}
@keyframes lbFlash {
  0% { opacity: 0; }
  7% { opacity: .95; }
  16% { opacity: .18; }
  24% { opacity: .72; }
  40% { opacity: .1; }
  100% { opacity: 0; }
}
.lb-storm { position: absolute; inset: 0; overflow: hidden; }
.lb-storm i {
  position: absolute; top: -30%; left: 50%;
  width: 2px; height: 150%;
  background: linear-gradient(180deg, transparent, var(--lb-trail, #b07cff) 30%, rgba(255, 255, 255, .95) 50%, var(--lb-trail, #b07cff) 68%, transparent);
  filter: blur(.5px) drop-shadow(0 0 10px var(--lb-trail, #b07cff));
  opacity: 0;
  transform-origin: 50% 0;
  animation: lbBolt 1.5s ease-out forwards;
}
.lb-storm i:nth-child(1) { transform: rotate(18deg) translateY(-8%); animation-delay: .06s; }
.lb-storm i:nth-child(2) { transform: rotate(-24deg) translateY(-14%); animation-delay: .18s; }
.lb-storm i:nth-child(3) { transform: rotate(38deg) translateY(-4%); animation-delay: .1s; }
.lb-storm i:nth-child(4) { transform: rotate(-8deg) translateY(-18%); animation-delay: .26s; }
.lb-storm i:nth-child(5) { transform: rotate(-48deg) translateY(-2%); animation-delay: .34s; }
@keyframes lbBolt {
  0% { opacity: 0; transform-origin: 50% 0; }
  18% { opacity: .9; }
  32% { opacity: .15; }
  46% { opacity: .75; }
  100% { opacity: 0; }
}
.lb-particles { position: absolute; inset: 0; pointer-events: none; }
.lb-particles i {
  position: absolute; left: 50%; top: 48%;
  width: var(--s, 3px); height: var(--s, 3px);
  border-radius: 50%;
  background: var(--lb-trail, #b07cff);
  box-shadow: 0 0 8px var(--lb-trail, #b07cff), 0 0 18px rgba(255, 255, 255, .35);
  animation: lbParticle var(--d, 1.4s) cubic-bezier(.16, .7, .3, 1) var(--delay, 0s) forwards;
}
@keyframes lbParticle {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 40px), var(--dy, -120px)) scale(.1); }
}
.lb-shock { position: absolute; inset: 0; place-items: center; display: grid; pointer-events: none; }
.lb-shock i {
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 2px solid var(--lb-trail, #b07cff);
  box-shadow: 0 0 30px var(--lb-trail, #b07cff), inset 0 0 26px var(--lb-trail, #b07cff);
  opacity: 0;
  animation: lbShock 1.5s ease-out forwards;
}
.lb-shock i:nth-child(2) { animation-delay: .18s; }
.lb-shock i:nth-child(3) { animation-delay: .36s; }
@keyframes lbShock {
  0% { opacity: .9; transform: scale(.35); }
  70% { opacity: .28; }
  100% { opacity: 0; transform: scale(3.3); }
}

.lb-card {
  position: relative;
  z-index: 3;
  width: min(74vw, 292px);
  aspect-ratio: .58;
  max-height: 62vh;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a120d, #0a0605);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 226, 160, .12);
  animation: lbCard 2.7s cubic-bezier(.17, .84, .26, 1) forwards;
  isolation: isolate;
}
@keyframes lbCard {
  0% { opacity: 0; transform: scale(.72) translateY(26px) rotate(-2deg); }
  10% { opacity: 1; transform: scale(1.04) translateY(0) rotate(0); }
  16% { transform: scale(1) translateY(0); }
  84% { transform: scale(1.01) translateY(-3px); }
  100% { opacity: 0; transform: scale(1.03) translateY(-12px); }
}
.lb-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 2px solid var(--lb-frame, #d9ac58);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 207, .18), inset 0 0 40px rgba(0, 0, 0, .5);
  pointer-events: none;
  z-index: 6;
}
.lb-art { position: absolute; inset: 5px; border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 50% 30%, var(--lb-glow, rgba(160,100,255,.4)), #070404 72%); }
.lb-glyph {
  position: absolute; left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 150px;
  font-weight: 900;
  color: rgba(255, 232, 180, .14);
  text-shadow: 0 0 26px var(--lb-trail, #b07cff);
}
.lb-hero {
  position: absolute; left: 50%; bottom: -8%;
  width: 126%; height: 88%;
  transform: translateX(-50%);
  background-position: center 12%;
  background-size: cover;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .75)) saturate(1.05) contrast(1.06);
  z-index: 3;
}
.lb-hero.is-glyph {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 190px;
  font-weight: 900;
  color: #f6e9c6;
  text-shadow: 0 0 18px var(--lb-trail, #b07cff), 0 0 50px var(--lb-trail, #b07cff), 0 8px 0 rgba(0, 0, 0, .35);
  background: radial-gradient(ellipse at 50% 36%, rgba(255, 240, 200, .18), transparent 64%);
}
.lb-clone {
  position: absolute; left: 50%; bottom: -8%;
  width: 126%; height: 88%;
  transform: translateX(-50%);
  background-position: center 12%;
  background-size: cover;
  z-index: 1;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(.6px) saturate(2) hue-rotate(var(--hue, 0deg)) drop-shadow(0 0 16px var(--lb-trail, #b07cff));
  animation: lbClone 1.15s ease-out forwards;
}
.lb-clone::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 30%, var(--lb-trail, #b07cff) 50%, transparent 70%);
  opacity: .5;
  mix-blend-mode: screen;
}
@keyframes lbClone {
  0% { opacity: 0; transform: translateX(-50%) translateX(0) skewX(0); }
  18% { opacity: .55; }
  100% { opacity: 0; transform: translateX(-50%) translateX(var(--shift, 34px)) skewX(-8deg); }
}
.lb-clone.clone-a { --shift: 34px; animation-delay: .05s; }
.lb-clone.clone-b { --shift: 54px; animation-delay: .13s; opacity: .4; }
.lb-clone.clone-c { --shift: -34px; animation-delay: .08s; --hue: 20deg; }
.lb-clone.clone-d { --shift: -58px; animation-delay: .2s; opacity: .35; --hue: 40deg; }
.lb-art-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(5, 3, 3, .12) 58%, rgba(5, 3, 3, .92) 100%);
  z-index: 4;
}
.lb-frame {
  position: absolute; inset: 10px;
  border: 1px solid rgba(255, 231, 177, .26);
  border-radius: 6px;
  z-index: 5;
  pointer-events: none;
}
.lb-head {
  position: absolute; left: 16px; right: 16px; top: 14px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 7;
}
.lb-faction {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 6px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  color: #fff6de;
  background: linear-gradient(145deg, var(--lb-f1, #2f6ecb), var(--lb-f2, #173d7c));
  border: 1px solid rgba(255, 238, 194, .5);
  box-shadow: 0 0 12px var(--lb-f2, rgba(23, 61, 124, .7));
}
.lb-id { text-align: right; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.lb-id b { display: block; font-family: var(--serif); font-size: 22px; letter-spacing: 2px; color: #fff3d4; }
.lb-id i { display: block; font-style: normal; font-size: 10px; letter-spacing: 3px; color: var(--lb-frame, #d9ac58); }
.lb-skill {
  position: absolute; left: 12px; right: 12px; bottom: 38px;
  z-index: 7;
  padding: 8px 10px 9px;
  border-radius: 7px;
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 12, 8, .82), rgba(8, 4, 3, .92));
  border: 1px solid var(--lb-frame, #d9ac58);
  box-shadow: 0 0 20px var(--lb-glow, rgba(160, 100, 255, .6)), inset 0 1px 0 rgba(255, 239, 195, .22);
  animation: lbSkillGlow 1.1s ease-in-out infinite alternate;
}
@keyframes lbSkillGlow {
  from { box-shadow: 0 0 12px var(--lb-glow, rgba(160, 100, 255, .35)), inset 0 1px 0 rgba(255, 239, 195, .2); }
  to { box-shadow: 0 0 30px var(--lb-glow, rgba(160, 100, 255, .9)), inset 0 1px 0 rgba(255, 239, 195, .5); }
}
.lb-skill small { display: block; font-size: 8.5px; letter-spacing: 2.4px; color: var(--lb-frame, #d9ac58); }
.lb-skill strong {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 3px;
  color: #fff1c9;
  text-shadow: 0 0 10px var(--lb-trail, #b07cff), 0 2px 0 rgba(0, 0, 0, .5);
}
.lb-gouges { position: absolute; left: 14px; bottom: 16px; z-index: 7; display: flex; gap: 5px; }
.lb-gouges i {
  width: 13px; height: 13px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(145deg, #ff7a6a, #b22a24);
  border: 1px solid rgba(255, 232, 190, .6);
  box-shadow: 0 0 7px rgba(255, 80, 60, .55);
}
.lb-gouges i.lost { background: #2a1512; box-shadow: none; opacity: .65; }
.lb-sweep {
  position: absolute; inset: 0;
  z-index: 8;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 48%, transparent 62%);
  transform: translateX(-130%);
  animation: lbSweep 1.1s ease-in-out .24s forwards;
}
@keyframes lbSweep { to { transform: translateX(130%); } }
.lb-word {
  position: absolute;
  left: 50%; bottom: 8.5%;
  z-index: 4;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: min(8vw, 30px);
  font-weight: 900;
  letter-spacing: .28em;
  color: #fff0c4;
  text-shadow: 0 0 12px var(--lb-trail, #b07cff), 0 0 34px var(--lb-trail, #b07cff), 0 3px 0 rgba(0, 0, 0, .5);
  opacity: 0;
  white-space: nowrap;
  animation: lbWord 2.7s ease-out forwards;
}
@keyframes lbWord {
  0%, 10% { opacity: 0; transform: translate(-50%, 12px); letter-spacing: .5em; }
  22% { opacity: 1; transform: translate(-50%, 0); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}
.limit-burst.tone-gold { --lb-frame: #ecc36d; --lb-trail: #ffd36e; --lb-glow: rgba(255, 190, 80, .5); --lb-f1: #3f8a5a; --lb-f2: #1c4a33; }
.limit-burst.tone-red { --lb-frame: #e8a06a; --lb-trail: #ff5a3c; --lb-glow: rgba(255, 90, 60, .48); --lb-f1: #5aa06a; --lb-f2: #24532f; }
.limit-burst.tone-blue { --lb-frame: #9ecbff; --lb-trail: #59d7ff; --lb-glow: rgba(80, 200, 255, .5); --lb-f1: #3f8a5a; --lb-f2: #1c4a33; }
.limit-burst.tone-violet { --lb-frame: #e6b3ff; --lb-trail: #ff8ad8; --lb-glow: rgba(210, 110, 255, .48); --lb-f1: #a4824c; --lb-f2: #5c3c1a; }
.limit-burst.tone-blood { --lb-frame: #ff9a7a; --lb-trail: #ff3b2f; --lb-glow: rgba(255, 50, 30, .52); --lb-f1: #7a2a24; --lb-f2: #3b100d; }
.limit-burst.tone-purple { --lb-frame: #c4a6ff; --lb-trail: #b07cff; --lb-glow: rgba(160, 100, 255, .55); --lb-f1: #4653c9; --lb-f2: #1f2570; }
.limit-burst.tone-cyan { --lb-frame: #a6f2e4; --lb-trail: #5ff0d0; --lb-glow: rgba(70, 230, 200, .45); --lb-f1: #3f8a5a; --lb-f2: #1c4a33; }
.limit-burst.tone-fire { --lb-frame: #ffc27a; --lb-trail: #ff7a2f; --lb-glow: rgba(255, 130, 40, .5); --lb-f1: #b34a4a; --lb-f2: #5c1f1f; }
.limit-burst.faction-shu .lb-faction { background: linear-gradient(145deg, #3f7d52, #1b3d2a); }
.limit-burst.faction-wei .lb-faction { background: linear-gradient(145deg, #4a5fc0, #1d2670); }
.limit-burst.faction-wu .lb-faction { background: linear-gradient(145deg, #b34a4a, #581d1d); }
.limit-burst.faction-qun .lb-faction { background: linear-gradient(145deg, #a4824c, #553715); }
@media (max-height: 700px) {
  .lb-card { width: min(62vw, 250px); max-height: 66vh; }
  .lb-skill strong { font-size: 20px; }
  .lb-glyph { font-size: 120px; }
  .lb-hero.is-glyph { font-size: 150px; }
}
.lb-clone.is-glyph {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 170px;
  font-weight: 900;
  color: #fff4d6;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 240, 210, .22), transparent 66%);
  text-shadow: 0 0 18px var(--lb-trail, #b07cff), 0 0 46px var(--lb-trail, #b07cff);
  filter: blur(.6px) drop-shadow(0 0 18px var(--lb-trail, #b07cff));
}
.lb-voiceline {
  position: absolute;
  left: 50%; bottom: 2.6%;
  z-index: 5;
  transform: translateX(-50%);
  max-width: 86vw;
  font-size: 12px;
  letter-spacing: 1px;
  color: #f4e2bd;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
  opacity: .92;
}
.lb-voiceline::before, .lb-voiceline::after { content: "「"; color: var(--lb-frame, #d9ac58); }
.lb-voiceline::after { content: "」"; }
@media (max-height: 700px) {
  .lb-voiceline { font-size: 11px; bottom: 1.4%; }
}
.general-limit {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(210, 172, 104, .18);
  font-size: 9.5px;
  line-height: 1.2;
  color: #d9b878;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.general-limit .mp-icon { width: 10px; height: 10px; flex: 0 0 auto; }
.codex-limit { color: #d9b878 !important; }
.codex-limit b { color: #f0ce8c !important; }
/* 选将页 · 模式切换 */
.mode-switch { display: flex; gap: 8px; margin: 10px 0 4px; }
.mode-opt {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(198, 158, 92, .28);
  background: linear-gradient(180deg, rgba(37, 22, 14, .9), rgba(18, 10, 6, .92));
  color: #e8d3ab;
  text-align: left;
  position: relative;
}
.mode-opt .mp-icon { width: 18px; height: 18px; color: #d7b479; flex: 0 0 auto; }
.mode-opt span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mode-opt b { font-size: 12.5px; font-weight: 700; color: #f2dfb8; }
.mode-opt small { font-size: 9.5px; color: #b9a483; white-space: nowrap; }
.mode-opt.is-active {
  border-color: rgba(236, 196, 120, .62);
  background: linear-gradient(180deg, rgba(84, 54, 27, .95), rgba(37, 22, 12, .95));
  box-shadow: inset 0 1px 0 rgba(255, 235, 184, .16), 0 4px 12px rgba(0, 0, 0, .28);
}
.mode-online { border-color: rgba(96, 160, 255, .35); }
.mode-online .mp-icon { color: #7fb4ff; }
.mode-online em {
  position: absolute; top: -6px; right: 7px;
  font-style: normal; font-size: 8px; font-weight: 800; letter-spacing: .5px;
  color: #102b56; background: linear-gradient(180deg, #b9dbff, #5fa4ff);
  padding: 1px 4px; border-radius: 3px;
}
.mode-online:active { transform: scale(.98); }
.home-multi {
  position: absolute;
  z-index: 12;
  top: calc(10px + var(--safe-top));
  left: 12px;
  height: 34px;
  padding: 0 9px 0 7px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #d9ecff;
  background: linear-gradient(150deg, rgba(34, 64, 104, .9), rgba(13, 22, 36, .96));
  border: 1px solid rgba(112, 168, 240, .55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(210, 235, 255, .2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.home-multi .mp-icon { width: 16px; height: 16px; color: #9ec8ff; }
.home-multi:active { transform: scale(.94); }
@media (max-height: 660px) {
  .home-multi { height: 30px; font-size: 10px; }
}
