.capture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  flex-shrink: 0;
}

.capture-header h1 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--wq-text-primary);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--wq-radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
  padding: 0;
}

.icon-btn:active {
  background: var(--wq-neutral-100);
}

.capture-main {
  flex: 1;
  padding: 0 16px 20px;
  overflow-y: auto;
}

.image-preview {
  position: relative;
  width: 100%;
  height: 300px;
  border: 2px dashed var(--wq-neutral-300);
  border-radius: var(--wq-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
  background: var(--wq-bg-card);
}

.image-preview:active {
  transform: scale(0.985);
}

.image-preview.has-image {
  border: none;
  background: var(--wq-neutral-200);
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--wq-text-tertiary);
  font-size: var(--text-sm);
}

.batch-capture-bar {
  background: var(--wq-primary-lightest);
  border: 1px solid var(--wq-primary-lighter);
  border-radius: var(--wq-radius-lg);
  padding: 12px 14px;
  position: relative;
  margin-top: 12px;
}

.batch-capture-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-capture-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--wq-text-primary);
}

.batch-capture-desc {
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  margin-top: 6px;
  line-height: var(--leading-normal);
}

.batch-counter {
  display: none;
  position: absolute;
  top: 12px;
  right: 62px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--wq-primary);
  background: var(--wq-primary-lighter);
  padding: 2px 8px;
  border-radius: var(--wq-radius-full);
}

.batch-toggle.active ~ .batch-counter {
  display: inline-block;
}

.batch-toggle {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.batch-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: var(--wq-radius-full);
  background: var(--wq-neutral-300);
  position: relative;
  transition: background 0.25s ease;
}

.batch-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--wq-text-inverse);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

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

.batch-toggle.active .batch-toggle-thumb {
  transform: translateX(20px);
}

.crop-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--wq-primary-lightest);
  border-radius: var(--wq-radius-md);
  border: 1px solid var(--wq-primary-lighter);
  margin-top: 12px;
  margin-bottom: 20px;
  font-size: var(--text-sm);
  color: var(--wq-primary);
  font-weight: var(--weight-medium);
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--wq-text-secondary);
  margin-bottom: 8px;
}

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-md);
  overflow: hidden;
}

.toggle-btn {
  padding: 9px 24px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-sans);
  color: var(--wq-text-secondary);
  background: var(--wq-bg-card);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
}

.toggle-btn:not(:last-child) {
  border-right: 1px solid var(--wq-border);
}

.toggle-btn.active {
  background: var(--wq-primary);
  color: var(--wq-text-inverse);
  font-weight: var(--weight-semibold);
}

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

.pill-btn {
  padding: 7px 18px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-sans);
  color: var(--wq-text-secondary);
  background: var(--wq-bg-card);
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.custom-select {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--wq-text-primary);
  background: var(--wq-bg-card);
  border: 1px solid var(--wq-border);
  border-radius: var(--wq-radius-md);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A8F9B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.custom-select:focus {
  outline: none;
  border-color: var(--wq-primary);
}

.bottom-action {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--wq-bg-card);
  border-top: 1px solid var(--wq-border-light);
  padding: 14px 20px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  margin-top: auto;
}

.bottom-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--wq-text-tertiary);
  margin-top: 10px;
  line-height: var(--leading-normal);
}

.batch-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow-y: auto;
}

.batch-thumb-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--wq-radius-md);
  overflow: hidden;
  border: 2px solid var(--wq-border);
}

.batch-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.batch-thumb-add {
  aspect-ratio: 1;
  border-radius: var(--wq-radius-md);
  border: 2px dashed var(--wq-neutral-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--wq-neutral-400);
  font-size: 28px;
  font-weight: var(--weight-light);
  transition: border-color 0.2s ease;
}

.batch-thumb-add:active {
  border-color: var(--wq-primary);
  color: var(--wq-primary);
}
