.ai-top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--wq-bg-card);
  border-bottom: 1px solid var(--wq-border-light);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.ai-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--wq-text-primary);
  flex: 1;
  text-align: center;
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--wq-radius-full);
  background: var(--wq-primary-lightest);
  color: var(--wq-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  flex-shrink: 0;
}

.batch-progress {
  position: sticky;
  top: 48px;
  z-index: 39;
  background: var(--wq-bg-card);
  border-bottom: 1px solid var(--wq-border-light);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-label {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  font-weight: var(--weight-medium);
}

.batch-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wq-neutral-300);
  transition: background 0.2s ease;
}

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

.batch-dot.done {
  background: var(--state-success);
}

.ai-page-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px;
}

.thumb-strip {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--wq-neutral-200) 0%, var(--wq-neutral-300) 50%, var(--wq-neutral-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wq-text-tertiary);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  position: relative;
  overflow: hidden;
}

.warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--state-warning-light);
  color: var(--state-warning);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.warning-banner .warn-icon {
  flex-shrink: 0;
  font-size: 16px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 12px;
  border-radius: var(--wq-radius-full);
  background: var(--wq-primary-lightest);
  border: 1px solid var(--wq-primary-lighter);
  font-size: var(--text-sm);
  color: var(--wq-primary-dark);
}

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

.tag .tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wq-primary-lighter);
  color: var(--wq-primary-dark);
  font-size: 12px;
  cursor: pointer;
  margin-left: 2px;
  flex-shrink: 0;
}

.tag-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed var(--wq-border);
  color: var(--wq-text-tertiary);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--wq-radius-full);
  border: 1px solid var(--wq-border);
  background: var(--wq-bg-card);
  font-size: var(--text-sm);
  color: var(--wq-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.radio-pill .radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--wq-neutral-300);
  position: relative;
  flex-shrink: 0;
}

.radio-pill .radio-pct {
  color: var(--wq-text-tertiary);
  font-size: var(--text-xs);
}

.radio-pill.selected {
  border-color: var(--wq-primary);
  background: var(--wq-primary-lightest);
  color: var(--wq-primary-dark);
}

.radio-pill.selected .radio-dot {
  border-color: var(--wq-primary);
}

.radio-pill.selected .radio-dot::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wq-primary);
}

.radio-pill.selected .radio-pct {
  color: var(--wq-primary);
}

.input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  background: var(--wq-bg-card);
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-md);
  padding: 10px 12px;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--wq-text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--wq-primary);
  box-shadow: 0 0 0 3px rgba(59, 142, 165, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--wq-radius-full);
  border: 1px solid var(--wq-border);
  background: var(--wq-bg-card);
  font-size: var(--text-sm);
  color: var(--wq-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill.active {
  background: var(--wq-primary);
  border-color: var(--wq-primary);
  color: var(--wq-text-inverse);
  font-weight: var(--weight-medium);
}

.star-rating {
  display: flex;
  gap: 4px;
}

.star {
  font-size: 22px;
  color: var(--wq-neutral-300);
  cursor: pointer;
  line-height: 1;
}

.star.filled {
  color: var(--state-warning);
}

.collapsible-details {
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-md);
  overflow: hidden;
  background: var(--wq-bg-card);
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--wq-text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.15s ease;
}

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

.collapsible-summary::marker {
  content: '';
}

.collapsible-summary:hover {
  background: var(--wq-neutral-50);
}

.chevron-icon {
  color: var(--wq-neutral-500);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.collapsible-details[open] .collapsible-summary .chevron-icon {
  transform: rotate(180deg);
}

.collapsible-details[open] .collapsible-summary {
  border-bottom: 1px solid var(--wq-border-light);
}

.collapsible-content {
  padding: 12px;
  padding-top: 0;
}

.form-read {
  width: 100%;
  background: var(--wq-neutral-50);
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-md);
  padding: 12px;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--wq-text-primary);
  resize: none;
  font-family: var(--font-sans);
}

.collapsible-content .form-read {
  border: none;
  background: transparent;
  padding: 0;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  background: var(--wq-bg-card);
  border-top: 1px solid var(--wq-border-light);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 50;
}

/* 非激活页面时隐藏 fixed 底栏 */
#page-ai-confirm:not(.active) .bottom-bar {
  display: none !important;
}

.batch-hint {
  width: 100%;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  margin-top: -2px;
}

.btn {
  flex: 1;
  height: 44px;
  border-radius: var(--wq-radius-lg);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}
