/* 桌游识图测试 */
body.test-page {
  background: #f5f5f5;
  padding: 16px 0 32px;
}

body.test-page.test-page--result {
  background: #e8e8e8;
}

.test-container.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.test-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 24px 20px;
  box-sizing: border-box;
}

.test-intro-title {
  font-size: 26px;
  color: #333;
  text-align: center;
  margin: 0 0 12px;
}

.test-intro-brief {
  display: none;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0 0 16px;
  text-align: center;
}

.test-intro-back {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

.test-intro-back a {
  color: #667eea;
  text-decoration: none;
}

.test-intro-lead {
  font-size: 15px;
  line-height: 1.7;
  color: #666;
  margin: 0 0 20px;
  text-align: center;
}

.test-rules {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
  background: #f9fafb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.test-rules li {
  margin: 6px 0;
}

.test-btn-primary,
.test-btn-secondary {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s;
}

.test-btn-primary {
  background: var(--site-accent, #f60);
  color: #fff;
}

.test-btn-primary:hover:not(:disabled) {
  background: #e67800;
}

.test-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.test-btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  margin-top: 12px;
}

.test-btn-secondary:hover {
  border-color: var(--site-accent, #f60);
  color: var(--site-accent, #f60);
}

.test-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.test-progress-bar {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  margin-left: 12px;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  background: var(--site-accent, #f60);
  border-radius: 3px;
  transition: width 0.25s ease;
}

.test-image-wrap {
  text-align: center;
  margin: 8px 0 20px;
}

.test-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

.test-question-hint {
  text-align: center;
  font-size: 15px;
  color: #444;
  margin-bottom: 16px;
  font-weight: 500;
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.test-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  background: #fafafa;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
  color: #333;
}

.test-option:hover {
  border-color: #ccc;
  background: #fff;
}

.test-option.is-selected {
  border-color: var(--site-accent, #f60);
  background: #fff8f0;
}

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

/* —— 结果页：截图分享卡片 —— */
.test-result-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 16px 24px;
  box-sizing: border-box;
}

.test-share-hint {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin: 0 0 12px;
}

.test-share-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
  -webkit-user-select: none;
  user-select: none;
}

.test-share-header {
  text-align: center;
  padding: 22px 20px 18px;
  background: linear-gradient(135deg, #ff8c1a 0%, #f60 55%, #e85d00 100%);
  color: #fff;
}

.test-share-brand {
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.92;
  margin-bottom: 6px;
}

.test-share-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.test-share-sub {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.9;
}

.test-share-score-block {
  text-align: center;
  padding: 20px 16px 8px;
}

.test-share-score-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

.test-share-score-line {
  line-height: 1;
  margin-bottom: 10px;
}

.test-share-score-num {
  font-size: 64px;
  font-weight: 800;
  color: var(--site-accent, #f60);
  letter-spacing: -0.02em;
}

.test-share-score-unit {
  font-size: 22px;
  font-weight: 600;
  color: #666;
  margin-left: 4px;
}

.test-share-tier-badge {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #e85d00;
  background: #fff3e6;
  border-radius: 20px;
  border: 1px solid #ffd4a8;
}

.test-share-tier-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 14px;
  padding: 10px 36px 12px;
  max-width: 92%;
  box-sizing: border-box;
}

.test-share-tier-line {
  display: block;
  width: 100%;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.75;
  color: #555;
  text-align: center;
  word-break: keep-all;
}

.test-share-stats-row {
  display: flex;
  align-items: stretch;
  margin: 0 20px 16px;
  background: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
}

.test-share-stat-item {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
}

.test-share-stat-divider {
  width: 1px;
  background: #e8e8e8;
  margin: 10px 0;
}

.test-share-stat-val {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.test-share-stat-item.is-correct .test-share-stat-val {
  color: #2e9e5b;
}

.test-share-stat-item.is-wrong .test-share-stat-val {
  color: #e74c3c;
}

.test-share-stat-name {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.test-share-breakdown-wrap {
  margin: 0 20px 12px;
}

.test-share-breakdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

.test-share-breakdown-toggle__icon {
  font-size: 12px;
  font-weight: 500;
  color: #999;
}

.test-share-breakdown-toggle.is-open {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}

.test-share-breakdown {
  margin: 0;
  padding: 10px 14px 12px;
  background: #fafafa;
  border: 1px solid #eee;
  border-top: none;
  border-radius: 0 0 10px 10px;
  font-size: 13px;
  line-height: 1.85;
  color: #666;
}

.test-share-breakdown[hidden] {
  display: none !important;
}

.test-share-breakdown .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.test-share-breakdown .row span:last-child {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.test-share-qr-block {
  text-align: center;
  padding: 16px 20px 12px;
  border-top: 1px dashed #eee;
  background: linear-gradient(180deg, #fff 0%, #fffbf7 100%);
}

.test-share-qr-canvas,
.test-share-qr-img {
  display: block;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.test-share-qr-tip {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px;
}

.test-share-footer {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  padding: 10px 16px 16px;
  background: #fffbf7;
}

.test-result-actions {
  margin-top: 20px;
  padding: 0 4px;
}

.test-result-actions .test-btn-primary,
.test-result-actions .test-btn-secondary {
  max-width: none;
}

.test-error-msg {
  color: #c0392b;
  font-size: 14px;
  text-align: center;
  margin: 12px 0;
  min-height: 20px;
}

.test-hidden {
  display: none !important;
}

/* —— 手机端：无头部/页脚，单屏布局 —— */
@media (max-width: 768px) {
  body.test-page #site-header,
  body.test-page .wap_nav.wap,
  body.test-page .site-breadcrumb-bar,
  body.test-page .test-page-footer-slot {
    display: none !important;
  }

  body.test-page {
    padding: 0;
    margin: 0;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.test-page .test-container.site-main {
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  body.test-page--intro #test-intro,
  body.test-page--quiz #test-quiz {
    flex: 1;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    margin: 0;
    border-radius: 12px;
    box-shadow: none;
    padding: 14px 12px;
    overflow: hidden;
  }

  body.test-page--intro #test-intro {
    justify-content: center;
  }

  body.test-page--intro .test-intro-title {
    font-size: 22px;
    margin-bottom: 8px;
  }

  body.test-page--intro .test-intro-lead,
  body.test-page--intro .test-rules {
    display: none;
  }

  body.test-page--intro .test-intro-brief {
    display: block;
    margin-bottom: 20px;
  }

  body.test-page--intro .test-btn-primary {
    max-width: none;
    flex-shrink: 0;
  }

  body.test-page--quiz .test-progress {
    flex-shrink: 0;
    margin-bottom: 6px;
    font-size: 13px;
  }

  body.test-page--quiz .test-question-hint {
    flex-shrink: 0;
    margin-bottom: 6px;
    font-size: 14px;
  }

  body.test-page--quiz .test-image-wrap {
    flex: 1;
    min-height: 0;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  body.test-page--quiz .test-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  body.test-page--quiz .test-options {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
  }

  body.test-page--quiz .test-option {
    padding: 8px 8px;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.test-page--quiz .test-actions {
    flex-shrink: 0;
  }

  body.test-page--quiz .test-btn-primary {
    max-width: none;
    padding: 12px 16px;
    font-size: 15px;
  }

  body.test-page--quiz .test-error-msg {
    flex-shrink: 0;
    margin: 4px 0;
    font-size: 12px;
  }

  /* 结果页：成绩卡尽量一屏，操作栏贴底 */
  body.test-page--result {
    background: #e8e8e8;
  }

  body.test-page--result .test-container {
    padding-bottom: 0;
  }

  body.test-page--result .test-result-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    max-width: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  body.test-page--result .test-share-hint {
    display: none;
  }

  body.test-page--result .test-share-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
  }

  body.test-page--result .test-share-header {
    padding: 12px 14px 10px;
    flex-shrink: 0;
  }

  body.test-page--result .test-share-brand {
    font-size: 10px;
    margin-bottom: 4px;
  }

  body.test-page--result .test-share-title {
    font-size: 17px;
  }

  body.test-page--result .test-share-sub {
    font-size: 11px;
    margin-top: 4px;
  }

  body.test-page--result .test-share-score-block {
    padding: 10px 12px 4px;
    flex-shrink: 0;
  }

  body.test-page--result .test-share-score-num {
    font-size: 44px;
  }

  body.test-page--result .test-share-score-unit {
    font-size: 16px;
  }

  body.test-page--result .test-share-tier-text {
    gap: 5px;
    margin: 8px auto 10px;
    padding: 8px 28px 10px;
    max-width: 94%;
    flex-shrink: 0;
  }

  body.test-page--result .test-share-tier-line {
    font-size: 12px;
    line-height: 1.6;
    max-width: 100%;
  }

  body.test-page--result .test-share-stats-row {
    margin: 0 12px 6px;
    flex-shrink: 0;
  }

  body.test-page--result .test-share-stat-item {
    padding: 8px 6px;
  }

  body.test-page--result .test-share-stat-val {
    font-size: 22px;
  }

  body.test-page--result .test-share-qr-block {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 8px;
    flex-shrink: 0;
    border-top: 1px dashed #eee;
  }

  body.test-page--result .test-share-qr-canvas,
  body.test-page--result .test-share-qr-img {
    width: 128px !important;
    height: 128px !important;
    margin-bottom: 8px;
    padding: 5px;
  }

  body.test-page--result .test-share-qr-tip {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
  }

  body.test-page--result .test-share-breakdown-wrap {
    margin: 0 12px 6px;
    flex-shrink: 0;
  }

  body.test-page--result .test-share-breakdown-toggle {
    padding: 8px 12px;
    font-size: 12px;
  }

  body.test-page--result .test-share-breakdown {
    padding: 8px 12px 10px;
    font-size: 11px;
    line-height: 1.55;
  }

  body.test-page--result .test-share-footer {
    flex-shrink: 0;
    padding: 6px 12px 8px;
    font-size: 10px;
  }

  body.test-page--result .test-result-actions {
    flex-shrink: 0;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body.test-page--result .test-result-actions .test-btn-primary,
  body.test-page--result .test-result-actions .test-btn-secondary {
    margin: 0;
    padding: 11px 8px;
    font-size: 14px;
  }

  body.test-page--result .test-result-actions .test-btn-secondary {
    margin-top: 0;
  }
}

