.play { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
.stage {
  position: relative;
  min-height: clamp(320px, 52vh, 620px);
  height: 100%;
  border-radius: 16px;
  border: 2px solid #353844;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.stage canvas, .vignette { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vignette { background: radial-gradient(ellipse, transparent 38%, rgba(10, 12, 18, .72) 100%); pointer-events: none; }
.stage-hud, .vitals {
  position: absolute;
  inset-inline: 16px;
  display: flex;
  align-items: center;
  color: #f5f6f8;
  font-size: .88rem;
  font-weight: 800;
}
.stage-hud { justify-content: space-between; top: 14px; }
.stage-hud span, .vitals span {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(15, 16, 22, .86);
  border: 1px solid #353844;
  backdrop-filter: blur(6px);
}
.vitals { gap: 8px; bottom: 14px; font-variant-numeric: tabular-nums; }
.vitals strong { color: var(--m6-lime); margin-left: 4px; }
.damage .vitals strong { color: var(--m6-orange); }
.damage .vignette { animation: damage .35s ease-out; }
@keyframes damage { from { box-shadow: inset 0 0 60px 18px #ff46557d; } to { box-shadow: inset 0 0 0 0 transparent; } }

.enemy-meter {
  position: absolute;
  top: 12%;
  right: 8%;
  width: clamp(130px, 22%, 210px);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 16, 22, .82);
  border: 1px solid #353844;
  font-size: .8rem;
  font-weight: 800;
  color: #f5f6f8;
  display: grid;
  gap: 5px;
}
.enemy-meter game-bar { display: block; width: 100%; height: 7px; }
#stun-hud { display: grid; gap: 3px; font-size: .72rem; color: var(--m6-lime); }
#stun-hud game-bar { width: 100%; height: 6px; }
.kill {
  position: absolute;
  bottom: 16%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--m6-lime);
  color: #111216;
  padding: 6px 24px;
  font-size: clamp(16px, 2.6vw, 28px);
  font-weight: 900;
  letter-spacing: .1em;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  box-shadow: 0 6px 24px rgba(200, 255, 0, .35);
}

.quiz {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(16px, 2.2vw, 24px);
  border-radius: 16px;
  border: 2px solid #353844;
  border-top: 4px solid var(--m6-orange);
  background: rgba(19, 20, 27, .94);
}
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; }
#timer { color: var(--m6-lime); font-weight: 900; white-space: nowrap; }
#timer-bar { display: block; width: 100%; height: 7px; margin-top: 4px; }
.quiz h2 { margin: 8px 0 10px; font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 900; line-height: 1.35; color: #fff; overflow-wrap: anywhere; }
.quiz h2:focus, .results h1:focus { outline: none; }

.options { display: grid; gap: 10px; }
.options button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 50px;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid #323644;
  border-left: 4px solid #4c5264;
  background: #1b1e27;
  color: #f4f6fa;
  font-family: var(--m6-font);
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
.options button:not(:disabled):hover { border-color: var(--m6-lime); background: #232836; transform: translateX(3px); }
.options button:not(:disabled):active { transform: scale(.98); }
.options button span { color: var(--m6-lime); font-size: .78rem; font-weight: 900; letter-spacing: .06em; opacity: .9; }
.options button.correct { border-color: var(--m6-lime); background: rgba(200, 255, 0, .14); color: var(--m6-lime); }
.options button.wrong { border-color: var(--m6-orange); background: rgba(255, 77, 0, .16); color: #ff8a65; }

.quiz kbd {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  font-family: var(--m6-font);
  font-size: .74rem;
  font-weight: 900;
}
.quiz .abilities { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0; }
.quiz .abilities button {
  padding: 7px 14px;
  border-radius: 10px;
  background: #222530;
  border: 2px solid #3a3f4f;
  color: #f2f4f8;
  font-size: .84rem;
  font-weight: 800;
}
.quiz .abilities button:not(:disabled):hover { border-color: var(--m6-lime); }
#wager {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 10px;
  border: 2px solid #ffd84d;
  background: rgba(255, 216, 77, .08);
  color: #ffd84d;
  font-size: .86rem;
  font-weight: 900;
}
#wager[aria-pressed="true"] { background: #ffd84d; color: #111216; }
#charge { width: 4.5rem; height: 8px; }
#shields { color: var(--teal); font-weight: 800; }
#gold-bar span { display: block; height: 100%; background: var(--m6-lime); transform-origin: left; box-shadow: 0 0 12px rgba(200, 255, 0, .6); }
#spell-input { min-height: 44px; min-width: 0; flex: 1; border-radius: 10px; background: #14161d; color: #fff; border: 2px solid #353844; padding: 0 12px; font: inherit; font-weight: 700; }
#spelling { display: flex; gap: 8px; }
#listen { margin-top: 4px; align-self: flex-start; border-radius: 10px; padding: 8px 14px; font-weight: 800; }
.feedback { min-height: 1.3em; color: #e2e6ef; font-size: .86rem; font-weight: 700; }
.race-hud { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; }
#race-clock { color: var(--m6-lime); font-weight: 900; }
#race-score { overflow-wrap: anywhere; font-weight: 800; }
#race-lead { flex: 1 1 100px; height: 8px; }

/* 绝区零战报结算页 */
.results {
  position: relative;
  padding: clamp(20px, 4vw, 38px);
  max-width: 960px;
  margin-inline: auto;
  border-radius: 18px;
  border: 2px solid #353844;
  border-top: 5px solid var(--m6-orange);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 77, 0, .16), transparent 36%),
    #13151b;
  display: grid;
  gap: 16px;
}
#result-rank {
  position: absolute;
  top: 18px;
  right: 26px;
  font-family: var(--m6-display);
  font-size: clamp(3.4rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--m6-lime);
  transform: skewX(-10deg);
  text-shadow: 5px 5px #090a0d;
}
.results h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 900; letter-spacing: .02em; }
.results-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.results-totals > * {
  padding: 12px 14px;
  border-radius: 12px;
  background: #1c1f28;
  border: 2px solid #2e3240;
  color: #f4f6fa;
  font-size: .92rem;
  font-weight: 800;
}
.results-totals strong { font-size: 1.35rem; color: var(--m6-lime); font-weight: 900; }
#raid-report { display: grid; gap: 14px; }
#raid-report h2 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: #fff; }
#raid-report section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
#raid-report section > h2 { grid-column: 1 / -1; }
#raid-report article {
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b1e27;
  border: 2px solid #2e3240;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
#raid-report article strong { font-size: 1.08rem; color: #fff; font-weight: 900; }
#raid-report article p { margin: 0; font-size: .84rem; color: #c4cbd8; line-height: 1.45; }
#raid-report article button {
  padding: 5px 12px;
  margin-right: 6px;
  border-radius: 999px;
  background: #252936;
  border: 1px solid #44495a;
  color: #f2f4f8;
  font-size: .78rem;
  font-weight: 800;
}
#raid-report article button:hover { border-color: var(--m6-lime); color: var(--m6-lime); }

.results ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.results li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b1e27;
  border: 2px solid #2e3240;
}
.results li span { grid-row: 2; color: #c2c9d6; font-size: .84rem; line-height: 1.4; }
.results li small { grid-column: 2; grid-row: 1; align-self: center; font-size: .76rem; font-weight: 800; color: var(--m6-lime); }
.results li.ever-wrong { border-color: var(--m6-orange); background: rgba(255, 77, 0, .1); }
.results li.ever-wrong small { color: #ff8a65; }
.results li button { justify-self: start; padding: 4px 10px; border-radius: 8px; font-weight: 900; }
.results li .star-word { grid-column: 2; grid-row: 2; justify-self: end; color: #ffd84d; }
#duel-results label { display: grid; gap: 4px; margin-block: 6px; }

@media (orientation: landscape) and (min-width: 760px) {
  .play { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); min-height: calc(100svh - 108px); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .quiz { padding: 10px; }
  .quiz h2 { margin-block: 4px 6px; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .options button { transition: none; } }
