:root {
  --orange: #FF8A3D;
  --orange-hot: #FFB15E;
  --gold: #FFD08A;
  --gold-deep: #E9A44C;
  --ink: #160d12;
  --panel: rgba(30, 17, 22, .78);
  --line: rgba(255, 190, 122, .22);
  --text: #FFF3E4;
  --muted: #D8BFA9;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0c070a;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 138, 61, .12), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(150, 39, 46, .16), transparent 45%);
  pointer-events: none;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #160d12;
  touch-action: none;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 开始页：封面成品图 + 一键开局，不是标题栏 */
#stage.title-mode #hud,
#stage.title-mode #hint,
#stage.title-mode .hurt-flash,
#stage.title-mode .boss-flash { display: none; }

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 138, 61, .16), transparent 58%),
    linear-gradient(180deg, #1b1015 0%, #0b0609 100%);
}

.start-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 18%, transparent 32%, rgba(5, 2, 5, .5) 100%);
}

.start-hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  overflow: hidden;
}

.start-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.02);
  -webkit-user-drag: none;
  pointer-events: none;
}

.start-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(12, 6, 10, .46) 0%, rgba(12, 6, 10, 0) 24%, rgba(12, 6, 10, 0) 52%, #140c11 97%),
    linear-gradient(90deg, rgba(10, 5, 8, .48) 0%, transparent 26%, transparent 74%, rgba(10, 5, 8, .48) 100%);
}

.start-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 5, 8, .5) 100%);
}

.start-brand {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: calc(var(--safe-top) + 14px);
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-seal {
  width: 34px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 138, 61, .75);
  border-radius: 7px;
  background: rgba(28, 12, 10, .62);
  color: #FFC98F;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  transform: rotate(-4deg);
  box-shadow: 0 0 18px rgba(255, 110, 40, .2), inset 0 0 12px rgba(255, 128, 52, .12);
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .17em;
  color: #FFCFA4;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .9);
}

.brand-meta em {
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .18em;
  color: #FFF3E2;
}

.start-content {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  margin-top: -84px;
  padding: 0 20px calc(18px + var(--safe-bottom));
  text-align: center;
}

.start-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .3em;
  color: #FFAE74;
  text-shadow: 0 1px 5px rgba(30, 6, 0, .8);
}

.start-kicker i {
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 178, 112, .72));
}

.start-kicker i:last-child { transform: scaleX(-1); }

.start-title {
  margin: 9px 0 0;
  font-size: clamp(34px, 10.4vw, 48px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: .05em;
  color: #FFF0DC;
  text-shadow: 0 3px 0 rgba(84, 28, 6, .18), 0 10px 30px rgba(255, 112, 40, .24);
}

.start-title em {
  font-style: normal;
  background: linear-gradient(180deg, #FFE2AE 6%, #FF9B4A 54%, #E75F18 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 5px 16px rgba(255, 118, 44, .3));
}

.start-sub {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .05em;
  color: #CDAF9C;
}

.start-feats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
}

.start-feats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 99px;
  border: 1px solid rgba(255, 176, 108, .18);
  background: rgba(58, 32, 28, .54);
  color: #F1D4BC;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
}

.start-feats .mp-icon { width: 13px; height: 13px; color: #FFB469; }

.start-btn {
  width: 100%;
  max-width: 340px;
  min-height: 54px;
  margin: 16px auto 0;
  border-radius: 16px;
  font-size: 18px;
  letter-spacing: .2em;
  background: linear-gradient(160deg, #FFC06F, #FF8A3D 52%, #DE581B);
  box-shadow: 0 12px 30px rgba(224, 86, 24, .4), 0 0 0 1px rgba(255, 231, 188, .18), inset 0 1px 0 rgba(255, 244, 212, .72);
  animation: startPulse 2.6s ease-in-out infinite;
}

.start-btn:active { transform: scale(.975); animation: none; }
.start-btn .mp-icon { width: 22px; height: 22px; }

.start-best {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  font-size: 10px;
  letter-spacing: .06em;
  color: #A88472;
}

.start-best .mp-icon { width: 14px; height: 14px; color: #D9A05C; opacity: .9; }

@keyframes startPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(224, 86, 24, .38), 0 0 0 1px rgba(255, 231, 188, .18), inset 0 1px 0 rgba(255, 244, 212, .72); }
  50% { box-shadow: 0 12px 34px rgba(255, 110, 36, .52), 0 0 0 5px rgba(255, 138, 61, .08), inset 0 1px 0 rgba(255, 244, 212, .8); }
}

@media (max-height: 690px) {
  .start-content { margin-top: -62px; padding-bottom: calc(12px + var(--safe-bottom)); }
  .start-title { font-size: clamp(30px, 9vw, 38px); }
  .start-sub { margin-top: 7px; }
  .start-feats { margin-top: 9px; }
  .start-btn { margin-top: 12px; min-height: 50px; }
  .start-best { margin-top: 8px; }
}


/* 战斗 HUD：贴顶信息层，没有标题栏 */
#hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  padding: calc(var(--safe-top) + 10px) 14px 0;
}

.hud-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}

.hero-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  max-width: 258px;
  min-width: 0;
  padding: 7px 12px 7px 7px;
  border-radius: 17px;
  border: 1px solid rgba(255, 194, 126, .26);
  background: linear-gradient(150deg, rgba(52, 30, 27, .92), rgba(24, 14, 20, .82));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 222, 173, .12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lv-orb {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #2b1406;
  background: radial-gradient(circle at 35% 28%, #FFE0A6, var(--orange) 62%, #C5541B);
  border: 1px solid rgba(255, 231, 188, .7);
  box-shadow: 0 0 14px rgba(255, 138, 61, .42), inset 0 -3px 6px rgba(120, 40, 0, .35);
}

.lv-orb span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .72;
  transform: translateY(1px);
}

.lv-orb b {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.hero-bars { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.hp-bar {
  position: relative;
  height: 14px;
  border-radius: 99px;
  background: rgba(8, 4, 7, .72);
  border: 1px solid rgba(255, 172, 108, .2);
  overflow: hidden;
}

.hp-bar .fill {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #C93D2D, #FF7E3D 48%, #FFC15D);
  box-shadow: 0 0 10px rgba(255, 106, 55, .55);
  transition: width .16s ease-out;
}

.hp-bar em {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .03em;
  color: #FFF6E9;
  text-shadow: 0 1px 2px rgba(50, 8, 0, .9);
}

.xp-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(8, 4, 7, .72);
  overflow: hidden;
  border: 1px solid rgba(255, 220, 160, .12);
}

.xp-bar .fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFB84E, #FFE6A0);
  box-shadow: 0 0 8px rgba(255, 204, 108, .7);
  transition: width .18s ease-out;
}

.run-chip {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 194, 126, .2);
  background: linear-gradient(150deg, rgba(44, 25, 27, .9), rgba(20, 12, 17, .8));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 222, 173, .1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.run-chip > div { display: flex; align-items: center; gap: 5px; line-height: 1; }

.run-chip .mp-icon { width: 13px; height: 13px; color: var(--gold); opacity: .9; }

.run-chip .time span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  color: #FFE7C9;
}

.run-chip .kills b,
.run-chip .kills span {
  font-size: 13px;
  font-weight: 900;
  color: var(--orange-hot);
  font-variant-numeric: tabular-nums;
}

.run-chip .kills em { font-style: normal; font-size: 9px; color: var(--muted); }

.run-chip .score span {
  font-size: 13px;
  font-weight: 900;
  color: #FFE0A6;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.run-chip .score em { font-style: normal; font-size: 9px; color: #C89F78; }

.boss-wrap {
  max-width: 420px;
  margin: 10px auto 0;
  padding: 7px 10px 9px;
  border-radius: 14px;
  border: 1px solid rgba(255, 124, 90, .34);
  background: linear-gradient(160deg, rgba(58, 22, 24, .9), rgba(24, 12, 17, .86));
  box-shadow: 0 8px 26px rgba(0, 0, 0, .42), 0 0 26px rgba(226, 69, 43, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: bossIn .36s ease-out both;
}

.boss-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 11px;
}

.boss-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #FFD9A8;
  background: rgba(255, 104, 68, .22);
  border: 1px solid rgba(255, 130, 92, .38);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.boss-tag .mp-icon { width: 11px; height: 11px; }

.boss-meta b { font-size: 14px; letter-spacing: .1em; color: #FFE2C4; }

.boss-meta em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: #FFB496;
  font-variant-numeric: tabular-nums;
}

.boss-bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(10, 3, 6, .8);
  overflow: hidden;
  border: 1px solid rgba(255, 120, 90, .18);
}

.boss-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8E1D22, #E8412C 55%, #FF9A53);
  box-shadow: 0 0 10px rgba(255, 84, 48, .55);
  transition: width .15s linear;
}

.combo {
  position: absolute;
  right: 16px;
  top: calc(var(--safe-top) + 92px);
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #FFC978;
  text-shadow: 0 2px 10px rgba(70, 20, 0, .9), 0 0 22px rgba(255, 138, 61, .5);
  transform-origin: right center;
}

.combo b { font-size: 32px; font-weight: 900; line-height: .9; letter-spacing: -.04em; }
.combo span { font-size: 11px; font-weight: 800; letter-spacing: .1em; opacity: .9; }
.combo.pop { animation: comboPop .26s ease-out; }

.notice {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translate(-50%, -6px);
  width: max-content;
  max-width: 88%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.notice b {
  display: block;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: .13em;
  color: #FFE5C2;
  text-shadow: 0 2px 0 rgba(72, 18, 0, .5), 0 0 28px rgba(255, 123, 46, .6);
}

.notice span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: .22em;
  color: #FFB888;
}

.notice.show { opacity: 1; transform: translate(-50%, 0); }

.hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 32px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 99px;
  border: 1px solid rgba(255, 196, 130, .25);
  background: rgba(24, 13, 18, .66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #FFE8CE;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: opacity .5s ease, transform .5s ease;
  animation: hintFloat 2.4s ease-in-out infinite;
}

.hint .mp-icon { width: 17px; height: 17px; color: var(--orange-hot); }
.hint em { font-style: normal; color: var(--muted); font-size: 10px; font-weight: 600; }
.hint.gone { opacity: 0; transform: translate(-50%, 10px); }

.hurt-flash, .boss-flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
}

.hurt-flash {
  background: radial-gradient(ellipse at center, transparent 38%, rgba(188, 22, 24, .32) 78%, rgba(255, 48, 32, .62) 100%);
  transition: opacity .1s linear;
}

.boss-flash {
  background: radial-gradient(ellipse at center, transparent 46%, rgba(255, 72, 38, .36) 100%);
  transition: opacity .28s ease-out;
}

/* 升级选技 */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 28%, rgba(24, 11, 17, .5), rgba(8, 4, 8, .84));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease-out both;
}

.overlay.hidden { display: none !important; }

.lv-panel {
  width: 100%;
  max-width: 560px;
  max-height: 92%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid rgba(255, 178, 106, .26);
  border-bottom: none;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 132, 61, .13), transparent 70%),
    linear-gradient(180deg, #291820, #170e14 68%, #120a10);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .66), inset 0 1px 0 rgba(255, 218, 166, .16);
  animation: sheetUp .34s cubic-bezier(.2, .9, .25, 1) both;
}

.sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 207, 157, .3);
  margin: 2px auto 12px;
}

.lv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .26em;
  color: #FFB47B;
  opacity: .9;
}

.lv-title {
  margin-top: 4px;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: .02em;
  color: #FFF1DE;
}

.lv-title b { color: var(--orange); font-size: 34px; text-shadow: 0 0 20px rgba(255, 138, 61, .4); }

.lv-seal {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px solid rgba(255, 138, 61, .62);
  color: #FFB072;
  font-size: 23px;
  font-weight: 900;
  transform: rotate(4deg);
  box-shadow: inset 0 0 14px rgba(255, 118, 45, .14), 0 0 18px rgba(255, 118, 45, .12);
}

.lv-tip {
  margin: 6px 0 13px;
  font-size: 11px;
  letter-spacing: .12em;
  color: #C7A58F;
}

.choices { display: flex; flex-direction: column; gap: 9px; }

.choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  text-align: left;
  border-radius: 15px;
  border: 1px solid rgba(255, 182, 118, .18);
  background: linear-gradient(110deg, rgba(74, 42, 30, .88), rgba(37, 21, 26, .92));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 220, 170, .08);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  animation: cardIn .3s cubic-bezier(.2, .9, .3, 1) both;
}

.choice:active {
  transform: scale(.982);
  border-color: rgba(255, 164, 92, .6);
  background: linear-gradient(110deg, rgba(96, 52, 32, .95), rgba(50, 26, 30, .96));
}

.choice-icon {
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #FFD4A0;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 209, 143, .4), transparent 58%),
    linear-gradient(150deg, #9C4A20, #4A1E16);
  border: 1px solid rgba(255, 198, 130, .36);
  box-shadow: inset 0 -4px 10px rgba(48, 10, 0, .36), 0 0 16px rgba(255, 116, 44, .12);
}

.choice-icon .mp-icon { width: 25px; height: 25px; }

.choice-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.choice-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
  color: #FFF0DB;
}

.choice-name em {
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  color: #FFD9A9;
  background: rgba(255, 138, 61, .16);
  border: 1px solid rgba(255, 160, 95, .28);
}

.choice-desc {
  font-size: 11px;
  line-height: 1.35;
  color: #D3B8A4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-go { flex: 0 0 auto; color: rgba(255, 185, 116, .6); display: flex; }
.choice-go .mp-icon { width: 19px; height: 19px; }

/* 阵亡结算 */
#over { align-items: center; padding: 20px 18px calc(20px + var(--safe-bottom)); }

.over-panel {
  width: 100%;
  max-width: 350px;
  position: relative;
  padding: 26px 22px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 168, 101, .3);
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(255, 116, 58, .16), transparent 72%),
    linear-gradient(170deg, #2B1920, #150c12 74%);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 220, 170, .13);
  text-align: center;
  animation: panelIn .38s cubic-bezier(.2, .9, .25, 1) both;
}

.over-seal {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 118, 64, .78);
  border-radius: 12px;
  color: #FF8B4C;
  font-size: 36px;
  font-weight: 900;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 22px rgba(255, 94, 40, .16), 0 0 26px rgba(255, 94, 40, .14);
}

.over-panel h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: .16em;
  color: #FFE8D0;
  font-weight: 900;
}

.over-sub { margin: 6px 0 20px; font-size: 11px; letter-spacing: .14em; color: #B9927F; }

.over-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(9, 4, 7, .38);
  border: 1px solid rgba(255, 188, 122, .12);
}

.over-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 6px 8px;
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(255, 196, 128, .055), rgba(255, 196, 128, .015));
  border: 1px solid rgba(255, 196, 128, .07);
}

.over-stats b {
  font-size: 20px;
  line-height: 1;
  color: #FFD19B;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.over-stats span { font-size: 9px; letter-spacing: .14em; color: #B9947F; }

.over-stats .stat-score b {
  font-size: 23px;
  color: #FFB05E;
  text-shadow: 0 0 18px rgba(255, 138, 61, .32);
}

.best-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 15px 0 17px;
  font-size: 11px;
  letter-spacing: .06em;
  color: #D8B28C;
}

.best-line .mp-icon { width: 15px; height: 15px; color: #FFC06F; }

.btn-primary {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 225, 174, .4);
  border-radius: 14px;
  background: linear-gradient(160deg, #FFB05B, #FF7C30 58%, #DB541C);
  color: #2C1103;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .16em;
  box-shadow: 0 9px 24px rgba(214, 81, 24, .34), inset 0 1px 0 rgba(255, 240, 205, .65);
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}

.btn-primary:active { transform: scale(.975); filter: brightness(1.06); }
.btn-primary .mp-icon { width: 20px; height: 20px; }

.over-hint { margin: 12px 0 0; font-size: 10px; color: #7E6258; letter-spacing: .03em; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes sheetUp {
  from { opacity: .4; transform: translateY(46px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes comboPop {
  0% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes bossIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hintFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

.hidden { display: none !important; }

/* 桌面预览时收成手机画幅，移动端仍然满屏 */
@media (min-width: 620px) and (min-height: 640px) {
  #stage {
    width: 460px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 26px;
    box-shadow: 0 0 0 1px rgba(255, 170, 104, .13), 0 34px 90px rgba(0, 0, 0, .7);
  }
  .hud-top { padding: 0 2px; }
  .lv-panel, .over-panel { border-radius: 22px; }
  #over { padding-bottom: 20px; }
  .overlay { align-items: center; background: radial-gradient(ellipse at 50% 40%, rgba(24, 11, 17, .6), rgba(8, 4, 8, .9)); }
  .lv-panel { border-radius: 22px; border-bottom: 1px solid rgba(255, 178, 106, .26); max-height: 88%; }
  .sheet-grip { display: none; }
}

@media (max-width: 359px) {
  .hero-chip { max-width: 224px; padding-right: 9px; }
  .run-chip { min-width: 78px; padding: 6px 8px; }
  .lv-orb { flex-basis: 34px; width: 34px; height: 34px; }
  .lv-orb b { font-size: 15px; }
  .choice-desc { font-size: 10px; }
}
