:root {
  --radius: 20px;
  --radius-sm: 14px;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", Georgia, serif;
  --font-sans: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

/* ==================== 正式主题：午夜紫雾 × 月光银紫 ==================== */
body.theme-midnight {
  --bg: #0f101c;
  --bg-card: rgba(25, 24, 42, 0.86);
  --bg-card-deep: rgba(15, 16, 28, 0.94);
  --bg-surface: rgba(255, 255, 255, 0.045);
  --bg-panel: rgba(8, 9, 18, 0.42);
  --bg-featured: linear-gradient(155deg, rgba(48, 40, 78, 0.92) 0%, rgba(22, 22, 38, 0.94) 100%);
  --border: rgba(226, 218, 255, 0.11);
  --border-strong: rgba(226, 218, 255, 0.2);
  --text: #f5f2fa;
  --text-body: #d3cee2;
  --text-muted: #a6a0bc;
  --text-dim: #777192;
  --title-grad: linear-gradient(180deg, #ffffff 0%, #dcd4f5 100%);
  --accent: #bda8ff;
  --accent-strong: #d5c6ff;
  --accent-text: #151126;
  --accent-soft: rgba(189, 168, 255, 0.13);
  --accent-border: rgba(189, 168, 255, 0.38);
  --accent-glow: rgba(184, 164, 248, 0.25);
  --btn-primary-bg: linear-gradient(135deg, #ddd1ff 0%, #a48af2 100%);
  --btn-primary-text: #151126;
  --progress-grad: linear-gradient(90deg, #7e67c9, #d5c6ff);
  --grain-color: rgba(255, 255, 255, 0.8);
  --shadow-card: 0 18px 46px rgba(6, 5, 16, 0.5);
  --divider-bg: #171628;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: radial-gradient(var(--grain-color) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

.ambient-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.5s ease;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 18px 40px;
}

.view {
  display: none;
  animation: fadeUp 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 0. 4位校验码解锁门禁页 ==================== */
.gate-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 0 20px;
}

.gate-emblem {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(189, 168, 255, 0.24) 0%, rgba(72, 56, 128, 0.42) 100%);
  border: 1px solid var(--accent-border);
  box-shadow: 0 14px 34px rgba(132, 104, 224, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #efe9ff;
  margin-bottom: 18px;
}

.gate-emblem-ring {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 1px dashed rgba(189, 168, 255, 0.28);
  pointer-events: none;
}

.gate-lock-svg {
  width: 32px;
  height: 32px;
}

.gate-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  background: var(--title-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-en {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--accent);
  opacity: 0.85;
  margin: 0 0 26px;
}

.gate-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  margin-bottom: 16px;
}

.gate-card.shake {
  animation: gateShake 0.36s ease;
  border-color: rgba(242, 118, 138, 0.7);
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.gate-card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  margin-bottom: 16px;
}

.pin-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 268px;
  margin: 0 auto 14px;
}

.pin-digit {
  width: 100%;
  height: 58px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  outline: none;
  caret-color: var(--accent);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pin-digit:focus {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(189, 168, 255, 0.16);
}

.pin-digit.filled {
  border-color: var(--accent-border);
}

.gate-tip {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  min-height: 18px;
}

.gate-tip.error {
  color: #f38ba0;
}

.gate-notice {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.gate-notice-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.notice-badge {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gate-notice p {
  margin: 0;
  font-size: 12.8px;
  color: var(--text-muted);
  line-height: 1.65;
}

.gate-submit {
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.gate-author {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  padding-bottom: 2px;
  border-bottom: 1px dashed rgba(189, 168, 255, 0.28);
}

/* ==================== 首页样式 ==================== */
.top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.badge-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.badge-dot {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-block {
  text-align: center;
  margin-bottom: 26px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  background: var(--title-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vs-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 6px;
}

.hero-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.75;
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.mode-card {
  position: relative;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(12px);
}

.mode-card:active {
  transform: scale(0.985);
}

.mode-card:hover {
  border-color: var(--border-strong);
}

.mode-card-featured {
  border-color: var(--accent-border);
  background: var(--bg-featured);
  box-shadow: var(--shadow-card);
}

.featured-ribbon {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.mode-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mode-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.tag-gold {
  color: var(--accent);
}

.mode-time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.mode-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

.mode-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

.mode-desc strong {
  color: var(--text);
  font-weight: 600;
}

.mode-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.cta-gold {
  color: var(--accent);
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.history-count {
  font-family: var(--font-mono);
  color: var(--accent);
}

.history-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.history-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.history-tip {
  font-size: 12px;
  color: var(--text-dim);
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.history-tip strong {
  color: var(--text);
}

.landing-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 14px;
}

/* ==================== 答题页样式 ==================== */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quiz-progress-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mode-mini {
  font-size: 11px;
  color: var(--text-dim);
}

.counter-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  width: 4%;
  background: var(--progress-grad);
  border-radius: 999px;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.milestone-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: 12px;
  margin-bottom: 16px;
  animation: fadeUp 0.3s ease;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent);
}

.question-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.question-stage.switching {
  animation: cardSwap 0.24s ease;
}

@keyframes cardSwap {
  from { opacity: 0.35; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.scene-chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.question-text {
  font-family: var(--font-serif);
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--text);
}

.options-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-body);
  font-size: 13.8px;
  line-height: 1.55;
  cursor: pointer;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}

.option-btn:active {
  transform: scale(0.985);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.option-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.option-btn.selected .option-key {
  background: var(--accent);
  color: var(--accent-text);
}

.quiz-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 18px;
}

/* ==================== 显影过渡页 ==================== */
.analyzing-box {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.scanner-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 1.1s linear infinite;
  margin-bottom: 24px;
}

.scanner-core {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 72%);
  opacity: 0.8;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyzing-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 8px;
}

.analyzing-title {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 8px;
}

.analyzing-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ==================== 结果档案页 ==================== */
.result-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.btn-ghost-sm {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.retest-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 12.5px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  line-height: 1.55;
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 22px 18px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.archive-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.archive-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.stamp {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
  opacity: 0.85;
}

.res-eyebrow {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 4px;
  text-align: center;
}

.res-name {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: 0.06em;
}

.res-en-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-align: center;
  color: var(--accent);
  margin: 0 0 14px;
}

.res-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.res-tag {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-body);
}

.contrast-meter {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 14px 12px;
  margin-bottom: 16px;
}

.contrast-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.contrast-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.contrast-val {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.contrast-bar-track {
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.contrast-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--progress-grad);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.contrast-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.res-oneliner {
  margin: 0 0 18px;
  padding: 14px 15px;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.65;
}

.dual-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.dual-box {
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  border: 1px solid var(--border);
}

.dual-surface {
  background: var(--bg-surface);
}

.dual-truth {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.dual-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.dual-box p,
.detail-block p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.72;
}

.detail-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  margin-bottom: 12px;
}

.detail-healing {
  background: var(--bg-panel);
}

.detail-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.match-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.match-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.match-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.match-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.55;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 22px 0 16px;
  position: relative;
}

.section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.section-divider span {
  position: relative;
  background: var(--divider-bg);
  padding: 2px 12px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.radar-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  margin-bottom: 16px;
}

.radar-card-end {
  margin-top: 18px;
  margin-bottom: 14px;
}

.result-disclaimer {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
  opacity: 0.9;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 12px;
}

.dim-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dim-stat-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--text-body);
}

.dim-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dim-stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.dim-stat-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dim-stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.upgrade-banner {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent-border);
  background: var(--accent-soft);
  text-align: center;
}

.upgrade-badge {
  font-size: 11.5px;
  color: var(--accent);
  margin-bottom: 6px;
}

.upgrade-banner h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text);
}

.upgrade-banner p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.btn-gold-block {
  width: 100%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-lg {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.btn-primary-lg:active {
  transform: scale(0.985);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 13px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(8px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card-deep);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 16px;
  color: var(--text);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.poster-preview-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  background: var(--bg);
}

.poster-preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.modal-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 10px 0 2px;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--bg-card-deep);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
