:root {
  --ink: #140d09;
  --ink-2: #1d120c;
  --gold: #d8aa5c;
  --gold-light: #f6dda6;
  --gold-dim: #9b7642;
  --accent: #ff8a3d;
  --accent-deep: #e26822;
  --red: #7d241d;
  --paper: #f2dfb9;
  --muted: #b99d78;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-brush: "STKaiti", "KaiTi", "Kaiti SC", "AR PL UKai CN", "Songti SC", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #0d0806; }
html { height: 100%; }
body {
  min-height: 100%;
  color: var(--paper);
  font-family: var(--font-ui);
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(120% 70% at 50% 0%, #3a2113 0%, #1a0f09 45%, #080504 100%);
}
button { font-family: inherit; }
img { display: block; }
i { font-style: normal; }

.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.85);
}

/* ---------- 场景 ---------- */
.stage {
  position: relative;
  flex: 1 0 auto;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1b100b;
}
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.05) brightness(0.8) contrast(1.04);
  transform: scale(1.015);
  animation: kenburns 26s ease-out both;
}
.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 6, 4, 0.82) 0%,
      rgba(10, 6, 4, 0.4) 22%,
      rgba(10, 6, 4, 0.08) 46%,
      rgba(12, 7, 5, 0.5) 72%,
      rgba(18, 11, 7, 0.97) 100%),
    radial-gradient(120% 78% at 50% 38%, rgba(255, 150, 70, 0.04) 0%, rgba(8, 5, 3, 0.5) 100%);
  pointer-events: none;
}

/* ---------- 顶部玩家信息 ---------- */
.hud {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 16px 0;
}
.player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 270px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(216, 170, 92, 0.44);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(36, 21, 14, 0.94), rgba(17, 10, 7, 0.88));
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 222, 166, 0.09);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.player.hit { animation: shake 0.42s ease; box-shadow: 0 0 0 1px rgba(255, 96, 60, 0.55), 0 9px 22px rgba(0, 0, 0, 0.38); }
.avatar-ring {
  flex: none;
  width: 51px;
  height: 51px;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f1ce8f 0%, #b27b34 52%, #5b3917 100%);
  box-shadow: 0 0 0 1px rgba(255, 224, 170, 0.18), 0 4px 12px rgba(0, 0, 0, 0.45);
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #2a160d;
  background: #2b1911;
}
.player-meta { min-width: 0; flex: 1 1 auto; }
.name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.player-name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffe8bd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.rank-badge {
  flex: none;
  padding: 2px 6px;
  border: 1px solid rgba(230, 186, 112, 0.46);
  border-radius: 4px;
  background: rgba(99, 51, 22, 0.55);
  color: #f5cf8d;
  font-family: var(--font-serif);
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.rank-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: #bca17e;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-line .sep { width: 1px; height: 8px; background: rgba(216, 170, 92, 0.34); flex: none; }
.rank-line #rankNext { color: #c9a978; }
.hp-row { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.hp-row > .mp-icon { flex: none; width: 12px; height: 12px; color: #d8aa5c; }
.hp-track {
  position: relative;
  height: 4px;
  flex: 1 1 auto;
  min-width: 62px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: inset 0 0 0 1px rgba(216, 170, 92, 0.16);
  overflow: hidden;
}
.hp-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb347, #ff7a2f);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.5);
  transition: width 0.38s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.hp-text {
  flex: none;
  min-width: 22px;
  text-align: right;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  color: #ffd8a4;
}

.chips { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.chip {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(216, 170, 92, 0.42);
  border-radius: 14px;
  background: rgba(17, 10, 7, 0.84);
  box-shadow: 0 4px 13px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 224, 170, 0.07);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #c7ad86;
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.chip .mp-icon { width: 13px; height: 13px; color: #f0c87d; }
.chip b { color: #ffe4ae; font-family: var(--font-ui); font-size: 12px; font-weight: 800; }

/* ---------- 对手与谍报 ---------- */
.stage-center {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.round-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 3px;
  color: #e8c991;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 2px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
}
.round-tag em {
  display: block;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, #d8aa5c, rgba(216, 170, 92, 0));
}
.round-tag span:last-child { color: #b79566; font-size: 9px; letter-spacing: 3px; }

.rival-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 11px;
  border: 1px solid rgba(221, 175, 99, 0.5);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(48, 26, 16, 0.95) 0%, rgba(25, 14, 9, 0.95) 58%, rgba(31, 17, 11, 0.96) 100%);
  box-shadow: 0 11px 28px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 226, 172, 0.09);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rival-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #ffb25b, #a32f20 70%, #541612);
}
.rival-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 142, 61, 0.09), rgba(255, 142, 61, 0) 68%);
  pointer-events: none;
}
.rival-card.attacking { animation: lunge 0.42s ease; }
.rival-card.hit { animation: shake 0.42s ease; border-color: rgba(255, 116, 64, 0.72); }
.rival-seal {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #d2a55a;
  background: radial-gradient(circle at 35% 28%, #913a2b 0%, #4d1a13 62%, #2a0d0a 100%);
  box-shadow: 0 0 0 3px rgba(59, 28, 16, 0.65), inset 0 0 12px rgba(0, 0, 0, 0.55);
  color: #f8dfab;
  font-family: var(--font-brush);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}
.rival-info { flex: 1 1 auto; min-width: 0; }
.rival-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rival-name {
  flex: none;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffe7ba;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}
.rival-office {
  flex: none;
  padding: 1px 5px;
  border: 1px solid rgba(214, 168, 92, 0.32);
  border-radius: 3px;
  color: #c9a978;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.habit {
  flex: none;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(122, 36, 25, 0.44);
  border: 1px solid rgba(211, 100, 70, 0.32);
  color: #eda98b;
  font-size: 8px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.rival-quote {
  margin: 2px 0 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #c4a984;
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.2px;
}
.rival-hp-row { display: flex; align-items: center; gap: 6px; }
.hp-label { flex: none; color: #a98b64; font-size: 8.5px; letter-spacing: 1px; }
.rival-track { height: 6px; flex: 1 1 auto; min-width: 40px; }
.rival-fill { background: linear-gradient(90deg, #d84832, #ff8a3d 65%, #ffc46b); box-shadow: 0 0 9px rgba(255, 108, 60, 0.4); }
.float-dmg {
  position: absolute;
  right: 15px;
  top: 22%;
  z-index: 5;
  color: #ffd36f;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 5px #000, 0 0 12px rgba(255, 138, 61, 0.5);
  opacity: 0;
  pointer-events: none;
}
.float-dmg.show { animation: floatUp 0.9s ease-out both; }

.intel {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 170, 92, 0.22);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(12, 7, 5, 0.78);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.27);
  color: #dcc5a3;
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: 0.2px;
}
.intel .mp-icon { flex: none; width: 14px; height: 14px; margin-top: 1px; color: #ffb35c; }
.intel b {
  color: #ffdda1;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: 1px;
}
.intel-note {
  display: inline-block;
  margin-left: 4px;
  padding: 0 3px;
  border: 1px solid rgba(216, 170, 92, 0.24);
  border-radius: 2px;
  color: #9e805b;
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: 0;
  vertical-align: 1px;
}

/* ---------- 出招面板 ---------- */
.panel {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  margin-top: -18px;
  padding: 13px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid rgba(229, 183, 108, 0.42);
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #261710 0%, #1a100b 46%, #110b07 100%);
  box-shadow: 0 -16px 38px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 223, 168, 0.12);
}
.panel::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 48px;
  height: 2px;
  margin-left: -24px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(216, 170, 92, 0), #e8c17f, rgba(216, 170, 92, 0));
  opacity: 0.85;
}
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.duel-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brush {
  font-family: var(--font-brush);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  color: #f7dda6;
  text-shadow: 0 2px 0 #5a2d17, 0 0 18px rgba(255, 160, 70, 0.22);
  white-space: nowrap;
}
.duel-sub { color: #a38865; font-size: 9px; letter-spacing: 1.5px; white-space: nowrap; }
.combo-badge {
  flex: none;
  padding: 3px 8px;
  border: 1px solid rgba(216, 170, 92, 0.28);
  border-radius: 10px;
  color: #9c815f;
  font-family: var(--font-serif);
  font-size: 9px;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.combo-badge.hot {
  color: #ffd58c;
  border-color: rgba(255, 169, 83, 0.7);
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.2);
}

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.move {
  position: relative;
  min-height: 76px;
  padding: 8px 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(224, 177, 101, 0.48);
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 157, 76, 0.13), rgba(255, 157, 76, 0) 55%),
    linear-gradient(180deg, #5b2f1c 0%, #3b1d12 55%, #29130b 100%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 221, 160, 0.14);
  color: #f4dfb7;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.09s ease, filter 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.move::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 220, 160, 0.08);
  border-radius: 9px;
  pointer-events: none;
}
.move::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -70%;
  width: 55%;
  height: 180%;
  background: linear-gradient(90deg, rgba(255, 235, 190, 0), rgba(255, 235, 190, 0.12), rgba(255, 235, 190, 0));
  transform: rotate(18deg);
  transition: left 0.45s ease;
  pointer-events: none;
}
.move:active { transform: scale(0.96); filter: brightness(1.12); }
.move:disabled { cursor: default; opacity: 0.62; transform: none; filter: none; }
.move.selected {
  border-color: #ffd98c;
  box-shadow: 0 0 0 1px rgba(255, 216, 138, 0.36), 0 0 22px rgba(255, 138, 61, 0.3), inset 0 1px 0 rgba(255, 224, 170, 0.22);
}
.move.selected::after { left: 120%; }
.move-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(230, 185, 108, 0.26);
  background: radial-gradient(circle at 42% 30%, rgba(255, 195, 108, 0.22), rgba(0, 0, 0, 0.2));
  color: #ffce83;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}
.move-icon .mp-icon { width: 18px; height: 18px; }
.move-name {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.15;
  color: #ffe9c2;
}
.move-beats { font-size: 8.5px; line-height: 1.3; color: #b38f65; letter-spacing: 0.5px; }

.rule-line {
  margin-top: 8px;
  text-align: center;
  color: #8e7354;
  font-size: 9px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log {
  min-height: 16px;
  margin-top: 5px;
  text-align: center;
  color: #c8a878;
  font-size: 10.5px;
  line-height: 1.45;
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}
.log.win { color: #ffd083; }
.log.lose { color: #e49579; }

.rank-track { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rank-cap {
  flex: none;
  color: #8c6f50;
  font-family: var(--font-serif);
  font-size: 8.5px;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.rank-ladder { flex: 1 1 auto; display: flex; align-items: center; gap: 3px; min-width: 0; }
.rank-node {
  flex: 1 1 0;
  height: 3px;
  border-radius: 2px;
  background: #38261a;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.rank-node.done { background: linear-gradient(90deg, #a97836, #e3b767); }
.rank-node.current {
  background: linear-gradient(90deg, #ff8a3d, #ffd083);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.7);
}

/* ---------- 印章 / 升官提示 ---------- */
.stamp {
  position: fixed;
  z-index: 40;
  top: 38%;
  left: 50%;
  width: 112px;
  height: 112px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px double rgba(255, 217, 156, 0.9);
  border-radius: 12px;
  background: rgba(122, 28, 19, 0.9);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55), inset 0 0 22px rgba(255, 180, 100, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.4) rotate(-12deg);
}
.stamp.show { animation: stampIn 0.88s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.stamp-char {
  font-family: var(--font-brush);
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: #ffe3b0;
  text-shadow: 0 2px 0 #4a150e, 0 0 14px rgba(255, 189, 100, 0.4);
}
.stamp-sub {
  margin-top: 5px;
  color: #ffd39a;
  font-size: 9px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 35;
  top: 30%;
  left: 50%;
  min-width: 214px;
  padding: 10px 20px 11px;
  text-align: center;
  border: 1px solid #e4b870;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(72, 38, 18, 0.98), rgba(36, 18, 10, 0.98));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), 0 0 28px rgba(255, 160, 60, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-kicker { color: #d8a95e; font-size: 8.5px; letter-spacing: 4px; }
.toast-main {
  margin-top: 3px;
  color: #ffe4b3;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(255, 160, 70, 0.25);
}

/* ---------- 结算 ---------- */
.overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 38%, rgba(66, 33, 15, 0.55), rgba(7, 4, 3, 0.94) 72%);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.overlay.show { opacity: 1; visibility: visible; }
.result {
  position: relative;
  width: 100%;
  max-width: 344px;
  padding: 25px 22px 19px;
  text-align: center;
  border: 1px solid rgba(232, 190, 116, 0.55);
  border-radius: 16px;
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(132, 61, 27, 0.35), rgba(132, 61, 27, 0) 60%),
    linear-gradient(160deg, #2c1a10 0%, #180f09 58%, #0f0805 100%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 225, 170, 0.15);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.overlay.show .result { transform: translateY(0) scale(1); }
.result::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 170, 92, 0.14);
  border-radius: 12px;
  pointer-events: none;
}
.result-crest {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border: 2px solid #d7a95d;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #93402b 0%, #4d1912 66%, #2a0d0a 100%);
  box-shadow: 0 0 0 4px rgba(59, 28, 16, 0.65), 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #ffd9a0;
}
.result-crest .mp-icon { width: 26px; height: 26px; }
.result-kicker { color: #c69d63; font-size: 9px; letter-spacing: 5px; }
.result h2 {
  margin: 6px 0 8px;
  color: #ffe3ad;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 0 #5a2b16, 0 0 20px rgba(255, 160, 70, 0.18);
}
.result-desc {
  max-width: 268px;
  margin: 0 auto 16px;
  color: #c3a882;
  font-size: 11.5px;
  line-height: 1.75;
  letter-spacing: 0.2px;
}
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 17px; }
.result-stats div {
  padding: 9px 4px 8px;
  border: 1px solid rgba(213, 166, 91, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}
.result-stats b { display: block; color: #ffd995; font-family: var(--font-ui); font-size: 20px; font-weight: 800; line-height: 1.1; }
.result-stats span { display: block; margin-top: 3px; color: #9d825f; font-size: 8px; letter-spacing: 1.5px; }
.restart {
  width: 100%;
  height: 48px;
  border: 1px solid #f0c47d;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffa254 0%, #e26922 100%);
  box-shadow: 0 9px 22px rgba(255, 120, 40, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #2a1005;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  cursor: pointer;
  transition: transform 0.09s ease, filter 0.18s ease;
}
.restart:active { transform: scale(0.975); filter: brightness(1.06); }
.result-tip { margin: 10px 0 0; color: #7e654a; font-size: 8.5px; letter-spacing: 0.5px; }

/* ---------- 动效 ---------- */
@keyframes kenburns {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(-0.8%, -0.5%, 0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-6px); }
  38% { transform: translateX(5px); }
  58% { transform: translateX(-3px); }
  78% { transform: translateX(2px); }
}
@keyframes lunge {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(7px) scale(1.012); }
  65% { transform: translateX(-2px); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(8px) scale(0.82); }
  22% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(1.06); }
}
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-16deg); }
  32% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-5deg); }
  62% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.14) rotate(-6deg); }
}

/* ---------- 适配 ---------- */
@media (max-height: 720px) {
  .stage { min-height: 370px; }
  .stage-center { padding-bottom: 21px; gap: 6px; }
  .panel { padding-top: 10px; }
  .panel-top { margin-bottom: 7px; }
  .brush { font-size: 21px; }
  .move { min-height: 66px; padding: 6px 4px 5px; }
  .move-icon { width: 26px; height: 26px; }
  .move-icon .mp-icon { width: 16px; height: 16px; }
  .move-name { font-size: 15.5px; }
  .rule-line { margin-top: 6px; }
  .log { margin-top: 3px; }
  .rank-track { margin-top: 6px; }
}
@media (max-width: 365px) {
  .hud { padding-left: 10px; padding-right: 10px; }
  .stage-center { padding-left: 10px; padding-right: 10px; }
  .panel { padding-left: 12px; padding-right: 12px; }
  .player { max-width: 238px; padding-right: 8px; }
  .avatar-ring { width: 47px; height: 47px; }
  .player-name { max-width: 74px; font-size: 14px; }
  .rank-line { font-size: 8.5px; }
  .duel-sub { display: none; }
  .habit { display: none; }
  .rival-office { font-size: 8px; }
  .move-name { font-size: 15px; letter-spacing: 1px; }
  .rule-line { font-size: 8.3px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
