.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  height: 48px;
  flex-shrink: 0;
  background: var(--wq-bg-card);
  border-bottom: 1px solid var(--wq-border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.detail-header span {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--wq-text-primary);
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-main {
  flex: 1;
  padding: 12px 16px 24px;
  overflow-y: auto;
}

.detail-main .section-card {
  margin-bottom: 12px;
}

.detail-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--wq-neutral-200) 0%, var(--wq-neutral-100) 50%, var(--wq-neutral-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: var(--wq-neutral-400);
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
}

.detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-section {
  margin-bottom: 12px;
}

.detail-label {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  font-weight: var(--weight-medium);
  margin-bottom: 6px;
}

.detail-text {
  font-size: var(--text-base);
  color: var(--wq-text-primary);
  line-height: var(--leading-relaxed);
}

.answer-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--wq-radius-md);
}

.answer-box.wrong {
  background: var(--state-error-light);
}

.answer-box.correct {
  background: var(--state-success-light);
}

.answer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--wq-text-inverse);
  font-size: 13px;
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.answer-box.wrong .answer-icon {
  background: var(--state-error);
}

.answer-box.correct .answer-icon {
  background: var(--state-success);
}

.answer-text {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.answer-box.wrong .answer-text {
  color: var(--state-error);
}

.answer-box.correct .answer-text {
  color: var(--state-success);
}

.detail-explanation {
  font-size: var(--text-sm);
  color: var(--wq-text-secondary);
  line-height: var(--leading-relaxed);
}

.detail-meta-row {
  display: flex;
  items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--wq-border-light);
}

.detail-meta-label {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  margin-right: 8px;
}

.detail-meta-value {
  font-size: var(--text-xs);
  color: var(--wq-text-secondary);
  font-weight: var(--weight-medium);
}

.detail-diff {
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.diff-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.diff-dot.active {
  background: var(--wq-primary);
}

.diff-dot.inactive {
  background: var(--wq-neutral-300);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--wq-text-primary);
  margin-bottom: 10px;
}

.tag-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: -16px;
  width: 2px;
  background: var(--wq-neutral-200);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-content-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.timeline-date {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--wq-text-primary);
}

.timeline-result {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.timeline-result.correct {
  color: var(--state-success);
}

.timeline-result.wrong {
  color: var(--state-error);
}

.timeline-result.created {
  color: var(--wq-text-tertiary);
}

.timeline-mastery {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
}

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

.mastery-count {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
}

.mastery-bar {
  width: 100%;
  height: 8px;
  background: var(--wq-neutral-200);
  border-radius: var(--wq-radius-full);
  overflow: hidden;
}

.mastery-bar-fill {
  height: 100%;
  background: var(--wq-primary);
  border-radius: var(--wq-radius-full);
  transition: width 0.3s ease;
}

.mastery-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  margin-top: 8px;
}

.next-review-text {
  text-align: center;
  padding: 4px 0 16px;
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
}

.related-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--wq-neutral-50);
  border-radius: var(--wq-radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.related-item:active {
  background: var(--wq-neutral-100);
}

.related-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--wq-radius-sm);
  background: linear-gradient(135deg, var(--wq-neutral-200) 0%, var(--wq-neutral-300) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--wq-neutral-500);
  flex-shrink: 0;
}

.related-info {
  flex: 1;
  min-width: 0;
}

.related-text {
  font-size: var(--text-sm);
  color: var(--wq-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.related-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.related-date {
  font-size: 11px;
  color: var(--wq-text-tertiary);
}

.related-mastery {
  display: flex;
  align-items: center;
  gap: 2px;
}
