/* 光影猎刃 · 网页版样式
   墨色底 / 暖橙猎手 / 冷青执光 / 少量金 —— 不做通用卡片模板感
*/
:root {
  --ink: #05060a;
  --ink-1: #080b11;
  --ink-2: #0d121a;
  --line: rgba(150, 175, 205, 0.16);
  --line-2: rgba(150, 175, 205, 0.08);
  --text: #e9eff6;
  --dim: #97a5b6;
  --dim-2: #6d7b8d;
  --hunter: #ee5c42;
  --hunter-2: #ff8a63;
  --light: #4cd9d1;
  --light-2: #b6fff7;
  --gold: #e8b04b;
  --boss: #ff5a44;
  --r: 4px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button { font-family: inherit; color: inherit; }
kbd {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(190, 210, 235, 0.28);
  border-bottom-color: rgba(190, 210, 235, 0.45);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: #dfe9f4;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

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

/* ---------------- 画布 ---------------- */
.stage { position: absolute; inset: 0; }
#game { display: block; width: 100%; height: 100%; }
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 95% at 50% 45%, rgba(0,0,0,0) 42%, rgba(0,0,0,0.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0) 18% 82%, rgba(0,0,0,0.55));
}
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.5'/></svg>");
}

/* ---------------- HUD ---------------- */
.hud {
  position: absolute; inset: 0;
  pointer-events: none;
  font-size: 12px;
}
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 14px 18px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
}
.topbar-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stage-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--gold);
  text-transform: uppercase;
}
.stage-pill::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.boss-flag {
  padding: 2px 6px;
  border: 1px solid rgba(255, 90, 68, .55);
  color: #ff8d78;
  border-radius: 2px;
  letter-spacing: .16em;
}
.map-name {
  font-family: var(--serif);
  font-size: 19px; letter-spacing: .06em;
  color: #d7e2ee;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.boss-wrap {
  flex: 0 1 520px; align-self: center;
  margin-top: 6px;
  padding: 8px 14px 10px;
  background: linear-gradient(180deg, rgba(30,10,10,.55), rgba(10,6,8,.35));
  border: 1px solid rgba(255, 90, 68, .28);
  border-radius: 3px;
  backdrop-filter: blur(6px);
}
.boss-line {
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: #ffb199; margin-bottom: 6px;
}
.boss-track { height: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.boss-track i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #7d1a12, #ff5a44 60%, #ffb199);
  box-shadow: 0 0 14px rgba(255,90,68,.55);
  transition: width .18s linear;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.stat { text-align: right; line-height: 1.15; }
.stat-k { display: block; font-size: 9px; letter-spacing: .14em; color: var(--dim-2); }
.stat b { font-family: var(--mono); font-size: 14px; color: #dfe8f2; font-weight: 600; }
.icon-btn {
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  background: rgba(10, 14, 20, .55);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  pointer-events: auto;
  color: #b9c7d6;
  transition: .18s;
}
.icon-btn:hover { color: #fff; border-color: rgba(232,176,75,.5); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-btn .i-sound path:first-child { fill: currentColor; stroke: none; }
.icon-btn.muted .wave { display: none; }
.icon-btn.muted { color: #6b7684; }

/* 玩家面板 */
.panel {
  position: absolute; bottom: 16px;
  width: 268px;
  padding: 11px 13px 9px;
  background: linear-gradient(180deg, rgba(10,14,20,.78), rgba(6,8,12,.62));
  border: 1px solid var(--line);
  border-left-width: 3px;
  backdrop-filter: blur(9px);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.panel.p1 { left: 16px; border-left-color: var(--hunter); }
.panel.p2 { right: 16px; border-left-color: var(--light); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 12px); border-left-width: 1px; border-right: 3px solid var(--light); }
.panel-head { display: flex; align-items: baseline; gap: 7px; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  padding: 1px 5px; border: 1px solid currentColor; border-radius: 2px;
}
.p1 .tag { color: var(--hunter); }
.p2 .tag { color: var(--light); }
.role { font-size: 12px; color: #cfdae6; letter-spacing: .08em; }
.p1 .role { color: #ffb09a; }
.p2 .role { color: #a7efe9; }
.lvl { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.lvl b { color: var(--gold); font-size: 12px; }
.hp-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hp-track { flex: 1; height: 5px; background: rgba(255,255,255,.09); overflow: hidden; }
.hp-track i { display: block; height: 100%; width: 100%; transition: width .12s linear; }
.p1 .hp-track i { background: linear-gradient(90deg, #8e2b1d, var(--hunter) 70%, #ffc0a6); }
.p2 .hp-track i { background: linear-gradient(90deg, #1c6f77, var(--light) 70%, #d6fffb); }
.hp-pct { font-family: var(--mono); font-size: 10px; color: var(--dim); width: 34px; text-align: right; }
.panel-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 18px; }
.shard { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 11px; color: #9dffe8; }
.shard i { width: 7px; height: 7px; transform: rotate(45deg); background: #7ef0dd; box-shadow: 0 0 8px #7ef0dd; }
.shard b { color: #d8fff8; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 3px;
  height: 18px; padding: 0 5px 0 4px;
  border: 1px solid rgba(232,176,75,.28);
  border-radius: 2px;
  background: rgba(232,176,75,.07);
  color: #f0cf94;
  font-size: 9px;
}
.chip svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.chip em { font-style: normal; color: #ffdf9f; font-family: var(--mono); }
.panel-keys { display: flex; align-items: center; gap: 3px; margin-top: 7px; color: var(--dim-2); font-size: 10px; }
.panel-keys em { font-style: normal; margin: 0 4px 0 3px; letter-spacing: .04em; }
.panel-keys kbd.act { border-color: rgba(232,176,75,.5); color: #ffe0a8; }
.cd-track { height: 2px; margin-top: 7px; background: rgba(255,255,255,.06); overflow: hidden; }
.cd-track i { display: block; height: 100%; width: 0%; background: var(--gold); opacity: .8; transition: width .1s linear; }

.keyhint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: rgba(160,180,200,.42); text-transform: uppercase;
  white-space: nowrap;
}
.toast {
  position: absolute; left: 50%; bottom: 74px; transform: translate(-50%, 8px);
  padding: 7px 14px;
  background: rgba(8, 12, 18, .88);
  border: 1px solid rgba(232,176,75,.3);
  border-left: 2px solid var(--gold);
  font-size: 12px; color: #f2ddb4;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  max-width: 78vw; text-align: center;
  backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.banner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  opacity: 0; pointer-events: none;
}
.banner.show { animation: bannerIn 2.4s ease forwards; }
@keyframes bannerIn {
  0% { opacity: 0; transform: translateY(8px); }
  14% { opacity: 1; transform: translateY(0); }
  76% { opacity: 1; }
  100% { opacity: 0; }
}
.banner-k { font-family: var(--mono); font-size: 10px; letter-spacing: .34em; color: var(--gold); }
.banner h2 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 5vw, 58px); letter-spacing: .1em;
  color: #f2f7fb; text-shadow: 0 6px 30px rgba(0,0,0,.9);
}
.banner p { margin: 0; font-size: 12px; letter-spacing: .18em; color: var(--dim); }
.banner.danger h2 { color: #ff9a83; }
.banner.danger .banner-k { color: var(--boss); }

.countdown {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.countdown::before {
  content: ""; position: absolute; width: 168px; height: 168px;
  border: 1px solid rgba(232,176,75,.3); border-radius: 50%;
  box-shadow: 0 0 26px rgba(232,176,75,.08) inset, 0 0 42px rgba(232,176,75,.06);
}
.countdown span {
  font-family: var(--serif); font-size: 92px; color: #ffdda0;
  text-shadow: 0 0 40px rgba(232,176,75,.35);
  animation: cdPulse .5s ease;
}
@keyframes cdPulse { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: scale(1); } }

/* ---------------- 首页 ---------------- */
.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--ink);
}
.home-bg {
  position: absolute; inset: -2% -2% -2% -2%;
  background: url("../assets/keyart.jpg") 62% 42%/cover no-repeat;
  filter: saturate(.92) contrast(1.05);
  opacity: .78;
}
.home-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #05060a 0%, rgba(5,6,10,.94) 34%, rgba(5,6,10,.62) 58%, rgba(5,6,10,.3) 100%),
    linear-gradient(180deg, rgba(5,6,10,.7), rgba(5,6,10,.16) 26%, rgba(5,6,10,.86) 100%);
}
.home {
  display: flex; flex-direction: column;
  padding: 26px clamp(22px, 4vw, 64px) 16px;
}
.brand { position: relative; display: flex; align-items: center; gap: 12px; z-index: 1; }
.brand img {
  width: 54px; height: 54px; border-radius: 10px;
  border: 1px solid rgba(76,217,209,.3);
  box-shadow: 0 0 22px rgba(76,217,209,.16), inset 0 0 18px rgba(0,0,0,.4);
  filter: drop-shadow(0 0 16px rgba(76,217,209,.28)) brightness(1.32) contrast(1.05);
  background: radial-gradient(circle at 50% 45%, rgba(76,217,209,.16), rgba(5,6,10,0) 72%);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-cn { font-family: var(--serif); font-size: 22px; letter-spacing: .22em; color: #f2f7fb; }
.brand-en { font-family: var(--mono); font-size: 9px; letter-spacing: .38em; color: var(--dim); margin-top: 4px; }
.brand-web {
  margin-left: 10px; align-self: flex-start; margin-top: 2px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: var(--light); border: 1px solid rgba(76,217,209,.35); padding: 2px 5px;
}
.home-grid {
  position: relative; z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 420px);
  gap: clamp(24px, 5vw, 76px);
  align-items: center;
  padding: 3vh 0 2vh;
  max-width: 1320px; width: 100%; margin: 0 auto;
}
.home-main { max-width: 620px; }
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .26em;
  color: #b9c8d8; text-transform: uppercase;
}
.kicker i { width: 26px; height: 1px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
h1 {
  margin: 18px 0 0;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1.0; letter-spacing: .04em;
  color: #f4f8fc;
  text-shadow: 0 10px 44px rgba(0,0,0,.65);
}
h1 span { display: block; }
h1 .accent { color: #a9f3ec; text-shadow: 0 0 44px rgba(76,217,209,.28); }
.lead {
  margin: 22px 0 0; max-width: 505px;
  font-size: 15px; line-height: 1.85; color: #b8c5d3;
  letter-spacing: .03em;
  word-break: keep-all; overflow-wrap: anywhere;
}
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 22px;
  border: 1px solid rgba(255, 170, 120, .45);
  border-radius: var(--r);
  background: linear-gradient(135deg, #f0764f 0%, #ee5c42 46%, #a6311f 100%);
  color: #fff8f2;
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  box-shadow: 0 8px 26px rgba(238, 92, 66, .28), inset 0 1px 0 rgba(255,255,255,.25);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(238,92,66,.38); filter: brightness(1.05); }
.primary:active { transform: translateY(0); }
.primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.primary.big { height: 54px; padding: 0 30px; font-size: 14px; }
.ghost {
  height: 44px; padding: 0 18px;
  border: 1px solid rgba(180, 200, 220, .26);
  border-radius: var(--r);
  background: rgba(12, 18, 26, .35);
  color: #cbd8e5; font-size: 12px; letter-spacing: .06em;
  cursor: pointer; transition: .18s;
  backdrop-filter: blur(6px);
}
.ghost:hover { border-color: rgba(180,200,220,.55); color: #fff; background: rgba(20,28,38,.5); }
.link {
  background: none; border: 0; padding: 6px 2px;
  color: var(--dim); font-size: 12px; letter-spacing: .1em;
  cursor: pointer; border-bottom: 1px solid rgba(150,175,205,.25);
}
.link:hover { color: #fff; border-color: var(--gold); }
.chips {
  display: flex; gap: 26px; margin-top: 38px; padding-top: 16px;
  border-top: 1px solid var(--line);
  max-width: 460px;
}
.chips > span { display: flex; align-items: baseline; gap: 7px; }
.chips b { font-family: var(--mono); font-size: 9px; color: var(--gold); letter-spacing: .1em; }
.chips span span { font-size: 11px; color: var(--dim); letter-spacing: .12em; }

.ctrl-board {
  align-self: center;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(9,13,19,.82), rgba(6,9,14,.6));
  border: 1px solid var(--line);
  border-top: 2px solid rgba(232,176,75,.5);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  position: relative;
}
.ctrl-board::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 26px; height: 26px;
  border-right: 1px solid rgba(232,176,75,.4); border-bottom: 1px solid rgba(232,176,75,.4);
}
.ctrl-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.ctrl-title span { font-family: var(--serif); font-size: 17px; letter-spacing: .14em; color: #eef5fb; }
.ctrl-title .ctrl-sub { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; color: var(--dim-2); }
.ctrl-card { padding: 13px 0 11px; border-top: 1px solid var(--line-2); }
.ctrl-card:first-of-type { border-top: 0; }
.cc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-head .dot { width: 6px; height: 6px; border-radius: 50%; }
.p1 .dot { background: var(--hunter); box-shadow: 0 0 8px var(--hunter); }
.p2 .dot { background: var(--light); box-shadow: 0 0 8px var(--light); }
.cc-head b { font-size: 12px; letter-spacing: .08em; color: #dbe6f1; }
.cc-head em { margin-left: auto; font-style: normal; font-size: 11px; letter-spacing: .1em; }
.p1 .cc-head em { color: #ffab94; }
.p2 .cc-head em { color: #9ceee8; }
.keys-line { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 10px; color: var(--dim); }
.keys-line kbd { min-width: 22px; height: 22px; font-size: 10px; }
.keys-line kbd.wide { min-width: 30px; }
.keys-line kbd.small { min-width: 22px; }
.keys-line span { margin-left: 6px; letter-spacing: .08em; }
.ctrl-note { margin: 14px 0 0; font-size: 10px; line-height: 1.7; color: var(--dim-2); letter-spacing: .02em; }

.home-foot {
  position: relative; z-index: 1; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 10px; color: var(--dim-2); letter-spacing: .08em;
}
.foot-right { display: flex; gap: 8px; }
.mini {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 2px;
  background: rgba(10,14,20,.5); color: #aab8c7;
  font-size: 10px; letter-spacing: .1em; cursor: pointer;
}
.mini:hover { color: #fff; border-color: rgba(232,176,75,.4); }
.mini svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.mini svg path:first-child { fill: currentColor; stroke: none; }
.mini.muted svg .wave { display: none; }

/* ---------------- 分工 ---------------- */
.prep {
  display: grid; place-items: center;
  background: radial-gradient(80% 70% at 50% 40%, #0b1018, #05060a 75%);
  padding: 24px;
}
.prep::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(120,150,180,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(120,150,180,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 75%);
}
.prep-card {
  position: relative; width: min(940px, 100%);
  padding: clamp(20px, 3vw, 38px);
  background: linear-gradient(180deg, rgba(10,14,20,.9), rgba(6,8,12,.78));
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  backdrop-filter: blur(14px);
}
.prep-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; letter-spacing: .14em; font-weight: 600; }
.prep-head p { margin: 8px 0 0; color: var(--dim); font-size: 12px; letter-spacing: .04em; }
.roles {
  display: grid; grid-template-columns: 1fr 92px 1fr; align-items: center;
  gap: 8px; margin: 26px 0 24px;
}
.role-card {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: rgba(8,12,18,.6);
  border-top: 2px solid var(--hunter);
}
.role-card::after {
  content: "猎"; position: absolute; right: 10px; bottom: -22px;
  font-family: var(--serif); font-size: 104px; line-height: 1;
  color: rgba(238,92,66,.07); pointer-events: none; z-index: 0;
}
.role-card.p2::after { content: "光"; color: rgba(76,217,209,.07); }
.role-card > * { position: relative; z-index: 1; }
.role-card.p2 { border-top-color: var(--light); }
.rc-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.rc-tag { color: var(--gold); }
.rc-keys { color: var(--dim-2); }
.role-card h3 { margin: 14px 0 8px; font-family: var(--serif); font-size: 26px; letter-spacing: .12em; font-weight: 600; }
.role-card.p1 h3 { color: #ffb7a2; }
.role-card.p2 h3 { color: #a9f4ee; }
.role-card p { margin: 0; font-size: 12px; line-height: 1.75; color: #aebbca; min-height: 42px; }
.rc-note { margin-top: 12px; font-size: 10px; color: var(--dim-2); letter-spacing: .1em; }
.swap {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; color: var(--dim);
  font-size: 10px; letter-spacing: .1em;
}
.swap svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; padding: 9px; border: 1px solid var(--line); border-radius: 50%; transition: .2s; }
.swap:hover { color: var(--gold); }
.swap:hover svg { border-color: rgba(232,176,75,.5); transform: rotate(180deg); }
.prep-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ---------------- 通用浮层 ---------------- */
.overlay {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: 22px;
  background: radial-gradient(70% 70% at 50% 45%, rgba(8,11,16,.86), rgba(3,4,7,.96));
  backdrop-filter: blur(9px);
  animation: fadeIn .22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 结算 */
.result-card {
  width: min(760px, 100%);
  padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(12,16,23,.94), rgba(6,9,14,.9));
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  position: relative;
}
.verdict {
  font-family: var(--serif); font-size: clamp(40px, 6vw, 66px); letter-spacing: .18em;
  line-height: 1; color: #ffe6b0;
}
.verdict.fail { color: #ff8f79; }
.verdict-sub { margin: 12px 0 0; font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.result-meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 22px 0 4px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-meta span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--dim-2); }
.result-meta b { display: block; font-size: 15px; color: #e8f1fa; letter-spacing: .04em; margin-top: 4px; }
.rows { margin-top: 16px; display: grid; gap: 8px; }
.row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,.028); border-left: 2px solid var(--line);
}
.row.p1 { border-left-color: var(--hunter); }
.row.p2 { border-left-color: var(--light); }
.row .rtag { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .1em; }
.row .rname { font-size: 13px; color: #e2ecf6; }
.row .rname em { font-style: normal; font-size: 10px; color: var(--dim-2); margin-left: 8px; letter-spacing: .08em; }
.row .rstats { display: flex; gap: 16px; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.row .rstats b { color: var(--gold); font-size: 12px; margin-left: 4px; }
.result-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* 三选一 */
.draft { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.draft-head { text-align: center; margin-bottom: 20px; }
.draft-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .34em; color: var(--gold); }
.draft-head h2 { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(24px, 3.2vw, 34px); letter-spacing: .12em; font-weight: 600; }
.draft-head p { margin: 8px 0 0; font-size: 11px; letter-spacing: .1em; color: var(--dim); }
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: min(1000px, 100%); align-items: start; }
.draft-col { background: rgba(255,255,255,.022); border: 1px solid var(--line); border-top: 2px solid var(--hunter); padding: 12px; }
.draft-col.p2 { border-top-color: var(--light); }
.draft-col.only { grid-column: 1 / -1; max-width: 540px; width: 100%; justify-self: center; }
.draft-col-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 10px; }
.draft-col-head b { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.draft-col.p1 .draft-col-head b { color: var(--hunter); }
.draft-col.p2 .draft-col-head b { color: var(--light); }
.draft-col-head span { font-size: 11px; color: #c2cfdd; letter-spacing: .06em; }
.draft-col-head em { margin-left: auto; font-style: normal; font-size: 9px; color: var(--dim-2); font-family: var(--mono); }
.draft-cards { display: grid; gap: 8px; }
.draft-card {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  padding: 11px 12px; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid rgba(180,200,220,.16);
  border-radius: 3px; cursor: pointer;
  transition: .16s; position: relative; overflow: hidden;
}
.draft-card:hover { border-color: rgba(232,176,75,.55); transform: translateX(2px); background: rgba(232,176,75,.07); }
.draft-card .ico { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(232,176,75,.3); background: rgba(232,176,75,.08); color: #f0c980; }
.draft-card .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.draft-card .dname { font-size: 13px; letter-spacing: .06em; color: #f0f5fa; display: flex; align-items: center; gap: 8px; }
.draft-card .dname u { text-decoration: none; font-family: var(--mono); font-size: 9px; color: var(--gold); border: 1px solid rgba(232,176,75,.35); padding: 0 3px; }
.draft-card .ddesc { margin-top: 4px; font-size: 10px; line-height: 1.6; color: var(--dim); }
.draft-card .pips { display: flex; gap: 3px; }
.draft-card .pips i { width: 5px; height: 5px; border: 1px solid rgba(232,176,75,.45); }
.draft-card .pips i.on { background: var(--gold); box-shadow: 0 0 6px rgba(232,176,75,.5); }
.draft-card .dkey { font-family: var(--mono); font-size: 9px; color: var(--dim-2); letter-spacing: .06em; text-align: right; }
.draft-col.p2 .draft-card:hover { border-color: rgba(76,217,209,.55); background: rgba(76,217,209,.06); }

/* 暂停 */
.pause-card {
  text-align: center; width: min(500px, 100%);
  padding: 34px 30px 26px;
  background: linear-gradient(180deg, rgba(12,16,23,.94), rgba(6,9,14,.9));
  border: 1px solid var(--line); border-top: 2px solid var(--gold);
}
.pause-card h2 { margin: 0; font-family: var(--serif); font-size: 38px; letter-spacing: .2em; font-weight: 600; color: #f1f7fc; }
.pause-sub { margin: 10px 0 0; font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.pause-actions { display: flex; flex-direction: column; gap: 9px; margin: 24px 0 18px; }
.pause-actions .primary, .pause-actions .ghost { width: 100%; }
.pause-keys { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--dim-2); line-height: 2; }

/* 玩法 */
.help-card {
  position: relative; width: min(820px, 100%); max-height: 88vh; overflow-y: auto;
  padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(11,15,22,.96), rgba(6,9,14,.94));
  border: 1px solid var(--line); border-top: 2px solid var(--gold);
}
.close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border: 1px solid var(--line); background: none;
  color: var(--dim); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 2px;
}
.close:hover { color: #fff; border-color: rgba(232,176,75,.5); }
.help-card h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 30px; letter-spacing: .16em; font-weight: 600; }
.help-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.help-mark { width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(126,240,221,.22); box-shadow: 0 0 18px rgba(80,220,210,.14); }
.help-brand { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .22em; color: var(--dim-2); margin-bottom: 4px; }
.help-card > p { margin: 0; font-size: 12px; line-height: 1.9; color: #aebccb; max-width: 640px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin: 24px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.help-grid h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .16em; color: var(--gold); font-weight: 600; }
.help-grid p { margin: 0; font-size: 11px; line-height: 1.8; color: #a7b5c5; }
.help-keys { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--dim-2); line-height: 2.1; margin: 16px 0 22px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.help-keys kbd { margin: 0 3px; }

@media (max-width: 1280px) {
  .keyhint { display: none; }
}

.rotate-tip {
  position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%);
  font-size: 10px; letter-spacing: .08em; color: #e8c079;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(10,14,19,.92); border: 1px solid rgba(232,176,75,.32);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  display: none; z-index: 20; pointer-events: none; white-space: nowrap;
}


/* ---------------- 语言切换 / 扫码 ---------------- */
.lang-switch {
  position: absolute; top: 26px; right: clamp(22px, 4vw, 64px); z-index: 3;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid rgba(232,176,75,.22); border-radius: 3px;
  background: rgba(7,10,15,.7); backdrop-filter: blur(10px);
}
.lang-switch button {
  min-width: 32px; padding: 5px 9px; border: 0; border-radius: 2px;
  background: transparent; color: #97a6b6; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.on { background: rgba(232,176,75,.92); color: #0d0f13; font-weight: 700; }

.scan-band {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 20px; flex: 0 0 auto;
  max-width: 1320px; width: 100%; margin: 6px auto 14px;
  padding: 12px 18px;
  background: linear-gradient(100deg, rgba(9,13,19,.72), rgba(9,13,19,.28) 62%, rgba(9,13,19,0));
}
.scan-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, rgba(180,205,225,.3), rgba(180,205,225,.1) 46%, rgba(180,205,225,0) 82%);
}
.scan-qr {
  position: relative; flex: 0 0 auto; padding: 5px; border-radius: 4px;
  background: #eef2ee; box-shadow: 0 0 0 1px rgba(126,240,221,.18), 0 8px 24px rgba(0,0,0,.45);
}
.scan-qr img { display: block; width: 112px; height: 112px; image-rendering: crisp-edges; }
.scan-qr-tag {
  position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 7px; letter-spacing: .3em; color: var(--dim-2);
}
.scan-copy { min-width: 0; }
.scan-k { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .26em; color: var(--gold); margin-bottom: 4px; }
.scan-copy h3 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: .06em; color: #eef4f8; }
.scan-copy p { margin: 5px 0 0; font-size: 10px; line-height: 1.65; color: #94a3b3; max-width: 560px; letter-spacing: .02em; }
.scan-link { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--dim-2); }
.scan-link span { color: #b9c6d3; }
.scan-link i { width: 18px; height: 1px; background: rgba(232,176,75,.45); }


@media (max-width: 1120px) {
  .home-actions { gap: 10px; margin-top: 26px; }
  .primary.big { height: 48px; padding: 0 22px; font-size: 13px; }
  .home-actions .ghost { height: 40px; padding: 0 12px; font-size: 11.5px; }
  .home-actions .link { font-size: 11px; }
}

@media (max-height: 760px) {
  .scan-band { padding: 8px 14px; gap: 14px; margin-bottom: 2px; }
  .scan-qr img { width: 96px; height: 96px; }
  .scan-qr-tag { display: none; }
  .scan-copy h3 { font-size: 16px; }
  .home { padding-top: 18px; }
  .home-grid { padding: 2vh 0 1vh; }
  .scan-copy p { display: none; }
  html[lang="en"] h1 { font-size: clamp(40px, 4.6vw, 56px); margin-top: 12px; }
  html[lang="en"] .lead { font-size: 12px; margin-top: 12px; }
  html[lang="en"] .home-actions { margin-top: 16px; }
  html[lang="en"] .home-grid { padding: 1vh 0; }
}
@media (max-width: 560px) {
  .lang-switch { top: 18px; right: 16px; }
  .scan-band { gap: 14px; padding: 10px 14px; }
  .scan-qr img { width: 74px; height: 74px; }
  .scan-copy h3 { font-size: 16px; }
  .scan-copy p { font-size: 9px; }
  .scan-link { flex-wrap: wrap; gap: 6px; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) {
  .home-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 2vh; }
  .ctrl-board { max-width: 520px; }
  .panel { width: 232px; }
  .keyhint { display: none; }
}
@media (max-width: 760px) {
  .home { padding: 18px 18px 12px; }
  .home-grid { gap: 20px; }
  h1 { font-size: clamp(36px, 11vw, 54px); }
  .lead { font-size: 13px; margin-top: 16px; }
  .home-actions { margin-top: 24px; gap: 10px; }
  .primary.big { width: 100%; }
  .ghost { flex: 1; }
  .chips { gap: 16px; margin-top: 26px; }
  .ctrl-board { padding: 16px; }
  .panel { width: 186px; padding: 8px 9px 7px; bottom: 8px; }
  .panel.p1 { left: 8px; }
  .panel.p2 { right: 8px; }
  .panel .panel-keys { display: none; }
  .panel .cd-track { margin-top: 5px; }
  .role, .lvl { font-size: 9px; }
  .topbar { padding: 8px 10px 0; }
  .map-name { font-size: 14px; }
  .stat { display: none; }
  .boss-wrap { flex: 1 1 auto; max-width: 46vw; padding: 5px 8px 6px; }
  .roles { grid-template-columns: 1fr; gap: 10px; }
  .swap { flex-direction: row; justify-content: center; padding: 6px 0; }
  .swap svg { transform: rotate(90deg); }
  .swap:hover svg { transform: rotate(-90deg); }
  .draft-grid { grid-template-columns: 1fr; gap: 12px; max-height: 62vh; overflow-y: auto; }
  .draft-col.p2.only { grid-column: auto; }
  .result-meta { gap: 14px; }
  .row { grid-template-columns: 30px 1fr; }
  .row .rstats { grid-column: 1 / -1; justify-content: space-between; }
  .help-grid { grid-template-columns: 1fr; }
  .home-foot { font-size: 9px; }
  .foot-left { display: none; }
  .prep-actions { justify-content: stretch; }
  .prep-actions .primary, .prep-actions .ghost { flex: 1; }
}
@media (max-width: 560px) and (orientation: portrait) {
  .ctrl-board { display: none; }
  .home-grid { gap: 0; }
  .home-actions { flex-wrap: wrap; }
  .ghost { flex: 0 0 auto; }
  .link { flex: 0 0 auto; margin-left: 0; }
  .chips { margin-bottom: 8px; }
  .rotate-tip { bottom: 58px; }
  body[data-phase="play"] .rotate-tip { display: block; }
  .home-foot { font-size: 9px; }
  .foot-right { gap: 6px; }
  .mini { padding: 4px 7px; font-size: 9px; }
}
@media (max-height: 560px) {
  .home { padding-top: 12px; }
  .kicker, .chips { display: none; }
  h1 { font-size: clamp(30px, 6vh, 46px); margin-top: 10px; }
  .lead { margin-top: 12px; }
  .home-actions { margin-top: 16px; }
  .ctrl-board { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 角色互换后的配色接管 */
.panel.p1[data-role="light"] { border-left-color: var(--light); }
.panel.p1[data-role="light"] .tag { color: var(--light); }
.panel.p1[data-role="light"] .role { color: #a7efe9; }
.panel.p1[data-role="light"] .hp-track i { background: linear-gradient(90deg, #1c6f77, var(--light) 70%, #d6fffb); }
.panel.p2[data-role="hunter"] { border-right-color: var(--hunter); }
.panel.p2[data-role="hunter"] .tag { color: var(--hunter); }
.panel.p2[data-role="hunter"] .role { color: #ffb09a; }
.panel.p2[data-role="hunter"] .hp-track i { background: linear-gradient(90deg, #8e2b1d, var(--hunter) 70%, #ffc0a6); }
.panel[data-down="1"] { opacity: .5; }
