.recipe-card .input-section {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.recipe-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

.recipe-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.recipe-drop {
  margin-top: 0;
}

.recipe-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.recipe-preview-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
}

.recipe-preview-thumb {
  position: relative;
  height: 96px;
  background: #111827;
  cursor: zoom-in;
}

.recipe-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.recipe-preview-meta {
  padding: 6px 8px;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.recipe-preview-remove:hover {
  background: rgba(220, 38, 38, 0.9);
}

.recipe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-sizing: border-box;
}

.recipe-lightbox-body {
  max-width: min(92vw, 960px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.recipe-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 48px);
  object-fit: contain;
  border-radius: 10px;
  background: #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.recipe-lightbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  color: #e2e8f0;
  font-size: 13px;
}

.recipe-lightbox-counter {
  font-weight: 600;
}

.recipe-lightbox-caption {
  color: #cbd5e1;
}

.recipe-lightbox-close,
.recipe-lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.recipe-lightbox-close:hover,
.recipe-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.recipe-lightbox-close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

.recipe-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

.recipe-lightbox-prev {
  left: 16px;
}

.recipe-lightbox-next {
  right: 16px;
}

@media (max-width: 640px) {
  .recipe-lightbox {
    padding: 12px;
  }

  .recipe-lightbox-prev {
    left: 8px;
  }

  .recipe-lightbox-next {
    right: 8px;
  }

  .recipe-lightbox-close {
    top: 10px;
    right: 10px;
  }
}

.recipe-select-card {
  margin-top: 16px;
}

.recipe-select-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: #111827;
}

.recipe-select-hint {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 14px;
}

.recipe-select-actions {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.recipe-select-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.recipe-select-ctl:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  color: #111827;
}

.recipe-select-ctl:active {
  background: #eff6ff;
  border-color: #3b82f6;
}

.recipe-ingredient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}

/* 标签样式：浅底描边，区别于下方 tb-btn 实心蓝按钮 */
.recipe-ingredient-tag {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f3f4f6;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: #6b7280;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.recipe-ingredient-tag:hover {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #4b5563;
}

.recipe-ingredient-tag.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.recipe-ingredient-tag.is-selected:hover {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1e40af;
}

.recipe-result-card {
  margin-top: 16px;
}

.recipe-result-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.recipe-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10001;
  max-width: min(92vw, 420px);
  text-align: center;
}

.recipe-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.recipe-result-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #111827;
}

.recipe-meta {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.recipe-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #111827;
}

.recipe-block {
  margin-top: 20px;
}

.recipe-block ul,
.recipe-block ol {
  margin: 0;
  padding-left: 22px;
  color: #374151;
  line-height: 1.7;
}

.recipe-ingredients-text {
  margin: 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.recipe-block li + li {
  margin-top: 6px;
}
