/* 速战峡谷 · 视觉系统 */
:root {
  --gold: #ffd27a;
  --gold-2: #ffb347;
  --gold-3: #c98733;
  --orange: #ff8a3d;
  --blue: #6bc4ff;
  --red: #ff6a58;
  --ink: #070b12;
  --panel: rgba(12, 19, 30, 0.86);
  --panel-2: rgba(20, 30, 44, 0.82);
  --line: rgba(255, 210, 122, 0.26);
  --text: #f4f0e6;
  --muted: #9aa7b8;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #05080e; }
body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
button, input { font-family: var(--font); }
button { border: 0; background: none; color: inherit; padding: 0; cursor: pointer; -webkit-touch-callout: none; }
.hidden { display: none !important; }
#app { position: relative; width: 100%; height: 100%; height: 100dvh; overflow: hidden; }

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mp-icon { flex: none; }

/* ================= 大厅 ================= */
.lobby { background: #060b14; }
.lobby-art { position: absolute; inset: 0; overflow: hidden; }
.lobby-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 8%, #2b4c7e 0%, #162948 34%, #0b1526 62%, #060a12 100%),
    linear-gradient(180deg, #0b1526 0%, #101d31 52%, #0a111d 100%);
}
.lobby-sky::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 40% at 50% 26%, rgba(117, 199, 255, 0.22), transparent 70%);
  mix-blend-mode: screen;
}
.lobby-stars {
  position: absolute; inset: 0; opacity: 0.6;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 14%, #cfe8ff, transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 8%, #9fd0ff, transparent 60%),
    radial-gradient(2px 2px at 72% 12%, #ffe6b0, transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 20%, #cfe8ff, transparent 60%),
    radial-gradient(1px 1px at 44% 18%, #ffffff, transparent 60%),
    radial-gradient(1px 1px at 62% 6%, #ffffff, transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 34%, #9fd0ff, transparent 60%),
    radial-gradient(1px 1px at 92% 38%, #ffe6b0, transparent 60%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .75; } }
.lobby-rays {
  position: absolute; left: 50%; top: 12%; width: 160vmax; height: 160vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(140, 205, 255, .08) 0deg 5deg, transparent 5deg 18deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,.9) 0%, transparent 55%);
  mask-image: radial-gradient(circle, rgba(0,0,0,.9) 0%, transparent 55%);
  animation: spin 70s linear infinite;
  opacity: .7;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lobby-moon {
  position: absolute; left: 50%; top: 10%; width: 120px; height: 120px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 42% 38%, #fff8dd 0%, #d9ecff 34%, rgba(106, 170, 235, .25) 62%, transparent 72%);
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}
.lobby-mount { position: absolute; left: 50%; transform: translateX(-50%); }
.m-back {
  bottom: 24%; width: 150%; height: 34%;
  background: linear-gradient(180deg, #33557f 0%, #17283f 70%, transparent 100%);
  clip-path: polygon(0 100%, 0 68%, 7% 52%, 12% 60%, 19% 34%, 25% 58%, 31% 44%, 38% 61%, 45% 40%, 52% 60%, 58% 33%, 65% 58%, 72% 46%, 79% 62%, 86% 40%, 92% 58%, 100% 46%, 100% 100%);
  opacity: .5;
}
.m-mid {
  bottom: 14%; width: 128%; height: 30%;
  background: linear-gradient(180deg, #203a58 0%, #0e1b2b 78%, transparent 100%);
  clip-path: polygon(0 100%, 0 72%, 9% 56%, 16% 66%, 24% 38%, 31% 62%, 40% 48%, 48% 70%, 57% 44%, 65% 66%, 73% 52%, 81% 68%, 90% 48%, 100% 64%, 100% 100%);
  opacity: .8;
}
.m-front {
  bottom: -2%; width: 118%; height: 22%;
  background: linear-gradient(180deg, #0c1725 0%, #060a11 72%);
  clip-path: polygon(0 100%, 0 40%, 10% 26%, 18% 44%, 27% 20%, 36% 42%, 47% 30%, 58% 46%, 68% 24%, 78% 44%, 88% 30%, 100% 48%, 100% 100%);
  opacity: .95;
}
.lobby-castle {
  position: absolute; left: 50%; bottom: 30%;
  width: 214px; height: 190px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #cfe8ff 0%, #6d9bcc 30%, #35557c 64%, #17283f 100%);
  clip-path: polygon(0 100%, 0 62%, 8% 62%, 8% 34%, 13% 34%, 13% 50%, 22% 50%, 22% 24%, 27% 10%, 32% 24%, 32% 54%, 40% 54%, 40% 30%, 45% 30%, 45% 14%, 50% 0, 55% 14%, 55% 30%, 60% 30%, 60% 54%, 68% 54%, 68% 24%, 73% 10%, 78% 24%, 78% 50%, 87% 50%, 87% 34%, 92% 34%, 92% 62%, 100% 62%, 100% 100%);
  opacity: .5;
  filter: drop-shadow(0 0 18px rgba(120, 200, 255, .35));
}
.lobby-island {
  position: absolute; left: 50%; bottom: 19%; width: 330px; height: 118px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(60% 100% at 50% 20%, rgba(120, 220, 255, .45), transparent 60%),
    radial-gradient(50% 80% at 50% 55%, #1c3c52 0%, #0a1622 70%);
  box-shadow: 0 0 60px rgba(90, 190, 255, .25);
}
.island-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 1px solid rgba(140, 220, 255, .38);
  transform: translate(-50%, -50%);
}
.island-ring.r1 { width: 62%; height: 58%; animation: pulseRing 4s ease-out infinite; }
.island-ring.r2 { width: 86%; height: 80%; animation: pulseRing 4s 2s ease-out infinite; }
@keyframes pulseRing { 0% { opacity: .7; transform: translate(-50%,-50%) scale(.9); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.15); } }
.island-core {
  position: absolute; left: 50%; top: 38%; width: 16px; height: 16px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(180deg, #fff8d8, #7fd8ff);
  box-shadow: 0 0 26px rgba(120, 220, 255, .9);
  border-radius: 3px;
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0) rotate(45deg); } 50% { transform: translate(-50%, -9px) rotate(45deg); } }
.lobby-fog {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44%;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 9, 15, .55) 48%, #05080e 100%);
}
.lobby-sparks { position: absolute; inset: 0; pointer-events: none; }
.lobby-sparks i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #ffe8b0; box-shadow: 0 0 10px #ffd27a;
  animation: floatUp linear infinite;
  opacity: 0;
}
.lobby-sparks i:nth-child(1) { left: 12%; bottom: 22%; animation-duration: 9s; animation-delay: 0s; }
.lobby-sparks i:nth-child(2) { left: 24%; bottom: 32%; animation-duration: 11s; animation-delay: 1.5s; }
.lobby-sparks i:nth-child(3) { left: 36%; bottom: 18%; animation-duration: 8s; animation-delay: 3s; }
.lobby-sparks i:nth-child(4) { left: 64%; bottom: 24%; animation-duration: 10s; animation-delay: .8s; }
.lobby-sparks i:nth-child(5) { left: 76%; bottom: 34%; animation-duration: 12s; animation-delay: 2.2s; }
.lobby-sparks i:nth-child(6) { left: 88%; bottom: 20%; animation-duration: 9s; animation-delay: 4s; }
.lobby-sparks i:nth-child(7) { left: 48%; bottom: 14%; animation-duration: 13s; animation-delay: 5s; }
.lobby-sparks i:nth-child(8) { left: 54%; bottom: 38%; animation-duration: 10s; animation-delay: 3.6s; }
@keyframes floatUp {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  80% { opacity: .5; }
  100% { transform: translateY(-46vh) scale(1.1); opacity: 0; }
}

.lobby-inner {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px calc(env(safe-area-inset-bottom, 0px) + 14px);
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lobby-top { display: flex; align-items: flex-start; justify-content: space-between; }
.profile-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: linear-gradient(135deg, rgba(18, 30, 48, .9), rgba(10, 17, 28, .72));
  border: 1px solid rgba(255, 210, 122, .24);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  text-align: left;
  max-width: 62vw;
}
.profile-chip:active { transform: scale(.97); }
.avatar-wrap {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden; flex: none;
  background: radial-gradient(circle at 35% 30%, #4a6f9e, #12243a);
  display: grid; place-items: center;
}
.avatar-wrap canvas { width: 100%; height: 100%; display: block; }
.avatar-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(255, 210, 122, .85);
  box-shadow: inset 0 0 12px rgba(255, 190, 90, .25);
}
.avatar-wrap.big { width: 68px; height: 68px; }
.profile-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-meta b { font-size: 14px; letter-spacing: .02em; color: #fff6dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta em { font-style: normal; font-size: 10px; color: var(--gold); letter-spacing: .08em; }
.top-actions { display: flex; gap: 8px; }
.round-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(12, 20, 32, .72);
  border: 1px solid rgba(255, 210, 122, .26);
  color: #ffe6b0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .15s ease, background .15s ease;
}
.round-btn:active { transform: scale(.92); background: rgba(255, 180, 70, .18); }
.round-btn.small { width: 36px; height: 36px; }
.round-btn .mp-icon { width: 20px; height: 20px; }

.hero-showcase {
  position: relative; flex: 1 1 auto; min-height: 120px; max-height: 250px;
  display: flex; align-items: flex-end; justify-content: center;
  margin-top: 2px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.hero-showcase canvas {
  height: 100%; width: 100%; max-width: 250px; object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
  animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.showcase-shadow {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 210px; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(120, 220, 255, .28), transparent 70%);
}
.brand { position: relative; text-align: center; padding: 4px 0 2px; }
.brand-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 10px; letter-spacing: .32em; color: #a9d8ff; opacity: .9;
  text-transform: uppercase;
}
.brand-eyebrow span { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, #7fc8ff); display: inline-block; }
.brand-eyebrow span:last-child { background: linear-gradient(90deg, #7fc8ff, transparent); }
.brand-title {
  margin: 5px 0 0;
  font-size: clamp(40px, 13vw, 58px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: .06em;
  background: linear-gradient(180deg, #fffbe8 0%, #ffe3a0 34%, #ffb347 56%, #a7661c 70%, #ffe9b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(78, 40, 8, .85)) drop-shadow(0 0 26px rgba(255, 160, 60, .45));
}
.brand-sub {
  margin: 6px 0 0; font-size: 11px; letter-spacing: .2em; color: #c8d7ea; opacity: .8;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-title, .result h2 {
    color: #ffd27a;
    background: none;
    -webkit-text-fill-color: #ffd27a;
  }
}
.lobby-actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.mode-switch { display: flex; gap: 8px; }
.mode-btn {
  flex: 1; padding: 9px 8px; border-radius: 13px;
  background: rgba(10, 17, 28, .7);
  border: 1px solid rgba(140, 190, 255, .16);
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  transition: border-color .2s, background .2s;
}
.mode-btn b { font-size: 13px; color: #e8f1ff; font-weight: 600; letter-spacing: .04em; }
.mode-btn small { font-size: 9px; color: #8fa3ba; letter-spacing: .08em; }
.mode-btn.active {
  border-color: rgba(255, 190, 90, .7);
  background: linear-gradient(180deg, rgba(255, 170, 60, .18), rgba(60, 40, 16, .35));
  box-shadow: inset 0 0 18px rgba(255, 170, 60, .12), 0 0 16px rgba(255, 160, 60, .12);
}
.mode-btn.active b { color: #ffe4a8; }
.diff-row {
  display: flex; gap: 4px; padding: 3px;
  background: rgba(8, 14, 24, .66);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px;
}
.diff-row button {
  flex: 1; padding: 6px 0; border-radius: 999px;
  font-size: 11px; color: #8fa3ba; letter-spacing: .1em;
  transition: all .2s;
}
.diff-row button.active {
  background: linear-gradient(180deg, rgba(255, 210, 122, .95), rgba(226, 150, 55, .95));
  color: #2a1606; font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 170, 60, .35);
}
.btn-gold {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; padding: 10px 18px; border-radius: 14px;
  background: linear-gradient(180deg, #ffe6a8 0%, #ffc45c 24%, #ff8a3d 64%, #b95a1d 100%);
  color: #2c1804;
  border: 1px solid #ffe9b0;
  box-shadow: 0 6px 0 #6d3c0f, 0 12px 24px rgba(0, 0, 0, .42), inset 0 2px 0 rgba(255, 255, 255, .65);
  font-weight: 800;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #6d3c0f, 0 6px 14px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .5);
}
.btn-gold b { font-size: 17px; letter-spacing: .14em; }
.btn-gold small { font-size: 9px; font-weight: 500; letter-spacing: .12em; opacity: .72; }
.btn-start { min-height: 62px; }
.btn-start b { font-size: 19px; }
.btn-shine {
  position: absolute; top: -40%; bottom: -40%; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: rotate(18deg) translateX(-260%);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 62% { transform: rotate(18deg) translateX(-260%); } 82%, 100% { transform: rotate(18deg) translateX(720%); } }
.btn-ghost {
  min-height: 44px; padding: 10px 18px; border-radius: 13px;
  background: rgba(14, 23, 36, .8);
  border: 1px solid rgba(160, 200, 240, .22);
  color: #dbe7f5; font-size: 13px; letter-spacing: .08em;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-ghost:active { background: rgba(60, 100, 150, .3); transform: scale(.98); }
.lobby-links { display: flex; justify-content: center; gap: 6px; }
.lobby-links button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; font-size: 10px; color: #9db1c7; letter-spacing: .06em;
  border-radius: 10px;
}
.lobby-links button:active { background: rgba(140, 200, 255, .1); }
.lobby-links .mp-icon { width: 18px; height: 18px; color: #cfe4ff; opacity: .85; }

/* ================= 选英雄 ================= */
.select { background: #070d16; }
.select-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 60% at 50% 0%, #1b3355 0%, #0d1a2c 45%, #070d16 100%),
    repeating-linear-gradient(90deg, rgba(120, 180, 255, .04) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(120, 180, 255, .04) 0 1px, transparent 1px 46px);
}
.select-bg::after {
  content: ""; position: absolute; left: 50%; top: 12%; width: 90vw; height: 90vw;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(90, 170, 255, .16), transparent 62%);
  border-radius: 50%;
}
.select-head {
  position: relative; z-index: 2; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
}
.select-title { flex: 1; min-width: 0; }
.select-title h2 { margin: 0; font-size: 19px; letter-spacing: .06em; color: #fff4da; }
.select-title p { margin: 3px 0 0; font-size: 9px; color: #8ba1b8; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-count {
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  padding: 5px 10px; border-radius: 10px;
  background: rgba(255, 190, 90, .1); border: 1px solid rgba(255, 190, 90, .3);
}
.select-count b { font-size: 15px; color: var(--gold); }
.select-count small { font-size: 8px; color: #b89760; margin-top: 2px; letter-spacing: .1em; }
.select-scroll {
  position: relative; z-index: 2;
  flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 16px 16px;
  overscroll-behavior: contain;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.hero-card {
  position: relative; aspect-ratio: 3 / 4; min-height: 178px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(160, 200, 240, .18);
  background: #0a1420;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.hero-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 8, 14, .92) 100%);
}
.hero-card:active { transform: scale(.97); }
.hero-card.selected {
  border-color: #ffd27a;
  box-shadow: 0 0 0 1px rgba(255, 210, 122, .6), 0 0 26px rgba(255, 180, 70, .35);
}
.hero-card.selected::before {
  content: ""; position: absolute; inset: 0; z-index: 3;
  border: 2px solid rgba(255, 210, 122, .9); border-radius: 13px;
  pointer-events: none;
}
.hero-card-info {
  position: absolute; left: 9px; right: 9px; bottom: 8px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
}
.hero-card-info b { font-size: 14px; letter-spacing: .06em; color: #fff1d2; text-shadow: 0 2px 8px #000; }
.hero-card-info small { display: block; font-size: 9px; color: #9fb6cd; letter-spacing: .08em; margin-top: 1px; }
.hero-card-tag {
  font-size: 8px; padding: 2px 6px; border-radius: 999px;
  border: 1px solid rgba(255, 210, 122, .4); color: #ffdf9e;
  background: rgba(20, 14, 6, .55);
  white-space: nowrap;
}
.hero-diff { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 2px; }
.hero-diff i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.hero-diff i.on { background: #ffd27a; box-shadow: 0 0 6px rgba(255, 200, 90, .8); }

.hero-detail {
  margin-top: 12px; padding: 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(22, 36, 54, .92), rgba(9, 16, 26, .94));
  border: 1px solid rgba(255, 210, 122, .16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-head h3 { margin: 0; font-size: 19px; color: #ffeccb; letter-spacing: .06em; }
.detail-head h3 small { font-size: 10px; color: #8fa5bd; font-weight: 400; letter-spacing: .1em; margin-left: 4px; }
.role-pill {
  font-size: 9px; padding: 3px 8px; border-radius: 999px;
  background: rgba(120, 190, 255, .12); border: 1px solid rgba(120, 190, 255, .35);
  color: #a9d8ff; letter-spacing: .12em;
}
.detail-stars { margin-left: auto; display: flex; gap: 3px; }
.detail-stars i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.detail-stars i.on { background: #ffd27a; box-shadow: 0 0 6px rgba(255, 200, 90, .8); }
.detail-stats { display: flex; gap: 10px; margin: 10px 0 6px; }
.stat-mini { flex: 1; }
.stat-mini label { font-size: 8px; color: #7f93a9; letter-spacing: .1em; display: flex; justify-content: space-between; }
.stat-mini .track { height: 4px; margin-top: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.stat-mini .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4aa8ff, #8ee6ff); }
.passive-row {
  margin-top: 9px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255, 190, 90, .07); border: 1px solid rgba(255, 190, 90, .18);
  font-size: 10px; line-height: 1.55; color: #d8c8a8;
}
.passive-row b { color: #ffd27a; margin-right: 4px; }
.skill-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.skill-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 8px; border-radius: 10px;
  background: rgba(8, 14, 23, .6);
  border: 1px solid rgba(150, 190, 230, .1);
}
.skill-key {
  width: 22px; height: 22px; flex: none; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #1f1408;
  background: linear-gradient(180deg, #ffe6a8, #e2a348);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.skill-row .txt { flex: 1; min-width: 0; }
.skill-row b { font-size: 11px; color: #ffe9c4; letter-spacing: .04em; }
.skill-row p { margin: 2px 0 0; font-size: 9px; line-height: 1.45; color: #93a7bd; }
.skill-row em { font-style: normal; font-size: 8px; color: #b79355; white-space: nowrap; }
.select-tip { margin: 12px 2px 0; font-size: 9px; color: #6e8298; text-align: center; letter-spacing: .04em; }
.select-bar {
  position: relative; z-index: 3; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(180deg, rgba(7, 13, 22, .4), rgba(7, 13, 22, .96) 40%);
  border-top: 1px solid rgba(255, 210, 122, .14);
}
.picked { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.picked-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #ffd27a; box-shadow: 0 0 10px rgba(255, 200, 90, .9);
}
.picked small { display: block; font-size: 8px; color: #7f93a9; letter-spacing: .12em; }
.picked b { display: block; font-size: 14px; color: #fff1d2; letter-spacing: .06em; margin-top: 1px; }
.btn-confirm { flex: none; min-width: 132px; min-height: 48px; border-radius: 12px; }
.btn-confirm b, .btn-confirm { font-size: 15px; }

/* ================= 对局 ================= */
.game { background: #071019; }
#gameCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hud > * { pointer-events: none; }
.hud button, .hud .gold-pill, .hud .joy-zone { pointer-events: auto; }

.hud-top {
  display: flex; align-items: flex-start; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 0;
}
.minimap-wrap {
  position: relative; width: 140px; height: 64px; flex: none;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 210, 122, .3);
  background: #0b1418;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 18px rgba(90, 170, 255, .12);
  pointer-events: auto;
}
.minimap-wrap canvas { width: 100%; height: 100%; display: block; }
.minimap-tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 6px; letter-spacing: .2em; text-align: center;
  padding: 1px 0; color: #cfe4ff;
  background: rgba(5, 10, 16, .72);
  border-top: 1px solid rgba(255, 210, 122, .16);
}
.score-box {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 5px 8px 6px;
  background: linear-gradient(180deg, rgba(9, 16, 26, .88), rgba(9, 16, 26, .55));
  border: 1px solid rgba(255, 210, 122, .18);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
}
.score-line { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.score-line em { font-style: normal; font-size: 8px; font-weight: 500; color: #8fa3ba; letter-spacing: .16em; }
.score-line .blue { color: #8ed0ff; text-shadow: 0 0 10px rgba(90, 180, 255, .55); }
.score-line .red { color: #ff9c88; text-shadow: 0 0 10px rgba(255, 100, 80, .55); }
.timer {
  font-size: 15px; font-weight: 700; letter-spacing: .12em; color: #fff1d2;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.objective { font-size: 8px; color: #a8bdd2; letter-spacing: .06em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-btns { flex: none; display: flex; flex-direction: column; gap: 6px; }

.team-strip {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 6px 10px 0 92px;
  gap: 6px;
}
.team-side { display: flex; gap: 3px; }
.team-side.red { flex-direction: row-reverse; }
.team-member {
  position: relative; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(110, 190, 255, .7);
  background: #0b141d; overflow: hidden;
}
.team-side.red .team-member { border-color: rgba(255, 110, 90, .7); }
.team-member canvas { width: 100%; height: 100%; display: block; }
.team-member.dead { filter: grayscale(1) brightness(.55); }
.team-member.dead::after {
  content: attr(data-respawn); position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #ffd27a;
  background: rgba(4, 8, 14, .6);
}
.team-member.is-player { box-shadow: 0 0 0 1.5px rgba(255, 210, 122, .8); }
.team-hp {
  position: absolute; left: 1px; right: 1px; bottom: 0; height: 2px;
  background: rgba(0, 0, 0, .6);
}
.team-hp i { display: block; height: 100%; background: #5ade8a; }

.kill-banner {
  position: absolute; left: 50%; top: 26%;
  transform: translate(-50%, -8px) scale(.96);
  display: flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 8px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(44, 27, 9, .95), rgba(10, 16, 26, .92));
  border: 1px solid rgba(255, 210, 122, .45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 170, 60, .18);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-width: 88vw; z-index: 6;
}
.kill-banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.kill-banner.red {
  border-color: rgba(255, 100, 80, .5);
  background: linear-gradient(90deg, rgba(52, 12, 10, .95), rgba(10, 16, 26, .92));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 80, 60, .2);
}
.kb-avatars { display: flex; align-items: center; gap: 3px; flex: none; }
.kb-avatars canvas {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(255, 210, 122, .6);
  background: #0a1420; display: block;
}
.kill-banner.red .kb-avatars canvas { border-color: rgba(255, 110, 90, .6); }
.kb-avatars span { color: #ff9c88; font-size: 10px; font-weight: 800; }
.kb-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kb-text b { font-size: 10px; letter-spacing: .16em; color: #ffd27a; white-space: nowrap; }
.kill-banner.red .kb-text b { color: #ff9c88; }
.kb-text span { font-size: 11px; color: #e8f2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-text em { font-style: normal; color: #ffe6a8; }
.kill-banner.red .kb-text em { color: #ffc0b6; }

.boss-alert {
  position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -8px);
  z-index: 7;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(58, 36, 8, .96), rgba(12, 18, 28, .94));
  border: 1px solid rgba(255, 200, 100, .55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5), 0 0 22px rgba(255, 160, 40, .2);
  pointer-events: auto;
  animation: bossAlertIn .25s ease both;
  max-width: 82vw;
}
.boss-alert > .mp-icon { width: 22px; height: 22px; color: #ffd27a; flex: none; }
.boss-alert-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.boss-alert-text b { font-size: 12px; color: #ffe6a8; letter-spacing: .04em; white-space: nowrap; }
.boss-alert-text small { font-size: 8px; color: #c9bda8; letter-spacing: .04em; white-space: nowrap; }
.boss-alert .chev { width: 14px; height: 14px; color: #ffd27a; flex: none; }
@keyframes bossAlertIn {
  from { opacity: 0; transform: translate(-50%, -14px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.boss-bar {
  display: flex; align-items: center; gap: 7px;
  margin: 5px auto 0; width: min(70%, 290px);
  padding: 4px 9px; border-radius: 999px;
  background: rgba(10, 8, 4, .8);
  border: 1px solid rgba(255, 180, 70, .45);
  box-shadow: 0 0 18px rgba(255, 160, 50, .22);
}
.boss-name { font-size: 8px; color: #ffcf80; letter-spacing: .1em; white-space: nowrap; }
.boss-bar .bar { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.boss-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ffe6a8); border-radius: 4px; transition: width .2s; }
.boss-bar b { font-size: 8px; color: #ffdf9e; font-variant-numeric: tabular-nums; }

.kill-feed {
  position: absolute; left: 12px; top: 37%; width: 190px;
  display: flex; flex-direction: column; gap: 4px;
  pointer-events: none;
}
.feed-line {
  font-size: 9px; line-height: 1.4; color: #dfe9f5;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(5, 10, 17, .7);
  border-left: 2px solid rgba(140, 200, 255, .55);
  animation: feedIn .25s ease both;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-line.red { border-left-color: rgba(255, 110, 90, .75); }
.feed-line.gold { border-left-color: #ffd27a; color: #ffe9c0; }
@keyframes feedIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.buff-pill {
  position: absolute; left: 12px; top: 168px;
  display: flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(60, 40, 10, .8); border: 1px solid rgba(255, 200, 100, .5);
  color: #ffe4a8; font-size: 8px; letter-spacing: .06em;
}
.buff-pill .mp-icon { width: 12px; height: 12px; color: #ffd27a; }
.buff-pill b { font-variant-numeric: tabular-nums; color: #fff3d0; }

.tower-status {
  position: absolute; right: 10px; top: 196px;
  display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
}
.tower-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 8px; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(5, 10, 17, .68);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #b7c7d8;
}
.tower-pill i { width: 5px; height: 5px; border-radius: 1px; background: #6bc4ff; }
.tower-pill.red i { background: #ff6a58; }

.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 300px; }
.status-stack {
  position: absolute; left: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 168px);
  display: flex; flex-direction: column; gap: 6px;
  width: 158px;
}
.gold-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 24, 10, .9), rgba(12, 10, 5, .85));
  border: 1px solid rgba(255, 200, 100, .4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  width: max-content;
}
.gold-pill .mp-icon { width: 14px; height: 14px; color: #ffd27a; }
.gold-pill b { font-size: 13px; color: #fff1d2; font-variant-numeric: tabular-nums; }
.gold-pill span { font-size: 8px; color: #b89760; letter-spacing: .08em; padding-left: 2px; }
.gold-pill .chev { width: 11px; height: 11px; color: #8f744c; }
.gold-pill:active { transform: scale(.97); }
.equip-row { display: flex; gap: 4px; pointer-events: auto; }
.equip {
  flex: 1; min-height: 29px; display: flex; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 2px; border-radius: 8px;
  background: rgba(8, 14, 23, .76);
  border: 1px solid rgba(150, 190, 230, .14);
  color: #7f93a9;
  transition: all .2s ease;
}
.equip .mp-icon { width: 12px; height: 12px; opacity: .75; }
.equip b { font-size: 9px; font-weight: 700; color: #8fa3ba; letter-spacing: .02em; }
.equip.on {
  border-color: rgba(255, 210, 122, .42);
  background: linear-gradient(180deg, rgba(255, 190, 90, .15), rgba(40, 28, 10, .55));
  color: #ffd27a;
  box-shadow: 0 0 10px rgba(255, 180, 60, .12);
}
.equip.on .mp-icon { opacity: 1; color: #ffd27a; }
.equip.on b { color: #ffe6a8; }
.equip:active { transform: scale(.94); }
.hp-wrap {
  padding: 5px 8px 0; border-radius: 10px;
  background: rgba(6, 11, 18, .66);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(4px);
}
.hp-info { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.hp-info span { font-size: 8px; color: #c9d7e6; font-variant-numeric: tabular-nums; }
.hp-info b { font-size: 9px; color: #ffd27a; letter-spacing: .04em; }
.hp-track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.hp-track > i { display: block; height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, #2ecc71, #6ef2a0); transition: width .18s linear; }
.exp-track { height: 2px; margin-top: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.exp-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb347, #ffe6a8); }

.joy-zone {
  position: absolute; left: 6px; bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  width: 152px; height: 152px;
  display: grid; place-items: center;
  touch-action: none;
}
.joy-base {
  position: relative; width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(30, 48, 70, .45), rgba(8, 14, 22, .22) 70%);
  border: 1.5px solid rgba(150, 200, 240, .22);
  box-shadow: inset 0 0 30px rgba(80, 160, 255, .1), 0 0 22px rgba(0, 0, 0, .3);
}
.joy-ring { position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed rgba(150, 200, 240, .14); }
.joy-knob {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px;
  margin: -29px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(190, 225, 255, .55), rgba(30, 60, 95, .85) 62%, rgba(10, 20, 32, .95));
  border: 1.5px solid rgba(190, 225, 255, .55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45), inset 0 0 12px rgba(160, 220, 255, .35);
  display: grid; place-items: center;
  transition: transform .06s linear;
}
.joy-knob i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(200, 235, 255, .5); background: rgba(120, 190, 255, .18); }

.controls-right { position: absolute; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); width: 216px; height: 206px; }
.action-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 40% 30%, rgba(40, 60, 85, .9), rgba(10, 18, 28, .92));
  border: 1px solid rgba(150, 200, 240, .28);
  color: #cfe4ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.action-btn .mp-icon { width: 17px; height: 17px; }
.action-btn span { font-size: 7px; letter-spacing: .05em; color: #a9bfd4; }
.action-btn:active { transform: scale(.92); background: rgba(70, 120, 170, .5); }
.action-btn.recall { right: 158px; bottom: 4px; }
.action-btn.shop { right: 158px; bottom: 62px; }

.skill-btn {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(46, 66, 92, .95), rgba(11, 20, 32, .96));
  border: 2px solid rgba(150, 200, 240, .32);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .45), inset 0 0 14px rgba(90, 160, 240, .1);
  overflow: hidden;
  touch-action: none;
}
.skill-btn[data-skill="0"] { right: 94px; bottom: 2px; }
.skill-btn[data-skill="1"] { right: 100px; bottom: 68px; width: 54px; height: 54px; }
.skill-btn[data-skill="2"] { right: 32px; bottom: 126px; width: 60px; height: 60px; border-color: rgba(255, 200, 100, .55); box-shadow: 0 5px 16px rgba(0, 0, 0, .45), inset 0 0 18px rgba(255, 170, 60, .18); }
.skill-art { display: grid; place-items: center; width: 100%; height: 100%; }
.skill-art .mp-icon { width: 26px; height: 26px; color: #dfeeff; filter: drop-shadow(0 0 6px rgba(120, 200, 255, .6)); }
.skill-btn.ult .skill-art .mp-icon { color: #ffe6a8; filter: drop-shadow(0 0 8px rgba(255, 180, 60, .8)); width: 30px; height: 30px; }
.skill-key {
  position: absolute; left: 4px; top: 4px;
  width: 15px; height: 15px; border-radius: 5px;
  display: grid; place-items: center;
  font-size: 8px; font-weight: 800; color: #12202f;
  background: linear-gradient(180deg, #d9ecff, #8fb9df);
}
.skill-btn.ult .skill-key { background: linear-gradient(180deg, #ffe6a8, #d9a04a); }
.cd-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: rgba(3, 7, 12, .78);
  transition: height .08s linear;
  pointer-events: none;
}
.cd-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px #000;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.skill-btn.ready { animation: readyPulse 1.6s ease-in-out infinite; }
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 5px 14px rgba(0, 0, 0, .45), inset 0 0 14px rgba(90, 160, 240, .1); }
  50% { box-shadow: 0 5px 18px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 210, 122, .32), inset 0 0 18px rgba(255, 200, 100, .18); }
}
.lock-tip {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: rgba(4, 8, 14, .82); border-radius: 50%;
  color: #ffd27a;
}
.lock-tip .mp-icon { width: 16px; height: 16px; }
.lock-tip em { font-style: normal; font-size: 7px; color: #d5b77b; }
.skill-btn.locked .lock-tip { display: flex; }
.skill-btn.locked .skill-art { opacity: .35; }
.skill-btn:active { transform: scale(.94); }

.attack-btn {
  position: absolute; right: 2px; bottom: 2px;
  width: 86px; height: 86px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 38% 28%, #ffe6a8 0%, #ffb347 34%, #ff8a3d 68%, #7c3d0d 100%);
  border: 2px solid #ffe9b0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5), inset 0 2px 8px rgba(255, 255, 255, .45);
  color: #2a1606;
  touch-action: none;
}
.attack-btn .attack-ico .mp-icon { width: 30px; height: 30px; color: #2a1606; }
.attack-btn .attack-label { font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.attack-btn:active { transform: scale(.93); filter: brightness(.94); }

.recall-progress {
  position: absolute; left: 50%; bottom: 156px; transform: translateX(-50%);
  width: 190px; padding: 7px 10px; border-radius: 10px;
  background: rgba(6, 12, 20, .9);
  border: 1px solid rgba(140, 200, 255, .3);
  text-align: center;
}
.recall-progress span { font-size: 8px; color: #bfe0ff; letter-spacing: .12em; }
.recall-progress .bar { height: 4px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.recall-progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6bc4ff, #ffe6a8); }

.death-overlay {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 28px; border-radius: 16px;
  background: radial-gradient(circle at 50% 0%, rgba(60, 20, 20, .75), rgba(5, 8, 13, .92));
  border: 1px solid rgba(255, 100, 80, .3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.death-kicker { font-size: 9px; letter-spacing: .3em; color: #ff9c88; }
.death-overlay b { font-size: 44px; line-height: 1.1; color: #fff1d2; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(255, 100, 80, .4); }
.death-overlay p { margin: 2px 0 0; font-size: 9px; color: #a8b6c4; letter-spacing: .08em; }

.countdown {
  position: absolute; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(5, 10, 18, .25), rgba(5, 10, 18, .65));
  pointer-events: none;
}
.countdown span {
  font-size: clamp(72px, 24vw, 120px); font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fffbe8, #ffd27a 45%, #b96c1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 rgba(50, 26, 4, .6)) drop-shadow(0 0 30px rgba(255, 170, 60, .5));
  animation: countPop .9s ease both;
}
.countdown em { margin-top: 12px; font-style: normal; font-size: 10px; letter-spacing: .16em; color: #cfdcec; opacity: .8; }
@keyframes countPop { 0% { transform: scale(1.7); opacity: 0; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(.96); opacity: .95; } }

/* ================= 弹层 ================= */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  background: rgba(3, 6, 11, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.sheet {
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(48, 80, 120, .45), transparent 60%),
    linear-gradient(180deg, #101c2c 0%, #0a131f 62%, #070d16 100%);
  border: 1px solid rgba(255, 210, 122, .22);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 50px rgba(0, 0, 0, .6);
  animation: sheetUp .24s cubic-bezier(.2, .8, .3, 1) both;
  overscroll-behavior: contain;
}
.sheet.compact { max-width: 480px; }
.sheet.tall { max-height: 90vh; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 18px; letter-spacing: .06em; color: #fff1d2; }
.sheet-head p { margin: 3px 0 0; font-size: 9px; color: #8ba1b8; letter-spacing: .05em; }
.sheet-close {
  margin-left: auto; width: 34px; height: 34px; flex: none;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #b9cbdd;
}
.sheet-close .mp-icon { width: 16px; height: 16px; }
.gold-mini { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; background: rgba(255, 190, 90, .1); border: 1px solid rgba(255, 190, 90, .3); }
.gold-mini .mp-icon { width: 13px; height: 13px; color: #ffd27a; }
.gold-mini b { font-size: 12px; color: #ffe6a8; font-variant-numeric: tabular-nums; }
.sheet-ok { width: 100%; margin-top: 12px; }

.shop-list { display: flex; flex-direction: column; gap: 9px; }
.shop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(25, 40, 58, .72), rgba(9, 16, 26, .8));
  border: 1px solid rgba(150, 190, 230, .12);
}
.shop-ico {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(255, 210, 122, .25), rgba(60, 40, 14, .5));
  border: 1px solid rgba(255, 210, 122, .3);
  color: #ffd27a;
}
.shop-ico .mp-icon { width: 22px; height: 22px; }
.shop-body { flex: 1; min-width: 0; }
.shop-body b { font-size: 13px; color: #fff1d2; letter-spacing: .04em; }
.shop-body small { display: block; font-size: 8px; color: #92a7bc; margin-top: 2px; }
.shop-lv { display: flex; gap: 3px; margin-top: 5px; }
.shop-lv i { width: 16px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.shop-lv i.on { background: linear-gradient(90deg, #ffd27a, #ffb347); box-shadow: 0 0 6px rgba(255, 190, 80, .6); }
.buy-btn {
  flex: none; min-width: 74px; padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 214, 130, .95), rgba(215, 145, 50, .95));
  color: #2a1606; font-size: 11px; font-weight: 800;
  box-shadow: 0 3px 0 #71400f, 0 4px 10px rgba(0, 0, 0, .3);
}
.buy-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #71400f; }
.buy-btn.disabled, .buy-btn:disabled {
  background: rgba(80, 95, 110, .35); color: #8798a8; box-shadow: none;
}
.buy-btn.done { background: rgba(80, 160, 110, .22); color: #9fe0b5; box-shadow: none; }

.recommend-box {
  margin-top: 10px; padding: 10px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(40, 30, 12, .42), rgba(10, 16, 26, .8));
  border: 1px solid rgba(255, 210, 122, .24);
}
.recommend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.recommend-head b { font-size: 12px; color: #ffd27a; letter-spacing: .06em; }
.recommend-head small { font-size: 8px; color: #92a7bc; }
.recommend-list { display: flex; gap: 6px; margin: 8px 0; }
.rec-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px; border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 210, 122, .16);
}
.rec-item .mp-icon { width: 16px; height: 16px; color: #ffd27a; }
.rec-item b { font-size: 9px; color: #e8f2ff; }
.rec-item em { font-style: normal; font-size: 8px; color: #ffd27a; }
.rec-item.done { opacity: .5; }
.recommend-buy { width: 100%; }
.recommend-buy:disabled { background: rgba(80, 95, 110, .35); color: #8798a8; box-shadow: none; }

.list-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #dfeafa; font-size: 13px; letter-spacing: .04em;
  margin-bottom: 8px;
}
.list-btn .mp-icon { width: 18px; height: 18px; color: #a9c8e6; }
.list-btn:active { background: rgba(140, 200, 255, .12); }
.list-btn.danger { color: #ff9c88; border-color: rgba(255, 100, 80, .22); }
.list-btn.danger .mp-icon { color: #ff9c88; }

.help-list { display: flex; flex-direction: column; gap: 8px; }
.help-item { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); }
.help-item b { font-size: 12px; color: #ffd27a; letter-spacing: .06em; }
.help-item p { margin: 4px 0 0; font-size: 10px; line-height: 1.6; color: #a7b8c9; }

.history-list { display: flex; flex-direction: column; gap: 7px; max-height: 50vh; overflow-y: auto; }
.history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-left: 3px solid #5ade8a;
}
.history-item.lose { border-left-color: #ff6a58; }
.history-item.draw { border-left-color: #ffd27a; }
.history-item .h-res { font-size: 12px; font-weight: 800; width: 34px; color: #8bf0ae; }
.history-item.lose .h-res { color: #ff9c88; }
.history-item.draw .h-res { color: #ffd27a; }
.history-item .h-mid { flex: 1; min-width: 0; }
.history-item .h-mid b { font-size: 11px; color: #e8f2ff; }
.history-item .h-mid small { display: block; font-size: 8px; color: #8ba1b8; margin-top: 2px; }
.history-item .h-kda { font-size: 11px; color: #ffd27a; font-variant-numeric: tabular-nums; }
.empty-tip { padding: 26px 10px; text-align: center; font-size: 10px; color: #7f93a9; line-height: 1.7; }

.codex-list { display: flex; flex-direction: column; gap: 9px; max-height: 58vh; overflow-y: auto; }
.codex-item { display: flex; gap: 9px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07); }
.codex-item canvas { width: 58px; height: 72px; border-radius: 9px; flex: none; background: #0a1420; }
.codex-info { flex: 1; min-width: 0; }
.codex-info .ci-top { display: flex; align-items: baseline; gap: 6px; }
.codex-info b { font-size: 13px; color: #fff1d2; }
.codex-info em { font-style: normal; font-size: 8px; color: #8ed0ff; letter-spacing: .1em; }
.codex-info p { margin: 3px 0 0; font-size: 9px; line-height: 1.5; color: #92a7bc; }
.codex-info p b { font-size: 9px; color: #ffd27a; }

.profile-card { display: flex; align-items: center; gap: 16px; padding: 10px 4px 16px; }
.profile-stats { flex: 1; display: flex; justify-content: space-around; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.profile-stats b { font-size: 18px; color: #ffd27a; font-variant-numeric: tabular-nums; }
.profile-stats small { font-size: 8px; color: #8ba1b8; letter-spacing: .1em; }
.field-label { display: block; font-size: 9px; color: #8ba1b8; letter-spacing: .16em; margin: 4px 0 6px; }
.text-input {
  width: 100%; height: 46px; padding: 0 12px; border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(150, 190, 230, .18);
  color: #fff1d2; font-size: 14px; outline: none;
}
.text-input:focus { border-color: rgba(255, 210, 122, .6); }
#profileSave { width: 100%; margin-top: 12px; }

/* ================= 结算 ================= */
.result {
  position: absolute; inset: 0; z-index: 70;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  overflow-y: auto;
  background:
    radial-gradient(80% 50% at 50% 12%, rgba(255, 190, 90, .18), transparent 62%),
    rgba(3, 6, 11, .88);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.result-rays {
  position: absolute; left: 50%; top: 20%; width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 122, .16) 0deg 3deg, transparent 3deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: spin 60s linear infinite;
  pointer-events: none;
}
.result-inner { position: relative; z-index: 2; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.result-crest {
  width: 54px; height: 54px; margin-top: 4px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(255, 230, 168, .3), rgba(50, 34, 12, .75));
  border: 1px solid rgba(255, 210, 122, .55);
  box-shadow: 0 0 26px rgba(255, 180, 60, .28), inset 0 0 14px rgba(255, 200, 100, .18);
}
.result-crest .mp-icon { width: 28px; height: 28px; color: #ffd27a; }
.result.lose .result-crest { border-color: rgba(160, 190, 220, .35); box-shadow: 0 0 22px rgba(90, 140, 200, .2); }
.result.lose .result-crest .mp-icon { color: #b9cee2; }
.result-kicker { font-size: 9px; letter-spacing: .36em; color: #c9a86c; margin-top: 6px; }
.result h2 {
  margin: 2px 0 0; font-size: clamp(46px, 16vw, 66px); line-height: 1.05; font-weight: 900;
  letter-spacing: .1em;
  background: linear-gradient(180deg, #fffbe8, #ffe0a0 38%, #ffb347 58%, #a7661c 74%, #ffe9b0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(60, 30, 6, .6)) drop-shadow(0 0 28px rgba(255, 170, 60, .45));
}
.result.lose h2 {
  background: linear-gradient(180deg, #e8f2ff, #9fb8d4 40%, #57718e 62%, #cfe4ff);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 4px 0 rgba(10, 20, 30, .6)) drop-shadow(0 0 24px rgba(90, 140, 200, .35));
}
.result.draw h2 {
  background: linear-gradient(180deg, #fffbe8, #ffe0a0 40%, #a8b8c8 70%, #ffffff);
  -webkit-background-clip: text; background-clip: text;
}
.result > .result-inner > p { margin: 5px 0 0; font-size: 10px; letter-spacing: .1em; color: #b6c6d6; }
.result-score { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 26px; font-weight: 800; }
.result-score .blue { color: #8ed0ff; }
.result-score .red { color: #ff9c88; }
.result-score em { font-style: normal; font-size: 14px; color: #8fa3ba; }
.mvp-card {
  width: 100%; display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(255, 200, 100, .14), rgba(16, 26, 40, .9));
  border: 1px solid rgba(255, 210, 122, .32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.mvp-card canvas { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255, 210, 122, .7); flex: none; }
.mvp-info { flex: 1; min-width: 0; }
.mvp-info small { font-size: 8px; letter-spacing: .24em; color: #c9a86c; }
.mvp-info b { display: block; font-size: 15px; color: #fff1d2; margin-top: 1px; }
.mvp-info b em { font-style: normal; font-size: 9px; color: #8fa3ba; margin-left: 5px; font-weight: 400; }
.mvp-kda { font-size: 11px; color: #ffd27a; font-variant-numeric: tabular-nums; }
.stat-grid {
  width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 10px;
}
.stat-cell {
  padding: 8px 2px; border-radius: 10px; text-align: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
}
.stat-cell b { display: block; font-size: 14px; color: #eaf3ff; font-variant-numeric: tabular-nums; }
.stat-cell small { display: block; margin-top: 2px; font-size: 8px; color: #8ba1b8; letter-spacing: .1em; }
.result-btns { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; gap: 8px; }
.result-row .btn-ghost { flex: 1; }
.result .btn-gold { width: 100%; min-height: 50px; }

/* ================= 加载 / 提示 ================= */
.loading {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 50% at 50% 38%, #16283f 0%, #0a131f 55%, #05080e 100%);
}
.loading-inner { display: flex; flex-direction: column; align-items: center; width: min(88%, 340px); text-align: center; }
.loading-emblem { position: relative; width: 86px; height: 86px; display: grid; place-items: center; margin-bottom: 18px; }
.loading-emblem span {
  width: 34px; height: 34px; transform: rotate(45deg);
  background: linear-gradient(160deg, #fff6d8, #ffb347 55%, #7c3d0d);
  border-radius: 4px; box-shadow: 0 0 30px rgba(255, 180, 70, .6);
}
.loading-emblem i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255, 210, 122, .4);
  border-top-color: rgba(255, 210, 122, .95);
  animation: spin360 1.4s linear infinite;
}
.loading-emblem i::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  border: 1px dashed rgba(120, 190, 255, .28);
  animation: spin360 4s linear infinite reverse;
}
@keyframes spin360 { to { transform: rotate(360deg); } }
.loading h3 { margin: 0; font-size: 19px; letter-spacing: .08em; color: #fff1d2; }
.loading p { margin: 6px 0 0; font-size: 10px; letter-spacing: .14em; color: #8ba1b8; }
.loading-lineup {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 14px;
}
.lu-side { display: flex; align-items: center; gap: 4px; flex: 1; }
.lu-side.blue { justify-content: flex-start; }
.lu-side.red { justify-content: flex-end; }
.lu-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.lu-hero canvas {
  width: clamp(34px, 11vw, 44px); height: clamp(34px, 11vw, 44px);
  border-radius: 10px; display: block; background: #0a1420;
  border: 1px solid rgba(110, 190, 255, .5);
  box-shadow: 0 0 10px rgba(80, 170, 255, .16);
}
.lu-side.red .lu-hero canvas {
  border-color: rgba(255, 110, 90, .5);
  box-shadow: 0 0 10px rgba(255, 100, 80, .16);
}
.lu-hero span {
  font-size: 7px; color: #a9c2d8; max-width: 46px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lu-vs {
  flex: none; font-size: 11px; font-weight: 800; color: #ffd27a;
  letter-spacing: .08em; text-shadow: 0 0 10px rgba(255, 180, 60, .4);
}
.loading-bar { width: 100%; height: 4px; margin-top: 18px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.loading-bar i { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, #ffb347, #ffe6a8); border-radius: 3px; transition: width .5s ease; }
.loading-tip { margin-top: 12px; font-size: 9px; line-height: 1.6; color: #6e8298; letter-spacing: .04em; }

.toast {
  position: fixed; left: 50%; top: 16%; z-index: 100;
  transform: translate(-50%, -8px);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(8, 14, 22, .92);
  border: 1px solid rgba(255, 210, 122, .3);
  color: #ffe6a8; font-size: 10px; letter-spacing: .06em;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  max-width: 80vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= 首页明亮版 ================= */
.lobby { background: #8fd3f2; }
.lobby-sky {
  background:
    radial-gradient(120% 80% at 50% 0%, #fff8dd 0%, #ffe4ad 14%, #cfeaff 38%, #8fd0f5 66%, #5aa6d6 100%);
}
.lobby-sky::after {
  background: radial-gradient(50% 40% at 50% 18%, rgba(255, 246, 200, .7), transparent 70%);
  mix-blend-mode: screen;
}
.lobby-stars { display: none; }
.lobby-rays {
  background: repeating-conic-gradient(from 0deg, rgba(255, 248, 210, .16) 0deg 4deg, transparent 4deg 16deg);
  opacity: .55;
}
.lobby-moon {
  left: 50%; top: 9%; width: 150px; height: 150px;
  background: radial-gradient(circle at 45% 45%, #fffbe6 0%, #ffe9a8 28%, rgba(255, 210, 130, .35) 55%, transparent 70%);
  filter: blur(2px); opacity: .9;
}
.m-back {
  background: linear-gradient(180deg, #a9d6ef 0%, #6fa8c8 60%, transparent 100%);
  opacity: .55;
}
.m-mid {
  background: linear-gradient(180deg, #7fbf9a 0%, #3f7a5e 80%, transparent 100%);
  opacity: .7;
}
.m-front {
  background: linear-gradient(180deg, #4f8a5b 0%, #1f3d2a 75%, #12241a 100%);
  opacity: .9;
}
.lobby-castle {
  left: 20%; bottom: 33%; width: 190px; height: 170px;
  background: linear-gradient(180deg, #fff8e8 0%, #e8d3a8 30%, #bfa06a 60%, #7a5b33 100%);
  opacity: .72;
  filter: drop-shadow(0 10px 24px rgba(70, 100, 80, .25));
}
.lobby-island {
  background:
    radial-gradient(60% 100% at 50% 20%, rgba(210, 255, 210, .6), transparent 60%),
    radial-gradient(50% 80% at 50% 55%, #5f9b6a 0%, #244d3a 70%);
  box-shadow: 0 0 60px rgba(120, 220, 180, .3), 0 20px 50px rgba(40, 80, 60, .25);
}
.island-core {
  background: linear-gradient(180deg, #fffbe0, #ffbf5a);
  box-shadow: 0 0 26px rgba(255, 200, 90, .9);
}
.lobby-fog {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 250, 235, .25) 40%, #f5eedf 100%);
}
.home-clouds {
  position: absolute; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, #fff 0%, rgba(255, 255, 255, .85) 40%, rgba(255, 255, 255, 0) 70%);
  filter: blur(6px); opacity: .8;
  animation: cloudDrift 42s linear infinite;
}
.home-clouds.c1 { width: 220px; height: 70px; left: -10%; top: 18%; }
.home-clouds.c2 { width: 300px; height: 90px; left: 58%; top: 30%; animation-duration: 55s; animation-delay: -12s; opacity: .6; }
.home-clouds.c3 { width: 180px; height: 60px; left: 30%; top: 46%; animation-duration: 48s; animation-delay: -30s; opacity: .45; }
@keyframes cloudDrift { from { transform: translateX(-10vw); } to { transform: translateX(115vw); } }

.lobby-inner {
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 84px);
}
.home-top { display: flex; align-items: center; gap: 6px; }
.profile-chip {
  max-width: 44vw; padding: 5px 10px 5px 5px; gap: 8px;
  background: linear-gradient(135deg, rgba(18, 30, 48, .88), rgba(10, 17, 28, .7));
}
.avatar-wrap { width: 40px; height: 40px; }
.profile-meta b { font-size: 13px; }
.profile-meta em { font-size: 9px; }
.home-res { flex: 1; display: flex; justify-content: center; gap: 4px; min-width: 0; }
.res-pill {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 6px; border-radius: 9px;
  background: rgba(10, 24, 36, .55);
  border: 1px solid rgba(255, 210, 122, .24);
  color: #fff1d2; white-space: nowrap;
}
.res-pill .mp-icon { width: 12px; height: 12px; color: #ffd27a; }
.res-pill b { font-size: 10px; font-weight: 700; }
.res-pill small { font-size: 7px; color: #b9cadb; }
#soundBtn { width: 38px; height: 38px; flex: none; }
#soundBtn .mp-icon { width: 18px; height: 18px; }

.home-head { margin-top: 6px; padding: 2px 0 0; }
.brand-eyebrow { color: #2f6688; }
.brand-eyebrow span { background: linear-gradient(90deg, transparent, #2f7fa8); }
.brand-eyebrow span:last-child { background: linear-gradient(90deg, #2f7fa8, transparent); }
.brand-title {
  filter: drop-shadow(0 2px 0 rgba(90, 50, 10, .55)) drop-shadow(0 0 18px rgba(255, 230, 170, .6));
}
.brand-sub { color: #2f4f67; opacity: .92; }
.home-actions {
  margin-top: auto; padding-top: 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.home-startbox { display: flex; flex-direction: column; gap: 9px; }
.home-modes { display: flex; flex-direction: column; gap: 9px; }
.home-modes .mode-btn { flex: none; }
.mode-card {
  position: relative; width: 100%; height: 112px; padding: 0;
  border-radius: 16px; overflow: hidden; display: block; text-align: left;
  background: #223; border: 1.5px solid rgba(255, 255, 255, .28);
  box-shadow: 0 8px 22px rgba(30, 60, 80, .2);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
  flex: none;
}
.mode-card:active { transform: scale(.985); }
.mode-card.quick { background: linear-gradient(120deg, #e8a24a, #b96028); }
.mode-card.team { background: linear-gradient(120deg, #5d4a9e, #2c2755); }
.mode-card.active {
  border-color: #ffd27a;
  box-shadow: 0 0 0 1px rgba(255, 210, 122, .45), 0 10px 26px rgba(255, 160, 60, .25);
}
.mode-art { position: absolute; inset: 0; display: block; }
.mode-art canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.mode-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0) 28%, rgba(10, 14, 20, .8) 100%);
}
.mode-badge {
  position: absolute; top: 10px; left: 12px; z-index: 2;
  padding: 3px 9px; border-radius: 6px 10px 10px 0;
  background: linear-gradient(180deg, #ffe6a8, #e09a3a);
  color: #3a2108; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.mode-card.team .mode-badge {
  background: linear-gradient(180deg, #e3d6ff, #8f6ee0);
  color: #241540;
}
.mode-info {
  position: absolute; left: 13px; bottom: 10px; z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
}
.home-modes .mode-info b {
  font-size: 17px; font-weight: 800; color: #fff8e8; letter-spacing: .04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
.home-modes .mode-info small {
  font-size: 9px; color: #eadfca; letter-spacing: .04em;
  text-shadow: 0 1px 4px #000;
}
.mode-chev {
  position: absolute; right: 10px; bottom: 18px; z-index: 2;
  width: 20px; height: 20px; color: #fff1d2; opacity: .9;
}
.mode-card.active .mode-chev { color: #ffd27a; }

.home-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center;
  padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: linear-gradient(180deg, rgba(10, 18, 28, .12), rgba(10, 18, 28, .95));
  border-top: 1px solid rgba(255, 210, 122, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 0 3px; border-radius: 10px;
  color: #a8bbce; font-size: 9px; letter-spacing: .06em;
}
.nav-item .mp-icon { width: 20px; height: 20px; }
.nav-item:active { background: rgba(255, 210, 122, .08); }
.nav-item.active { color: #ffd27a; }
.nav-item.active .mp-icon { filter: drop-shadow(0 0 6px rgba(255, 190, 80, .6)); }
.nav-item.active::after {
  content: ""; width: 16px; height: 2px; border-radius: 2px;
  background: #ffd27a; box-shadow: 0 0 6px rgba(255, 200, 90, .8);
}

/* 小屏适配 */
@media (max-height: 700px) {
  .hero-showcase { display: none; }
  .brand-title { font-size: clamp(36px, 11vw, 46px); }
  .lobby-actions { padding-top: 8px; gap: 8px; }
  .brand-sub { display: none; }
  .minimap-wrap { height: 106px; }
  .hud-bottom { height: 280px; }
}
@media (max-width: 360px) {
  .controls-right { transform: scale(.92); transform-origin: right bottom; }
  .joy-zone { transform: scale(.92); transform-origin: left bottom; }
  .status-stack { width: 146px; }
  .team-strip { padding-left: 88px; }
  .lobby-inner { padding-left: 14px; padding-right: 14px; }
}
input.text-input { user-select: text; -webkit-user-select: text; }

@media (min-width: 700px) {
  .lobby-inner { max-width: 640px; margin: 0 auto; width: 100%; }
  .game { left: 50%; right: auto; width: 640px; transform: translateX(-50%); border-left: 1px solid rgba(255, 210, 122, .08); border-right: 1px solid rgba(255, 210, 122, .08); }
  .select { left: 50%; right: auto; width: 640px; transform: translateX(-50%); }
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .result h2 {
    color: #ffd27a;
    background: none;
    -webkit-text-fill-color: #ffd27a;
  }
}

/* ================= 横屏主布局 ================= */
@media (orientation: landscape) and (min-width: 480px) {
  .game {
    left: 0; right: 0; width: auto; transform: none;
    border-left: 0; border-right: 0;
  }
  .select {
    left: 0; right: 0; width: auto; transform: none;
  }
  .lobby-inner {
    max-width: 1100px; margin: 0 auto; width: 100%;
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 18px; row-gap: 4px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 22px calc(env(safe-area-inset-bottom, 0px) + 66px);
    overflow: hidden;
  }
  .home-top { grid-column: 1 / -1; grid-row: 1; }
  .home-head {
    grid-column: 1; grid-row: 2; align-self: end;
    text-align: left; padding-left: 6px; margin-top: 0;
  }
  .home-head .brand-eyebrow { justify-content: flex-start; }
  .home-head .brand-title { font-size: clamp(40px, 6.2vw, 68px); }
  .home-head .brand-sub { display: block; letter-spacing: .16em; }
  .home-actions { display: contents; }
  .home-modes {
    grid-column: 2; grid-row: 2 / 4;
    display: flex; flex-direction: row; gap: 10px;
    align-self: center; margin: 0;
  }
  .home-modes .mode-btn { flex: 1; width: auto; }
  .mode-card { height: clamp(100px, 30vh, 148px); }
  .home-startbox {
    grid-column: 1; grid-row: 3; align-self: end;
    padding-right: 12px; gap: 8px;
  }
  .home-startbox .btn-start { min-height: 48px; }
  .home-startbox .btn-start b { font-size: 16px; }
  .home-nav {
    left: 50%; right: auto; width: 100%; max-width: 1100px;
    transform: translateX(-50%);
    padding: 5px 14px calc(env(safe-area-inset-bottom, 0px) + 5px);
  }
  .nav-item { flex-direction: row; gap: 6px; padding: 6px 0; font-size: 10px; }
  .nav-item .mp-icon { width: 18px; height: 18px; }

  /* 对局 HUD：横屏 */
  .hud-top { padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 0; gap: 8px; }
  .minimap-wrap { width: 142px; height: 74px; border-radius: 10px; }
  .minimap-tag { font-size: 6px; letter-spacing: .2em; padding: 1px 0; }
  .score-box { max-width: 320px; margin: 0 auto; padding: 4px 14px 5px; border-radius: 10px; }
  .score-line { font-size: 15px; gap: 10px; }
  .timer { font-size: 14px; }
  .objective { font-size: 8px; }
  .hud-btns .round-btn { width: 34px; height: 34px; }
  .team-strip {
    position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
    padding: 0; gap: 10px; z-index: 3;
  }
  .team-member { width: 24px; height: 24px; }
  .boss-bar {
    position: absolute; top: 104px; left: 50%; transform: translateX(-50%);
    margin: 0; width: 300px; max-width: 42vw; z-index: 3;
  }
  .kill-feed { left: 190px; top: 132px; width: 220px; }
  .buff-pill { left: 12px; top: 192px; }
  .tower-status { right: 12px; top: 54px; }
  .hud-bottom { height: 260px; }
  .status-stack {
    left: 12px; top: 84px; bottom: auto;
    width: 172px;
  }
  .joy-zone { left: 10px; bottom: 10px; width: 136px; height: 136px; }
  .joy-base { width: 116px; height: 116px; }
  .joy-knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .controls-right { right: 14px; bottom: 10px; width: 282px; height: 200px; }
  .skill-btn[data-skill="0"] { right: 96px; bottom: 2px; }
  .skill-btn[data-skill="1"] { right: 104px; bottom: 70px; }
  .skill-btn[data-skill="2"] { right: 30px; bottom: 130px; }
  .action-btn.recall { right: 172px; bottom: 4px; }
  .action-btn.shop { right: 172px; bottom: 62px; }
  .recall-progress { bottom: 116px; }
  .death-overlay { top: 42%; }
  .kill-banner { top: 24%; }
  .countdown span { font-size: 82px; }

  /* 选英雄：横屏 */
  .select-head { padding: calc(env(safe-area-inset-top, 0px) + 6px) 18px 6px; }
  .select-title h2 { font-size: 17px; }
  .select-scroll {
    display: grid; grid-template-columns: 1.28fr 0.72fr;
    gap: 14px; padding: 4px 18px 10px; align-items: start;
  }
  .hero-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-card { min-height: 128px; border-radius: 11px; }
  .hero-card-info b { font-size: 12px; }
  .hero-card-info small { font-size: 8px; }
  .hero-card-tag { font-size: 7px; }
  .hero-detail { margin: 0; padding: 11px; }
  .detail-head h3 { font-size: 17px; }
  .select-tip { grid-column: 1 / -1; margin: 2px 0 0; }
  .select-bar { padding: 7px 18px calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .btn-confirm { min-height: 44px; }

  /* 结算：横屏 */
  .result { align-items: center; padding: 10px 16px; }
  .result-inner { max-width: 560px; }
  .result-crest { width: 42px; height: 42px; margin-top: 0; }
  .result-crest .mp-icon { width: 22px; height: 22px; }
  .result h2 { font-size: 48px; }
  .result-kicker { margin-top: 2px; }
  .mvp-card { margin-top: 7px; padding: 7px 10px; }
  .stat-grid { margin-top: 7px; gap: 5px; }
  .stat-cell { padding: 6px 2px; }
  .stat-cell b { font-size: 13px; }
  .result-btns { margin-top: 8px; flex-direction: row; align-items: stretch; }
  .result-btns .btn-gold { flex: 1.2; min-height: 42px; }
  .result-row { flex: 1; }
  .result-row .btn-ghost { min-height: 42px; }

  /* 加载：横屏 */
  .loading-inner { width: min(72%, 480px); }
  .loading-emblem { width: 66px; height: 66px; margin-bottom: 10px; }
  .loading-emblem span { width: 26px; height: 26px; }
  .loading-bar { margin-top: 10px; }
  .loading-tip { margin-top: 8px; }

  /* 弹层：横屏居中 */
  .modal { align-items: center; padding: 10px 16px; }
  .sheet {
    border-radius: 18px; border-bottom: 1px solid rgba(255, 210, 122, .22);
    max-height: 92vh; width: min(620px, 94vw);
  }
  .sheet.tall { max-height: 92vh; }
}

/* 更矮的横屏（手机横置） */
@media (orientation: landscape) and (max-height: 420px) {
  .home-head .brand-title { font-size: clamp(34px, 5.6vw, 48px); }
  .home-head .brand-sub { display: none; }
  .mode-card { height: 108px; }
  .home-startbox .btn-start { min-height: 44px; }
  .home-startbox .btn-start b { font-size: 15px; }
  .home-startbox .diff-row button { padding: 5px 0; }
  .mode-info { bottom: 7px; }
  .home-modes .mode-info b { font-size: 15px; }
  .home-nav { padding-top: 3px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 3px); }
  .nav-item { padding: 4px 0 2px; font-size: 9px; }
  .minimap-wrap { width: 118px; height: 54px; }
  .team-strip { top: 44px; }
  .team-member { width: 22px; height: 22px; }
  .boss-bar { top: 84px; width: 260px; }
  .status-stack { top: 64px; width: 148px; }
  .kill-feed { top: 108px; left: 164px; width: 190px; }
  .buff-pill { top: 168px; }
  .tower-status { top: 44px; right: 10px; }
  .joy-zone { width: 118px; height: 118px; bottom: 8px; }
  .joy-base { width: 102px; height: 102px; }
  .joy-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .controls-right { width: 252px; height: 176px; bottom: 8px; }
  .skill-btn[data-skill="0"] { right: 88px; }
  .skill-btn[data-skill="1"] { right: 94px; bottom: 64px; }
  .skill-btn[data-skill="2"] { right: 26px; bottom: 116px; }
  .action-btn.recall { right: 156px; }
  .action-btn.shop { right: 156px; bottom: 58px; }
  .attack-btn { width: 78px; height: 78px; }
  .attack-btn .attack-ico .mp-icon { width: 26px; height: 26px; }
  .recall-progress { bottom: 100px; width: 160px; }
  .kill-banner { top: 30%; }
  .result { align-items: flex-start; }
}

/* 极小横屏（320 高左右） */
@media (orientation: landscape) and (max-height: 360px) {
  .mode-card { height: 92px; }
  .home-head .brand-title { font-size: 34px; }
  .status-stack { width: 142px; }
  .minimap-wrap { width: 104px; height: 48px; }
  .kill-feed { top: 98px; left: 158px; width: 170px; }
  .boss-bar { top: 76px; width: 230px; }
  .hud-bottom { height: 240px; }
}
