/* ============================================
   TestWhat（测什么） — Stylesheet
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-elevated: #1e1e2a;

  --text-primary: #e8e6f0;
  --text-secondary: #8a8899;
  --text-muted: #5a586a;

  --accent-main: #a78bfa;
  --accent-main-dim: rgba(167, 139, 250, 0.15);
  --accent-blue: #60a5fa;
  --accent-pink: #f472b6;
  --accent-green: #34d399;
  --accent-orange: #fb923c;
  --accent-purple: #c084fc;
  --accent-red: #f87171;

  --gradient-main: linear-gradient(135deg, #a78bfa 0%, #f472b6 50%, #fb923c 100%);
  --gradient-card: linear-gradient(145deg, rgba(167,139,250,0.08) 0%, rgba(244,114,182,0.05) 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Category accent colors (portal home) */
  --cat-science: #818cf8;
  --cat-relation: #f472b6;
  --cat-career: #60a5fa;
  --cat-emotion: #34d399;
  --cat-internet: #fb923c;

  --font-display: 'Outfit', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(167,139,250,0.15);

  --surface: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.07);
  --nav-bg: rgba(10, 10, 15, 0.8);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { min-height: 100vh; }

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all 0.3s;
}

.nav.scrolled {
  border-bottom-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .nav.scrolled {
  border-bottom-color: rgba(0,0,0,0.1) !important;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-mark {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-submark {
  margin-left: 6px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); }

.btn-nav {
  background: var(--accent-main-dim) !important;
  color: var(--accent-main) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 500 !important;
  transition: all 0.2s !important;
}

.btn-nav:hover {
  background: rgba(167, 139, 250, 0.25) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 0;
}

.mobile-menu .mobile-menu-group {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

[data-theme="light"] .mobile-menu .mobile-menu-group {
  border-top-color: rgba(0,0,0,0.06);
}

.mobile-menu.active { display: flex; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(167, 139, 250, 0.4);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.12);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167,139,250,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 70% 10%, rgba(244,114,182,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 30% 20% at 30% 20%, rgba(96,165,250,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-main);
  background: var(--accent-main-dim);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
  animation: fadeInUp 0.8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-gallery-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: -24px auto 32px;
  line-height: 1.65;
  text-align: center;
  animation: fadeInUp 0.8s ease 0.24s both;
}

.hero-gallery-hint a {
  color: var(--accent-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-gallery-hint a:hover {
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* ============================================
   STATS
   ============================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 80px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: rgba(167,139,250,0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   FEATURED CARDS
   ============================================ */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 100px;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.3s;
}

.featured-card:hover {
  border-color: rgba(167,139,250,0.15);
  transform: translateY(-4px);
}

.featured-card:hover::before { opacity: 1; }

.featured-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid rgba(167,139,250,0.2);
}

.featured-img-sm {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.featured-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.featured-code {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.featured-code.small {
  font-size: 2rem;
  letter-spacing: -1px;
}

.featured-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.featured-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   SECTION BLOCKS
   ============================================ */

.section-block {
  margin-top: 120px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-main);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ============================================
   MODELS GRID
   ============================================ */

.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.models-grid .model-card:nth-child(4),
.models-grid .model-card:nth-child(5) {
  grid-column: span 1;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
  position: relative;
}

.model-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-main);
  opacity: 0;
  transition: opacity 0.3s;
}

.model-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

.model-card:hover::after { opacity: 0.5; }

.model-dims {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-main);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.model-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.model-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* last two cards center */
.models-grid {
  justify-items: center;
}

/* ============================================
   COMPARE
   ============================================ */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: all 0.3s;
}

.compare-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.1);
}

.compare-badge {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.compare-sbti .compare-badge {
  background: var(--accent-main-dim);
  color: var(--accent-main);
}

.compare-mbti .compare-badge {
  background: rgba(96, 165, 250, 0.15);
  color: var(--accent-blue);
}

.compare-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.compare-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.compare-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-card li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}

.compare-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-main);
}

.compare-mbti li::before {
  background: var(--accent-blue);
}

/* ============================================
   FAQ
   ============================================ */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.1);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-weight: 500;
  font-size: 0.95rem;
}

.faq-icon {
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-main);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: all 0.35s ease;
}

.faq-item.active .faq-a {
  max-height: 200px;
  padding: 0 24px 20px;
}

/* ============================================
   FOOTER  (old simple .footer removed — all pages now use .portal-footer)
   ============================================ */

/* ============================================
   QUIZ SECTION
   ============================================ */

.quiz-section {
  min-height: 100vh;
  background: var(--bg-primary);
  padding-top: 80px;
}

.quiz-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.quiz-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.quiz-back:hover { color: var(--text-primary); }

.quiz-progress-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  margin-bottom: 60px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 4px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-body {
  min-height: 400px;
}

.quiz-question {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 40px;
  animation: fadeInUp 0.4s ease both;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-option {
  background: var(--bg-card);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeInUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.quiz-option:nth-child(1) { animation-delay: 0.05s; }
.quiz-option:nth-child(2) { animation-delay: 0.1s; }
.quiz-option:nth-child(3) { animation-delay: 0.15s; }
.quiz-option:nth-child(4) { animation-delay: 0.2s; }

.quiz-option:hover {
  border-color: rgba(167,139,250,0.3);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.quiz-option.selected {
  border-color: var(--accent-main);
  background: var(--accent-main-dim);
  color: var(--text-primary);
}

.quiz-option-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.quiz-option.selected .quiz-option-marker {
  border-color: var(--accent-main);
  background: var(--accent-main);
}

.quiz-option.selected .quiz-option-marker::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Keep marker and text above stat bar */
.quiz-option-marker,
.quiz-option > span {
  position: relative;
  z-index: 1;
}

/* Pop animation on selected option */
.quiz-option.option-pop {
  animation: optionPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
}

@keyframes optionPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

/* Click ripple */
.quiz-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.28);
  transform: scale(0);
  animation: quizRipple 0.55s linear forwards;
  pointer-events: none;
}

@keyframes quizRipple {
  to { transform: scale(4); opacity: 0; }
}

/* Progress label below counter */
.quiz-progress-label {
  display: block;
  font-size: 0.70rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: right;
  margin-top: 3px;
  min-height: 1em;
}

/* Stats distribution bar */
.quiz-stat-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(167, 139, 250, 0.10);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: inherit;
  z-index: 0;
}

.quiz-option.selected .quiz-stat-bar {
  background: rgba(167, 139, 250, 0.20);
}

.quiz-stat-pct {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  z-index: 1;
  opacity: 0;
  animation: fadeIn 0.35s ease 0.15s both;
}

.quiz-option.selected .quiz-stat-pct {
  color: var(--accent-main);
  font-weight: 600;
}

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

/* Milestone toast */
.quiz-milestone-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--text-primary);
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 24px rgba(167,139,250,0.12);
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}

.quiz-milestone-toast.qmt-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quiz-milestone-toast.qmt-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-12px);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-bottom: 60px;
}

/* ============================================
   RESULT SECTION
   ============================================ */

.result-section {
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 100px 0 60px;
}

.result-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.result-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 64px 40px;
  text-align: center;
  margin-bottom: 48px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* 全站同结果人数：右上角（由 quiz-engine 注入 #resultGlobalRank） */
.result-global-rank {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: min(92%, 280px);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: rgba(22, 22, 30, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
  text-align: right;
  pointer-events: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .result-global-rank {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(124, 58, 237, 0.18);
  color: var(--text-secondary);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.08);
}

.result-card-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(167,139,250,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(244,114,182,0.12) 0%, transparent 50%),
    var(--bg-card);
  z-index: 0;
}

.result-card-inner {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

/* 结果人像：用 max-* + 固有宽高比缩放，避免 aspect-ratio+height:auto 在部分 WebKit 下把 <img> 压成非等比例 */
.result-img {
  display: block;
  box-sizing: border-box;
  max-width: min(100%, 280px);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 20px;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto 16px;
  background: #fff;
  filter: drop-shadow(0 8px 28px rgba(167,139,250,0.30));
  animation: fadeInUp 0.6s ease 0.05s both;
}

/* 依恋类型：角色图裁切后铺满结果卡展示区 */
.page-attachment .result-img,

.page-vinegar .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

.vinegar-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.28);
}
.vinegar-tip-title { font-weight: 800; margin-bottom: 8px; color: #dc2626; }
.vinegar-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.vinegar-tip-links a { color: var(--accent-orange); }

.page-tiangou .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.tiangou-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.28);
}
.tiangou-tip-title { font-weight: 800; margin-bottom: 8px; color: #ea580c; }
.tiangou-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.tiangou-tip-links a { color: var(--accent-orange); }

.page-ex .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

.ex-support-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(180, 83, 9, 0.1);
  border: 1px solid rgba(180, 83, 9, 0.28);
}
.ex-support-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.ex-support-banner p {
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.ex-support-links a {
  color: var(--accent-main);
  text-decoration: none;
}
.ex-support-links a:hover {
  text-decoration: underline;
}

.result-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-main);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease both;
}

.result-code {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease 0.1s both;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 6px;
  /* 长英文代码（如 GBTI 的 NEWS_TRADER）单行过宽时换行，避免被 .result-card overflow 裁切 */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.result-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.result-match {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-green);
  background: rgba(52, 211, 153, 0.1);
  padding: 6px 16px;
  border-radius: 100px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

/* RESULT DETAILS */

.result-details {
  animation: fadeInUp 0.8s ease 0.5s both;
}

.result-section-block {
  margin-bottom: 40px;
}

.result-section-block h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.result-section-block p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* DIMENSION CHART */

.dims-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dim-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
}

.dim-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.dim-bar-fill.model-s { background: var(--accent-blue); }
.dim-bar-fill.model-e { background: var(--accent-pink); }
.dim-bar-fill.model-a { background: var(--accent-green); }
.dim-bar-fill.model-ac { background: var(--accent-orange); }
.dim-bar-fill.model-so { background: var(--accent-purple); }

.dim-score {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dim-explanation {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 102px;
  margin-top: -4px;
  line-height: 1.5;
}

/* FACETS GRID */

.facets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.facet-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.facet-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.facet-score-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  position: relative;
}

.facet-score-ring svg {
  transform: rotate(-90deg);
}

.facet-score-ring circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.facet-score-ring .ring-bg {
  stroke: rgba(255,255,255,0.06);
}

.facet-score-ring .ring-fill {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.facet-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.facet-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* RESULT DISCLAIMER */

.result-disclaimer {
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.15);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.result-disclaimer p {
  font-size: 0.85rem;
  color: var(--accent-orange);
}

.result-leaderboard-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(244,114,182,0.08));
  border: 1px solid rgba(167,139,250,0.25);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.result-leaderboard-link:hover {
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(244,114,182,0.15));
  border-color: var(--accent-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(167,139,250,0.15);
}

.result-leaderboard-link svg:first-child { color: var(--accent-main); }
.result-leaderboard-link svg:last-child { color: var(--text-muted); }

/* ── 结果页金句与社交文案复制 ── */
.share-gold-inline {
  margin: -10px 0 18px;
  padding: 16px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(167,139,250,0.16), transparent 42%),
    rgba(167,139,250,0.07);
  border: 1px solid rgba(167,139,250,0.24);
}

.share-gold-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent-main);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.share-gold-quote {
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 4vw, 1.4rem);
  line-height: 1.45;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.share-gold-hint {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.social-copy-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-copy-tools {
  justify-content: center;
  margin: 0;
}

.social-copy-btn {
  flex: 1;
  min-width: 138px;
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(90deg, #a78bfa, #f472b6);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s, filter 0.18s, border-color 0.18s;
}

.social-copy-btn {
  color: var(--text-primary);
  background: rgba(167,139,250,0.10);
}

.social-copy-btn.primary {
  color: #fff;
  background: linear-gradient(90deg, #a78bfa, #f472b6);
}

.social-copy-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(244,114,182,0.5);
}

/* ── 双平台红包结果页广告卡 ── */
.jd-bar {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  margin: 14px auto 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.72) 0 7%, transparent 8%),
    linear-gradient(135deg, #fff2c6 0%, #ffd983 46%, #ffb84c 100%);
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(194,65,12,0.24), 0 8px 22px rgba(0,0,0,0.18);
  padding: 12px;
  display: none;
  overflow: hidden;
}
.jd-bar::after {
  content: none;
  position: absolute;
  right: 14px;
  bottom: 7px;
  color: rgba(154,52,18,0.55);
  font-size: 0.72rem;
  font-weight: 700;
}
.jd-bar.jd-bar--visible {
  display: block;
}
.jd-bar.jd-bar--hidden {
  display: none !important;
}
.jd-bar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.red-packet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 42px 0 2px;
}
.red-packet-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b91c1c;
  font-size: clamp(1.1rem, 3.4vw, 1.48rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 0 rgba(255,255,255,0.7);
}
.red-packet-title::before {
  content: "🧧";
  display: inline-block;
  filter: drop-shadow(0 2px 3px rgba(185,28,28,0.22));
}
.red-packet-countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
  color: #4a3327;
  font-size: clamp(0.78rem, 2.3vw, 0.94rem);
  font-weight: 700;
  white-space: nowrap;
}
.red-packet-count-num {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border-radius: 7px;
  background: #2b2525;
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 2.5vw, 1rem);
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.02em;
}
.red-packet-countdown em {
  color: #6b4a37;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-style: normal;
  font-weight: 900;
}
.red-packet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-right: 28px;
}
.red-packet-card {
  position: relative;
  min-height: 64px;
  padding: 9px 12px;
  border-radius: 9px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(circle at 8% 0%, rgba(255,255,255,0.32) 0 18%, transparent 19%),
    linear-gradient(90deg, #ef4444 0%, #e11d48 54%, #f43f5e 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 8px 18px rgba(185,28,28,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  isolation: isolate;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.red-packet-card--tmall {
  background:
    radial-gradient(circle at 8% 0%, rgba(255,255,255,0.26) 0 18%, transparent 19%),
    linear-gradient(90deg, #f97316 0%, #ea580c 56%, #f59e0b 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 8px 18px rgba(234,88,12,0.22);
}
.red-packet-card::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -35%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent);
  transform: rotate(18deg);
  animation: jdShine 4.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.red-packet-card:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28), 0 12px 24px rgba(185,28,28,0.28);
}
.red-packet-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.red-packet-brand {
  display: inline-block;
  color: rgba(255,255,255,0.92);
  font-size: clamp(0.72rem, 2vw, 0.86rem);
  font-weight: 900;
  line-height: 1.15;
}
.red-packet-card-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  color: #fff7ed;
  font-size: clamp(0.98rem, 2.8vw, 1.22rem);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: normal;
}
.red-packet-card-title strong {
  color: #fff3b0;
  font-size: 0.92em;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(88,28,0,0.28);
  white-space: nowrap;
}
.red-packet-mascot {
  position: relative;
  z-index: 1;
  --fallback: "京";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 58px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255,255,255,0.95);
  overflow: hidden;
  transform: rotate(-3deg);
  box-shadow: 0 4px 12px rgba(127,29,29,0.16);
}
.red-packet-mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.red-packet-card--tmall .red-packet-mascot {
  border-radius: 13px 9px 12px 9px;
  transform: rotate(3deg);
}
.red-packet-mascot--tmall {
  --fallback: "猫";
}
.red-packet-mascot--missing::after {
  content: var(--fallback);
  color: #e11d48;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}
.red-packet-card--tmall .red-packet-mascot--missing::after {
  color: #ea580c;
}
.red-packet-pill {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 2px;
  min-width: 70px;
  height: 34px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #dc2626;
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(127,29,29,0.18);
  animation: jdPulse 1.8s ease-in-out infinite;
}
.red-packet-card--tmall .red-packet-pill {
  color: #ea580c;
}
.red-packet-card-hint {
  position: relative;
  z-index: 2;
  display: block;
  color: rgba(255,255,255,0.82);
  font-size: clamp(0.64rem, 1.8vw, 0.74rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.red-packet-card--tmall .red-packet-card-hint {
  color: rgba(255,255,255,0.84);
}
.red-packet-ad-label {
  position: absolute;
  right: 6px;
  bottom: -6px;
  color: rgba(154,52,18,0.55);
  font-size: 0.72rem;
  font-weight: 800;
}
.jd-bar-close {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 5;
  width: 26px; height: 26px;
  border: 1px solid rgba(185,28,28,0.18);
  background: rgba(255,255,255,0.78);
  color: rgba(185,28,28,0.72);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.jd-bar-close:hover { color: #dc2626; background: rgba(255,255,255,0.82); }

@media (max-width: 640px) {
  .jd-bar {
    border-radius: 16px;
    padding: 10px;
  }
  .red-packet-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-right: 34px;
  }
  .red-packet-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    padding-right: 22px;
  }
  .red-packet-card {
    min-height: 58px;
    padding: 8px 10px;
    gap: 8px;
  }
  .red-packet-mascot {
    width: 52px;
    height: 42px;
  }
  .red-packet-pill {
    min-width: 62px;
    height: 32px;
    padding: 0 9px 0 11px;
  }
  .red-packet-card-title {
    gap: 5px;
  }
}

.jd-quiz-red-packet {
  width: 100%;
  margin: 22px auto 0;
  padding: 10px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(120,53,15,0.16), 0 6px 16px rgba(0,0,0,0.14);
  animation: fadeInUp 0.4s ease 0.12s both;
}
.jd-quiz-red-packet .jd-bar-inner {
  gap: 10px;
}
.jd-quiz-red-packet .red-packet-head {
  gap: 10px;
  padding-right: 34px;
}
.jd-quiz-red-packet .red-packet-title {
  font-size: clamp(1rem, 3vw, 1.18rem);
  letter-spacing: -0.06em;
}
.jd-quiz-red-packet .red-packet-countdown {
  gap: 5px;
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
}
.jd-quiz-red-packet .red-packet-count-num {
  min-width: 28px;
  height: 26px;
  border-radius: 7px;
  font-size: clamp(0.78rem, 2.4vw, 0.92rem);
}
.jd-quiz-red-packet .red-packet-grid {
  gap: 10px;
  padding-right: 0;
}
.jd-quiz-red-packet .red-packet-card {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 9px;
}
.jd-quiz-red-packet .red-packet-card-title {
  font-size: clamp(0.9rem, 2.8vw, 1.08rem);
}
.jd-quiz-red-packet .red-packet-card-body {
  margin-top: 10px;
}
.jd-quiz-red-packet .red-packet-mascot {
  width: 46px;
  height: 38px;
  border-radius: 9px;
}
.jd-quiz-red-packet .red-packet-pill {
  min-width: 56px;
  height: 30px;
  padding: 0 8px 0 10px;
  font-size: clamp(0.72rem, 2.4vw, 0.84rem);
}
.jd-quiz-red-packet .red-packet-card-hint {
  font-size: 0.62rem;
}
.jd-quiz-red-packet .red-packet-ad-label {
  bottom: -7px;
}
.jd-quiz-red-packet .jd-bar-close {
  top: 7px;
  right: 7px;
}

@media (max-width: 640px) {
  .jd-quiz-red-packet {
    margin-top: 18px;
    padding: 12px;
  }
  .jd-quiz-red-packet .red-packet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  /* 窄屏 2 列时把卡片改成纵向堆叠：吉祥物移到右上角徽标位，
     文案占满整张卡的宽度，按钮沉到底部，避免文字被挤成竖排。 */
  .jd-quiz-red-packet .red-packet-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 112px;
    padding: 10px 11px 11px;
    gap: 6px;
  }
  .jd-quiz-red-packet .red-packet-mascot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 34px;
    height: 30px;
    border-radius: 8px;
  }
  .jd-quiz-red-packet .red-packet-copy {
    width: 100%;
    padding-right: 40px;
    gap: 2px;
  }
  .jd-quiz-red-packet .red-packet-card-title {
    font-size: clamp(0.92rem, 4vw, 1.04rem);
    gap: 4px;
    line-height: 1.14;
  }
  .jd-quiz-red-packet .red-packet-card-hint {
    font-size: 0.62rem;
  }
  .jd-quiz-red-packet .red-packet-pill {
    margin-top: auto;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
  }
}

@media (max-width: 420px) {
  .jd-quiz-red-packet .red-packet-card {
    min-height: 108px;
  }
}

/* light theme */
[data-theme="light"] .jd-bar {
  background: #f5dfbd;
  border-color: rgba(180,83,9,0.15);
  box-shadow: 0 16px 42px rgba(180,83,9,0.16);
}

@keyframes jdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes jdShine {
  0%, 62% { left: -40%; opacity: 0; }
  72% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}
.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* SHARE */

/* 主行动区 — 两个大按钮 */
.share-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.share-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
}

.share-action-btn svg { flex-shrink: 0; }

.share-action-save {
  background: var(--accent-main);
  color: #fff;
}
.share-action-save:hover { opacity: 0.88; transform: translateY(-2px); }

.share-action-challenge {
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.35);
}
.share-action-challenge:hover {
  background: rgba(251,146,60,0.25);
  transform: translateY(-2px);
}

/* 社交渠道区 — 圆形图标按钮 */
.share-channels {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-ch-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s;
  position: relative;
}
.share-ch-btn:hover { transform: translateY(-3px); }
.share-ch-btn svg { flex-shrink: 0; }

/* 悬停 tooltip */
.share-ch-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
}
.share-ch-btn:hover::after { opacity: 1; }

.share-ch-wechat { border-color: rgba(7,193,96,0.3); }
.share-ch-wechat:hover { background: rgba(7,193,96,0.12); border-color: #07C160; }
.share-ch-wechat svg { color: #07C160; }

.share-ch-weibo { border-color: rgba(230,73,58,0.3); }
.share-ch-weibo:hover { background: rgba(230,73,58,0.12); border-color: #e6493a; }
.share-ch-weibo svg { color: #e6493a; }

.share-ch-qq { border-color: rgba(18,183,245,0.3); }
.share-ch-qq:hover { background: rgba(18,183,245,0.12); border-color: #12b7f5; }
.share-ch-qq svg { color: #12b7f5; }

.share-ch-copy { border-color: rgba(52,211,153,0.3); }
.share-ch-copy:hover { background: rgba(52,211,153,0.12); border-color: var(--accent-green); }
.share-ch-copy svg { color: var(--accent-green); }

.share-ch-native { border-color: rgba(167,139,250,0.3); }
.share-ch-native:hover { background: rgba(167,139,250,0.12); border-color: var(--accent-main); }
.share-ch-native svg { color: var(--accent-main); }

.share-ch-x { border-color: rgba(255,255,255,0.15); }
.share-ch-x:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.35); }
.share-ch-x svg { color: #e7e7e7; }
[data-theme="light"] .share-ch-x svg { color: #111; }

.share-ch-facebook { border-color: rgba(24,119,242,0.3); }
.share-ch-facebook:hover { background: rgba(24,119,242,0.12); border-color: #1877f2; }
.share-ch-facebook svg { color: #1877f2; }

.share-ch-telegram { border-color: rgba(38,169,224,0.3); }
.share-ch-telegram:hover { background: rgba(38,169,224,0.12); border-color: #26a9e0; }
.share-ch-telegram svg { color: #26a9e0; }

.share-ch-whatsapp { border-color: rgba(37,211,102,0.3); }
.share-ch-whatsapp:hover { background: rgba(37,211,102,0.12); border-color: #25d366; }
.share-ch-whatsapp svg { color: #25d366; }

/* 响应式控制 */
.share-desktop-only { display: inline-flex; }
.share-mobile-only  { display: none; }
@media (max-width: 600px) or (pointer: coarse) {
  .share-desktop-only { display: none; }
  .share-mobile-only  { display: inline-flex; }
  .share-actions { gap: 10px; }
  .share-action-btn { padding: 12px 14px; font-size: 0.85rem; }
  .share-gold-inline { padding: 15px; }
  .social-copy-tools { flex-direction: column; }
  .social-copy-btn { width: 100%; }
}

/* 兼容旧 .share-btn（share-modal 关闭按钮等用到） */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.share-btn:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.share-btn svg { flex-shrink: 0; }

.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.share-modal-content {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.share-modal-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.share-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.share-modal-close:hover { color: var(--text-primary); }

.share-modal-body {
  padding: 20px;
  text-align: center;
}

.share-modal-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.share-modal-body .share-tip {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 分享尺寸切换 tabs */
.share-preset-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}

.share-preset-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.share-preset-btn:hover {
  color: var(--text-primary);
  background: rgba(167,139,250,0.08);
}

.share-preset-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(167,139,250,0.5), rgba(96,165,250,0.45));
  border-color: rgba(167,139,250,0.45);
  box-shadow: 0 2px 10px rgba(124,58,237,0.22);
}

.share-preset-viewer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

#sharePreviewImg {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  transition: opacity 0.2s ease;
}

#sharePreviewImg.is-loading {
  opacity: 0.45;
}

[data-theme="light"] .share-preset-tabs {
  background: rgba(124,58,237,0.05);
  border-color: rgba(124,58,237,0.12);
}

[data-theme="light"] .share-preset-btn {
  color: var(--text-secondary);
}

[data-theme="light"] .share-preset-btn:hover {
  background: rgba(124,58,237,0.08);
  color: var(--text-primary);
}

[data-theme="light"] .share-preset-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(124,58,237,0.25);
}

[data-theme="light"] #sharePreviewImg {
  box-shadow: 0 4px 24px rgba(124,58,237,0.18);
}

/* CONTACT PAGE */

.contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 8px 0;
  overflow: hidden;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
}

.contact-item + .contact-item {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(167,139,250,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-main);
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-value:hover {
  color: var(--accent-main);
}

.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent-green);
  color: #000;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10000;
  pointer-events: none;
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .stats-row { grid-template-columns: 1fr; }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-main { grid-row: span 1; }

  .models-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .hero-title { letter-spacing: -0.5px; }

  .result-card { padding: 48px 24px; }

  .dim-row {
    grid-template-columns: 70px 1fr 36px;
    gap: 8px;
  }

  .dim-label { font-size: 0.68rem; }

  .facets-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-footer {
    flex-direction: column;
    gap: 12px;
  }

  .quiz-footer .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .facets-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* ============================================
   SELECTION
   ============================================ */

::selection {
  background: rgba(167, 139, 250, 0.3);
  color: #fff;
}

/* ============================================
   MORE TESTS CARDS (result page)
   ============================================ */

.result-more-tests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.more-test-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary, #fff);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.more-test-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167,139,250,0.25);
  background: rgba(167,139,250,0.06);
}
.more-test-card svg {
  flex-shrink: 0;
  opacity: 0.35;
  margin-left: auto;
  transition: transform 0.2s, opacity 0.2s;
}
.more-test-card:hover svg {
  transform: translateX(3px);
  opacity: 0.7;
}

.more-test-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.more-test-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.more-test-info strong {
  font-size: 0.88rem;
  font-weight: 700;
}
.more-test-info small {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono, monospace);
}

@media (max-width: 600px) {
  .result-more-tests {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   LIGHT THEME
   ============================================ */

[data-theme="light"] {
  --bg-primary: #f6f5ff;
  --bg-secondary: #edeafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f0edff;
  --bg-elevated: #e8e4fa;
  --text-primary: #1a1830;
  --text-secondary: #5c5875;
  --text-muted: #9895b0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 40px rgba(167,139,250,0.12);
  --gradient-card: linear-gradient(145deg, rgba(167,139,250,0.05) 0%, rgba(244,114,182,0.03) 100%);
  --accent-main-dim: rgba(167,139,250,0.12);
  --surface: rgba(0,0,0,0.025);
  --border: rgba(0,0,0,0.08);
  --nav-bg: rgba(246,245,255,0.88);
}

/* NAV */
[data-theme="light"] .nav {
  border-bottom-color: rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .mobile-menu {
  background: #edeafc;
  border-bottom-color: rgba(0,0,0,0.07);
}

/* BUTTONS */
[data-theme="light"] .btn-ghost {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: var(--text-secondary);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.07);
  border-color: rgba(0,0,0,0.15);
  color: var(--text-primary);
}

/* STAT CARDS */
[data-theme="light"] .stat-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .stat-card:hover {
  border-color: rgba(167,139,250,0.25);
}

/* FEATURED CARDS */
[data-theme="light"] .featured-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .featured-card:hover {
  border-color: rgba(167,139,250,0.2);
}

/* MODEL CARDS */
[data-theme="light"] .model-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .model-card:hover {
  border-color: rgba(0,0,0,0.12);
}

/* COMPARE CARDS */
[data-theme="light"] .compare-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .compare-card:hover {
  border-color: rgba(0,0,0,0.12);
}

/* FAQ */
[data-theme="light"] .faq-item {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .faq-item:hover {
  border-color: rgba(0,0,0,0.12);
}

/* QUIZ */
[data-theme="light"] .quiz-progress-bar {
  background: rgba(0,0,0,0.07);
}
[data-theme="light"] .quiz-option {
  border-color: rgba(0,0,0,0.08);
  color: var(--text-secondary);
}
[data-theme="light"] .quiz-option:hover {
  border-color: rgba(167,139,250,0.35);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
[data-theme="light"] .quiz-option.selected {
  border-color: var(--accent-main);
  background: var(--accent-main-dim);
  color: var(--text-primary);
}
[data-theme="light"] .quiz-option-marker {
  border-color: rgba(0,0,0,0.2);
}
[data-theme="light"] .quiz-stat-bar {
  background: rgba(167, 139, 250, 0.08);
}
[data-theme="light"] .quiz-option.selected .quiz-stat-bar {
  background: rgba(167, 139, 250, 0.16);
}
[data-theme="light"] .quiz-milestone-toast {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 24px rgba(167,139,250,0.08);
  border-color: rgba(167, 139, 250, 0.25);
}

/* RESULT */
[data-theme="light"] .result-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .result-card-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(167,139,250,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(244,114,182,0.07) 0%, transparent 50%),
    var(--bg-card);
}
[data-theme="light"] .result-section-block h3 {
  border-bottom-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .result-leaderboard-link {
  background: linear-gradient(135deg, rgba(167,139,250,0.09), rgba(244,114,182,0.06));
  border-color: rgba(167,139,250,0.2);
}
[data-theme="light"] .share-gold-inline {
  background:
    radial-gradient(circle at top left, rgba(167,139,250,0.14), transparent 40%),
    rgba(167,139,250,0.06);
  border-color: rgba(167,139,250,0.22);
}
[data-theme="light"] .social-copy-btn {
  color: #4c1d95;
  background: rgba(167,139,250,0.10);
}
[data-theme="light"] .result-disclaimer {
  background: rgba(251,146,60,0.07);
  border-color: rgba(251,146,60,0.18);
}
/* jd bar light theme already handled inside .jd-bar block above */

/* DIMENSION BARS */
[data-theme="light"] .dim-bar-track {
  background: rgba(0,0,0,0.07);
}

/* FACET CARDS */
[data-theme="light"] .facet-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .facet-score-ring .ring-bg {
  stroke: rgba(0,0,0,0.08);
}

/* SHARE */
[data-theme="light"] .share-btn,
[data-theme="light"] .share-ch-btn {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  color: var(--text-primary);
}
[data-theme="light"] .share-btn:hover,
[data-theme="light"] .share-ch-btn:hover {
  border-color: rgba(0,0,0,0.18);
  background: #f6f5ff;
}
[data-theme="light"] .share-action-challenge {
  background: rgba(251,146,60,0.1);
  border-color: rgba(251,146,60,0.3);
}
[data-theme="light"] .share-action-challenge:hover {
  background: rgba(251,146,60,0.18);
}
[data-theme="light"] .share-modal-content {
  background: var(--bg-secondary);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .share-modal-header {
  border-bottom-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .share-modal-body img {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* CONTACT */
[data-theme="light"] .contact-card {
  border-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .contact-item + .contact-item {
  border-top-color: rgba(0,0,0,0.07);
}

/* FOOTER — light theme portal-footer */
[data-theme="light"] .portal-footer {
  border-top-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .pf-bottom {
  border-top-color: rgba(0,0,0,0.06);
}

/* MORE TESTS BLOCK */
[data-theme="light"] .more-test-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
  color: var(--text-primary);
}
[data-theme="light"] .more-test-card:hover {
  background: rgba(167,139,250,0.08);
  border-color: rgba(167,139,250,0.3);
}
[data-theme="light"] .more-test-info small {
  color: rgba(0,0,0,0.4);
}

/* HERO BACKGROUND */
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(167,139,250,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 70% 10%, rgba(244,114,182,0.05) 0%, transparent 50%),
    radial-gradient(ellipse 30% 20% at 30% 20%, rgba(96,165,250,0.04) 0%, transparent 50%);
}

/* STATS / RANK PAGE */
[data-theme="light"] .rank-item {
  border-color: rgba(0,0,0,0.07) !important;
  background: transparent !important;
}
[data-theme="light"] .rank-item:nth-child(1) {
  border-color: rgba(251,191,36,0.3) !important;
  background: linear-gradient(135deg, rgba(251,191,36,0.05), var(--bg-card)) !important;
}
[data-theme="light"] .rank-bar-wrap {
  background: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .rank-item-zero {
  opacity: 0.35;
}
[data-theme="light"] .rank-item-zero .rank-pos {
  color: rgba(0,0,0,0.2) !important;
}

/* TESTS HUB hover shadow */
[data-theme="light"] .test-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.1) !important;
}

/* SCROLLBAR */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

/* SELECTION */
[data-theme="light"] ::selection {
  background: rgba(167,139,250,0.25);
  color: var(--text-primary);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
  margin-right: 8px;
}
.theme-toggle:hover {
  border-color: rgba(167,139,250,0.5);
  color: var(--accent-main);
  background: var(--accent-main-dim);
}
[data-theme="light"] .theme-toggle {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.1);
}

/* show sun in light mode, moon in dark mode */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ============================================
   NEW FEATURES — STYLES
   ============================================ */

/* ── Daily Module ────────────────────────────── */
.daily-module {
  display: flex;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.daily-module::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fb923c);
}
.daily-module-left { flex: 1; min-width: 0; }
.daily-module-right {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.daily-badge-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  display: block;
  margin-bottom: 10px;
}
.daily-type-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.daily-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-main);
}
.daily-name {
  font-size: 1.1rem;
  font-weight: 600;
}
.daily-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.daily-scenario-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  display: block;
  margin-bottom: 10px;
}
.daily-scenario {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
@media (max-width: 640px) {
  .daily-module { flex-direction: column; gap: 16px; padding: 20px; }
  .daily-module-right { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; }
}

/* ── Challenge Banner ────────────────────────── */
.challenge-banner {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(244,114,182,0.08));
  border-bottom: 1px solid rgba(167,139,250,0.2);
  padding: 48px 0 40px;
  text-align: center;
}
.challenge-banner .container { max-width: 560px; }
.challenge-banner-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-main);
  margin-bottom: 20px;
}
.challenge-friend-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: var(--radius-xl);
  padding: 14px 28px;
  margin-bottom: 16px;
}
.challenge-code {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-main);
}
.challenge-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.challenge-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.challenge-cta-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Shared Banner ────────────────────────────── */
.shared-banner {
  background: linear-gradient(135deg, rgba(96,165,250,0.08), rgba(167,139,250,0.06));
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  text-align: center;
}
.shared-banner-content { }
.shared-banner-label {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  background: rgba(96,165,250,0.12);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.shared-banner-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.shared-banner-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Comparison Section ───────────────────────── */
.comparison-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.comparison-header {
  text-align: center;
  margin-bottom: 48px;
}
.comparison-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin: 12px 0 8px;
}
.comparison-header p {
  color: var(--text-secondary);
}
.comparison-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 48px;
}
.compare-col {
  text-align: center;
  flex: 1;
  max-width: 240px;
}
.compare-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.compare-img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}
.compare-col-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-main);
  margin-bottom: 4px;
}
.compare-col-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.compare-vs {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  flex-shrink: 0;
}
.compare-compat {
  text-align: center;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 32px;
}
.compare-compat-score {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent-main);
  line-height: 1;
  margin-bottom: 12px;
}
.compare-compat-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.compare-compat-msg {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.compare-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .comparison-grid { flex-direction: column; gap: 16px; }
  .compare-vs { transform: rotate(90deg); }
}

/* ── Radar Chart ───────────────────────────── */
.compare-radar-wrap {
  text-align: center;
  margin-bottom: 32px;
}
.compare-radar-wrap canvas {
  max-width: 100%;
  height: auto !important;
}
.compare-radar-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}
.compare-radar-legend-me { color: rgba(96,165,250,0.9); }
.compare-radar-legend-friend { color: rgba(244,114,182,0.8); }

/* ── Dimension Detail Table ────────────────── */
.compare-dim-detail { margin-bottom: 32px; }
.compare-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
}
.compare-dim-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.compare-dim-diff { border-color: rgba(244,114,182,0.25); }
.compare-dim-label {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
}
.compare-dim-val {
  font-family: var(--font-mono);
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.compare-dim-vs {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-size: 0.75rem;
}
.dim-high { color: var(--accent-main); }
.dim-mid  { color: var(--text-secondary); }
.dim-low  { color: var(--accent-pink); }

/* ── Reveal Animation ──────────────────────── */
.reveal-hidden {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}
.reveal-hidden.reveal-left  { transform: translateX(-30px) translateY(0); }
.reveal-hidden.reveal-right { transform: translateX(30px) translateY(0); }
.reveal-hidden.reveal-scale { transform: scale(0.3); filter: blur(4px); }
.reveal-show {
  opacity: 1 !important;
  filter: blur(0) !important;
  transform: none !important;
}

/* ── Dimension Comparison Bars ────────────── */
.compare-dims-bars {
  max-width: 480px;
  margin: 0 auto 32px;
}
.cdim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.cdim-label {
  width: 80px;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
  font-family: var(--font-mono);
}
.cdim-track {
  flex: 1;
  height: 20px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cdim-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}
.cdim-bar-me {
  left: 0;
  background: rgba(96,165,250,0.5);
  z-index: 2;
}
.cdim-bar-fr {
  left: 0;
  background: rgba(244,114,182,0.35);
  z-index: 1;
}

/* ── Scenario Cards ──────────────────────── */
.compare-scenarios {
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.compare-scenarios-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.compare-scenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Challenge Banner (quiz-engine) ─────────── */
.qe-challenge-banner {
  background: linear-gradient(135deg, rgba(192,132,252,0.1), rgba(96,165,250,0.1));
  border: 1px solid rgba(192,132,252,0.2);
  border-radius: 16px;
  padding: 32px 24px;
  margin-top: 24px;
  text-align: center;
}
.qe-challenge-inner { max-width: 400px; margin: 0 auto; }
.qe-challenge-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}
.qe-challenge-friend {
  margin-bottom: 16px;
}
.qe-challenge-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-main);
  margin-bottom: 4px;
}
.qe-challenge-name {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}
.qe-challenge-cta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── History Section (tests.html) ────────────── */
.history-section {
  margin-bottom: 48px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.history-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
}
.history-header {
  margin-bottom: 24px;
}
.history-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.history-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.history-count {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-main);
  margin-left: 8px;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.history-card:hover { transform: translateY(-2px); border-color: rgba(167,139,250,0.2); }
.history-done { border-color: rgba(52,211,153,0.15); }
.history-done::before { content: '✓'; position: absolute; top: 8px; right: 10px; font-size: 0.65rem; color: var(--accent-green); }
.history-card { position: relative; }
.history-card-emoji { font-size: 1.6rem; margin-bottom: 6px; }
.history-card-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-main);
  margin-bottom: 3px;
  word-break: break-all;
  line-height: 1.2;
}
.history-card-test {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.history-card-date {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.history-card-link {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-main);
  text-decoration: none;
  font-weight: 600;
}
.history-card-link:hover { text-decoration: underline; }
.history-go { color: var(--text-muted); }

/* ── Comments ─────────────────────────────────── */
.comments-area {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.comments-list {
  min-height: 80px;
  max-height: 240px;
  overflow-y: auto;
  padding: 16px;
  background: var(--surface);
}
.comment-item {
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
  border: 1px solid var(--border);
}
.comment-item:last-child { margin-bottom: 0; }
.comment-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}
.comment-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.comment-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.comment-input::placeholder { color: var(--text-muted); }
.comment-input:focus { border-color: rgba(167,139,250,0.4); }
.btn-sm { padding: 8px 16px !important; font-size: 0.85rem !important; }

/* 新版评论表单（.comment-form / -foot / -tip + textarea#commentInput），
   被升级过留存包的测试页使用；旧版 .comment-input-row 继续保留。 */
.comments-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  max-height: 220px;
  resize: vertical;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  line-height: 1.55;
  outline: none;
  transition: border-color 0.2s;
}
.comment-form textarea::placeholder { color: var(--text-muted); }
.comment-form textarea:focus { border-color: rgba(167,139,250,0.4); }
.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.comment-form-tip {
  flex: 1;
  min-width: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.comment-form-foot .btn { flex: 0 0 auto; }

/* ── Light theme overrides for new features ───── */
[data-theme="light"] .daily-module {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .daily-module-right { border-left-color: rgba(0,0,0,0.08); }
[data-theme="light"] .challenge-banner {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(244,114,182,0.05));
  border-bottom-color: rgba(167,139,250,0.15);
}
[data-theme="light"] .challenge-friend-card {
  background: #fff;
  border-color: rgba(167,139,250,0.25);
}
[data-theme="light"] .shared-banner {
  background: linear-gradient(135deg, rgba(96,165,250,0.06), rgba(167,139,250,0.04));
  border-color: rgba(96,165,250,0.15);
}
[data-theme="light"] .comparison-section { background: #f8f7fc; border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .compare-compat { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .compare-dim-row { background: #fff; border-color: rgba(0,0,0,0.07); }
[data-theme="light"] .compare-dim-diff { border-color: rgba(244,114,182,0.2); }
[data-theme="light"] .qe-challenge-banner { background: linear-gradient(135deg, rgba(192,132,252,0.08), rgba(96,165,250,0.08)); border-color: rgba(192,132,252,0.15); }
[data-theme="light"] .compare-scenario-card { background: #fff; border-color: rgba(0,0,0,0.07); }
[data-theme="light"] .cdim-track { background: #f3f2f8; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .history-section { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .history-card { background: #f8f7fc; border-color: rgba(0,0,0,0.07); }
[data-theme="light"] .history-done { border-color: rgba(52,211,153,0.3); }
[data-theme="light"] .comments-area { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .comments-list { background: #fafafa; }
[data-theme="light"] .comment-item { background: #fff; border-color: rgba(0,0,0,0.07); }
[data-theme="light"] .comment-input-row { background: #f5f4f8; border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .comment-input { background: #fff; border-color: rgba(0,0,0,0.1); color: var(--text-primary); }
[data-theme="light"] .comment-form { background: #f5f4f8; border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .comment-form textarea { background: #fff; border-color: rgba(0,0,0,0.1); color: var(--text-primary); }

/* ============================================
   Nav Dropdown — 统一导航下拉菜单
   ============================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
  user-select: none;
  display: inline-block;
}
.nav-dropdown:hover .nav-dropdown-toggle {
  color: var(--text-primary);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  padding-top: 18px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}
/* 用伪元素填满 toggle 到菜单之间的空隙，防止鼠标滑过时触发 mouseout */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
[data-theme="light"] .nav-dropdown-menu {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .nav-dropdown-menu a:hover {
  background: rgba(0,0,0,0.04);
}

/* ── 测验页 SEO：搜索说明 + FAQ 区块 ── */
.test-seo-search {
  border-top: 1px solid var(--border);
  background:
    radial-gradient(circle at 18% 0%, rgba(167,139,250,0.08), transparent 34%),
    var(--bg-primary);
}
.test-seo-search-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 54px 16px 50px;
}
.test-seo-search-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-main);
  margin-bottom: 10px;
}
.test-seo-search h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.25;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
}
.test-seo-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.test-seo-search-main {
  display: grid;
  gap: 16px;
}
.test-seo-search-main p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.86;
  font-size: 0.94rem;
}
.test-seo-search-side {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.test-seo-search-side h3 {
  margin: 0 0 10px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.test-seo-search-side h3:not(:first-child) {
  margin-top: 22px;
}
.test-seo-search-side ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.75;
}
.test-seo-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.test-seo-related a {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(167,139,250,0.1);
  color: var(--accent-main);
  text-decoration: none;
  font-size: 0.8rem;
}
.test-seo-related a:hover {
  background: rgba(167,139,250,0.18);
}
.test-seo-faq {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.test-seo-faq-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 56px;
}
.test-seo-faq-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.test-seo-faq-lead {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0 0 28px;
  line-height: 1.75;
}
.test-seo-faq-dl {
  margin: 0;
}
.test-seo-faq-dl dt {
  font-weight: 700;
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.92rem;
}
.test-seo-faq-dl dt:first-child {
  margin-top: 0;
}
.test-seo-faq-dl dd {
  margin: 0 0 6px 0;
  color: var(--text-secondary);
  line-height: 1.78;
  font-size: 0.88rem;
}
[data-theme="light"] .test-seo-faq {
  background: #f4f2fb;
}
[data-theme="light"] .test-seo-search {
  background:
    radial-gradient(circle at 18% 0%, rgba(124,58,237,0.08), transparent 34%),
    #fbfaff;
}
[data-theme="light"] .test-seo-search-side {
  background: #fff;
}
@media (max-width: 820px) {
  .test-seo-search-grid {
    grid-template-columns: 1fr;
  }
}

/* 图鉴入口：21 项太多，用两列网格压缩高度 */
.nav-dropdown-menu.nav-dropdown-menu-grid {
  display: none;
  min-width: 420px;
  max-height: 72vh;
  overflow-y: auto;
  padding: 10px;
  padding-top: 18px;
}
.nav-dropdown:hover .nav-dropdown-menu.nav-dropdown-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.nav-dropdown-menu.nav-dropdown-menu-grid a {
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* ── 独立测试页：关于本测试 / 答题贴士 ── */
.test-intro-wrap {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.test-intro-wrap h3 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.test-intro-wrap p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.test-intro-wrap p:last-of-type { margin-bottom: 0; }
.test-intro-tips {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.12);
}
.test-intro-tips strong {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-main);
  margin-bottom: 10px;
}
.test-intro-tips ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.test-intro-tips li { margin-bottom: 6px; }
.test-intro-tips li:last-child { margin-bottom: 0; }

/* ── 通用维度说明卡片（test-dims-grid / test-dim-card）── */
.test-dims-section {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 0 16px;
}
.test-dims-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}
.test-dims-section .test-dims-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}
.test-dims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 0;
}
.test-dim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.test-dim-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.test-dim-card:nth-child(1)::before  { background: linear-gradient(90deg,#60a5fa,#818cf8); }
.test-dim-card:nth-child(2)::before  { background: linear-gradient(90deg,#34d399,#a78bfa); }
.test-dim-card:nth-child(3)::before  { background: linear-gradient(90deg,#fb923c,#f472b6); }
.test-dim-card:nth-child(4)::before  { background: linear-gradient(90deg,#facc15,#38bdf8); }
.test-dim-card:nth-child(5)::before  { background: linear-gradient(90deg,#c084fc,#60a5fa); }
.test-dim-card:nth-child(6)::before  { background: linear-gradient(90deg,#f87171,#fbbf24); }
.test-dim-card:nth-child(7)::before  { background: linear-gradient(90deg,#38bdf8,#34d399); }
.test-dim-card:nth-child(8)::before  { background: linear-gradient(90deg,#a78bfa,#fb923c); }
.test-dim-card:nth-child(9)::before  { background: linear-gradient(90deg,#4ade80,#818cf8); }
.test-dim-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--accent-main);
  margin-bottom: 10px;
}
.test-dim-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.test-dim-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
@media (max-width: 600px) {
  .test-dims-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .test-dims-grid { grid-template-columns: 1fr; }
}
[data-theme="light"] .test-dim-card { background: #fff; }

/* ── 类型快速预览网格（test-types-section）── */
.test-types-section {
  max-width: 820px;
  margin: 36px auto 0;
  padding: 0 16px;
}
.test-types-section h2 {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}
.test-types-section .test-types-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}
.test-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.test-type-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.15s;
  cursor: default;
}
a.test-type-chip:hover { border-color: rgba(167,139,250,0.4); transform: translateY(-2px); }
.test-type-chip-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--accent-main);
}
.test-type-chip-name { font-size: 0.78rem; color: var(--text-secondary); }
[data-theme="light"] .test-type-chip { background: #fff; }

/* ============================================
   AI INTERPRET
   ============================================ */

.ai-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gradient-main);
  color: #fff;
  vertical-align: middle;
  margin-left: 6px;
  position: relative;
  top: -1px;
}

.ai-interpret-content {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.9;
  white-space: pre-wrap;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(167,139,250,0.06) 0%, rgba(96,165,250,0.04) 100%);
  border-left: 3px solid var(--accent-main);
  margin-bottom: 16px;
  min-height: 60px;
  position: relative;
}

.ai-interpret-content:empty {
  display: none;
}

.btn-ai {
  position: relative;
  overflow: hidden;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ai .ai-sparkle {
  flex-shrink: 0;
}

.btn-ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: aiShimmer 3s ease-in-out infinite;
}

@keyframes aiShimmer {
  0%, 100% { left: -100%; }
  50% { left: 140%; }
}

.ai-interpret-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.ai-loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aiSpin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

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

/* Light theme overrides */
[data-theme="light"] .ai-interpret-content {
  background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, rgba(96,165,250,0.04) 100%);
  border-left-color: #7c3aed;
}

[data-theme="light"] .ai-loading-spinner {
  border-color: rgba(124,58,237,0.3);
  border-top-color: #7c3aed;
}

/* =========================================================================
   INLINE DOSSIER (embedded shareTemplate preview on result page)
   Kraft-archive feel to echo the dossier visual; renders small inline and
   opens the share modal for full-size view / size switching.
   ========================================================================= */
.inline-dossier {
  margin-top: 32px;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(217,189,148,0.08) 0%, rgba(217,189,148,0.03) 100%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(217,189,148,0.22);
  position: relative;
  overflow: hidden;
}
.inline-dossier::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 15%, rgba(217,189,148,0.07) 0%, transparent 38%),
                    radial-gradient(circle at 85% 90%, rgba(217,189,148,0.05) 0%, transparent 42%);
  pointer-events: none;
}
.inline-dossier > * { position: relative; z-index: 1; }

.inline-dossier-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px dashed rgba(217,189,148,0.28) !important;
}
.inline-dossier-icon { font-size: 1.1em; }

.inline-dossier-hint {
  font-size: 0.82rem !important;
  color: rgba(217,189,148,0.78) !important;
  margin: 0 0 16px !important;
  line-height: 1.55 !important;
}

.inline-dossier-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  margin: 0 auto 18px;
  max-width: 420px;
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(217,189,148,0.14);
}
.inline-dossier-img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.2);
  cursor: zoom-in;
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.inline-dossier-img:hover { transform: translateY(-2px); }

.inline-dossier-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  color: rgba(217,189,148,0.75);
  font-size: 0.85rem;
}
.inline-dossier-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(217,189,148,0.22);
  border-top-color: rgba(217,189,148,0.75);
  animation: inlineDossierSpin 0.9s linear infinite;
}
@keyframes inlineDossierSpin { to { transform: rotate(360deg); } }
.inline-dossier-retry {
  margin-top: 6px;
  padding: 6px 14px;
  background: rgba(217,189,148,0.15);
  border: 1px solid rgba(217,189,148,0.35);
  color: inherit;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}
.inline-dossier-retry:hover { background: rgba(217,189,148,0.25); }

.inline-dossier-actions {
  display: flex;
  justify-content: center;
}
.inline-dossier-save {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.92rem;
}
.inline-dossier-save svg { flex-shrink: 0; }

@media (max-width: 640px) {
  .inline-dossier { padding: 18px 16px 16px; }
  .inline-dossier-frame { max-width: 100%; padding: 8px; }
  .inline-dossier-img { max-width: 100%; }
}

/* Light theme: warmer kraft-paper feel */
[data-theme="light"] .inline-dossier {
  background:
    linear-gradient(180deg, rgba(166,124,82,0.08) 0%, rgba(166,124,82,0.03) 100%),
    rgba(252,247,240,0.6);
  border-color: rgba(166,124,82,0.28);
}
[data-theme="light"] .inline-dossier-title {
  border-bottom-color: rgba(166,124,82,0.32) !important;
}
[data-theme="light"] .inline-dossier-hint {
  color: rgba(120,85,50,0.78) !important;
}
[data-theme="light"] .inline-dossier-skeleton {
  color: rgba(120,85,50,0.7);
}
[data-theme="light"] .inline-dossier-spinner {
  border-color: rgba(166,124,82,0.25);
  border-top-color: rgba(120,85,50,0.75);
}
[data-theme="light"] .inline-dossier-frame {
  background: rgba(252,247,240,0.9);
  box-shadow: inset 0 0 0 1px rgba(166,124,82,0.18);
}

/* Depression test — crisis help banner */
.depression-crisis-banner {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35) 0%, rgba(185, 28, 28, 0.2) 100%);
}
.depression-crisis-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fecaca;
  margin-bottom: 10px;
}
.depression-crisis-inner p,
.depression-crisis-inner li {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.depression-crisis-inner ul {
  margin: 10px 0 10px 1.1rem;
  padding: 0;
}
.depression-crisis-note {
  font-size: 0.82rem !important;
  color: #fca5a5 !important;
  margin-top: 8px;
}
[data-theme="light"] .depression-crisis-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border-color: rgba(220, 38, 38, 0.35);
}
[data-theme="light"] .depression-crisis-title {
  color: #b91c1c;
}

.page-zuiying .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.zuiying-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.zuiying-tip-title { font-weight: 800; margin-bottom: 8px; color: #475569; }
.zuiying-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.zuiying-tip-links a { color: var(--accent-orange); }

.page-pofang .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.pofang-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.28);
}
.pofang-tip-title { font-weight: 800; margin-bottom: 8px; color: #dc2626; }
.pofang-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.pofang-tip-links a { color: var(--accent-orange); }

.page-tuoyan .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.tuoyan-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.28);
}
.tuoyan-tip-title { font-weight: 800; margin-bottom: 8px; color: #7c3aed; }
.tuoyan-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.tuoyan-tip-links a { color: var(--accent-orange); }

.page-aimei .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.aimei-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.28);
}
.aimei-tip-title { font-weight: 800; margin-bottom: 8px; color: #d63384; }
.aimei-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.aimei-tip-links a { color: var(--accent-orange); }

.page-pyq .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.pyq-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
}
.pyq-tip-title { font-weight: 800; margin-bottom: 8px; color: #16a34a; }
.pyq-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.pyq-tip-links a { color: var(--accent-orange); }

.page-bingzhong .result-img {
  width: min(100%, 400px);
  max-width: min(100%, 400px);
  max-height: none;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.bingzhong-tip-banner {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
}
.bingzhong-tip-title { font-weight: 800; margin-bottom: 8px; color: #0d9488; }
.bingzhong-tip-inner p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 8px; }
.bingzhong-tip-links a { color: var(--accent-orange); }


/* ============================================
   PORTAL HOME  (testwhat.com 首页专属)
   ============================================ */

/* ── Hero ── */
.portal-hero {
  padding: 140px 0 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 120%; height: 120%;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(129,140,248,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 70%, rgba(96,165,250,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(244,114,182,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.portal-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.portal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 18px;
  margin-bottom: 24px;
}
.portal-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.portal-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.9;
}
.portal-cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.portal-stats {
  display: flex;
  gap: 0;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pstat { flex: 1; padding: 18px 0; text-align: center; border-right: 1px solid var(--border); }
.pstat:last-child { border-right: none; }
.pstat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-main);
  line-height: 1;
}
.pstat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }
.portal-hero-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 16px;
  letter-spacing: 0.02em;
}

/* ── Trust Bar ── */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 18px 24px;
  overflow: hidden;
}
.trust-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 20px;
  white-space: nowrap;
}
.trust-icon { font-size: 0.95rem; flex-shrink: 0; }
.trust-sep {
  color: var(--border);
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}
[data-theme="light"] .trust-bar { background: rgba(99,102,241,0.03); }

/* ── Report Preview ── */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  transition: border-color 0.2s;
}
.preview-card:hover { border-color: rgba(129,140,248,0.28); }
.preview-label {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-main);
  margin-bottom: 16px;
}
.preview-mock {
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 20px 16px;
  margin-bottom: 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mock-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-main);
  letter-spacing: 0.05em;
}
.mock-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.mock-dims { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mock-dim { display: flex; align-items: center; gap: 8px; }
.mock-dim-label { font-size: 0.65rem; color: var(--text-muted); width: 46px; text-align: right; flex-shrink: 0; }
.mock-dim-bar { flex: 1; height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.mock-dim-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--cat-science), #a78bfa); }
.mock-share-emoji { font-size: 2rem; }
.mock-share-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.mock-share-tag { font-size: 0.75rem; color: var(--text-secondary); }
.mock-share-rank { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); margin-top: 6px; }
.mock-dossier-header {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.mock-dossier-code {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-main);
  letter-spacing: 0.1em;
}
.mock-dossier-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.mock-dossier-bar {
  width: 80px;
  height: 2px;
  background: var(--border);
  margin: 8px auto;
}
.mock-dossier-stamp {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(244,114,182,0.5);
  border: 1px solid rgba(244,114,182,0.3);
  padding: 2px 8px;
  border-radius: 3px;
  transform: rotate(-5deg);
}
.preview-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; }

/* ── Section layout ── */
.portal-section { padding: 88px 0; }
.portal-section-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.portal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 44px;
}
.portal-section-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}
.portal-section-head h2 .dot { color: var(--accent-main); }
.portal-more {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}
.portal-more:hover { color: var(--accent-main); }
.portal-divider {
  max-width: 1120px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Category groups ── */
.cat-group { margin-bottom: 64px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-group-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-group-badge-science { background: rgba(129,140,248,0.12); color: var(--cat-science); border: 1px solid rgba(129,140,248,0.2); }
.cat-group-badge-relation { background: rgba(244,114,182,0.12); color: var(--cat-relation); border: 1px solid rgba(244,114,182,0.2); }
.cat-group-badge-career { background: rgba(96,165,250,0.12); color: var(--cat-career); border: 1px solid rgba(96,165,250,0.2); }
.cat-group-badge-emotion { background: rgba(52,211,153,0.12); color: var(--cat-emotion); border: 1px solid rgba(52,211,153,0.2); }
.cat-group-badge-internet { background: rgba(251,146,60,0.12); color: var(--cat-internet); border: 1px solid rgba(251,146,60,0.2); }
.cat-group-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Tests Grid ── */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 16px;
}
.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.test-card:hover {
  border-color: rgba(129,140,248,0.22);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}
.test-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.25s;
}
.test-card:hover::before { opacity: 1; }

/* Category-based top stripe */
.cat-group-science .test-card::before { background: linear-gradient(90deg, var(--cat-science), #a78bfa); }
.cat-group-relation .test-card::before { background: linear-gradient(90deg, var(--cat-relation), #fb7185); }
.cat-group-career .test-card::before { background: linear-gradient(90deg, var(--cat-career), #38bdf8); }
.cat-group-emotion .test-card::before { background: linear-gradient(90deg, var(--cat-emotion), #4ade80); }
.cat-group-internet .test-card::before { background: linear-gradient(90deg, var(--cat-internet), #f97316); }

.tc-chip {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 10px;
}
.tc-chip-hot { background: rgba(251,113,133,0.15); color: #fb7185; }
.tc-chip-new { background: rgba(52,211,153,0.15); color: #34d399; }
.tc-chip-scale { background: rgba(129,140,248,0.13); color: var(--cat-science); }
.tc-emoji { font-size: 1.6rem; margin-bottom: 12px; display: block; }
.tc-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.tc-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 7px; }
.tc-desc { font-size: 0.79rem; color: var(--text-secondary); line-height: 1.72; margin-bottom: 14px; }
.tc-meta { display: flex; gap: 12px; font-size: 0.68rem; color: var(--text-muted); }
.tc-arrow {
  position: absolute;
  right: 16px; bottom: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.25s;
  font-size: 0.85rem;
}
.test-card:hover .tc-arrow { background: rgba(129,140,248,0.12); color: var(--accent-main); }

/* ── Rankings ── */
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.rank-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.rank-meta { font-size: 0.67rem; color: var(--text-muted); margin-bottom: 12px; font-family: var(--font-mono); }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, background 0.15s;
  border-radius: 8px;
}
.rank-row:hover { transform: translateX(2px); background: rgba(129,140,248,0.05); }
.rank-row:last-child { border-bottom: none; }
.rank-row.top3 .rank-name { font-weight: 800; color: var(--text-primary); }
.rank-row.low2 { opacity: 0.78; }
.rank-pos { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; width: 22px; text-align: center; flex-shrink: 0; }
.rank-pos.g { color: #facc15; }
.rank-pos.s { color: #94a3b8; }
.rank-pos.b { color: #fb923c; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 0.67rem; color: var(--text-muted); margin-top: 2px; }
.rank-bar-wrap { width: 100px; height: 4px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.rank-bar { height: 100%; border-radius: 3px; }
.rank-pct { font-family: var(--font-mono); font-size: 0.67rem; color: var(--text-muted); width: 36px; text-align: right; flex-shrink: 0; }
.rank-loading { font-size: 0.82rem; color: var(--text-muted); padding: 24px 0; text-align: center; }
.rank-skeleton .rank-row { pointer-events: none; }
.rank-skeleton .rank-pos,
.rank-skeleton .sk-name,
.rank-skeleton .sk-bar,
.rank-skeleton .sk-pct {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: rankShimmer 1.15s infinite;
  border-radius: 6px;
  color: transparent;
}
.rank-skeleton .rank-pos { width: 22px; height: 14px; }
.rank-skeleton .sk-name { width: 110px; height: 12px; }
.rank-skeleton .sk-bar { width: 100px; height: 4px; }
.rank-skeleton .sk-pct { width: 32px; height: 12px; }
@keyframes rankShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Activity + Feed ── */
.activity-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.feed-card, .side-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feed-card h3, .side-card h3 { font-size: 0.92rem; font-weight: 700; margin-bottom: 18px; }
.feed-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.feed-row:last-child { border-bottom: none; }
.feed-row-loading .feed-text { color: var(--text-muted); }
a.feed-row-link { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-decoration: none; color: inherit; }
a.feed-row-link:hover .ftype { color: var(--accent-main); }
.feed-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.feed-body { flex: 1; }
.feed-text { font-size: 0.79rem; line-height: 1.65; color: var(--text-secondary); }
.feed-text strong { color: var(--accent-main); font-weight: 600; }
.feed-text .ftype { color: var(--accent-blue); font-weight: 600; }
.feed-time { font-size: 0.63rem; color: var(--text-muted); margin-top: 3px; }
.notice-item { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.notice-item:last-child { border-bottom: none; }
.notice-item a { color: var(--text-secondary); text-decoration: none; font-size: 0.79rem; transition: color 0.2s; }
.notice-item a:hover { color: var(--accent-main); }
.notice-tag { font-size: 0.6rem; color: var(--accent-main); font-family: var(--font-mono); margin-right: 6px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag-pill {
  background: rgba(129,140,248,0.08);
  color: var(--accent-main);
  border: 1px solid rgba(129,140,248,0.15);
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 0.71rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.tag-pill:hover { background: rgba(129,140,248,0.15); color: var(--text-primary); }

/* ── SEO / Guide ── */
.portal-seo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 22px;
  align-items: start;
}
.portal-seo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.portal-seo-card h3 { font-family: var(--font-display); font-size: 1.06rem; margin-bottom: 12px; }
.portal-seo-card p { color: var(--text-secondary); font-size: 0.89rem; line-height: 1.85; margin-bottom: 14px; }
.portal-seo-card p:last-child { margin-bottom: 0; }
.portal-seo-list { display: grid; gap: 11px; margin-top: 4px; }
.portal-seo-list a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.55;
  transition: all 0.2s;
  font-size: 0.88rem;
}
.portal-seo-list a:hover { color: var(--text-primary); border-color: rgba(129,140,248,0.25); background: rgba(129,140,248,0.05); }

/* ── SBTI Tools ── */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.tool-card:hover { border-color: rgba(129,140,248,0.2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-icon { font-size: 1.8rem; margin-bottom: 12px; }
.tool-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.tool-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.65; }

/* ── FAQ ── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open],
.faq-item:hover { border-color: rgba(129,140,248,0.22); }
.faq-q {
  font-size: 0.93rem;
  font-weight: 700;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 22px 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.85;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* ── Footer ── */
.portal-footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 36px;
  margin-top: 60px;
}
.pf-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.pf-brand .logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 12px;
}
.pf-brand .logo .mark { color: var(--accent-main); }
.pf-brand p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.85; max-width: 280px; }
.pf-col h4 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.pf-col a { display: block; font-size: 0.79rem; color: var(--text-secondary); text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.pf-col a:hover { color: var(--accent-main); }
.pf-muted { color: var(--text-muted); opacity: 0.7; }
.pf-bottom {
  max-width: 1120px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  font-size: 0.67rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .preview-grid { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: 1fr; }
  .portal-seo-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-inner { grid-template-columns: 1fr 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .trust-item { padding: 4px 12px; font-size: 0.74rem; }
  .trust-sep { display: none; }
}
@media (max-width: 640px) {
  .tests-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .pf-inner { grid-template-columns: 1fr; }
  .portal-stats { flex-direction: column; }
  .pstat { border-right: none; border-bottom: 1px solid var(--border); }
  .pstat:last-child { border-bottom: none; }
  .portal-cta-row { flex-direction: column; align-items: center; }
  .trust-bar-inner { flex-direction: column; gap: 6px; align-items: flex-start; padding: 0 4px; }
  .trust-sep { display: none; }
  .trust-item { padding: 2px 0; font-size: 0.76rem; }
}

/* ── Light theme overrides ── */
[data-theme="light"] .tag-pill { background: rgba(99,102,241,0.07); border-color: rgba(99,102,241,0.18); }
[data-theme="light"] .rank-row:hover { background: rgba(99,102,241,0.06); }
[data-theme="light"] .rank-skeleton .rank-pos,
[data-theme="light"] .rank-skeleton .sk-name,
[data-theme="light"] .rank-skeleton .sk-bar,
[data-theme="light"] .rank-skeleton .sk-pct {
  background: linear-gradient(90deg, rgba(71,85,105,0.08) 25%, rgba(71,85,105,0.15) 50%, rgba(71,85,105,0.08) 75%);
  background-size: 200% 100%;
}
[data-theme="light"] .trust-bar { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .faq-item { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .faq-item[open],
[data-theme="light"] .faq-item:hover { border-color: rgba(99,102,241,0.25); }
[data-theme="light"] .mock-dim-bar { background: rgba(0,0,0,0.06); }
[data-theme="light"] .preview-mock { background: rgba(99,102,241,0.04); border-color: rgba(0,0,0,0.07); }


/* ============================================
   PORTAL SEARCH
   ============================================ */

/* ── Hero 搜索框 ── */
.hero-search-wrap {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto 40px;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search:focus-within {
  border-color: rgba(129,140,248,0.5);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.1);
}
.hero-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 10px;
}
.hero-search input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 8px 0;
  min-width: 0;
  -webkit-appearance: none;
}
.hero-search input[type="search"]::placeholder { color: var(--text-muted); }
.hero-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.hero-search-btn {
  flex-shrink: 0;
  background: var(--accent-main);
  color: #fff;
  border: none;
  border-radius: calc(var(--radius-xl) - 6px);
  padding: 9px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.hero-search-btn:hover { background: #8b6cf0; transform: scale(1.02); }

/* ── 建议下拉面板（Hero & Nav 共用） ── */
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(129,140,248,0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 2000;
  overflow: hidden;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.suggest-item:last-of-type { border-bottom: none; }
.suggest-item:hover { background: rgba(129,140,248,0.07); }
.suggest-emoji { font-size: 1.15rem; flex-shrink: 0; }
.suggest-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.suggest-name { font-size: 0.88rem; font-weight: 600; }
.suggest-name mark { background: rgba(167,139,250,0.3); color: inherit; border-radius: 3px; padding: 0 1px; }
.suggest-cat { font-size: 0.68rem; color: var(--text-muted); }
.suggest-more {
  display: block;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--accent-main);
  text-decoration: none;
  background: rgba(129,140,248,0.05);
  text-align: center;
  transition: background 0.15s;
  border-top: 1px solid rgba(129,140,248,0.1);
}
.suggest-more:hover { background: rgba(129,140,248,0.12); }
.suggest-empty {
  padding: 14px 16px;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-align: center;
}
.suggest-empty a { color: var(--accent-main); }

/* ── 导航栏搜索图标 ── */
.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 7px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.nav-search-btn:hover { color: var(--accent-main); background: rgba(129,140,248,0.08); }

/* Language switcher pill in nav (more prominent: flag + gradient on hover) */
.nav-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(129,140,248,0.55);
  background: rgba(129,140,248,0.06);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-main) !important;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-lang-btn:hover {
  color: #fff !important;
  border-color: transparent;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  text-decoration: none;
  transform: translateY(-1px);
}

/* 导航搜索浮层（桌面） */
.nav-search-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 70px;
  width: 400px;
  background: var(--bg-elevated);
  border: 1px solid rgba(129,140,248,0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 12px;
  z-index: 2001;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.nav-search-popover.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  transition: border-color 0.2s;
}
.nav-search-form:focus-within { border-color: rgba(129,140,248,0.5); }
.nav-search-form input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  padding: 4px 0;
  -webkit-appearance: none;
}
.nav-search-form input[type="search"]::placeholder { color: var(--text-muted); }
.nav-search-form input[type="search"]::-webkit-search-cancel-button { display: none; }
.nav-search-popover .search-suggest {
  position: static;
  border: none;
  background: transparent;
  box-shadow: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
  border-radius: 0;
}
.nav-search-popover .suggest-item { border-radius: 8px; }

/* ── 搜索结果页 ── */
.search-hero {
  padding: 100px 0 40px;
  text-align: center;
}
.search-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin-bottom: 6px; }
.search-hero .search-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 28px; }
.search-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  min-height: 1.2em;
}
.search-count strong { color: var(--accent-main); }
.search-results { padding-bottom: 80px; }
.search-group { margin-bottom: 56px; }
.search-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.search-group-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
}
/* 空结果 */
.search-empty-msg {
  text-align: center;
  padding: 60px 24px;
}
.search-empty-msg p { color: var(--text-secondary); margin-bottom: 28px; line-height: 1.9; }
.search-empty-msg h3 { font-size: 1rem; margin-bottom: 20px; color: var(--text-muted); }
/* 无查询时的分类卡 */
.search-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.search-browse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}
.search-browse-card:hover { border-color: rgba(129,140,248,0.25); transform: translateY(-2px); }
.search-browse-icon { font-size: 1.8rem; margin-bottom: 10px; }
.search-browse-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.search-browse-count { font-size: 0.72rem; color: var(--text-muted); }
/* mark in result cards */
.test-card mark { background: rgba(167,139,250,0.25); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ── Light theme ── */
[data-theme="light"] .hero-search { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .hero-search:focus-within { border-color: rgba(99,102,241,0.4); box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }
[data-theme="light"] .hero-search input { color: #1e1b4b; }
[data-theme="light"] .search-suggest { background: #fff; border-color: rgba(99,102,241,0.15); }
[data-theme="light"] .suggest-item:hover { background: rgba(99,102,241,0.05); }
[data-theme="light"] .nav-search-popover { background: #fff; border-color: rgba(99,102,241,0.15); }
[data-theme="light"] .nav-search-form { background: #f8f8ff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .nav-search-form input { color: #1e1b4b; }
[data-theme="light"] .suggest-name mark { background: rgba(99,102,241,0.18); }
[data-theme="light"] .test-card mark { background: rgba(99,102,241,0.15); }
[data-theme="light"] .search-browse-card { background: #fff; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero-search-wrap { width: 100%; }
  .hero-search-btn { padding: 9px 14px; font-size: 0.82rem; }
  .nav-search-popover { right: 12px; left: 12px; width: auto; }
}

/* ───────────────── Result page trust strip (rarity + today active) ───────────────── */
.result-trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 6px;
  padding: 0 16px;
  max-width: 520px;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.trust-chip-icon { font-size: 0.82rem; line-height: 1; }
.trust-chip-rare {
  background: linear-gradient(135deg, rgba(251,191,36,0.16), rgba(167,139,250,0.16));
  border-color: rgba(251,191,36,0.3);
}
.trust-chip-today {
  background: rgba(251,113,133,0.14);
  border-color: rgba(251,113,133,0.28);
}
[data-theme="light"] .trust-chip {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
  color: #1e1b4b;
}
[data-theme="light"] .trust-chip-rare {
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(99,102,241,0.14));
  border-color: rgba(251,191,36,0.36);
}
[data-theme="light"] .trust-chip-today {
  background: rgba(251,113,133,0.12);
  border-color: rgba(251,113,133,0.3);
}
@media (max-width: 480px) {
  .trust-chip { font-size: 0.7rem; padding: 4px 10px; }
}

/* ───────────────── DNA snippet card (cross-test interpretation) ───────────────── */
.dna-snippet-block { }
.dna-snippet-card {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(96,165,250,0.08));
  border: 1px solid rgba(167,139,250,0.18);
  border-radius: 18px;
  padding: 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dna-snippet-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #60a5fa, #f472b6);
}
.dna-snippet-combo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.dna-snippet-plus {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 300;
}
.dna-snippet-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.dna-snippet-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 auto 16px;
  max-width: 540px;
  text-align: left;
}
.dna-snippet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 100px;
  background: rgba(167,139,250,0.18);
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  border: 1px solid rgba(167,139,250,0.28);
  transition: background 0.2s, transform 0.15s;
}
.dna-snippet-link:hover {
  background: rgba(167,139,250,0.28);
  transform: translateY(-1px);
}
[data-theme="light"] .dna-snippet-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(59,130,246,0.06));
  border-color: rgba(99,102,241,0.2);
}
[data-theme="light"] .dna-snippet-title { color: #1e1b4b; }
[data-theme="light"] .dna-snippet-link {
  color: #6366f1;
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.3);
}
[data-theme="light"] .dna-snippet-link:hover { background: rgba(99,102,241,0.22); }

/* ============================================================
   P1 · 5 大核心测试结果页深度内容（big5 / enneagram / holland /
   attachment / burnout 的 xxxFull 区块共用样式）
   ============================================================ */

/* Big5 行式深度解读 */
.big5-rows { display: flex; flex-direction: column; gap: 14px; }
.big5-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 16px;
}
.big5-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.big5-row-name { font-weight: 700; font-size: 0.94rem; }
.big5-row-tag { font-size: 0.72rem; padding: 3px 9px; border-radius: 100px; font-weight: 600; }
.big5-row-desc { font-size: 0.84rem; color: var(--text-secondary); margin: 0; line-height: 1.65; }

.big5-famous { display: flex; flex-wrap: wrap; gap: 8px; }
.big5-famous-chip {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid;
  background: rgba(255,255,255,0.03);
  font-weight: 500;
}

.big5-apps { display: flex; flex-direction: column; gap: 12px; }
.big5-app-item {
  display: flex; gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 14px;
}
.big5-app-icon { font-size: 1.5rem; line-height: 1.2; flex-shrink: 0; }
.big5-app-item strong { display: block; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 4px; }
.big5-app-item p { margin: 0; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

[data-theme="light"] .big5-row,
[data-theme="light"] .big5-app-item { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }
[data-theme="light"] .big5-famous-chip { background: rgba(255,255,255,0.6); }

/* Enneagram 翼型 + 整合/解离 + 兼容性 */
.enn-wings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.enn-wing {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 13px 15px;
}
.enn-wing-head { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; letter-spacing: 0.5px; }
.enn-wing-title { font-size: 0.96rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.enn-wing-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

.enn-arrows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.enn-arrow {
  border-radius: 12px;
  padding: 13px 15px;
  border: 1px solid;
}
.enn-arrow-growth { background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.22); }
.enn-arrow-stress { background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.22); }
.enn-arrow-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 5px; }
.enn-arrow-growth .enn-arrow-label { color: #34d399; }
.enn-arrow-stress .enn-arrow-label { color: #f87171; }
.enn-arrow-target { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.enn-arrow-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

.enn-compat-grid { display: flex; flex-direction: column; gap: 8px; }
.enn-compat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
}
.enn-compat-target { font-weight: 700; font-size: 0.86rem; min-width: 110px; color: var(--text-primary); }
.enn-compat-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.enn-compat-bar-fill { height: 100%; border-radius: 4px; transition: width 0.7s ease; }
.enn-compat-pct { font-size: 0.76rem; font-weight: 700; min-width: 36px; text-align: right; }
.enn-compat-hint { font-size: 0.72rem; color: var(--text-muted); margin-left: 8px; }

[data-theme="light"] .enn-wing,
[data-theme="light"] .enn-compat-row { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }

/* Holland 全字母解读 + 职业列表 */
.holland-letters { display: flex; flex-direction: column; gap: 10px; }
.holland-letter-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.holland-letter-row.is-top { border-width: 1.5px; }
.holland-letter-badge {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}
.holland-letter-body { flex: 1; min-width: 0; }
.holland-letter-name { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 3px; }
.holland-letter-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.holland-letter-score { font-weight: 800; font-size: 0.95rem; flex-shrink: 0; }

.holland-blocks { display: grid; grid-template-columns: 1fr; gap: 12px; }
.holland-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 16px;
}
.holland-block-title { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.holland-block-items { display: flex; flex-wrap: wrap; gap: 7px; }
.holland-chip {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}
.holland-block-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; margin: 0; }

[data-theme="light"] .holland-letter-row,
[data-theme="light"] .holland-block { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }
[data-theme="light"] .holland-chip { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.18); color: #4338ca; }

/* Attachment 4×4 关系预测矩阵 */
.att-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.att-matrix {
  width: 100%;
  min-width: 460px;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 0.78rem;
}
.att-matrix th, .att-matrix td {
  padding: 9px 8px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
}
.att-matrix thead th {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}
.att-matrix tbody th {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  text-align: left;
  padding-left: 12px;
  font-size: 0.78rem;
}
.att-cell { color: #fff; line-height: 1.35; }
.att-cell-self { outline: 2px solid #fde047; outline-offset: -1px; }
.att-cell-pct { font-size: 0.7rem; opacity: 0.85; font-weight: 700; margin-top: 2px; }
.att-cell-hint { font-size: 0.68rem; opacity: 0.9; font-weight: 500; }

.att-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 0.72rem; color: var(--text-muted); }
.att-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.att-legend-sq { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

[data-theme="light"] .att-matrix thead th,
[data-theme="light"] .att-matrix tbody th { background: rgba(99,102,241,0.06); color: #4338ca; }

/* Burnout 阶段进度 + 预警 + 7 天复原计划 */
.burn-stages {
  display: flex; align-items: stretch; gap: 4px;
  margin-bottom: 14px;
  position: relative;
}
.burn-stage {
  flex: 1;
  padding: 12px 8px 11px;
  border-radius: 9px;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.3s;
  position: relative;
}
.burn-stage.is-passed { opacity: 0.55; }
.burn-stage.is-current { box-shadow: 0 0 0 2px currentColor inset; }
.burn-stage-num { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 3px; opacity: 0.7; }
.burn-stage-name { font-size: 0.82rem; font-weight: 700; line-height: 1.2; }
.burn-stage-score { font-size: 0.7rem; font-weight: 500; margin-top: 3px; opacity: 0.7; }

.burn-warning {
  background: linear-gradient(135deg, rgba(251,146,60,0.1), rgba(248,113,113,0.08));
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; gap: 12px;
}
.burn-warning-icon { font-size: 1.5rem; flex-shrink: 0; }
.burn-warning strong { display: block; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 5px; }
.burn-warning p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.burn-warning.is-safe {
  background: linear-gradient(135deg, rgba(52,211,153,0.1), rgba(96,165,250,0.08));
  border-color: rgba(52,211,153,0.25);
}

.burn-plan { display: flex; flex-direction: column; gap: 8px; }
.burn-plan-day {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.burn-plan-day-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(96,165,250,0.18);
  color: #60a5fa;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.burn-plan-day-body { flex: 1; }
.burn-plan-day-title { font-weight: 700; font-size: 0.86rem; color: var(--text-primary); margin-bottom: 3px; }
.burn-plan-day-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }

[data-theme="light"] .burn-stage,
[data-theme="light"] .burn-plan-day { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }

@media (max-width: 560px) {
  .enn-wings, .enn-arrows { grid-template-columns: 1fr; }
  .burn-stages { gap: 3px; }
  .burn-stage { padding: 9px 4px 8px; }
  .burn-stage-name { font-size: 0.72rem; }
}

/* ============================================================
   Attachment — 关系急救包 / 角色 / 全景档案 / 历史变化
   ============================================================ */

/* 急救包卡片 */
.att-sc-grid { display: grid; gap: 14px; }
.att-sc-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px 18px 14px;
}
.att-sc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.att-sc-emoji { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.att-sc-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.att-sc-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 0.86rem;
  line-height: 1.7;
}
.att-sc-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
  white-space: nowrap;
}
.att-sc-gut .att-sc-content { color: var(--text-muted); font-style: italic; }
.att-sc-say .att-sc-saytext {
  color: var(--text-primary);
  font-weight: 500;
  background: rgba(167,139,250,0.07);
  border-left: 3px solid rgba(167,139,250,0.4);
  padding: 8px 12px;
  border-radius: 6px;
  flex: 1;
}
.att-sc-tip {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 6px 0 10px;
}
.att-sc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.att-sc-copy {
  appearance: none;
  border: 1px solid rgba(167,139,250,0.35);
  background: rgba(167,139,250,0.1);
  color: var(--text-primary);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.att-sc-copy:hover { background: rgba(167,139,250,0.18); transform: translateY(-1px); }
.att-sc-copy:active { transform: translateY(0); }

[data-theme="light"] .att-sc-card { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.13); }
[data-theme="light"] .att-sc-say .att-sc-saytext { background: rgba(99,102,241,0.06); border-left-color: rgba(99,102,241,0.5); }
[data-theme="light"] .att-sc-copy { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.3); }

/* 角色对照卡 */
.att-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.att-char-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 16px;
}
.att-char-name { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; line-height: 1.4; }
.att-char-work { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.att-char-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid;
  margin-bottom: 8px;
}
.att-char-why { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
[data-theme="light"] .att-char-card { background: rgba(99,102,241,0.04); }

/* 关系全景档案卡 */
.att-cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.att-cluster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.18s ease;
}
.att-cluster-card:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
  border-color: rgba(167,139,250,0.4);
}
.att-cluster-card.is-done {
  opacity: 0.6;
  background: rgba(52,211,153,0.04);
  border-color: rgba(52,211,153,0.2);
}
.att-cluster-emoji { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.att-cluster-body { flex: 1; min-width: 0; }
.att-cluster-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.att-cluster-done {
  font-size: 0.7rem;
  color: #34d399;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.att-cluster-reason { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; }

[data-theme="light"] .att-cluster-card { background: rgba(99,102,241,0.04); }
[data-theme="light"] .att-cluster-card:hover { background: rgba(99,102,241,0.08); }

/* 历史变化 timeline */
.att-hist-list {
  position: relative;
  padding-left: 6px;
}
.att-hist-list::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}
.att-hist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.att-hist-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  border: 3px solid var(--bg-primary, #14121e);
}
.att-hist-latest .att-hist-dot {
  box-shadow: 0 0 0 4px rgba(167,139,250,0.2);
}
.att-hist-info { flex: 1; min-width: 0; }
.att-hist-code { font-weight: 700; font-size: 0.96rem; }
.att-hist-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

[data-theme="light"] .att-hist-list::before { background: rgba(0,0,0,0.1); }
[data-theme="light"] .att-hist-dot { border-color: #fff; }

/* ============================================================
   Engine modules — resume banner, hero preview,
   invite-script modal, pending challenge reminder
   ============================================================ */

/* Resume / pending banners shared style */
.qe-resume-banner,
.qe-pending-challenge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 12px 0 22px;
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(96,165,250,0.10));
  border: 1px solid rgba(167,139,250,0.28);
  border-radius: 14px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.qe-pending-challenge {
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,113,133,0.10));
  border-color: rgba(251,191,36,0.32);
}
.qe-resume-icon, .qe-pending-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.qe-resume-text, .qe-pending-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.qe-resume-text strong, .qe-pending-text strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
}
.qe-resume-text span, .qe-pending-text span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.qe-resume-actions, .qe-pending-actions { display: flex; gap: 8px; flex-shrink: 0; }
.qe-resume-btn, .qe-pending-btn {
  appearance: none;
  border: 1px solid rgba(167,139,250,0.35);
  background: rgba(167,139,250,0.12);
  color: var(--text-primary);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.qe-resume-continue, .qe-pending-resend {
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  color: #fff;
  border: none;
}
.qe-resume-continue:hover, .qe-pending-resend:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(167,139,250,0.3); }
.qe-resume-restart:hover, .qe-pending-dismiss:hover { background: rgba(167,139,250,0.22); }
.qe-pending-dismiss {
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}
[data-theme="light"] .qe-resume-banner,
[data-theme="light"] .qe-pending-challenge { background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(96,165,250,0.06)); border-color: rgba(99,102,241,0.22); }
[data-theme="light"] .qe-pending-challenge { background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,113,133,0.08)); border-color: rgba(251,191,36,0.3); }

/* Hero first-question preview */
.qe-hero-preview {
  max-width: 640px;
  margin: 26px auto 0;
  padding: 18px 22px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  text-align: left;
}
.qe-hero-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 600;
}
.qe-hero-preview-kicker { color: rgba(167,139,250,0.95); }
.qe-hero-preview-q {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 14px;
}
.qe-hero-preview-opts {
  display: grid;
  gap: 8px;
}
.qe-hero-preview-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}
.qe-hero-preview-opt:hover {
  background: rgba(167,139,250,0.1);
  border-color: rgba(167,139,250,0.4);
  transform: translateX(2px);
}
.qe-hero-preview-letter {
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(167,139,250,0.18);
  color: #a78bfa;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.qe-hero-preview-label { flex: 1; line-height: 1.5; }
.qe-hero-preview-foot {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}
[data-theme="light"] .qe-hero-preview { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }
[data-theme="light"] .qe-hero-preview-opt { background: rgba(255,255,255,0.65); border-color: rgba(99,102,241,0.15); }
[data-theme="light"] .qe-hero-preview-opt:hover { background: rgba(99,102,241,0.08); }

/* Invite-script modal */
.qe-invite-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
  animation: qeFadeIn 0.2s ease;
}
@keyframes qeFadeIn { from { opacity: 0; } to { opacity: 1; } }
.qe-invite-card {
  background: var(--bg-primary, #1a1828);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 24px 24px 18px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.qe-invite-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  appearance: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.qe-invite-close:hover { background: rgba(255,255,255,0.1); }
.qe-invite-head { margin-bottom: 16px; padding-right: 30px; }
.qe-invite-title { font-size: 1.06rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.qe-invite-sub { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.qe-invite-list { display: grid; gap: 10px; }
.qe-invite-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.qe-invite-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.qe-invite-text {
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.7;
}
.qe-invite-copy {
  justify-self: end;
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  color: #fff;
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.qe-invite-copy:hover { transform: scale(1.04); }
.qe-invite-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.qe-invite-rawcopy {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-secondary);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.qe-invite-rawcopy:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.qe-invite-link {
  font-size: 0.82rem;
  color: rgba(167,139,250,0.95);
  text-decoration: none;
  font-weight: 600;
}
.qe-invite-link:hover { color: #a78bfa; }
[data-theme="light"] .qe-invite-card { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 30px 80px rgba(0,0,0,0.15); }
[data-theme="light"] .qe-invite-close { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .qe-invite-item { background: rgba(99,102,241,0.04); border-color: rgba(99,102,241,0.12); }
[data-theme="light"] .qe-invite-rawcopy { border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .qe-invite-foot { border-top-color: rgba(0,0,0,0.08); }

@media (max-width: 560px) {
  .qe-resume-banner, .qe-pending-challenge { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .qe-resume-actions, .qe-pending-actions { width: 100%; justify-content: flex-end; }
  .qe-hero-preview { padding: 16px 16px 14px; margin-top: 22px; }
  .qe-hero-preview-q { font-size: 0.96rem; }
  .att-sc-card { padding: 14px 14px 12px; }
  .att-sc-row { flex-direction: column; gap: 6px; }
  .att-sc-tag { align-self: flex-start; }
  .att-sc-actions { flex-direction: column; }
  .att-sc-copy { width: 100%; }
}

/* Add trust-chip 总人数 chip color */
.trust-chip-total {
  background: rgba(96,165,250,0.14);
  border-color: rgba(96,165,250,0.28);
}
[data-theme="light"] .trust-chip-total {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.22);
}

/* ──────────────── SBTI 历史漂移轨迹 ──────────────── */
.sbti-hist-note { color: rgba(255,255,255,0.78); font-size: 0.95rem; line-height: 1.65; margin: 6px 0 14px; }
.sbti-hist-note b { color: #fbbf24; }
.sbti-hist-tip { color: rgba(255,255,255,0.55); font-size: 0.82rem; margin-top: 10px; }
.sbti-hist-list { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 18px; }
.sbti-hist-list::before {
  content:''; position:absolute; left:6px; top:6px; bottom:6px; width:2px;
  background: linear-gradient(180deg, rgba(251,191,36,0.55), rgba(99,102,241,0.18));
  border-radius:2px;
}
.sbti-hist-item { position:relative; padding: 8px 0 10px 8px; }
.sbti-hist-dot {
  position:absolute; left:-18px; top:14px; width:12px; height:12px;
  border-radius:50%; background: rgba(99,102,241,0.5);
  border: 2px solid rgba(0,0,0,0.4);
}
.sbti-hist-item.is-latest .sbti-hist-dot {
  background: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,0.55);
}
.sbti-hist-code { font-weight: 700; font-size: 0.95rem; color: #fbbf24; }
.sbti-hist-name { color: rgba(255,255,255,0.78); font-size: 0.86rem; margin-top: 2px; }
.sbti-hist-date { color: rgba(255,255,255,0.42); font-size: 0.74rem; margin-top: 3px; }
[data-theme="light"] .sbti-hist-note { color: #1f2937; }
[data-theme="light"] .sbti-hist-tip { color: #6b7280; }
[data-theme="light"] .sbti-hist-name { color: #374151; }
[data-theme="light"] .sbti-hist-date { color: #9ca3af; }
[data-theme="light"] .sbti-hist-list::before {
  background: linear-gradient(180deg, rgba(217,119,6,0.55), rgba(99,102,241,0.22));
}
[data-theme="light"] .sbti-hist-dot {
  background: rgba(99,102,241,0.6); border-color: rgba(255,255,255,0.9);
}
[data-theme="light"] .sbti-hist-item.is-latest .sbti-hist-dot {
  background: #d97706; box-shadow: 0 0 10px rgba(217,119,6,0.45);
}
