/* 三国群英战 · 竖屏守城 H5
   主色 #FF8A3D / 暖色卡通风 / 移动端满屏无标题栏 */

:root {
  --orange: #FF8A3D;
  --orange-deep: #E96A1C;
  --orange-light: #FFA45C;
  --gold: #FFC65C;
  --cream: #FFF8EC;
  --paper: #FFFDF7;
  --ink: #3A2418;
  --ink2: #6B4A34;
  --muted: #9A7A63;
  --line: rgba(122, 77, 44, .16);
  --serif: "STKaiti", "KaiTi", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #2A170D;
}

body {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--sans);
  color: var(--ink);
  touch-action: manipulation;
  overscroll-behavior: none;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

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

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

#safeProbe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  padding-top: env(safe-area-inset-top);
  visibility: hidden;
  pointer-events: none;
}

/* ---------------- 顶部战况 ---------------- */

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.hud > * { pointer-events: auto; }

.gate-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 6px;
  border-radius: 14px;
  background: rgba(255, 250, 240, .93);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 3px 10px rgba(83, 43, 15, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.gate-ico {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #FFA45C, #F0731E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.gate-ico .mp-icon { width: 16px; height: 16px; font-size: 16px; }
.gate-bar-wrap { width: 78px; }

.gate-bar {
  height: 7px;
  border-radius: 5px;
  background: #EADFCE;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(90, 50, 20, .18);
}

.gate-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #68C98C, #43AE74);
  transition: width .25s ease, background .3s ease;
}

.gate-bar.low span { background: linear-gradient(90deg, #FFB25B, #F0782D); }
.gate-bar.danger span { background: linear-gradient(90deg, #FF7A6E, #D9423B); }

.gate-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: .04em;
}

.gate-meta b { font-size: 11px; color: var(--ink); }

.wave-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(60, 36, 23, .9), rgba(44, 25, 15, .94));
  border: 1px solid rgba(255, 200, 140, .28);
  box-shadow: 0 4px 12px rgba(50, 24, 8, .22);
  color: #FFE9CD;
  line-height: 1.15;
}

.wave-chip span {
  font-size: 9.5px;
  letter-spacing: .14em;
  opacity: .74;
  white-space: nowrap;
}

.wave-chip b {
  font-size: 13px;
  letter-spacing: .06em;
  font-weight: 800;
  white-space: nowrap;
}

.hud-actions { display: flex; gap: 5px; flex: 0 0 auto; }

.round-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #6B4A34;
  background: rgba(255, 250, 240, .93);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 3px 9px rgba(83, 43, 15, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .1s;
}

.round-btn:active { transform: scale(.9); }
.round-btn .mp-icon { width: 17px; height: 17px; font-size: 17px; }

/* ---------------- 提示 / 播报 ---------------- */

.hint {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 60px);
  transform: translate(-50%, -6px);
  z-index: 7;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(48, 27, 15, .82);
  color: #FFE8C9;
  font-size: 11.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 200, 140, .18);
}

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

.toast {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, 6px);
  z-index: 12;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(45, 24, 12, .92);
  color: #FFEBD0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 190, 120, .25);
  max-width: 82vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: rgba(150, 48, 26, .94); }

.wave-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 26%;
  z-index: 9;
  text-align: center;
  pointer-events: none;
  opacity: 0;
}

.wave-banner.show { animation: bannerShow 1.9s cubic-bezier(.2, .7, .3, 1) forwards; }

.wave-banner span {
  display: block;
  font-size: 11px;
  letter-spacing: .3em;
  color: #FFDDA8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.wave-banner b {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: .12em;
  color: #FFF4DE;
  text-shadow: 0 3px 0 rgba(150, 62, 12, .85), 0 8px 26px rgba(0, 0, 0, .5);
}

.skill-hint {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 156px);
  transform: translate(-50%, 8px);
  z-index: 9;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(140deg, #FF9A4B, #ED6A18);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 6px 18px rgba(220, 90, 10, .4);
  white-space: nowrap;
}

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

/* ---------------- 底部点将台 ---------------- */

.deck {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  padding: 7px 12px calc(env(safe-area-inset-bottom) + 7px);
  background: linear-gradient(180deg, rgba(255, 248, 236, .93), rgba(255, 246, 230, .99) 38%);
  border-top: 1px solid rgba(255, 255, 255, .75);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 26px rgba(74, 36, 10, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform .25s ease, opacity .25s ease;
}

#app[data-mode="menu"] .hud,
#app[data-mode="menu"] .deck,
#app[data-mode="menu"] .hint,
#app[data-mode="menu"] .skill-hint {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.deck-top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.skill-btn {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #FFB268, #F0741E);
  color: #FFF6E7;
  box-shadow: 0 4px 0 #C95712, 0 7px 14px rgba(190, 80, 15, .3);
  transition: transform .1s ease, filter .2s ease, box-shadow .2s ease;
  overflow: visible;
}

.skill-btn .mp-icon {
  width: 21px;
  height: 21px;
  font-size: 21px;
  filter: drop-shadow(0 1px 0 rgba(120, 40, 0, .3));
}

.skill-name {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-top: -1px;
}

.skill-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #C95712; }

.skill-btn.cooling { filter: saturate(.55) brightness(.94); }
.skill-btn.ready { animation: skillPulse 1.8s ease-in-out infinite; }
.skill-btn.armed {
  box-shadow: 0 0 0 4px rgba(255, 138, 61, .3), 0 4px 0 #C95712;
  transform: translateY(-2px);
}

.skill-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(43, 24, 12, .6) calc(var(--p, 0) * 1turn), transparent 0);
  pointer-events: none;
  opacity: 0;
}

.skill-btn.cooling .skill-ring { opacity: 1; }

.skill-cd {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #FFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  pointer-events: none;
  opacity: 0;
}

.skill-btn.cooling .skill-cd { opacity: 1; }
.skill-btn.cooling .skill-name,
.skill-btn.cooling > .mp-icon { opacity: .3; }

.energy-box { flex: 1; min-width: 0; }

.energy-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--ink2);
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.energy-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.energy-meta .mp-icon { width: 13px; height: 13px; font-size: 13px; color: #E9822B; }
.energy-meta b { font-size: 11px; color: var(--ink); letter-spacing: .02em; }

.pips { display: flex; gap: 3px; height: 9px; }

.pip {
  flex: 1;
  border-radius: 3px;
  background: #E8DAC6;
  box-shadow: inset 0 1px 2px rgba(100, 60, 25, .18);
  transition: background .15s ease, box-shadow .15s ease;
}

.pip.on {
  background: linear-gradient(180deg, #FFC05E, #F08A2B);
  box-shadow: 0 0 5px rgba(255, 150, 50, .5);
}

.pip.over { background: linear-gradient(180deg, #FFE08A, #FFB03C); }

.cards { display: flex; gap: 6px; }

.hero-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 76px;
  border-radius: 13px;
  padding: 3px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(180deg, #FFFDF8, #FFF0DD);
  border: 1.5px solid rgba(190, 125, 70, .24);
  box-shadow: 0 3px 0 rgba(196, 130, 76, .22), 0 5px 10px rgba(120, 65, 25, .09);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, filter .15s ease;
  overflow: hidden;
}

.hero-card:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(196, 130, 76, .22); }

.hero-card.selected {
  border-color: #FF8A3D;
  background: linear-gradient(180deg, #FFFAF0, #FFE7CB);
  transform: translateY(-5px);
  box-shadow: 0 6px 0 rgba(233, 106, 28, .35), 0 8px 16px rgba(233, 106, 28, .28);
}

.hero-card.disabled { filter: saturate(.55); }
.hero-card.deny { animation: deny .32s ease; }

.hero-card .portrait {
  width: 100%;
  height: 36px;
  display: block;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 70%, rgba(255, 205, 145, .45), rgba(255, 240, 215, .2));
}

.hero-card .h-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  margin-top: 1px;
  color: var(--ink);
}

.hero-card .h-role {
  font-size: 7.5px;
  color: var(--muted);
  line-height: 1;
  margin-top: 1px;
  white-space: nowrap;
}

.cost-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 1px 4px 1px 3px;
  border-radius: 8px;
  background: linear-gradient(140deg, #FF9C4F, #EE6E1A);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(170, 70, 10, .35);
}

.cost-badge .mp-icon { width: 9px; height: 9px; font-size: 9px; }

.cd-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(48, 28, 16, .58);
  border-radius: 0 0 12px 12px;
  pointer-events: none;
  transition: height .1s linear;
}

.cd-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  color: #FFF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  pointer-events: none;
}

/* ---------------- 遮罩与弹层 ---------------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 16px) 18px calc(env(safe-area-inset-bottom) + 16px);
  background: rgba(38, 20, 10, .58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  overflow-y: auto;
  animation: fadeIn .25s ease-out;
}

.start-overlay {
  background: linear-gradient(180deg, rgba(48, 24, 10, .26) 0%, rgba(40, 20, 9, .6) 46%, rgba(30, 15, 7, .9) 100%);
}

.start-inner {
  width: 100%;
  max-width: 390px;
  text-align: center;
  padding: 8px 0 4px;
  animation: riseIn .5s cubic-bezier(.2, .8, .3, 1);
}

.brand-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .34em;
  color: #FFDAA6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.brand-kicker span {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #FFC985);
}

.brand-kicker span:last-child { background: linear-gradient(90deg, #FFC985, transparent); }

.brand {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: .04em;
  color: #FFF2D8;
  text-shadow: 0 4px 0 #A8470D, 0 5px 0 #8F3808, 0 14px 34px rgba(0, 0, 0, .55);
}

.brand em {
  display: block;
  font-style: normal;
  font-size: 26px;
  letter-spacing: .5em;
  margin-bottom: 2px;
  color: #FFCE8F;
  text-shadow: 0 2px 0 #9C400C, 0 6px 16px rgba(0, 0, 0, .45);
}

.brand-sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: .22em;
  color: rgba(255, 229, 195, .82);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.hero-line {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 18px 0 14px;
}

.hero-chip {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.hero-chip canvas {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, rgba(255, 214, 158, .38), rgba(255, 246, 230, .1) 70%);
  border: 1px solid rgba(255, 214, 158, .35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

.hero-chip span {
  font-size: 10px;
  color: #FFE3BC;
  letter-spacing: .08em;
}

.howto {
  background: rgba(255, 248, 236, .94);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 16px;
  padding: 10px 12px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  margin: 0 auto 12px;
  max-width: 360px;
}

.howto-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.howto-row .num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFA45C, #EE6E1A);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(190, 80, 15, .35);
}

.howto-row p {
  margin: 0;
  font-size: 12.5px;
  color: #5A3A25;
  line-height: 1.35;
}

.best-record {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 222, 170, .14);
  border: 1px solid rgba(255, 212, 150, .28);
  color: #FFD9A4;
  font-size: 11px;
  letter-spacing: .05em;
}

.best-record .mp-icon { width: 14px; height: 14px; font-size: 14px; }

.cta {
  width: 100%;
  max-width: 360px;
  height: 54px;
  border-radius: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(160deg, #FFB168, #FF832F 48%, #F06E15);
  color: #FFF9EF;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .18em;
  box-shadow: 0 6px 0 #BC4F0C, 0 14px 28px rgba(190, 75, 10, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .1s ease, box-shadow .1s ease;
  border: 1px solid rgba(255, 235, 200, .45);
}

.cta .mp-icon { width: 20px; height: 20px; font-size: 20px; transform: translateY(-1px); }

.cta:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #BC4F0C, 0 6px 12px rgba(190, 75, 10, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.start-foot {
  margin: 12px 0 0;
  font-size: 10.5px;
  letter-spacing: .18em;
  color: rgba(255, 231, 198, .62);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 390px;
  background: linear-gradient(180deg, #FFFDF8, #FFF6E7);
  border-radius: 24px;
  padding: 24px 18px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .7);
  animation: popIn .32s cubic-bezier(.2, .9, .3, 1.2);
  text-align: center;
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 19px;
  border: 1px solid rgba(190, 125, 70, .2);
  pointer-events: none;
}

.sheet-badge {
  position: relative;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(140deg, #FF9A4B, #EE6E1A);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  box-shadow: 0 3px 8px rgba(210, 90, 15, .3);
}

.sheet-badge.fail { background: linear-gradient(140deg, #D46A55, #A83A2C); }
.sheet-badge.calm { background: linear-gradient(140deg, #6AA6A0, #397D77); }

.sheet h2 {
  margin: 12px 0 4px;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: .08em;
  color: #4A2A16;
}

.sheet-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: #8B6A52;
  letter-spacing: .02em;
  line-height: 1.5;
}

.sheet-foot {
  margin: 14px 0 0;
  font-size: 10.5px;
  color: #A98A72;
  letter-spacing: .06em;
}

.reward-stats { display: flex; gap: 6px; margin: 4px 0 14px; }

.reward-stats div {
  flex: 1;
  padding: 8px 4px;
  border-radius: 12px;
  background: #F7EAD8;
  border: 1px solid rgba(180, 120, 70, .16);
}

.reward-stats b { display: block; font-size: 17px; color: #4A2A16; }

.reward-stats span {
  font-size: 9.5px;
  color: #9A7A63;
  letter-spacing: .06em;
}

.upgrades { display: flex; flex-direction: column; gap: 8px; }

.upgrade {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFDF8, #FFF3E1);
  border: 1.5px solid rgba(190, 125, 70, .22);
  text-align: left;
  box-shadow: 0 2px 0 rgba(190, 125, 70, .15);
  transition: transform .1s ease, border-color .15s ease;
}

.upgrade:active { transform: scale(.985); border-color: #FF8A3D; }

.upgrade .u-ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #FFB166, #EE6E1A);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.upgrade .u-ico .mp-icon { width: 20px; height: 20px; font-size: 20px; }

.upgrade .u-txt { flex: 1; min-width: 0; }

.upgrade .u-txt b {
  display: block;
  font-size: 13.5px;
  color: #4A2A16;
  letter-spacing: .03em;
}

.upgrade .u-txt span {
  display: block;
  font-size: 11px;
  color: #94735C;
  margin-top: 2px;
  line-height: 1.3;
}

.upgrade .u-go { color: #C9946A; }
.upgrade .u-go .mp-icon { width: 18px; height: 18px; font-size: 18px; }
.upgrade.taken { border-color: #FF8A3D; background: #FFEBD3; }

.defeat-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 2px 0 16px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #F8EBDD;
  color: #8B5A3C;
  font-size: 12px;
}

.defeat-flag .mp-icon { width: 17px; height: 17px; font-size: 17px; color: #C06B32; }

.ghost-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 44px;
  border-radius: 22px;
  border: 1.5px solid rgba(160, 100, 55, .26);
  background: transparent;
  color: #8B6247;
  font-size: 12.5px;
  letter-spacing: .06em;
  font-weight: 600;
  transition: background .12s ease, transform .1s ease;
}

.ghost-btn:active { background: rgba(200, 140, 90, .1); transform: scale(.99); }

.pause-row { display: flex; gap: 8px; margin-top: 10px; }
.pause-row .ghost-btn { margin-top: 0; }
.ghost-btn.solid { background: #F8EBDD; border-color: transparent; }
.pause-sheet .cta { margin-top: 4px; }

/* ---------------- 动画 ---------------- */

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

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(.9) translateY(10px); }
  100% { opacity: 1; transform: none; }
}

@keyframes skillPulse {
  0%, 100% { box-shadow: 0 4px 0 #C95712, 0 0 0 0 rgba(255, 150, 60, .5); }
  50% { box-shadow: 0 4px 0 #C95712, 0 0 0 8px rgba(255, 150, 60, 0); }
}

@keyframes deny {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes bannerShow {
  0% { opacity: 0; transform: translateY(10px) scale(.94); }
  12% { opacity: 1; transform: none; }
  78% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* ---------------- 小屏适配 ---------------- */

@media (max-height: 700px) {
  .brand { font-size: 47px; }
  .brand em { font-size: 21px; }
  .brand-sub { margin-top: 7px; }
  .hero-line { margin: 12px 0 10px; }
  .hero-chip canvas { width: 42px; height: 42px; }
  .hero-chip span { font-size: 9px; }
  .howto { padding: 7px 10px; }
  .howto-row { padding: 3px 0; }
  .howto-row p { font-size: 11.5px; }
  .howto-row .num { width: 21px; height: 21px; }
  .cta { height: 48px; font-size: 16px; }
  .start-foot { margin-top: 8px; }
  .hero-card { height: 70px; }
  .hero-card .portrait { height: 30px; }
  .deck-top { margin-bottom: 5px; }
  .skill-btn { width: 44px; height: 44px; }
  .skill-btn .mp-icon { width: 19px; height: 19px; font-size: 19px; }
}

@media (max-height: 640px) {
  .overlay { align-items: flex-start; }
  .start-inner { padding-top: 4px; }
}

@media (max-width: 350px) {
  .brand { font-size: 48px; }
  .hero-chip { width: 52px; }
  .hero-chip canvas { width: 44px; height: 44px; }
  .gate-bar-wrap { width: 62px; }
  .hero-card .h-role { display: none; }
  .hero-card { height: 67px; }
}

@media (prefers-reduced-motion: reduce) {
  .skill-btn.ready { animation: none; }
  .wave-banner.show { animation-duration: .01s; }
}
