:root {
  --sprout: #7CB342;
  --sprout-dark: #558B2F;
  --sprout-deep: #33691E;
  --sprout-light: #AED581;
  --sprout-pale: #DCEDC8;
  --leaf-yellow: #CDDC39;
  --bg: #F5F9EF;
  --bg-warm: #FAFDF7;
  --card: #FFFFFF;
  --text: #2E3B24;
  --text-secondary: #6B7A5C;
  --text-muted: #9AAA8B;
  --border: #DCE8C8;
  --border-light: #E8F0DC;
  --shadow-sm: 0 2px 8px rgba(85, 139, 47, 0.08);
  --shadow-md: 0 4px 20px rgba(85, 139, 47, 0.12);
  --shadow-lg: 0 8px 40px rgba(85, 139, 47, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --nav-h: 54px;
  --content-w: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; background: #fff; color: var(--text); line-height: 1.7; overflow-x: hidden; padding-bottom: 64px; }

h1, h2, h3, h4 { font-family: 'Noto Serif SC', serif; font-weight: 700; line-height: 1.35; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== 顶部导航 ===== */
.quiz-topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(85, 139, 47, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  height: var(--nav-h); display: flex; align-items: center;
  padding: 0 16px; color: #fff;
  max-width: var(--content-w); margin: 0 auto;
}
.quiz-topnav-back {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}
.quiz-topnav-back svg { width: 22px; height: 22px; }
.quiz-topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.quiz-topnav-brand {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: 1px;
}
.quiz-topnav-search {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.quiz-topnav-search:hover { background: rgba(255,255,255,0.28); }
.quiz-topnav-search svg { width: 18px; height: 18px; color: #fff; }
.quiz-topnav-menu {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.quiz-topnav-menu:hover { background: rgba(255,255,255,0.28); }
.quiz-topnav-menu svg { width: 20px; height: 20px; color: #fff; }

/* ===== Hero 封面区 ===== */
.quiz-hero {
  position: relative;
  width: 100%; max-width: var(--content-w); margin: 0 auto;
  overflow: hidden;
}
.quiz-hero-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ===== 封面信息区 ===== */
.quiz-hero-info {
  max-width: var(--content-w); margin: 0 auto;
  padding: 20px 16px 14px;
  background: var(--bg);
}
.quiz-hero-info .quiz-hero-tags { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.quiz-hero-info .quiz-hero-tag {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  background: var(--sprout-pale); color: var(--sprout-dark);
}
.quiz-hero-info .quiz-hero-tag:empty { display: none; }
.quiz-hero-info .quiz-hero-tag.quiz-featured { background: linear-gradient(135deg, #CDDC39, #C0CA33); color: #33691E; }
.quiz-hero-info .quiz-hero-title {
  font-size: 24px; font-weight: 900;
  color: var(--text); text-shadow: none;
  margin: 24px 0; line-height: 1.25;
  text-align: center;
}
.quiz-hero-info-card {
  background: #F8FBF4;
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin: 8px auto 0;
  max-width: 85%;
}
.quiz-hero-card-stats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.quiz-hero-card-stat {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-secondary);
}
.quiz-hero-card-stat svg { width: 14px; height: 14px; color: var(--sprout-dark); opacity: 0.8; }
.quiz-hero-card-features {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 10px 0 0;
  padding: 0;
}
.quiz-hero-card-feature {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.quiz-hero-card-feature .quiz-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--sprout); flex-shrink: 0; opacity: 0.7;
}
.quiz-hero-card-start-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: max-content;
  padding: 6px 20px;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  color: #fff; font-size: 13px; font-weight: 700;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
  transition: transform 0.25s, box-shadow 0.25s;
  margin: 10px auto 0;
}
.quiz-hero-card-start-btn:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(255, 152, 0, 0.25); }
.quiz-hero-card-start-btn svg { width: 16px; height: 16px; }

/* ===== 浮动开始按钮（已弃用，保留选择器兼容旧版） ===== */
.quiz-float-start, .quiz-btn-float { display: none; }

/* ===== 主体容器 ===== */
.quiz-page-body { max-width: 680px; margin: 0 auto; background: var(--bg); }

/* ===== 卡片基础 ===== */
.quiz-card {
  background: none;
  border-radius: 0;
  padding: 25px;
  margin-bottom: 0;
  box-shadow: none;
  border: none;
}
.quiz-card-title {
  font-size: 17px; font-weight: 700; color: var(--sprout-deep);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 2px solid var(--sprout-pale);
}
.quiz-card-title .quiz-icon-wrap {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quiz-card-title .quiz-icon-wrap svg { width: 16px; height: 16px; color: var(--sprout-dark); }

/* ===== 测试介绍 ===== */
.quiz-intro-text p { font-size: 16px; color: var(--text-secondary); line-height: 1.85; margin-bottom: 10px; }
.quiz-intro-text p:last-child { margin-bottom: 0; }
.quiz-intro-text strong { color: var(--sprout-dark); font-weight: 600; }



/* ===== 参考资料（纯文本列表） ===== */
.quiz-ref-list { list-style: none; counter-reset: ref-counter; }
.quiz-ref-list li {
  counter-increment: ref-counter;
  font-size: 14px; color: var(--text-secondary); line-height: 1.85;
  padding: 10px 0 10px 28px; position: relative;
  border-bottom: 1px solid var(--border-light);
}
.quiz-ref-list li:last-child { border-bottom: none; }
.quiz-ref-list li::before {
  content: '[' counter(ref-counter) ']';
  position: absolute; left: 0; top: 10px;
  font-weight: 600; color: var(--sprout-dark);
  font-family: 'Noto Serif SC', serif;
}
.quiz-ref-list li strong { color: var(--text); font-weight: 500; }

/* ===== 测试说明 ===== */
.quiz-notice-box {
  background: none;
  border-radius: 0;
  padding: 0;
  border: none;
}
.quiz-notice-box p { font-size: 14px; color: var(--text-secondary); line-height: 1.85; margin-bottom: 10px; padding-left: 22px; position: relative; }
.quiz-notice-box p:last-child { margin-bottom: 0; }
.quiz-notice-box p::before {
  content: ''; position: absolute; left: 4px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-yellow);
}
.quiz-notice-box strong { color: var(--sprout-dark); }

/* ===== 相关测试（移动端2x2，PC端1x4） ===== */
.quiz-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quiz-related-card {
  border-radius: var(--radius-md); overflow: hidden;
  background: none; border: none;
  box-shadow: none; cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}
.quiz-related-card:hover { transform: translateY(-4px); }
.quiz-related-card .quiz-thumb { width: 100%; height: 100px; overflow: hidden; border-radius: var(--radius-md); }
.quiz-related-card .quiz-info { padding: 10px 12px; }
.quiz-related-card .quiz-info .quiz-t-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.quiz-related-card .quiz-info .quiz-t-meta { font-size: 11px; color: var(--text-muted); }
.quiz-related-card .quiz-info .quiz-t-meta span + span::before,
.quiz-bottom-bar .quiz-bb-info .quiz-s span + span::before {
  content: ' | '; color: var(--text-muted); opacity: 0.6;
}

/* ===== 底部固定操作栏 ===== */
.quiz-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  max-width: var(--content-w); margin: 0 auto;
}
.quiz-bottom-bar .quiz-bb-info { flex: 1; min-width: 0; }
.quiz-bottom-bar .quiz-bb-info .quiz-t { font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-bottom-bar .quiz-bb-info .quiz-s { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.quiz-btn-bottom {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--sprout), var(--sprout-dark));
  color: #fff; font-size: 15px; font-weight: 600;
  padding: 11px 32px; border-radius: 26px;
  box-shadow: 0 3px 12px rgba(85, 139, 47, 0.35);
  white-space: nowrap; flex-shrink: 0;
  transition: transform 0.25s;
}
.quiz-btn-bottom:hover { transform: translateY(-1px); }
.quiz-btn-bottom svg { width: 16px; height: 16px; }

/* ===== Footer ===== */
.quiz-footer {
  background: #4A6B2E;
  color: rgba(255, 255, 255, 0.85);
  padding: 24px 16px calc(14px + env(safe-area-inset-bottom));
  margin-top: 0;
  max-width: var(--content-w); margin-left: auto; margin-right: auto;
}
.quiz-footer-inner { max-width: 100%; }
.quiz-footer-brand {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.quiz-footer-brand svg { width: 28px; height: 28px; }
.quiz-footer-brand span { font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700; color: #fff; }
.quiz-footer-desc { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.quiz-footer-links {
  display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 12px;
}
.quiz-footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.25s; }
.quiz-footer-links a:hover { color: var(--sprout-light); }
.quiz-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
  text-align: center; font-size: 12px; color: rgba(255,255,255,0.45);
}

/* ===== 搜索弹窗 ===== */
.quiz-search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.quiz-search-overlay.quiz-active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.quiz-search-modal {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  width: 90%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.quiz-search-modal form { display: flex; gap: 8px; }
.quiz-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Noto Sans SC', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.quiz-search-input:focus { border-color: var(--sprout); }
.quiz-search-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--sprout), var(--sprout-dark));
  color: #fff; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

/* ===== 汉堡菜单 ===== */
.quiz-nav-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
}
.quiz-nav-overlay.quiz-active { display: block; }
.quiz-nav-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 260px; max-width: 80vw;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.quiz-nav-overlay.quiz-active .quiz-nav-panel {
  transform: translateX(0);
}
.quiz-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.quiz-nav-header span { font-size: 18px; font-weight: 700; color: var(--sprout-deep); font-family: 'Noto Serif SC', serif; }
.quiz-nav-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg); }
.quiz-nav-close svg { width: 18px; height: 18px; color: var(--text-secondary); }
.quiz-nav-links { display: flex; flex-direction: column; gap: 4px; }
.quiz-nav-links a {
  display: block;
  padding: 12px 8px;
  font-size: 15px; color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.quiz-nav-links a:hover { background: var(--bg); color: var(--sprout-dark); }

/* ===== 回到顶部按钮 ===== */
.quiz-back-top {
  position: fixed; bottom: 96px; right: 16px; z-index: 80;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(51, 105, 30, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  cursor: pointer;
}
.quiz-back-top.quiz-show { opacity: 1; visibility: visible; transform: translateY(0); }
.quiz-back-top:hover { background: rgba(51, 105, 30, 1); }
.quiz-back-top svg { width: 22px; height: 22px; color: #fff; }

/* ===== 平板适配 ===== */
@media (min-width: 768px) {
  :root { --content-w: 760px; }
  .quiz-hero-img { aspect-ratio: 16 / 9; }
  .quiz-hero-title { font-size: 28px; }
  .quiz-hero-info { padding: 22px 24px 16px; }
  .quiz-hero-info .quiz-hero-title { font-size: 26px; }
  .quiz-page-body { max-width: 760px; background: var(--bg); }
  .quiz-card { padding: 20px; }
  .quiz-card-title { font-size: 20px; }
  .quiz-intro-text p { font-size: 15px; }
  .quiz-ref-list li { font-size: 15px; }
  .quiz-related-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .quiz-related-card .quiz-thumb { height: 120px; }
  .quiz-related-card .quiz-info .quiz-t-name { font-size: 14px; }
  .quiz-bottom-bar { padding: 12px 24px; }
  .quiz-bottom-bar .quiz-bb-info .quiz-t { font-size: 15px; }
  .quiz-bottom-bar .quiz-bb-info .quiz-s { font-size: 12px; }
  .quiz-btn-bottom { font-size: 16px; padding: 12px 36px; }
  body { padding-bottom: 0; }
  .quiz-bottom-bar { display: none; }
  .quiz-float-start { bottom: -28px; }
  .quiz-btn-float { font-size: 16px; padding: 14px 32px; }
  .quiz-footer { padding: 28px 24px 16px; }
  .quiz-back-top { bottom: 32px; right: 32px; }
}

/* ===== 桌面适配 ===== */
@media (min-width: 1024px) {
  :root { --content-w: 820px; }
  .quiz-hero-img { aspect-ratio: 16 / 9; }
  .quiz-hero-title { font-size: 32px; }
  .quiz-hero-overlay { max-width: 820px; }
  .quiz-hero-info { padding: 24px 24px 18px; }
  .quiz-hero-info .quiz-hero-title { font-size: 28px; }
  .quiz-hero-card-start-btn { font-size: 15px; padding: 10px 24px; }
  .quiz-page-body { max-width: 820px; }
  .quiz-card { padding: 24px; }
}