/* ============================================================
   单词论剑 V2 · 「白瓷道场」Porcelain Dojo
   瓷白承接透明立绘 · 细线留白 · 宋体+等宽字 · 朱砂/黛青守武侠之骨
   ============================================================ */
:root {
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", "Liberation Mono", monospace;

  /* 瓷面 */
  --bg: #f2f0ea;
  --surface: #fbfaf7;
  --surface-2: #ffffff;
  --surface-3: #f6f3ec;

  /* 墨 */
  --ink: #17181c;
  --ink-text: #17181c;
  --ink-2: #3c3f46;
  --ink-3: #5b5e66;
  --muted: #656870;

  /* 线 */
  --line: #e6e1d7;
  --line-2: #d8d2c5;
  --line-3: #c9c2b3;

  /* 双方色 */
  --red: #b0392d;
  --red-deep: #8f2b21;
  --red-soft: #f6e8e4;
  --blue: #2b5b9b;
  --blue-deep: #214878;
  --blue-soft: #e8eff8;

  /* 点缀 */
  --gold: #a9863f;
  --gold-bright: #a9863f;
  --jade: #4f7c69;
  --seal: #b0392d;
  --green: #4f7c69;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 22px 44px -34px rgba(23, 24, 28, 0.45);
  --shadow-float: 0 18px 40px -26px rgba(23, 24, 28, 0.4);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==================== 顶栏 ==================== */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #f7f4ec;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.brand-cn {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand-en {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 3px;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 26px;
  padding-left: 26px;
  border-left: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
}

.top-meta b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
}

.top-sep {
  color: var(--line-3);
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  letter-spacing: 0.04em;
  height: 40px;
  padding: 0 18px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-xs {
  height: 26px;
  padding: 0 11px;
  font-size: 11px;
  border-radius: 7px;
}

.btn-lg {
  height: 48px;
  padding: 0 26px;
  font-size: 14px;
  border-radius: 11px;
}

.btn-ink {
  background: var(--ink);
  color: #f8f5ed;
  box-shadow: 0 10px 22px -14px rgba(23, 24, 28, 0.8);
}

.btn-ink:hover {
  background: #000;
}

.btn-line {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--ink-3);
}

.btn-ghost {
  color: var(--ink-2);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--line-3);
}

.btn-danger {
  background: transparent;
  border-color: rgba(176, 57, 45, 0.4);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn-text {
  border: 0;
  padding: 0 6px;
  height: 30px;
  color: var(--ink-3);
  font-size: 12px;
}

.btn-text:hover {
  color: var(--ink);
}

.btn .arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  transition: transform 160ms ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.full {
  width: 100%;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.03em;
}

.link:hover {
  text-decoration: underline;
}

/* ==================== 通用标签 / 分隔 ==================== */
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker .k-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(176, 57, 45, 0.1);
}

.kicker .k-sep {
  color: var(--line-3);
}

.en-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 2px 12px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-head h2 .en {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.section-head .aside {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ==================== 屏幕切换 ==================== */
.screen {
  display: none;
  flex: 1;
  width: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ==================== 首页 ==================== */
.hero {
  position: relative;
  margin-top: 18px;
  height: 408px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  overflow: hidden;
  padding: 34px 40px 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(700px 380px at 78% 116%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 70%),
    linear-gradient(112deg, #fbfaf6 0%, #f7f4ed 54%, #f3efe6 100%);
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 24, 28, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 28, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(760px 420px at 72% 40%, #000 0%, transparent 76%);
  mask-image: radial-gradient(760px 420px at 72% 40%, #000 0%, transparent 76%);
  opacity: 0.5;
}

.hero-watermark {
  position: absolute;
  right: 300px;
  top: -62px;
  font-family: var(--font-serif);
  font-size: 430px;
  line-height: 1;
  color: rgba(23, 24, 28, 0.032);
  pointer-events: none;
  user-select: none;
}

.hero-side-label {
  position: absolute;
  right: 15px;
  top: 44px;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.42em;
  color: #b3ac9d;
  z-index: 2;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 560px;
}

.hero h1 {
  margin: 12px 0 0;
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.hero-en {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.52em;
  color: var(--gold);
  text-transform: uppercase;
}

.hero-lead {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.hero-desc {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

.hero-desc .dim {
  color: var(--line-3);
  margin: 0 6px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.cta-row .btn-line .fill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hero-stats {
  display: flex;
  gap: 26px;
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  max-width: 470px;
}

.hero-stats div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.hero-stats b {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero-stats span {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- 立绘列 ---------- */
.lineup {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 30px;
}

.figure {
  position: relative;
  width: 172px;
  height: 360px;
  flex-shrink: 0;
  margin-left: -26px;
  transition: transform 260ms ease;
}

.figure:first-child {
  margin-left: 0;
}

.figure:hover {
  transform: translateY(-8px);
}

.figure .halo {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 186px;
  height: 186px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--fc) 0%, transparent 66%);
  opacity: 0.14;
}

.figure .fig-index {
  position: absolute;
  top: 26px;
  left: 18px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.figure img {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  height: 320px;
  width: auto;
  filter: drop-shadow(0 16px 14px rgba(23, 24, 28, 0.1));
}

.figure .floor {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 106px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(23, 24, 28, 0.13), transparent 70%);
}

.figure .fig-tag {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.figure .fig-tag b {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.figure .fig-tag em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ==================== 配置区 ==================== */
.config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 26px 22px;
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head .ph-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.panel-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

.field .hint-inline {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  color: var(--line-3);
  margin-left: 5px;
}

.field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.field-top .label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

.deck-row .field-top {
  margin-bottom: 7px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.chip {
  height: 26px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-3);
  transition: all 150ms ease;
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f7f4ec;
}

.helper {
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.helper .dot {
  color: var(--line-3);
  margin: 0 5px;
}

.input,
.select,
textarea {
  height: 40px;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface-2);
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 24, 28, 0.06);
}

.input::placeholder,
textarea::placeholder {
  color: #b3b0a8;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.input.num {
  width: 44px;
  height: 32px;
  text-align: center;
  padding: 0 4px;
}

.input.mono {
  font-family: var(--font-mono);
}

/* 分段 */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: #efebe2;
  border: 1px solid #e6e1d6;
  border-radius: 11px;
}

.seg button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  min-height: 40px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.seg button small {
  font-size: 9.5px;
  color: var(--muted);
  transform: scale(0.95);
}

.seg button.active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 24, 28, 0.08), 0 0 0 1px rgba(23, 24, 28, 0.03);
}

.seg button.active small {
  color: var(--ink-3);
}

.mode-seg button {
  min-height: 52px;
}

.mode-seg button b {
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* 难度档位卡 */
.diff {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.diff button {
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: 10px;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 160ms ease;
}

.diff button b {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.diff button span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.diff button.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.diff button.active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.diff button.active span {
  color: var(--ink-2);
}

/* 倒计时 inline */
.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 0 8px;
}

.switch-wrap {
  display: inline-flex;
  cursor: pointer;
}

.switch-wrap input {
  display: none;
}

.switch {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #ddd8cc;
  position: relative;
  flex-shrink: 0;
  transition: background 150ms ease;
  display: inline-block;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 150ms ease;
}

.switch-wrap input:checked + .switch {
  background: var(--ink);
}

.switch-wrap input:checked + .switch::after {
  transform: translateX(14px);
}

.inline .unit {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
  padding-right: 4px;
}

/* 勾选项 */
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
}

.check input {
  display: none;
}

.check .box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line-3);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: transparent;
}

.check input:checked ~ .box {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* 本局概览 */
.match-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.match-summary .ms-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.match-summary .ms-items {
  display: flex;
  gap: 18px;
}

.match-summary .ms-items span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.match-summary .ms-items b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin-right: 3px;
}

.bottom-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px 14px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.bottom-note .mono {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--line-3);
}

/* ==================== 选人页 ==================== */
.select-wrap {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  gap: 14px;
  height: 280px;
}

.preview {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 16px 20px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--side), rgba(255, 255, 255, 0));
  opacity: 0.9;
}

.preview.a {
  --side: var(--red);
  --side-soft: var(--red-soft);
}

.preview.b {
  --side: var(--blue);
  --side-soft: var(--blue-soft);
}

.pv-art {
  position: relative;
  width: 158px;
  height: 100%;
  flex-shrink: 0;
  border-radius: 12px;
  background:
    radial-gradient(120px 180px at 50% 22%, color-mix(in srgb, var(--fc, var(--side)) 16%, transparent), transparent 72%),
    linear-gradient(180deg, #fff 0%, #faf8f3 100%);
  overflow: hidden;
  border: 1px solid var(--line);
}

.pv-art .art-ring {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 96px;
  height: 96px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--fc, var(--side)) 26%, transparent);
  opacity: 0.7;
}

.pv-art img {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  height: 246px;
  width: auto;
  filter: drop-shadow(0 12px 10px rgba(23, 24, 28, 0.12));
}

.pv-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.pv-side {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--side);
  text-transform: uppercase;
}

.pv-side .sq {
  width: 6px;
  height: 6px;
  background: var(--side);
  border-radius: 1px;
}

.pv-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 7px;
}

.pv-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.1;
  margin: 0;
}

.pv-en {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.pv-title {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  width: 100%;
  max-width: 330px;
}

.stat-row {
  display: grid;
  grid-template-columns: 30px 1fr 26px;
  align-items: center;
  gap: 8px;
}

.stat-row .k {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.stat-track {
  height: 3px;
  border-radius: 2px;
  background: #e9e4da;
  overflow: hidden;
}

.stat-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--side) 62%, #b9a98a), var(--side));
}

.stat-row .v {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-2);
  text-align: right;
}

.ult-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.ult-line .lab {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.ult-line .val {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--side);
}

.pv-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.pv-actions .btn {
  height: 28px;
  padding: 0 11px;
  font-size: 10.5px;
  border-radius: 7px;
}

.pv-ghost {
  position: absolute;
  right: 18px;
  bottom: -6px;
  font-family: var(--font-serif);
  font-size: 138px;
  line-height: 1;
  color: rgba(23, 24, 28, 0.045);
  pointer-events: none;
  user-select: none;
}

/* 中央 决 */
.vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vs-col .vline {
  width: 1px;
  flex: 1;
  background: linear-gradient(180deg, transparent, var(--line-2));
}

.vs-col .vline:last-child {
  background: linear-gradient(0deg, transparent, var(--line-2));
}

.vs-medal {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--ink);
  color: #f6f2e8;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  box-shadow: 0 10px 24px -14px rgba(23, 24, 28, 0.9);
}

.vs-medal::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
}

.vs-medal::before {
  content: "VS";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

/* 名册 */
.roster {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.rc {
  position: relative;
  height: 148px;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.rc:hover {
  transform: translateY(-2px);
  border-color: var(--line-3);
  box-shadow: var(--shadow-float);
}

.rc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 13px;
  width: 26px;
  height: 2px;
  background: var(--fc);
  opacity: 0.85;
}

.rc-art {
  position: absolute;
  right: -2px;
  bottom: 5px;
  height: 138px;
  width: auto;
  opacity: 0.94;
  filter: drop-shadow(0 6px 6px rgba(23, 24, 28, 0.1));
  transition: transform 220ms ease;
  pointer-events: none;
}

.rc:hover .rc-art {
  transform: translateY(-2px) scale(1.02);
}

.rc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface) 32%, rgba(251, 250, 247, 0.94) 48%, rgba(251, 250, 247, 0) 73%);
  pointer-events: none;
}

.rc-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rc-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.rc-idx {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--line-3);
  letter-spacing: 0.08em;
}

.rc-en {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--muted);
  text-transform: uppercase;
}

.rc-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin-top: 3px;
}

.rc-ult {
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 118px;
}

.rc-actions {
  display: flex;
  gap: 5px;
  margin-top: auto;
}

.pick {
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.72);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  transition: all 140ms ease;
}

.pick:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.pick[data-side="A"].on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.pick[data-side="B"].on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.rc-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
}

.rc.sel-a {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 42%, transparent), var(--shadow-float);
}

.rc.sel-a .rc-badge {
  display: grid;
  background: var(--red);
}

.rc.sel-b {
  border-color: color-mix(in srgb, var(--blue) 52%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 42%, transparent), var(--shadow-float);
}

.rc.sel-b .rc-badge {
  display: grid;
  background: var(--blue);
}

.select-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
}

.select-footer .tip {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.select-footer .tip .mono {
  color: var(--line-3);
  margin-right: 6px;
  font-size: 9px;
}

/* ==================== 对战页 ==================== */
.battle-screen {
  height: 100vh;
  gap: 12px;
  padding: 14px 0 14px;
}

/* HUD */
.hud {
  height: 94px;
  display: grid;
  grid-template-columns: 1fr 214px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hud-side {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 12px;
  transition: background 0.2s, box-shadow 0.2s;
}

.hud-side.b {
  flex-direction: row-reverse;
}

.hud-side.active-turn {
  background: color-mix(in srgb, var(--side) 6%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--side) 24%, transparent);
}

.hud-av {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--side) 30%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--side) 7%, transparent);
  background: color-mix(in srgb, var(--side) 5%, #fff);
}

.hud-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 21%;
}

.hud-main {
  flex: 1;
  min-width: 0;
}

.hud-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hud-side.b .hud-top {
  flex-direction: row-reverse;
}

.side-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--side);
  background: color-mix(in srgb, var(--side) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--side) 16%, transparent);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.pname {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.fname {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpnum {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hud-side.b .hpnum {
  margin-left: 0;
  margin-right: auto;
}

.hpnum span {
  color: var(--line-3);
  font-size: 9px;
}

.hp {
  position: relative;
  height: 9px;
  margin-top: 7px;
  border-radius: 2px;
  background: #e9e3d7;
  overflow: hidden;
}

.hp .trail,
.hp .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  transition: width 1s linear; /* 时长与倒计时 tick 间隔一致，视觉连续匀速 */
}

.hp .trail {
  background: color-mix(in srgb, var(--side) 26%, #fff);
  transition: width 0.55s ease 0.15s;
}

.hp .fill {
  background: linear-gradient(90deg, color-mix(in srgb, var(--side) 82%, #000), var(--side));
}

.hud-side.b .hp .trail,
.hud-side.b .hp .fill {
  left: auto;
  right: 0;
}

.hp .ticks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 21px, rgba(255, 255, 255, 0.5) 21px 22px);
  opacity: 0.6;
}

.hud-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.hud-side.b .hud-bottom {
  flex-direction: row-reverse;
}

.pips {
  display: flex;
  gap: 5px;
}

.pips i {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--side);
  opacity: 0.4;
}

.pips i.filled {
  background: var(--side);
  opacity: 0.95;
}

.combo {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.combo b {
  color: var(--side);
  font-weight: 500;
}

/* 中央计时 */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.round {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.timer {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) 0 58%, #e5dfd2 58% 100%);
  display: grid;
  place-items: center;
}

.timer::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}

.timer b {
  position: relative;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.timer.danger {
  background: conic-gradient(var(--red) 0 80%, #ecd6cd 80% 100%);
  animation: pulseTimer 0.6s infinite;
}

.remain {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ==================== 演武台 ==================== */
.arena {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(620px 420px at 10% 78%, rgba(176, 57, 45, 0.055), transparent 62%),
    radial-gradient(620px 420px at 90% 78%, rgba(43, 91, 155, 0.06), transparent 62%),
    radial-gradient(720px 300px at 50% 96%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f8f5ee 0%, #f3eee3 58%, #ebe4d5 100%);
  box-shadow: inset 0 0 150px rgba(52, 40, 24, 0.07);
}

.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 24, 28, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 28, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 100%);
  opacity: 0.55;
}

.arena-word {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: 300px;
  line-height: 1;
  color: rgba(23, 24, 28, 0.028);
  user-select: none;
  pointer-events: none;
}

.ghost-letter {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 150px;
  font-weight: 300;
  color: rgba(23, 24, 28, 0.035);
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}

.ghost-letter.a { left: 34px; }
.ghost-letter.b { right: 34px; }

.rings {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  pointer-events: none;
}

.rings i {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border: 1px solid rgba(23, 24, 28, 0.1);
  border-radius: 50%;
}

.rings i:nth-child(1) { width: 1180px; height: 250px; }
.rings i:nth-child(2) { width: 880px; height: 190px; opacity: 0.8; }
.rings i:nth-child(3) { width: 580px; height: 128px; opacity: 0.6; }

.seam {
  position: absolute;
  left: 50%;
  top: 12%;
  bottom: 98px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(23, 24, 28, 0.12) 40%, rgba(23, 24, 28, 0.12) 100%);
  pointer-events: none;
}

/* 角色站位（stage-fighter 动画类挂载于此） */
.fighter {
  position: absolute;
  bottom: 13%;
  height: 58%;
  max-height: 372px;
  width: 330px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
}

.fighter.a { left: 12%; }
.fighter.b { right: 12%; }

.fighter .pedestal {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(23, 24, 28, 0.14), rgba(23, 24, 28, 0.035) 58%, transparent 72%);
  pointer-events: none;
}

.fighter img {
  position: relative;
  height: 100%;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 16px 16px rgba(23, 24, 28, 0.13));
}

.arena-vs {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--ink);
  color: #f6f1e6;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  z-index: 4;
  box-shadow: 0 0 0 6px rgba(251, 250, 247, 0.7), 0 0 0 7px var(--line);
}

.arena-vs::after {
  content: "VS";
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.arena-meta {
  position: absolute;
  left: 18px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--line-3);
  z-index: 3;
}

.arena-meta.r {
  left: auto;
  right: 18px;
}

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* 超必杀暗转：施放期间舞台压暗聚焦，视频黑底随之融入 */
.arena.ult-dim::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000; /* 与技能视频黑底完全一致，"关灯放大招" */
  pointer-events: none;
  animation: dimIn 0.45s ease;
}

/* 倒计时条：一次性线性播放（浏览器驱动，绝对平滑无停顿） */
@keyframes barShrink {
  from { width: 100%; }
  to { width: 0%; }
}

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

/* ==================== 题面 ==================== */
.quiz {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.quiz-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #ece6da;
}

.quiz-progress i {
  display: block;
  height: 100%;
  width: 4%;
  background: linear-gradient(90deg, var(--red), #d07c62);
  transition: width 0.3s ease;
}

.quiz-head {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.turn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--red);
  font-weight: 600;
}

.turn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--red-soft);
}

.turn.turn-b {
  color: var(--blue);
}

.turn.turn-b::before {
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.qmeta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.qno {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.quiz-body {
  display: grid;
  grid-template-columns: 0.92fr 1.55fr;
  gap: 40px;
  min-height: 218px;
  padding: 16px 18px;
}

.q-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 2px;
}

.q-left::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: var(--line);
}

.q-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.q-word {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-all;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 16px;
  letter-spacing: 0.05em;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.opt kbd {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  transition: all 150ms ease;
}

.opt:hover {
  border-color: var(--ink);
  box-shadow: 0 10px 22px -18px rgba(23, 24, 28, 0.7);
  transform: translateY(-1px);
}

.opt:hover kbd {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.opt:disabled {
  cursor: default;
}

.opt:disabled:hover {
  transform: none;
  border-color: var(--line-2);
  box-shadow: none;
}

.opt.correct {
  background: #eef4ea;
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.opt.wrong {
  background: var(--red-soft);
  border-color: var(--red);
}

/* ==================== 双人同答 ==================== */
.dual-quiz-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 18px 16px;
}

.dqz-pane {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dqz-pane.a {
  --side: var(--red);
  --side-soft: var(--red-soft);
  border-color: color-mix(in srgb, var(--red) 30%, var(--line));
}

.dqz-pane.b {
  --side: var(--blue);
  --side-soft: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
}

.dqz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dqz-label {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--side);
}

.dqz-timer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 8px;
}

.dqz-timer.danger {
  color: var(--red);
  border-color: rgba(176, 57, 45, 0.4);
  background: var(--red-soft);
}

.dqz-word {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  word-break: break-all;
}

.dual-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dual-options .opt {
  padding: 8px 12px;
  font-size: 14.5px;
  gap: 9px;
  min-height: 44px;
}

.dual-options .opt kbd {
  width: 22px;
  height: 22px;
  font-size: 9.5px;
}

/* 答错惩戒锁定 */
.dqz-pane.blocked {
  animation: blockedFlash 0.55s ease infinite;
}

.dqz-pane.blocked::after {
  content: "✖ 答错惩戒 · 短暂锁定";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
  background: rgba(23, 24, 28, 0.9);
  border: 1px solid rgba(176, 57, 45, 0.7);
  color: #f6d9cf;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==================== 底栏 ==================== */
.battle-footer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fgroup {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fbtn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  transition: background 140ms ease, color 140ms ease;
}

.fbtn:hover {
  background: #fff;
  color: var(--ink);
}

.fbtn.danger {
  color: var(--red);
}

.fdiv {
  width: 1px;
  height: 11px;
  background: var(--line-2);
  margin: 0 6px;
}

.floating-restore {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}

/* ==================== 大招视频 ==================== */
.ult-video {
  position: absolute;
  left: 50%;
  top: 62%;
  height: 148%;        /* 演出窗放大：超出舞台的部分 screen 混合自动融入 */
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 6;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 55%, rgba(0, 0, 0, 0.3) 78%, transparent 95%);
  mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 55%, rgba(0, 0, 0, 0.3) 78%, transparent 95%);
}

/* ==================== 特效层（瓷面适配） ==================== */
.fx-callout {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 10px;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85), 0 10px 34px rgba(23, 24, 28, 0.28);
  animation: popCallout 0.95s ease forwards;
  text-align: center;
}

.fx-callout.hit {
  color: var(--ink);
}

.fx-callout.ult {
  font-size: 60px;
  letter-spacing: 12px;
  color: var(--red);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9), 0 12px 40px rgba(176, 57, 45, 0.35);
}

.fx-callout.miss {
  color: var(--ink-3);
}

.fx-callout.counter {
  color: #6d4bb0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(109, 75, 176, 0.3);
}

.fx-callout.info {
  color: var(--blue);
  font-size: 40px;
}

.fx-sub {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-top: 8px;
  animation: popCallout 0.95s ease forwards;
}

.slash-fx {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 150px;
  height: 22px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1) 42%, rgba(169, 134, 63, 0.9) 62%, transparent);
  border-radius: 999px;
  filter: drop-shadow(0 4px 10px rgba(23, 24, 28, 0.35));
  animation: slashSweep 0.34s ease-out forwards;
}

.damage-float {
  position: absolute;
  top: 24%;
  z-index: 6;
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 600;
  pointer-events: none;
  animation: damageFloat 1s ease-out forwards;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

.damage-float.pos-a {
  left: 15%;
}

.damage-float.pos-b {
  right: 15%;
}

.damage-float.dmg {
  color: var(--red);
}

.damage-float.heal {
  color: var(--jade);
}

/* ==================== 弹窗 ==================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 24, 28, 0.42);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 30px 70px -30px rgba(23, 24, 28, 0.5);
}

.modal-xl {
  max-width: 1080px;
  height: 86vh;
}

.modal-lg {
  max-width: 760px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.modal-sub {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.icon-close {
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.icon-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ==================== 题库管理 ==================== */
.deck-manager-body {
  flex: 1;
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 0;
}

.deck-sidebar {
  border-right: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: var(--surface-3);
}

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

.two-btn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

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

.deck-item {
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}

.deck-item:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.deck-item.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.deck-item-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.deck-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  flex-shrink: 0;
}

.deck-item-meta {
  font-size: 11px;
  color: var(--muted);
}

.deck-editor {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.deck-meta-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.import-box {
  background: var(--surface-3);
  border: 1px dashed var(--line-3);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.import-head,
.import-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.single-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.item-table-wrap {
  flex: 1;
  min-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.item-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--ink);
}

.item-table th,
.item-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.item-table th {
  background: var(--surface-3);
  position: sticky;
  top: 0;
  color: var(--ink-3);
  font-size: 11px;
}

.item-table td input {
  padding: 5px 8px;
  font-size: 12.5px;
  height: 32px;
}

/* ==================== 结算 ==================== */
.result-card {
  padding: 24px 26px;
  gap: 16px;
  overflow-y: auto;
}

.result-banner {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 14px;
  color: var(--ink);
}

.result-winner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 20px;
}

.result-winner-art {
  width: 96px;
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.result-winner-art .vs-emblem {
  align-self: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ink);
  color: #f6f1e6;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line-2);
}

.result-winner-art img {
  height: 160px;
  width: auto;
  filter: drop-shadow(0 12px 10px rgba(23, 24, 28, 0.12));
}

.result-winner-text h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.result-winner-text p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
}

.stat-card.side-a {
  border-top: 3px solid var(--red);
}

.stat-card.side-b {
  border-top: 3px solid var(--blue);
}

.stat-card h4 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.stat-kv {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  font-size: 12px;
  color: var(--ink-3);
}

.stat-kv strong {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 14px;
  margin-left: 4px;
}

.mistakes-section h4 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.count-pill {
  background: var(--red-soft);
  color: var(--red);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
}

.mistakes-list {
  max-height: 170px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mistake-row {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-2);
}

.mistake-ans {
  color: var(--jade);
  font-weight: 700;
}

.mistake-wrong {
  color: var(--red);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  background: var(--ink);
  color: #f4f0e6;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 34px -16px rgba(23, 24, 28, 0.7);
}

/* ==================== 关键帧 ==================== */
/* 待机：呼吸感（浮动 + 微缩放 + 衣摆微摆），A/B 相位错开 */
@keyframes fighterIdle {
  0%   { transform: translateY(0) scale(1) rotate(0deg); }
  28%  { transform: translateY(-7px) scale(1.015) rotate(-1deg); }
  52%  { transform: translateY(-3px) scale(1) rotate(0.6deg); }
  78%  { transform: translateY(-8px) scale(1.02) rotate(-0.6deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes fighterIdleB {
  0%   { transform: scaleX(-1) translateY(-4px) scale(1.01) rotate(0deg); }
  28%  { transform: scaleX(-1) translateY(2px) scale(1) rotate(-1deg); }
  52%  { transform: scaleX(-1) translateY(-6px) scale(1.02) rotate(0.8deg); }
  78%  { transform: scaleX(-1) translateY(0) scale(1) rotate(-0.8deg); }
  100% { transform: scaleX(-1) translateY(-4px) scale(1.01) rotate(0deg); }
}

/* 普通攻击：蓄势前倾 → 突进 → 挥击横拉 → 弹性收招 */
@keyframes lungeA {
  0%   { transform: translateX(0) rotate(0deg); }
  22%  { transform: translateX(-14px) rotate(-4deg) scale(1.02); }
  48%  { transform: translateX(158px) rotate(7deg) scale(1.05); }
  64%  { transform: translateX(184px) rotate(-5deg) scaleX(1.14); }
  82%  { transform: translateX(150px) rotate(2deg) scaleX(1); }
  100% { transform: translateX(0) rotate(0deg); }
}

@keyframes lungeB {
  0%   { transform: scaleX(-1) translateX(0) rotate(0deg); }
  22%  { transform: scaleX(-1) translateX(-14px) rotate(-4deg) scale(1.02); }
  48%  { transform: scaleX(-1) translateX(158px) rotate(7deg) scale(1.05); }
  64%  { transform: scaleX(-1) translateX(184px) rotate(-5deg) scaleX(1.14); }
  82%  { transform: scaleX(-1) translateX(150px) rotate(2deg) scaleX(1); }
  100% { transform: scaleX(-1) translateX(0) rotate(0deg); }
}

@keyframes ultA {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-24px) scale(1.14); }
  55% { transform: translateX(220px) scale(1.24); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes ultB {
  0% { transform: scaleX(-1) translateX(0) scale(1); }
  25% { transform: scaleX(-1) translateX(-24px) scale(1.14); }
  55% { transform: scaleX(-1) translateX(220px) scale(1.24); }
  100% { transform: scaleX(-1) translateX(0) scale(1); }
}

/* 受击：先格挡（缩身前倾）→ 被击退后仰 → 晃动回稳 */
@keyframes hurtFlash {
  0%   { transform: scale(0.96) rotate(3deg) translateX(0); filter: brightness(1); }
  18%  { transform: scale(0.94) rotate(4deg) translateX(-12px); filter: brightness(0.94) drop-shadow(0 0 16px rgba(74, 144, 217, 0.8)); }
  38%  { transform: scale(1.02) rotate(-7deg) translateX(-26px); filter: brightness(0.82) saturate(1.5) drop-shadow(0 0 20px rgba(176, 57, 45, 0.55)); }
  56%  { transform: scale(0.99) rotate(3deg) translateX(-12px); filter: brightness(0.88); }
  76%  { transform: scale(1) rotate(-1.5deg) translateX(-4px); filter: brightness(1.02); }
  100% { transform: scale(1) rotate(0deg) translateX(0); filter: none; }
}

/* 防御姿态 */
@keyframes guardStance {
  0%, 100% { transform: scale(0.97) rotate(3.5deg) translateY(2px); }
  50% { transform: scale(0.955) rotate(4.5deg) translateY(4px); }
}

@keyframes guardShield {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 0.9; transform: translateX(-50%) scaleY(1.06); }
}

@keyframes slashSweep {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-38deg) scaleX(0.2); }
  30%  { opacity: 1; transform: translate(-50%, -50%) rotate(-38deg) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-30deg) scaleX(1.25); }
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-10px, 6px); }
  40% { transform: translate(10px, -6px); }
  60% { transform: translate(-7px, -4px); }
  80% { transform: translate(7px, 4px); }
}

@keyframes flashOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes popCallout {
  0% { opacity: 0; transform: scale(0.55) translateY(18px); }
  22% { opacity: 1; transform: scale(1.08) translateY(0); }
  78% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.95) translateY(-14px); }
}

@keyframes damageFloat {
  0% { opacity: 0; transform: translateY(24px) scale(0.7); }
  18% { opacity: 1; transform: translateY(0) scale(1.18); }
  100% { opacity: 0; transform: translateY(-74px) scale(1); }
}

@keyframes blockedFlash {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(176, 57, 45, 0.1); }
  50% { box-shadow: inset 0 0 26px rgba(176, 57, 45, 0.28); }
}

@keyframes pulseTimer {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}

/* ==================== 动作类挂载 ==================== */
/* 技能视频播放期间：冻结宿主待机动画，画面稳定 */
.stage-fighter.video-playing > img {
  opacity: 0; /* 视频中已有角色特写，仅隐藏立绘图（视频同为直接子元素，用 > img 精确排除） */
}

.stage-fighter {
  transform-origin: bottom center;
  animation: fighterIdle 2.8s ease-in-out infinite;
  transition: transform 0.25s ease;
}

.fighter img {
  transition: opacity 0.15s ease;
}

.stage-fighter-b {
  transform: scaleX(-1);
  transform-origin: bottom center;
  animation: fighterIdleB 2.8s ease-in-out infinite;
  animation-delay: -1.4s;
}

.stage-fighter.attack-a {
  animation: lungeA 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-fighter.attack-b {
  animation: lungeB 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-fighter.ult-a {
  animation: ultA 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 26px rgba(169, 134, 63, 0.55));
}

.stage-fighter.ult-b {
  animation: ultB 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 26px rgba(76, 110, 245, 0.5));
}

.stage-fighter.hurt {
  animation: hurtFlash 0.72s ease;
}

/* 大招受击（特殊化）：大幅击退 + 旋转 + 重击红光 */
@keyframes hurtUlt {
  0%   { transform: scale(1) rotate(0deg) translateX(0); filter: brightness(1); }
  14%  { transform: scale(1.07) rotate(-4deg) translateX(8px); filter: brightness(1.35); }
  34%  { transform: scale(0.92) rotate(11deg) translateX(-42px); filter: brightness(0.7) saturate(1.7) drop-shadow(0 0 26px rgba(176, 57, 45, 0.8)); }
  54%  { transform: scale(0.88) rotate(16deg) translateX(-60px) translateY(8px); filter: brightness(0.55) saturate(1.4); }
  72%  { transform: scale(0.96) rotate(-7deg) translateX(-34px); filter: brightness(0.85); }
  88%  { transform: scale(0.99) rotate(2deg) translateX(-8px); filter: brightness(1); }
  100% { transform: scale(1) rotate(0deg) translateX(0); filter: none; }
}

.stage-fighter.hurt-ult {
  animation: hurtUlt 0.95s ease;
}

/* 防御姿态（护盾光环 + 沉身格挡） */
.stage-fighter.guard {
  animation: guardStance 1.6s ease-in-out infinite;
}

.stage-fighter.guard::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 26%;
  width: 72%;
  height: 64%;
  transform: translateX(-50%);
  border-radius: 46% 54% 50% 50% / 58% 58% 42% 42%;
  border: 1.6px solid rgba(74, 144, 217, 0.55);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(94, 178, 214, 0.16), transparent 62%),
    radial-gradient(ellipse at center, transparent 58%, rgba(94, 178, 214, 0.2) 78%, rgba(74, 144, 217, 0.34) 94%, transparent 100%);
  animation: guardShield 1.4s ease-in-out infinite;
  pointer-events: none;
}

.stage-fighter.ko-a {
  animation: none;
  transform: translateX(-50px) rotate(-76deg) translateY(34px);
  opacity: 0.45;
  filter: grayscale(0.85);
}

.stage-fighter.ko-b {
  animation: none;
  transform: scaleX(-1) translateX(-50px) rotate(-76deg) translateY(34px);
  opacity: 0.45;
  filter: grayscale(0.85);
}

/* 关闭特效模式 */
.no-fx .stage-fighter,
.no-fx .arena,
.no-fx .arena::after,
.no-fx .timer,
.no-fx .fx-callout,
.no-fx .damage-float,
.no-fx .slash-fx {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .stage-fighter,
  .arena,
  .arena::after,
  .timer,
  .fx-callout,
  .damage-float,
  .slash-fx,
  .dqz-pane.blocked {
    animation: none !important;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1180px) {
  .fighter {
    height: min(68%, 340px);
    width: 280px;
  }
  .fighter img {
    height: 100%;
  }
  .hero h1 {
    font-size: 52px;
  }
}

/* 常见教室投影/短高屏（1024×768、1280×720、1366×768）防立绘裁头 */
@media (max-height: 820px) and (min-width: 981px) {
  .battle-screen {
    gap: 8px;
    padding: 8px 0 10px;
  }
  .hud {
    height: 78px;
  }
  .hud-av {
    width: 46px;
    height: 46px;
  }
  .fighter {
    bottom: 8%;
    height: min(78%, 300px);
    max-height: 84%;
  }
  .fighter img {
    height: 100%;
  }
  .quiz-head {
    height: 38px;
  }
  .quiz-body {
    padding: 12px 18px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 0 16px;
  }
  .config,
  .preview-row,
  .deck-manager-body,
  .result-stats,
  .dual-quiz-zone {
    grid-template-columns: 1fr;
  }
  .vs-col {
    display: none;
  }
  .roster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    padding-bottom: 20px;
  }
  .lineup {
    height: 240px;
    margin-top: 10px;
  }
  .figure {
    width: 120px;
    height: 230px;
  }
  .figure img {
    height: 200px;
  }
  .hero-watermark,
  .hero-side-label {
    display: none;
  }
  .quiz-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .q-left::after {
    display: none;
  }
  .hud {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px 0;
  }
  .hud-center {
    order: -1;
    flex-direction: row;
    gap: 12px;
  }
  .battle-screen {
    height: auto;
  }
  .fighter {
    position: relative;
    left: auto !important;
    right: auto !important;
    bottom: auto;
    height: 280px;
    width: 100%;
  }
  .fighter img {
    height: 270px;
  }
  .top-meta {
    display: none;
  }
}

@media (max-width: 640px) {
  .three-col,
  .two-col,
  .single-add-row {
    grid-template-columns: 1fr;
  }
  .item-table-wrap {
    overflow-x: auto;
  }
  .item-table {
    min-width: 520px;
  }
}
