/* ==========================================================================
 * css/chaoyue-quiz.css — 《今天是太阳雨 × 超越村 101 考古试炼》
 * 融合 Fable 晴雨星光气象画布 × Effect Atlas 3D 磁感折射卡 × 移动端单手沉浸交互
 * 复用 css/tokens.css 语义变量，支持日间纸感 (paper) 与暗夜舞台 (dark) 双主题
 * ========================================================================== */

.cq-body {
  --cq-violet: #7C3AED;
  --cq-violet-soft: rgba(124, 58, 237, 0.11);
  --cq-gold-glow: rgba(217, 119, 6, 0.18);
  --cq-cyan-glow: rgba(2, 132, 199, 0.14);
  --cq-dock-h: 68px;
}

body[data-theme="dark"].cq-body {
  --cq-violet: #A78BFA;
  --cq-violet-soft: rgba(167, 139, 250, 0.16);
  --cq-gold-glow: rgba(245, 185, 82, 0.22);
  --cq-cyan-glow: rgba(56, 189, 248, 0.18);
}

.cq-body [hidden] {
  display: none !important;
}

/* 顶部晴雨虹彩总进度条 */
.cq-top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(148, 163, 184, 0.16);
  pointer-events: none;
}

.cq-top-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rain-cyan) 0%, var(--sun-gold) 52%, var(--cq-violet) 100%);
  background-size: 200% 100%;
  transition: width 0.38s var(--ea-out);
  animation: cqSpectrumShift 4.5s linear infinite;
}

@keyframes cqSpectrumShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* 顶部轻量导航 */
.cq-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.cq-topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 640px) {
  .cq-topbar-inner {
    padding: 11px 22px;
  }
}

.cq-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cq-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cq-back-btn:hover {
  background: var(--bg-panel);
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.cq-back-full { display: none; }
.cq-back-short { display: inline; }

@media (min-width: 560px) {
  .cq-back-full { display: inline; }
  .cq-back-short { display: none; }
}

.cq-brand-text {
  min-width: 0;
}

.cq-brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .cq-brand-title {
    font-size: 16px;
  }
}

.cq-title-full { display: none; }
.cq-title-short { display: inline; }

@media (min-width: 560px) {
  .cq-title-full { display: inline; }
  .cq-title-short { display: none; }
}

.cq-status-pill {
  display: none;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--cq-violet-soft);
  color: var(--cq-violet);
  border: 1px solid rgba(124, 58, 237, 0.26);
}

.cq-status-pill.is-graded {
  background: var(--status-lime-bg);
  color: var(--status-lime-text);
  border-color: rgba(22, 163, 74, 0.28);
}

@media (min-width: 720px) {
  .cq-status-pill {
    display: inline-flex;
  }
}

.cq-top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .cq-top-actions {
    gap: 6px;
  }
}

.cq-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s var(--ea-out), border-color 0.2s ease, background-color 0.2s ease;
}

.cq-action-btn:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
}

.cq-action-btn--gold {
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  border-color: var(--hairline-strong);
}

@media (max-width: 480px) {
  .cq-share-label,
  .cq-sheet-word { display: none; }
  .cq-topbar-inner { padding: 8px 10px; gap: 6px; }
  .cq-brand { gap: 6px; }
  .cq-brand-title { font-size: 13.5px; }
  .cq-back-btn { padding: 4px 8px; font-size: 11px; }
  .cq-top-actions { gap: 4px; }
  .cq-action-btn { padding: 4px 7px; font-size: 11px; }
}

/* 页面主容器 */
.cq-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 12px calc(var(--cq-dock-h) + 26px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .cq-shell {
    padding: 22px 24px 80px;
  }
}

/* Fable × Specular Glare 基础卡片系统 */
.cq-card {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

.cq-spec-card {
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: perspective(920px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition:
    transform 0.36s var(--ea-out),
    border-color 0.22s ease,
    box-shadow 0.28s ease;
}

.cq-spec-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    var(--cq-gold-glow),
    var(--cq-cyan-glow) 44%,
    transparent 74%
  );
  transition: opacity 0.25s ease;
}

.cq-spec-card > * {
  position: relative;
  z-index: 1;
}

.cq-spec-card:hover {
  border-color: var(--hairline-strong);
}

.cq-spec-card:hover::before {
  opacity: 1;
}

/* 开篇英雄舞台 + Fable 晴雨画布 */
.cq-hero {
  padding: 20px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, var(--bg-elevated) 62%),
    radial-gradient(circle at 90% 10%, var(--cq-violet-soft), transparent 55%);
}

body[data-theme="dark"] .cq-hero {
  background:
    linear-gradient(155deg, rgba(28, 37, 48, 0.90) 0%, var(--bg-elevated) 72%),
    radial-gradient(circle at 90% 10%, var(--cq-violet-soft), transparent 55%);
}

@media (min-width: 920px) {
  .cq-hero {
    padding: 28px 28px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.92fr);
    gap: 26px;
    align-items: center;
  }
}

.cq-atmos-canvas {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0 !important;
  display: block;
}

.cq-hero-veil {
  position: absolute !important;
  inset: 0;
  pointer-events: none;
  z-index: 0 !important;
  background:
    radial-gradient(110% 85% at 82% 8%, rgba(245, 185, 82, 0.14), transparent 56%),
    radial-gradient(85% 75% at 10% 94%, rgba(56, 189, 248, 0.11), transparent 60%);
}

.cq-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--sun-gold);
  margin-bottom: 8px;
}

.cq-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(23px, 5vw, 35px);
  font-weight: 900;
  line-height: 1.32;
  color: var(--ink-primary);
  margin-bottom: 12px;
}

.cq-hero-title em {
  font-style: normal;
  color: var(--sun-gold);
}

.cq-flip-wrap {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  color: var(--cq-violet);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .cq-flip-wrap {
    display: table;
    margin-top: 2px;
  }
}

.cq-flip-phrase {
  display: inline-block;
  transition: opacity 0.28s ease, transform 0.34s var(--ea-out);
}

.cq-flip-phrase.is-swapping {
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
}

.cq-underline-svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  pointer-events: none;
}

.cq-underline-path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: cqDrawUnderline 1.2s var(--ea-out) 0.25s forwards;
}

@keyframes cqDrawUnderline {
  to { stroke-dashoffset: 0; }
}

.cq-hero-lead {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-secondary);
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .cq-hero-lead {
    font-size: 14.5px;
  }
}

.cq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.cq-hero-actions .cq-primary-btn,
.cq-hero-actions .cq-restart-btn {
  flex: 1 1 144px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
}

@media (min-width: 640px) {
  .cq-hero-actions .cq-primary-btn,
  .cq-hero-actions .cq-restart-btn {
    flex: 0 1 auto;
    min-width: 158px;
  }
}

.cq-primary-btn,
.cq-restart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 0;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ea-out), box-shadow 0.2s ease, filter 0.2s ease;
}

.cq-primary-btn {
  background: linear-gradient(135deg, var(--sun-gold) 0%, #D97706 45%, var(--cq-violet) 100%);
  box-shadow: 0 10px 24px -8px rgba(217, 119, 6, 0.45);
}

.cq-restart-btn {
  background: linear-gradient(135deg, #0369A1 0%, #1D4ED8 48%, #6D28D9 100%);
  box-shadow: 0 10px 24px -8px rgba(29, 78, 216, 0.44);
}

body[data-theme="dark"] .cq-restart-btn {
  background: linear-gradient(135deg, #0284C7 0%, #2563EB 48%, #7C3AED 100%);
  box-shadow: 0 10px 24px -8px rgba(59, 130, 246, 0.48);
}

.cq-primary-btn:hover:not(:disabled),
.cq-restart-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.cq-primary-btn:disabled,
.cq-restart-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.cq-primary-btn--sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 12.5px;
}

.cq-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ea-out), border-color 0.2s ease, color 0.2s ease;
}

.cq-ghost-btn:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
  color: var(--sun-gold);
}

.cq-credits-details {
  border-radius: 12px;
  border: 1px dashed var(--hairline-strong);
  background: var(--bg-panel);
  padding: 8px 12px;
}

.cq-credits-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.cq-credits-details summary::-webkit-details-marker {
  display: none;
}

.cq-credits-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.cq-rank-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cq-rank-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  color: var(--ink-primary);
}

/* 右侧 KPI + 控制坞 */
.cq-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cq-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 460px) {
  .cq-kpi-grid {
    gap: 6px;
  }
}

.cq-kpi-tile {
  padding: 12px 10px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cq-kpi-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.cq-kpi-val {
  font-size: clamp(20px, 4.4vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--sun-gold);
}

.cq-kpi-tile[data-tone="violet"] .cq-kpi-val { color: var(--cq-violet); }
.cq-kpi-tile[data-tone="cyan"] .cq-kpi-val { color: var(--rain-cyan); }

.cq-kpi-unit {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.cq-kpi-sub {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-secondary);
}

.cq-control-dock {
  padding: 12px;
  border-radius: 15px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cq-seg-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
}

.cq-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cq-seg-btn.is-active {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  color: var(--ink-primary);
  box-shadow: var(--card-shadow);
}

.cq-switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.cq-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cq-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.cq-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s var(--ea-out);
}

.cq-switch-row input:checked + .cq-switch-track {
  background: linear-gradient(90deg, var(--sun-gold), var(--cq-violet));
}

.cq-switch-row input:checked + .cq-switch-track .cq-switch-thumb {
  transform: translateX(16px);
}

/* 章节分段导航条 */
.cq-chapter-wrap {
  margin-bottom: 14px;
}

.cq-chapter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cq-chapter-bar::-webkit-scrollbar {
  display: none;
}

.cq-chapter-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.18s var(--ea-out), border-color 0.18s ease, background-color 0.18s ease;
}

.cq-chapter-pill:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
}

.cq-chapter-pill.is-active {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.cq-chapter-stat {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--ink-muted);
}

.cq-chapter-pill.is-done .cq-chapter-stat {
  background: var(--status-lime-bg);
  color: var(--status-lime-text);
}

/* 题目卡片核心区 */
.cq-workspace {
  margin-bottom: 18px;
}

.cq-restart-undo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 8px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--ink-primary);
  font-size: 13px;
}

.cq-restart-undo .cq-mid-link {
  min-height: 44px;
  color: inherit;
}

.cq-qcard {
  padding: 18px 14px;
  transition: transform 0.3s var(--ea-out), opacity 0.25s ease;
}

@media (min-width: 640px) {
  .cq-qcard {
    padding: 26px 28px;
  }
}

.cq-qcard.is-card-enter {
  animation: cqCardFloatIn 0.34s var(--ea-out) both;
}

@keyframes cqCardFloatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cq-qcard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.cq-qcard-badges,
.cq-qcard-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cq-qnum-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 800;
  color: var(--sun-gold);
}

.cq-qchap-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.cq-crowd-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
}

.cq-flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cq-flag-btn.is-flagged {
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  border-color: var(--hairline-strong);
}

/* 题干与动态完型填空胶囊 */
.cq-qprompt {
  font-family: var(--font-serif);
  font-size: clamp(18px, 4.3vw, 22px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink-primary);
  margin-bottom: 18px;
  word-break: break-word;
}

.cq-qprompt,
.cq-opt-btn {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.cq-blank-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 1px 10px;
  margin: 0 3px;
  border-radius: 8px;
  border-bottom: 2.5px dashed var(--sun-gold);
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  font-family: var(--font-sans);
  font-size: 0.9em;
  font-weight: 800;
  vertical-align: baseline;
  transition: all 0.22s var(--ea-out);
}

.cq-blank-slot.is-filled {
  border-bottom-style: solid;
  border-color: var(--cq-violet);
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  color: var(--ink-primary);
  box-shadow: 0 2px 10px -4px rgba(124, 58, 237, 0.35);
}

/* 选项列表：手机拇指友好大按钮 */
.cq-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cq-opt-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s var(--ea-out),
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.cq-opt-btn:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
}

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

.cq-opt-btn.is-selected {
  border-color: var(--sun-gold);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.13), rgba(124, 58, 237, 0.08));
  box-shadow: 0 8px 20px -10px rgba(217, 119, 6, 0.45);
}

body[data-theme="dark"] .cq-opt-btn.is-selected {
  background: linear-gradient(135deg, rgba(245, 185, 82, 0.16), rgba(167, 139, 250, 0.12));
}

.cq-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s var(--ea-out);
}

.cq-opt-btn.is-selected .cq-opt-letter {
  background: linear-gradient(135deg, var(--sun-gold), var(--cq-violet));
  border-color: transparent;
  color: #FFFFFF;
  transform: scale(1.06);
}

.cq-opt-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  flex: 1 1 auto;
  word-break: break-word;
}

.cq-opt-check {
  font-size: 18px;
  color: var(--sun-gold);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s var(--ea-out);
  flex-shrink: 0;
}

.cq-opt-btn.is-selected .cq-opt-check {
  opacity: 1;
  transform: scale(1);
}

/* 桌面端题卡底部翻页脚 */
.cq-qcard-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cq-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cq-nav-btn:hover:not(:disabled) {
  border-color: var(--hairline-strong);
  color: var(--sun-gold);
}

.cq-nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cq-nav-btn--next {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border-color: var(--hairline-strong);
}

.cq-mid-link {
  border: 0;
  background: transparent;
  color: var(--rain-cyan);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 767px) {
  .cq-qcard-foot {
    display: none;
  }
}

/* 章节列表连答视图 */
.cq-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
}

.cq-list-desc {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
}

.cq-question-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cq-list-item-card {
  padding: 16px 14px;
}

@media (min-width: 640px) {
  .cq-list-item-card {
    padding: 20px 22px;
  }
}

/* 交卷区 */
.cq-submit-card {
  padding: 20px 16px;
  margin-bottom: 22px;
}

@media (min-width: 640px) {
  .cq-submit-card {
    padding: 26px 28px;
  }
}

.cq-submit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cq-submit-title {
  font-family: var(--font-serif);
  font-size: clamp(17px, 4vw, 22px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.cq-submit-example {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.cq-submit-progress-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline-strong);
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.cq-submit-progress-pill strong {
  color: var(--sun-gold);
}

.cq-submit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.cq-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  min-height: 22px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cq-counter {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.cq-counter.is-over {
  color: var(--status-rose-text);
}

.cq-textarea,
.cq-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cq-textarea:focus,
.cq-input:focus {
  border-color: var(--sun-gold);
  box-shadow: 0 0 0 3px var(--status-amber-bg);
}

.cq-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 720px) {
  .cq-submit-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .cq-submit-cta-wrap {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .cq-submit-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
  }
  .cq-submit-cta-wrap {
    grid-column: auto;
  }
}

/* 票根身份选择器（村民 / 月芽 / 郑雨） */
.cq-identity-hint {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cq-identity-hint.is-villager {
  background: rgba(180, 118, 40, 0.12);
  color: #8C480A;
  border: 1px solid rgba(180, 118, 40, 0.28);
}

.cq-identity-hint.is-yueya {
  background: rgba(124, 58, 237, 0.11);
  color: #6D28D9;
  border: 1px solid rgba(124, 58, 237, 0.28);
}

.cq-identity-hint.is-zhengyu {
  background: rgba(2, 132, 199, 0.10);
  color: #0E7490;
  border: 1px solid rgba(2, 132, 199, 0.28);
}

body[data-theme="dark"].cq-body .cq-identity-hint.is-villager {
  background: rgba(245, 185, 82, 0.16);
  color: #FDE68A;
  border-color: rgba(245, 185, 82, 0.34);
}

body[data-theme="dark"].cq-body .cq-identity-hint.is-yueya {
  background: rgba(167, 139, 250, 0.18);
  color: #E9D5FF;
  border-color: rgba(192, 132, 252, 0.38);
}

body[data-theme="dark"].cq-body .cq-identity-hint.is-zhengyu {
  background: rgba(56, 189, 248, 0.16);
  color: #BAE6FD;
  border-color: rgba(56, 189, 248, 0.36);
}

.cq-identity-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  min-height: 47px;
  border-radius: 13px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-panel);
  align-items: stretch;
}

.cq-identity-group--compact {
  min-height: 40px;
  padding: 3px;
  border-radius: 12px;
}

.cq-identity-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.16s var(--ea-out);
}

.cq-identity-group--compact .cq-identity-btn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12.5px;
}

.cq-identity-btn:focus-visible {
  outline: 2px solid var(--sun-gold);
  outline-offset: 2px;
}

.cq-identity-glyph {
  font-size: 11px;
  line-height: 1;
  opacity: 0.78;
}

.cq-identity-icon {
  font-size: 13px;
  line-height: 1;
  opacity: 0.8;
}

.cq-identity-btn.is-villager:hover:not(.is-active) {
  background: rgba(180, 118, 40, 0.09);
  color: #8C480A;
}

.cq-identity-btn.is-yueya:hover:not(.is-active) {
  background: rgba(124, 58, 237, 0.10);
  color: #6D28D9;
}

.cq-identity-btn.is-zhengyu:hover:not(.is-active) {
  background: rgba(2, 132, 199, 0.10);
  color: #0E7490;
}

body[data-theme="dark"].cq-body .cq-identity-btn.is-villager:hover:not(.is-active) {
  background: rgba(245, 185, 82, 0.14);
  color: #FDE68A;
}

body[data-theme="dark"].cq-body .cq-identity-btn.is-yueya:hover:not(.is-active) {
  background: rgba(167, 139, 250, 0.16);
  color: #E9D5FF;
}

body[data-theme="dark"].cq-body .cq-identity-btn.is-zhengyu:hover:not(.is-active) {
  background: rgba(56, 189, 248, 0.15);
  color: #BAE6FD;
}

/* 村民：杨超越男粉 · 暖阳琥珀经典样式 */
.cq-identity-btn.is-villager.is-active {
  background: linear-gradient(135deg, rgba(245, 225, 188, 0.72) 0%, rgba(255, 248, 232, 0.96) 100%);
  border-color: #B47628;
  color: #7C3D07;
  box-shadow: 0 4px 12px -6px rgba(180, 118, 40, 0.55);
}

body[data-theme="dark"].cq-body .cq-identity-btn.is-villager.is-active {
  background: linear-gradient(135deg, rgba(180, 118, 40, 0.34) 0%, rgba(217, 119, 6, 0.20) 100%);
  border-color: #F5B952;
  color: #FEF3C7;
}

/* 月芽：杨超越女粉 · 星月应援紫弯月样式 */
.cq-identity-btn.is-yueya.is-active {
  border-radius: 999px;
  background: linear-gradient(135deg, #6D28D9 0%, #9333EA 54%, #A855F7 100%);
  border-color: rgba(243, 232, 255, 0.52);
  color: #FFFFFF;
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.74);
}

.cq-identity-btn.is-yueya.is-active .cq-identity-icon {
  color: #FEF3C7;
  opacity: 1;
}

/* 郑雨：《今天是太阳雨》角色形态 · 晴雨天青宋体样式 */
.cq-identity-btn.is-zhengyu.is-active {
  font-family: var(--font-serif);
  background: linear-gradient(135deg, #0F766E 0%, #0284C7 62%, #38BDF8 100%);
  border-color: rgba(254, 240, 138, 0.58);
  color: #F8FDFF;
  box-shadow: 0 8px 20px -8px rgba(2, 132, 199, 0.72);
}

.cq-identity-btn.is-zhengyu.is-active .cq-identity-icon {
  color: #FDE68A;
  opacity: 1;
}

.cq-submit-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, var(--sun-gold) 0%, #D97706 42%, var(--cq-violet) 100%);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(124, 58, 237, 0.55);
  transition: transform 0.2s var(--ea-out), filter 0.2s ease;
}

.cq-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.cq-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cq-confirm-box {
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--status-amber-bg);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cq-confirm-copy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-primary);
}

.cq-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cq-submit-status {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.cq-submit-status.is-ok {
  background: var(--status-lime-bg);
  color: var(--status-lime-text);
}

.cq-submit-status.is-warn {
  background: var(--status-amber-bg);
  color: var(--status-amber-text);
}

.cq-submit-status.is-err {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
}

/* 交卷后纪念票根展台（与弹窗、连胜战报共用同一极简居中风格） */
.cq-result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  animation: cqCardFloatIn 0.45s var(--ea-out) both;
}

.cq-ticket-showcase {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

@media (min-width: 640px) {
  .cq-ticket-showcase {
    padding: 24px 26px 26px;
    gap: 16px;
  }
}

.cq-ticket-showcase-head {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cq-ticket-showcase-actions {
  width: 100%;
  max-width: 348px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cq-manual-copy {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px dashed var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 手机端底部粘性操作坞 */
.cq-mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 0.95fr 1fr 0.95fr;
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--hairline);
}

@media (min-width: 768px) {
  .cq-mobile-dock {
    display: none;
  }
}

.cq-dock-btn {
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.cq-dock-btn:disabled {
  opacity: 0.4;
}

.cq-dock-btn--sheet {
  background: var(--bg-panel);
}

.cq-dock-btn--next {
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  border-color: var(--hairline-strong);
}

.cq-dock-btn--submit {
  background: var(--bg-panel);
  border-color: var(--hairline-strong);
  color: var(--ink-secondary);
}

.cq-dock-btn--submit.is-ready {
  background: linear-gradient(135deg, var(--sun-gold), var(--cq-violet));
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 8px 18px -8px rgba(124, 58, 237, 0.55);
}

/* 101 题答题卡抽屉（手机底部上滑 / 桌面居中） */
.cq-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.cq-sheet-backdrop[hidden] {
  display: none !important;
}

@media (min-width: 680px) {
  .cq-sheet-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.cq-sheet-modal {
  width: 100%;
  max-width: 680px;
  max-height: 82vh;
  background: var(--bg-elevated);
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--hairline-strong);
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

@media (min-width: 680px) {
  .cq-sheet-modal {
    border-radius: 22px;
    padding: 20px 22px;
  }
}

.cq-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cq-sheet-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
}

.cq-sheet-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.cq-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cq-sheet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cq-sheet-filter {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cq-sheet-filter.is-active {
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  border-color: var(--hairline-strong);
}

.cq-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 7px;
  overflow-y: auto;
  padding: 2px 2px 6px;
}

.cq-tile {
  position: relative;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  cursor: pointer;
}

.cq-tile.is-answered {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.cq-tile.is-current {
  box-shadow: 0 0 0 2px var(--sun-gold);
}

.cq-tile-sub {
  font-size: 9px;
  color: var(--sun-gold);
}

.cq-tile-flag {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-hot);
}

.cq-sheet-foot {
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cq-reset-btn,
.cq-reset-yes,
.cq-reset-no {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cq-reset-confirm {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--rose-hot);
}

.cq-reset-yes {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
  border-color: rgba(225, 29, 72, 0.3);
}

/* 悬浮提示与页脚 */
.cq-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--cq-dock-h) + 14px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  z-index: 90;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #F8FAFC;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ea-out);
  max-width: min(92vw, 420px);
  text-align: center;
}

@media (min-width: 768px) {
  .cq-toast {
    bottom: 24px;
  }
}

.cq-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cq-retry-link {
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-elevated);
  color: var(--sun-gold);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.cq-conflict-bar,
.cq-dirty-pill {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--status-amber-bg);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-primary);
}

.cq-global-copy {
  margin-bottom: 14px;
}

.cq-dirty-pill {
  margin-bottom: 0;
  justify-content: flex-start;
}

@media (max-width: 767px) {
  html:has(.cq-body) {
    scroll-padding-top: 58px;
    scroll-padding-bottom: calc(var(--cq-dock-h) + 20px + env(safe-area-inset-bottom, 0px));
  }
  .cq-hero {
    padding: 15px 14px;
    gap: 12px;
    margin-bottom: 12px;
  }
  .cq-hero-title {
    margin-bottom: 8px;
  }
  .cq-hero-lead {
    margin-bottom: 10px;
  }
  .cq-hero-actions {
    margin-bottom: 10px;
    gap: 8px;
  }
  .cq-kpi-tile {
    padding: 9px 8px;
    gap: 2px;
  }
  .cq-kpi-sub {
    font-size: 10px;
  }
  .cq-qcard {
    padding: 16px 14px;
  }
  .cq-options-list {
    gap: 8px;
  }
  .cq-opt-btn {
    min-height: 48px;
    padding: 10px 12px;
  }
  .cq-qcard,
  .cq-list-item-card,
  .cq-submit-card {
    scroll-margin-top: 0;
    scroll-margin-bottom: 0;
  }
}

.cq-inline-link {
  color: var(--sun-gold);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cq-desktop-sim-btn {
  display: none;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .cq-desktop-sim-btn {
    display: inline-flex;
  }
}

html.is-mobile-sim-inner .cq-desktop-sim-btn {
  display: none !important;
}

/* 电脑端「手机模式测试」真机预览壳 */
.cq-psim-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: radial-gradient(circle at 50% 24%, #182336 0%, #070A10 78%);
  display: flex;
  flex-direction: column;
  color: #F8FAFC;
}

.cq-psim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(10, 15, 24, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cq-psim-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cq-psim-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(30, 41, 59, 0.78);
  color: #E2E8F0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.cq-psim-btn:hover {
  border-color: rgba(245, 185, 82, 0.6);
  color: #FFFFFF;
}

.cq-psim-btn.is-active {
  background: rgba(245, 185, 82, 0.22);
  border-color: #F5B952;
  color: #FEF08A;
}

.cq-psim-btn--exit {
  background: linear-gradient(135deg, #F5B952, #EA580C);
  border-color: transparent;
  color: #111827;
  font-weight: 700;
}

.cq-psim-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cq-psim-shell {
  box-sizing: border-box;
  background: #0B0E14;
  border-radius: 48px;
  padding: 14px;
  border: 3px solid #334155;
  box-shadow: 0 0 0 2px #0F172A, 0 28px 70px rgba(0, 0, 0, 0.76);
  position: relative;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, height 0.22s ease;
}

.cq-psim-island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  border-radius: 99px;
  background: #000000;
  z-index: 4;
  pointer-events: none;
}

.cq-psim-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #06090F;
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.cq-psim-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.cq-psim-home {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.36);
  z-index: 4;
  pointer-events: none;
}

.cq-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 14px 8px 4px;
}

.cq-legal-note {
  max-width: 780px;
  margin: 8px auto 0;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.cq-legal-note a {
  color: var(--sun-gold);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}

.cq-legal-note a:hover {
  text-decoration: underline;
}

/* 交卷出分纪念票根展台弹窗（单栏居中，一屏呈现票根与核心按钮） */
.cq-smodal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.cq-smodal-backdrop[hidden] {
  display: none !important;
}

.cq-smodal {
  width: 100%;
  max-width: 416px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-elevated);
  border-radius: 24px;
  border: 1px solid var(--hairline-strong);
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

.cq-smodal > * {
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .cq-smodal {
    max-width: 432px;
    padding: 18px 22px 20px;
    gap: 14px;
  }
}

.cq-smodal-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cq-smodal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--status-amber-bg);
  color: var(--sun-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cq-smodal-kicker.is-holo {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(236, 72, 153, 0.14), rgba(124, 58, 237, 0.18), rgba(14, 165, 233, 0.15));
  border: 1px solid rgba(124, 58, 237, 0.28);
  color: var(--cq-violet);
}

body[data-theme="dark"] .cq-smodal-kicker.is-holo {
  color: #FDE68A;
  border-color: rgba(196, 181, 253, 0.42);
}

.cq-smodal-poster-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cq-smodal-poster-wrap[hidden] {
  display: none !important;
}

.cq-smodal-poster-frame {
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-panel);
  box-shadow: 0 16px 36px -14px rgba(15, 23, 42, 0.28);
}

.cq-smodal-poster-frame.is-holo {
  border-color: rgba(124, 58, 237, 0.42);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.20), rgba(236, 72, 153, 0.14), rgba(124, 58, 237, 0.18), rgba(56, 189, 248, 0.18));
  box-shadow: 0 18px 40px -12px rgba(124, 58, 237, 0.34), 0 0 0 1px rgba(245, 158, 11, 0.20);
}

.cq-smodal-poster-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(63dvh, 540px);
  border-radius: 12px;
  -webkit-touch-callout: default;
}

@media (max-height: 700px) {
  .cq-smodal-poster-img {
    max-height: min(56dvh, 460px);
  }
}

.cq-ticket-showcase-frame .cq-smodal-poster-img {
  width: 100%;
  max-width: 340px;
  max-height: none;
}

.cq-smodal-actions {
  width: 100%;
  max-width: 348px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cq-smodal-subactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.cq-smodal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, background-color 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.cq-smodal-cta:hover {
  transform: translateY(-1px);
}

.cq-smodal-cta--primary {
  width: 100%;
  background: linear-gradient(135deg, var(--sun-gold) 0%, #D97706 46%, var(--cq-violet) 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 22px -10px rgba(124, 58, 237, 0.55);
}

.cq-smodal-cta--primary:hover {
  filter: brightness(1.06);
}

.cq-smodal-subactions .cq-smodal-cta {
  flex: 1 1 112px;
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.cq-smodal-cta--pk {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.11), rgba(217, 119, 6, 0.11));
  border-color: rgba(124, 58, 237, 0.34);
  color: var(--ink-primary);
}

.cq-smodal-cta--pk:hover {
  border-color: var(--cq-violet);
}

.cq-smodal-cta--ghost {
  background: var(--bg-panel);
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.cq-smodal-cta--ghost:hover {
  border-color: var(--sun-gold);
}

.cq-smodal-back-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.cq-smodal-back-link:hover {
  color: var(--ink-primary);
  background: var(--bg-panel);
}

/* --------------------------------------------------------------------------
 * Phase 1 & Phase 2: 仪式感动效、入村证徽章、高光/悬念/维度复盘、皮肤切换、PK 挑战
 * -------------------------------------------------------------------------- */

.cq-celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 82;
}

/* PK 横幅与冲突确认条 */
.cq-pk-conflict-bar,
.cq-pk-notice-bar {
  margin-bottom: 14px;
}

.cq-pk-banner {
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  background:
    radial-gradient(circle at 92% 18%, rgba(124, 58, 237, 0.14), transparent 55%),
    linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border-color: var(--hairline-strong);
}

.cq-pk-banner-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 220px;
}

.cq-pk-sword-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.16);
  color: var(--sun-gold);
  font-size: 11.5px;
  font-weight: 800;
}

.cq-pk-banner-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink-primary);
}

.cq-pk-banner-meta {
  font-size: 12px;
  color: var(--ink-secondary);
}

.cq-pk-banner-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* 证书号、天气签、隐藏高分徽章、成分标签、同步率 */
.cq-cert-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 10px;
}

.cq-cert-row--modal {
  margin: 0 0 2px;
}

.cq-cert-row--streak {
  margin: 4px 0 8px;
}

.cq-cert-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--status-amber-bg);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: var(--sun-gold);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.cq-cert-pill.is-ex {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(2, 132, 199, 0.14));
  border-color: rgba(124, 58, 237, 0.36);
  color: #6D28D9;
}

.cq-cert-pill.is-ssr {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(219, 39, 119, 0.14), rgba(124, 58, 237, 0.16));
  border-color: rgba(219, 39, 119, 0.38);
  color: #B45309;
}

.cq-cert-pill.is-ur {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.18));
  border-color: rgba(124, 58, 237, 0.48);
  color: #5B21B6;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.16);
}

.cq-cert-egg-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(244, 114, 182, 0.16));
  border: 1px solid rgba(217, 119, 6, 0.4);
  color: #9A3412;
  font-size: 11px;
  font-weight: 800;
}

.cq-cert-hint-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-subtle, rgba(148, 163, 184, 0.12));
  border: 1px dashed var(--hairline);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
}

body[data-theme="dark"] .cq-cert-pill.is-ex {
  color: #C4B5FD;
  border-color: rgba(167, 139, 250, 0.45);
}

body[data-theme="dark"] .cq-cert-pill.is-ssr {
  color: #FDE68A;
  border-color: rgba(244, 114, 182, 0.45);
}

body[data-theme="dark"] .cq-cert-pill.is-ur {
  color: #FDE68A;
  border-color: rgba(196, 181, 253, 0.55);
}

body[data-theme="dark"] .cq-cert-egg-pill {
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.45);
}

.cq-weather-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cq-violet-soft);
  color: var(--cq-violet);
  font-size: 11.5px;
  font-weight: 700;
}

.cq-high-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.16), rgba(22, 163, 74, 0.16));
  border: 1px solid rgba(217, 119, 6, 0.34);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 800;
}

.cq-result-commentary,
.cq-modal-commentary {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink-primary);
}

.cq-modal-commentary {
  margin: 2px 0;
  font-size: 13px;
}

.cq-community-line,
.cq-modal-community-line {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.cq-next-gap-line,
.cq-modal-next-gap {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--sun-gold);
}

.cq-modal-community-line,
.cq-modal-next-gap {
  margin: 0;
  font-size: 12px;
}

.cq-smodal-sync-pill {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.12);
  color: var(--rain-cyan);
  font-size: 11.5px;
  font-weight: 700;
}

.cq-sync-fun-line,
.cq-modal-sync-line {
  margin: 0 0 14px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--bg-panel);
  border: 1px dashed var(--hairline-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.cq-modal-sync-line {
  margin: 0;
  padding: 5px 9px;
  font-size: 11.5px;
}

.cq-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cq-tags-row--modal {
  margin-bottom: 2px;
}

.cq-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-elevated);
  color: var(--ink-primary);
  font-size: 11.5px;
  font-weight: 700;
}

.cq-pk-verdict-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(124, 58, 237, 0.14));
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.cq-pk-verdict-box--modal {
  margin-bottom: 0;
  padding: 8px 10px;
  font-size: 12.5px;
}

.cq-pk-share-btn {
  background: linear-gradient(135deg, #7C3AED 0%, #D97706 100%);
}

.cq-smodal-btn--pk {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(217, 119, 6, 0.14));
  border-color: rgba(124, 58, 237, 0.38);
}

.cq-smodal-btn--pk .cq-smodal-btn-icon {
  color: var(--cq-violet);
}

/* 3套皮肤切换胶囊 */
.cq-skin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.cq-skin-btn,
.cq-streak-skin-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.cq-skin-btn:hover,
.cq-streak-skin-btn:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.cq-skin-btn.is-active,
.cq-streak-skin-btn.is-active {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border-color: var(--sun-gold);
  color: var(--ink-primary);
  box-shadow: 0 4px 12px -6px rgba(217, 119, 6, 0.45);
}

.cq-qr-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed var(--hairline-strong);
  background: var(--bg-panel);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.cq-qr-toggle:hover {
  border-color: var(--sun-gold);
  color: var(--ink-primary);
}

.cq-qr-toggle.is-active {
  border-style: solid;
  border-color: var(--cq-violet);
  background: var(--cq-violet-soft);
  color: var(--ink-primary);
}

.cq-qr-toggle--modal {
  font-size: 11px;
  padding: 5px 10px;
}

/* 分档情绪化分享文案框 */
.cq-share-copy-box {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cq-share-copy-box--modal {
  margin-top: 0;
  padding: 11px 12px;
}

.cq-share-copy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cq-share-copy-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cq-share-cycle-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.cq-share-copy-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-primary);
  word-break: break-word;
}

.cq-share-copy-note {
  margin: 0;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--status-amber-bg);
  color: var(--ink-secondary);
  font-size: 11.5px;
  line-height: 1.45;
}

.cq-share-copy-foot {
  display: flex;
  justify-content: flex-end;
}

/* 记忆复盘彩蛋区（高光金句 + 悬念错题 + 三大维度） */
.cq-bonus-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cq-bonus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

@media (min-width: 780px) {
  .cq-bonus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cq-modal-bonus-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cq-bonus-card {
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cq-bonus-card--gold {
  background:
    radial-gradient(circle at 92% 10%, rgba(217, 119, 6, 0.16), transparent 60%),
    var(--bg-panel);
  border-color: rgba(217, 119, 6, 0.36);
}

.cq-bonus-card--mystery {
  background:
    radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.14), transparent 60%),
    var(--bg-panel);
  border-color: rgba(124, 58, 237, 0.3);
}

.cq-bonus-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cq-bonus-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.cq-bonus-pill.is-gold {
  background: var(--status-amber-bg);
  color: var(--sun-gold);
}

.cq-bonus-pill.is-mystery {
  background: var(--cq-violet-soft);
  color: var(--cq-violet);
}

.cq-bonus-subbadge {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.cq-bonus-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink-primary);
}

.cq-bonus-prompt {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-primary);
}

.cq-bonus-meta,
.cq-bonus-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.cq-dimensions-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cq-dimensions-card--modal {
  padding: 12px 14px;
  border-radius: 14px;
}

.cq-dimensions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.cq-dimensions-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink-primary);
}

.cq-dimensions-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.cq-dim-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cq-dim-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cq-dim-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.cq-dim-label {
  flex: 1 1 160px;
  min-width: 0;
}

.cq-dim-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.cq-dim-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.cq-dim-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rain-cyan), var(--sun-gold), var(--cq-violet));
  transition: width 0.55s var(--ea-out);
}

.cq-dim-fill.is-sunrain {
  background: linear-gradient(90deg, #F59E0B, #D97706);
}

.cq-dim-fill.is-mindset {
  background: linear-gradient(90deg, #38BDF8, #7C3AED);
}

.cq-dim-fill.is-variety {
  background: linear-gradient(90deg, #10B981, #0284C7);
}

/* ==========================================================================
 * v2.0 晴雨星光全维升级：三赛道选择、专注模式、1★~6★ 星级、3 心露珠连胜、
 * 桌面双栏出分弹窗、5 套纪念皮肤 + 郑雨剧照选择器与求助姐妹图
 * ========================================================================== */

/* 专注答题收起条 */
.cq-focus-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--card-shadow);
}

.cq-focus-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 180px;
}

.cq-focus-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border: 1px solid var(--hairline-strong);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 800;
}

.cq-focus-progress {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cq-dock-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cq-mini-focus-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px dashed var(--hairline-strong);
  background: var(--bg-elevated);
  color: var(--sun-gold);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.14s ease;
}

.cq-mini-focus-btn:hover {
  border-style: solid;
  border-color: var(--sun-gold);
  transform: translateY(-1px);
}

/* 三大玩法赛道选择卡片 */
.cq-mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .cq-mode-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
}

.cq-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1.5px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ea-out), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.cq-mode-card:hover {
  transform: translateY(-1px);
  border-color: var(--hairline-strong);
}

.cq-mode-card.is-active {
  border-color: var(--sun-gold);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.13), rgba(124, 58, 237, 0.08));
  box-shadow: 0 8px 20px -12px rgba(217, 119, 6, 0.55);
}

body[data-theme="dark"] .cq-mode-card.is-active {
  background: linear-gradient(135deg, rgba(245, 185, 82, 0.16), rgba(167, 139, 250, 0.14));
}

.cq-mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cq-mode-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.25;
}

.cq-mode-card-tag {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: var(--status-amber-bg);
  color: var(--sun-gold);
}

.cq-mode-card-tag.is-cyan {
  background: rgba(2, 132, 199, 0.13);
  color: var(--rain-cyan);
}

.cq-mode-card-tag.is-violet {
  background: var(--cq-violet-soft);
  color: var(--cq-violet);
}

.cq-mode-card-sub {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-secondary);
}

/* 题目星级（1★~5★）与场景氛围标签 + 阶段闯关提示条 */
.cq-star-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  color: var(--sun-gold);
}

.cq-star-pill.is-s1 {
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.28);
  color: #047857;
}

.cq-star-pill.is-s2 {
  background: rgba(2, 132, 199, 0.11);
  border-color: rgba(2, 132, 199, 0.28);
  color: var(--rain-cyan);
}

.cq-star-pill.is-s3 {
  background: var(--status-amber-bg);
  border-color: rgba(217, 119, 6, 0.34);
  color: var(--sun-gold);
}

.cq-star-pill.is-s4 {
  background: var(--cq-violet-soft);
  border-color: rgba(124, 58, 237, 0.34);
  color: var(--cq-violet);
}

.cq-star-pill.is-s5 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(225, 29, 72, 0.16), rgba(124, 58, 237, 0.2));
  border-color: rgba(217, 119, 6, 0.48);
  color: #B45309;
}

body[data-theme="dark"] .cq-star-pill.is-s1 { color: #6EE7B7; }
body[data-theme="dark"] .cq-star-pill.is-s5 { color: #FDE68A; }

.cq-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  color: var(--ink-secondary);
}

.cq-cat-pill.is-sunrain {
  background: rgba(245, 158, 11, 0.10);
  color: var(--sun-gold);
  border-color: rgba(245, 158, 11, 0.26);
}

.cq-cat-pill.is-mindset {
  background: rgba(124, 58, 237, 0.09);
  color: var(--cq-violet);
  border-color: rgba(124, 58, 237, 0.22);
}

.cq-cat-pill.is-variety {
  background: rgba(2, 132, 199, 0.09);
  color: var(--rain-cyan);
  border-color: rgba(2, 132, 199, 0.22);
}

.cq-stage-banner {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  border: 1px solid var(--hairline-strong);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  animation: cqCardFloatIn 0.3s var(--ea-out) both;
}

.cq-stage-banner.is-boss {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.18), rgba(225, 29, 72, 0.13), rgba(124, 58, 237, 0.16));
  border-color: rgba(217, 119, 6, 0.45);
}

/* 结果星级徽章（1★~6★） */
.cq-star-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.10));
  border: 1px solid rgba(217, 119, 6, 0.38);
  color: var(--sun-gold);
  font-size: 11.5px;
  font-weight: 800;
}

.cq-star-result-pill.is-ssr {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(236, 72, 153, 0.18), rgba(124, 58, 237, 0.22), rgba(14, 165, 233, 0.20));
  border-color: rgba(217, 119, 6, 0.55);
  color: var(--ink-primary);
  box-shadow: 0 4px 14px -6px rgba(124, 58, 237, 0.45);
}

/* 3 套以上皮肤条 + 郑雨剧照选择器 + 虹彩限定按钮 + 海报全息光泽 */
.cq-skin-btn--holo.is-unlocked {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(244, 114, 182, 0.16), rgba(167, 139, 250, 0.18));
  border-color: rgba(217, 119, 6, 0.44);
  color: var(--ink-primary);
}

.cq-skin-btn--holo.is-locked {
  opacity: 0.78;
  border-style: dashed;
}

.cq-still-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
}

.cq-still-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.cq-still-chip.is-active {
  border-color: var(--sun-gold);
  background: var(--status-amber-bg);
  color: var(--sun-gold);
}

.cq-holo-tilt {
  position: relative;
  overflow: hidden;
  transition: transform 0.28s var(--ea-out), box-shadow 0.28s ease;
}

.cq-holo-tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    118deg,
    transparent 20%,
    rgba(255, 240, 180, 0.24) 42%,
    rgba(196, 181, 253, 0.22) 52%,
    rgba(125, 211, 252, 0.20) 62%,
    transparent 82%
  );
  transition: opacity 0.25s ease;
}

.cq-holo-tilt:hover::after {
  opacity: 1;
}

/* 微信约战 / 小红书无链 文案渠道切换 */
.cq-share-copy-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cq-channel-pills {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  gap: 2px;
}

.cq-channel-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.cq-channel-pill.is-active {
  background: linear-gradient(135deg, var(--status-amber-bg), var(--cq-violet-soft));
  color: var(--ink-primary);
}

.cq-bonus-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.cq-help-img-btn {
  padding: 5px 11px;
  font-size: 11.5px;
}

/* 🔥 三颗晴雨露珠无尽连胜闯关舞台 */
.cq-streak-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.cq-streak-hud {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  background:
    radial-gradient(circle at 86% 14%, rgba(124, 58, 237, 0.14), transparent 56%),
    linear-gradient(135deg, var(--bg-elevated), var(--bg-panel));
}

.cq-streak-lives-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cq-streak-hud-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.cq-streak-lives {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cq-dewdrop {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(245, 158, 11, 0.22));
  border: 1.5px solid rgba(2, 132, 199, 0.45);
  box-shadow: 0 4px 12px -4px rgba(2, 132, 199, 0.42);
  transition: transform 0.25s var(--ea-out), opacity 0.25s ease, filter 0.25s ease;
}

.cq-dewdrop.is-lost {
  opacity: 0.34;
  filter: grayscale(1);
  transform: scale(0.86);
  box-shadow: none;
}

.cq-streak-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cq-streak-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cq-streak-stat span {
  font-size: 11px;
  color: var(--ink-muted);
}

.cq-streak-stat strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--sun-gold);
}

.cq-streak-hud-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cq-streak-fb-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.cq-streak-fb-pill.is-hit {
  background: var(--status-lime-bg);
  color: var(--status-lime-text);
}

.cq-streak-fb-pill.is-miss {
  background: var(--status-rose-bg);
  color: var(--status-rose-text);
}

.cq-streak-card.is-hit-flash {
  border-color: rgba(22, 163, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.cq-streak-card.is-miss-flash {
  border-color: rgba(225, 29, 72, 0.50);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

.cq-streak-rule-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--hairline);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* 连胜票根下方轻量署名与身份选择区 */
.cq-streak-nick-inline {
  width: 100%;
  max-width: 348px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cq-streak-nick-input {
  min-height: 40px;
  font-size: 13px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 3D 透明亚克力票夹挂件入口按钮与全屏把玩舞台（100% 视口大屏展示，三身份氛围光晕） */
.cq-smodal-cta--pendant {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(124, 58, 237, 0.11), rgba(2, 132, 199, 0.11));
  border-color: rgba(124, 58, 237, 0.32);
  color: var(--ink-primary);
}

.cq-smodal-cta--pendant:hover {
  border-color: var(--cq-violet);
  box-shadow: 0 6px 16px -8px rgba(124, 58, 237, 0.36);
}

body[data-theme="dark"].cq-body .cq-smodal-cta--pendant {
  background: linear-gradient(135deg, rgba(245, 185, 82, 0.15), rgba(167, 139, 250, 0.17), rgba(56, 189, 248, 0.15));
  border-color: rgba(196, 181, 253, 0.40);
  color: #F5F3FF;
}

/* 平铺票根边框与角标按三身份微调呼应色（炫彩 6★ 仍保持最高级虹彩框） */
.cq-smodal-kicker[data-ticket-identity="yueya"]:not(.is-holo) {
  background: rgba(124, 58, 237, 0.12);
  color: #6D28D9;
}

.cq-smodal-kicker[data-ticket-identity="zhengyu"]:not(.is-holo) {
  background: rgba(2, 132, 199, 0.12);
  color: #0E6B84;
}

body[data-theme="dark"] .cq-smodal-kicker[data-ticket-identity="yueya"]:not(.is-holo) {
  background: rgba(192, 132, 252, 0.18);
  color: #E9D5FF;
}

body[data-theme="dark"] .cq-smodal-kicker[data-ticket-identity="zhengyu"]:not(.is-holo) {
  background: rgba(56, 189, 248, 0.18);
  color: #BAE6FD;
}

.cq-smodal-poster-frame[data-ticket-identity="yueya"]:not(.is-holo) {
  border-color: rgba(124, 58, 237, 0.28);
  background: linear-gradient(135deg, rgba(245, 238, 255, 0.88), rgba(233, 213, 255, 0.56));
}

.cq-smodal-poster-frame[data-ticket-identity="zhengyu"]:not(.is-holo) {
  border-color: rgba(2, 132, 199, 0.28);
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.88), rgba(212, 238, 250, 0.58));
}

body[data-theme="dark"] .cq-smodal-poster-frame[data-ticket-identity="yueya"]:not(.is-holo) {
  border-color: rgba(192, 132, 252, 0.34);
  background: rgba(46, 28, 78, 0.52);
}

body[data-theme="dark"] .cq-smodal-poster-frame[data-ticket-identity="zhengyu"]:not(.is-holo) {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(16, 48, 66, 0.52);
}

.cq-pendant-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* 方向 A：暖金村民卡配极淡冷雾石膏影棚底 + 居中微暖柔光，突出卡片暖金色 */
  background:
    radial-gradient(46% 42% at 50% 45%, rgba(254, 243, 212, 0.44) 0%, transparent 72%),
    radial-gradient(72% 66% at 50% 44%, #F2F4F8 0%, #DFE4EC 58%, #CBD2DE 100%);
  animation: cqPendantFadeIn 0.2s ease-out;
}

.cq-pendant-overlay[hidden] {
  display: none !important;
}

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

.cq-pendant-overlay[data-pendant-identity="yueya"] {
  /* 月芽青春紫卡配干净暖珍珠素底 + 极淡星月紫晕，避免紫卡融进紫背景 */
  background:
    radial-gradient(46% 42% at 50% 45%, rgba(203, 167, 249, 0.24) 0%, transparent 72%),
    radial-gradient(72% 66% at 50% 44%, #FAF8F5 0%, #EAE5DE 58%, #D7D1C8 100%);
}

.cq-pendant-overlay[data-pendant-identity="zhengyu"] {
  /* 郑雨天青卡配晴日暖米亚麻素底 + 左上微阳柔光，冷雨暖晴自然拉开层次 */
  background:
    radial-gradient(42% 38% at 28% 28%, rgba(253, 224, 145, 0.30) 0%, transparent 70%),
    radial-gradient(46% 42% at 52% 48%, rgba(186, 230, 253, 0.22) 0%, transparent 72%),
    radial-gradient(72% 66% at 50% 44%, #F9F6F0 0%, #E8E2D7 58%, #D5CEC2 100%);
}

.cq-pendant-overlay.is-holo {
  background:
    radial-gradient(46% 42% at 28% 28%, rgba(253, 224, 130, 0.40) 0%, transparent 72%),
    radial-gradient(48% 44% at 72% 70%, rgba(244, 114, 182, 0.20) 0%, transparent 74%),
    radial-gradient(72% 66% at 50% 45%, #F4F5F9 0%, #DFE4EE 60%, #CAD1DF 100%);
}

.cq-pendant-overlay[data-pendant-identity="yueya"].is-holo {
  background:
    radial-gradient(46% 42% at 28% 28%, rgba(253, 224, 130, 0.30) 0%, transparent 72%),
    radial-gradient(50% 46% at 70% 66%, rgba(192, 132, 252, 0.30) 0%, transparent 74%),
    radial-gradient(72% 66% at 50% 45%, #FAF7F5 0%, #EAE4DF 60%, #D8D1C9 100%);
}

.cq-pendant-overlay[data-pendant-identity="zhengyu"].is-holo {
  background:
    radial-gradient(46% 42% at 26% 26%, rgba(253, 224, 130, 0.36) 0%, transparent 72%),
    radial-gradient(48% 44% at 74% 68%, rgba(56, 189, 248, 0.26) 0%, transparent 74%),
    radial-gradient(42% 38% at 54% 48%, rgba(167, 139, 250, 0.16) 0%, transparent 70%),
    radial-gradient(72% 66% at 50% 45%, #F8F6F1 0%, #E5E4DE 60%, #D0D4DC 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay {
  background:
    radial-gradient(64% 56% at 50% 46%, #382C1F 0%, #18151B 62%, #0C0E15 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="yueya"] {
  background:
    radial-gradient(64% 56% at 50% 46%, #44246C 0%, #1B1130 62%, #0D0A1A 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="zhengyu"] {
  background:
    radial-gradient(64% 56% at 50% 46%, #143A50 0%, #0E1C2B 62%, #0A101A 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay.is-holo {
  background:
    radial-gradient(54% 48% at 24% 24%, rgba(245, 158, 11, 0.34) 0%, transparent 70%),
    radial-gradient(58% 54% at 76% 74%, rgba(236, 72, 153, 0.24) 0%, transparent 72%),
    radial-gradient(64% 58% at 50% 48%, #362519 0%, #12101A 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="yueya"].is-holo {
  background:
    radial-gradient(54% 48% at 24% 24%, rgba(217, 119, 6, 0.24) 0%, transparent 70%),
    radial-gradient(58% 54% at 76% 74%, rgba(168, 85, 247, 0.42) 0%, transparent 72%),
    radial-gradient(64% 58% at 50% 48%, #321A56 0%, #100B22 100%);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="zhengyu"].is-holo {
  background:
    radial-gradient(54% 48% at 24% 24%, rgba(245, 158, 11, 0.26) 0%, transparent 70%),
    radial-gradient(58% 54% at 76% 74%, rgba(56, 189, 248, 0.36) 0%, transparent 72%),
    radial-gradient(64% 58% at 50% 48%, #133952 0%, #0A1424 100%);
}

.cq-pendant-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cq-badge3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 24px 32px rgba(15, 23, 42, 0.16));
}

body[data-theme="dark"].cq-body .cq-badge3d-canvas {
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.44));
}

.cq-pendant-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  pointer-events: none;
}

.cq-pendant-loading[hidden] {
  display: none !important;
}

.cq-badge3d-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--hairline-strong);
  border-top-color: var(--sun-gold);
  animation: cqBadgeSpin 0.8s linear infinite;
}

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

.cq-pendant-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  pointer-events: none;
}

.cq-pendant-kicker {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(50% - 24px);
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(148, 115, 72, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--sun-gold);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.26);
}

.cq-pendant-kicker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cq-pendant-overlay[data-pendant-identity="yueya"] .cq-pendant-kicker {
  color: #6D28D9;
  border-color: rgba(124, 58, 237, 0.26);
}

.cq-pendant-overlay[data-pendant-identity="zhengyu"] .cq-pendant-kicker {
  color: #0E7490;
  border-color: rgba(2, 132, 199, 0.26);
}

.cq-pendant-overlay.is-holo .cq-pendant-kicker {
  color: #B45309;
  border-color: rgba(217, 119, 6, 0.38);
}

.cq-pendant-overlay[data-pendant-identity="yueya"].is-holo .cq-pendant-kicker {
  color: #7C3AED;
  border-color: rgba(124, 58, 237, 0.38);
}

.cq-pendant-overlay[data-pendant-identity="zhengyu"].is-holo .cq-pendant-kicker {
  color: #0369A1;
  border-color: rgba(14, 165, 233, 0.38);
}

body[data-theme="dark"].cq-body .cq-pendant-kicker {
  background: rgba(18, 22, 34, 0.72);
  border-color: rgba(255, 255, 255, 0.16);
  color: #FDE68A;
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="yueya"] .cq-pendant-kicker {
  color: #DDD6FE;
  border-color: rgba(192, 132, 252, 0.34);
}

body[data-theme="dark"].cq-body .cq-pendant-overlay[data-pendant-identity="zhengyu"] .cq-pendant-kicker {
  color: #BAE6FD;
  border-color: rgba(125, 211, 252, 0.34);
}

.cq-pendant-close {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 115, 72, 0.28);
  background: rgba(255, 252, 245, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.28);
  transition: transform 0.14s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.cq-pendant-close:hover {
  transform: translateY(-1px);
  border-color: var(--sun-gold);
}

body[data-theme="dark"].cq-body .cq-pendant-close {
  background: rgba(18, 22, 34, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  color: #F8FAFC;
}

.cq-pendant-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.cq-pendant-dock-actions {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.82);
  border: 1px solid rgba(148, 115, 72, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px -14px rgba(15, 23, 42, 0.30);
}

body[data-theme="dark"].cq-body .cq-pendant-dock-actions {
  background: rgba(18, 22, 34, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.65);
}

.cq-pendant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 115, 72, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, filter 0.16s ease, background-color 0.16s ease;
}

.cq-pendant-pill:hover {
  transform: translateY(-1px);
  border-color: var(--sun-gold);
}

.cq-pendant-pill[hidden] {
  display: none !important;
}

.cq-pendant-pill--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--sun-gold) 0%, #D97706 46%, var(--cq-violet) 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 18px -10px rgba(124, 58, 237, 0.58);
}

.cq-pendant-pill--primary:hover {
  filter: brightness(1.06);
}

body[data-theme="dark"].cq-body .cq-pendant-pill {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
  color: #F8FAFC;
}

body[data-theme="dark"].cq-body .cq-pendant-pill--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #D97706 0%, #9333EA 100%);
  color: #FFFFFF;
}

.cq-pendant-hint {
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: center;
  line-height: 1.35;
}

body[data-theme="dark"].cq-body .cq-pendant-hint {
  color: rgba(226, 232, 240, 0.78);
}

@media (max-width: 420px) {
  .cq-pendant-topbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 6px;
  }
  .cq-pendant-kicker {
    min-height: 34px;
    padding: 0 11px;
    font-size: 11.5px;
  }
  .cq-pendant-close {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }
  .cq-pendant-dock {
    padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 5px;
  }
  .cq-pendant-dock-actions {
    gap: 6px;
    padding: 5px;
  }
  .cq-pendant-pill {
    min-height: 36px;
    padding: 0 13px;
    font-size: 12.5px;
  }
  .cq-pendant-hint {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cq-pendant-overlay {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cq-top-progress-fill,
  .cq-underline-path,
  .cq-qcard.is-card-enter,
  .cq-stage-banner,
  .cq-result-section,
  .cq-badge3d-spinner {
    animation: none !important;
  }
  .cq-underline-path {
    stroke-dashoffset: 0;
  }
  .cq-spec-card,
  .cq-holo-tilt {
    transform: none !important;
    transition: border-color 0.2s ease !important;
  }
  .cq-dim-fill {
    transition: none !important;
  }
  .cq-celebration-canvas {
    display: none !important;
  }
}
