/* ============================================================
   东江·羽迹 — 拍照识鸟（弹窗内三步流程）
   与站点设计 token 一致：--brand-* / --surface-* / --r-*
   ============================================================ */

.camera-dialog.bc-host {
  display: block;
}

/* 弹窗变成「内容滚动 + 底部按钮固定」，按钮永远点得到 */
dialog.modal.modal-camera[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

dialog.modal.modal-camera[open] > .modal-heading {
  flex-shrink: 0;
}

.camera-dialog.bc-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.bc-body {
  --bc-line: var(--line, #e3e9db);
  --bc-line-soft: var(--line-soft, #eef2e6);
  --bc-surface3: var(--surface-3, #f3f7ea);
  --bc-ink: var(--ink, #1b3226);
  --bc-muted: var(--muted, #61745f);
  --bc-brand100: var(--brand-100, #d8e6c5);
  --bc-brand200: var(--brand-200, #b3c79b);
  --bc-brand600: var(--brand-600, #2f5c46);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  color: var(--bc-ink);
}

.bc-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ccd8bb transparent;
}

.bc-foot {
  flex-shrink: 0;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bc-line-soft);
}

.bc-body svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.bc-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 步骤条 ---------- */
.bc-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 18px;
  font-size: 12px;
  color: var(--bc-muted);
  letter-spacing: .2px;
}

.bc-step {
  white-space: nowrap;
}

.bc-step.is-active {
  font-weight: 650;
  color: var(--bc-brand600);
}

.bc-step-sep {
  color: var(--bc-brand200);
  font-size: 13px;
  margin: 0 2px;
}

/* ---------- 上传区 ---------- */
.bc-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 236px;
  overflow: hidden;
  border: 1.5px dashed var(--bc-brand200);
  border-radius: var(--r-md, 16px);
  background: var(--bc-surface3);
  color: var(--brand-500, #3f7355);
  cursor: pointer;
  text-align: center;
  transition: border-color .18s ease, background-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.bc-zone:active {
  border-color: var(--bc-brand600);
}

.bc-zone h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  color: var(--brand-700, #24483a);
}

.bc-zone p {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--bc-muted);
}

.bc-zone-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  border-radius: var(--r-lg, 22px);
  background: var(--brand-100, #d8e6c5);
  color: var(--brand-600, #2f5c46);
}

.bc-zone-icon svg {
  width: 36px;
  height: 36px;
}

.bc-zone.has-photo img,
.bc-zone-busy img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bc-zone-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: var(--r-pill, 999px);
  background: rgba(255, 255, 255, .88);
  font-size: 11.5px;
  font-weight: 550;
  color: var(--brand-600, #2f5c46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 识别扫描条 */
.bc-zone-busy {
  cursor: default;
  border-style: solid;
  border-color: var(--bc-line);
}

.bc-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47, 92, 70, 0) 0%, rgba(47, 92, 70, .16) 48%, rgba(47, 92, 70, 0) 100%);
  animation: bc-scan 2.2s ease-in-out infinite;
}

@keyframes bc-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .bc-scan { animation: none; opacity: .25; }
}

/* ---------- 按钮 ---------- */
.bc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bc-actions-col {
  grid-template-columns: 1fr;
  gap: 10px;
}

.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-xs, 8px);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.bc-btn:active {
  transform: scale(.985);
}

.bc-btn-primary {
  background: var(--brand-700, #24483a);
  color: #fff;
  box-shadow: var(--sh-brand, 0 10px 22px -12px rgba(36, 72, 58, .55));
}

.bc-btn-primary:hover {
  background: var(--brand-600, #2f5c46);
}

.bc-btn-ghost {
  background: var(--surface, #fff);
  border-color: var(--bc-line);
  color: var(--brand-600, #2f5c46);
}

.bc-btn-ghost:hover {
  background: var(--bc-surface3);
}

.bc-btn-done {
  background: var(--brand-25, #f4f8ec);
  border-color: var(--bc-brand100);
  color: var(--brand-600, #2f5c46);
  cursor: default;
}

.bc-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px auto 0;
  padding: 8px 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--bc-muted);
  cursor: pointer;
}

/* ---------- 隐私说明 ---------- */
.bc-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-xs, 8px);
  background: var(--bc-surface3);
  color: var(--brand-500, #3f7355);
}

.bc-note svg {
  margin-top: 2px;
}

.bc-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--bc-muted);
}

/* ---------- 识别中 ---------- */
.bc-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  text-align: center;
}

.bc-progress strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--brand-700, #24483a);
}

.bc-progress small {
  font-size: 12px;
  color: var(--bc-muted);
}

.bc-dots {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 2px;
}

.bc-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bc-brand600);
  animation: bc-dot 1.2s ease-in-out infinite;
}

.bc-dots i:nth-child(2) { animation-delay: .16s; }
.bc-dots i:nth-child(3) { animation-delay: .32s; }

@keyframes bc-dot {
  0%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- 结果 ---------- */
.bc-hero {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.bc-hero-photo {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: var(--r-md, 16px);
  background: var(--bc-surface3);
  object-fit: cover;
}

.bc-hero-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 2px;
}

.bc-hero-tag {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .3px;
  color: var(--brand-500, #3f7355);
}

.bc-hero-info h3 {
  margin: 3px 0 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.bc-hero-info i {
  margin-top: 2px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--bc-muted);
}

.bc-card {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--bc-line-soft);
  border-radius: var(--r-md, 16px);
  background: var(--bc-surface3);
}

.bc-confidence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid var(--accent-200, #f7e59b);
  border-radius: var(--r-xs, 8px);
  background: var(--accent-50, #fdf9e8);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-700, #6d5c16);
  white-space: nowrap;
}

.bc-confidence b {
  font-size: 13.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.bc-confidence.is-high {
  border-color: var(--bc-brand100);
  background: var(--brand-50, #eaf1dc);
  color: var(--brand-600, #2f5c46);
}

.bc-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.bc-features span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--bc-brand100);
  border-radius: var(--r-xs, 8px);
  background: var(--brand-25, #f4f8ec);
  font-size: 11.5px;
  font-weight: 550;
  color: var(--brand-600, #2f5c46);
}

.bc-reason {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2, #39543f);
}

.bc-warn {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-xs, 8px);
  background: var(--accent-50, #fdf9e8);
  font-size: 12px;
  line-height: 1.7;
  color: var(--accent-700, #6d5c16);
}

.bc-others {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--bc-muted);
}

.bc-others button {
  padding: 6px 10px;
  border: 1px solid var(--bc-line);
  border-radius: var(--r-pill, 999px);
  background: var(--surface, #fff);
  font: inherit;
  font-size: 12px;
  color: var(--ink-2, #39543f);
  cursor: pointer;
}

.bc-others button b {
  color: var(--bc-muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

.bc-others button:hover {
  border-color: var(--bc-brand200);
  color: var(--brand-600, #2f5c46);
}

.bc-tip {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-xs, 8px);
  background: var(--surface, #fff);
  border: 1px dashed var(--bc-line);
  font-size: 12px;
  line-height: 1.75;
  color: var(--bc-muted);
}

/* ---------- 空状态 / 失败 ---------- */
.bc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 12px 28px;
  text-align: center;
}

.bc-empty-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--bc-surface3);
  color: var(--brand-500, #3f7355);
}

.bc-empty-icon svg {
  width: 32px;
  height: 32px;
}

.bc-empty h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.bc-empty p {
  margin: 0;
  max-width: 34em;
  font-size: 13px;
  line-height: 1.8;
  color: var(--bc-muted);
}

/* ---------- 收藏成功 ---------- */
.bc-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 12px 4px;
  text-align: center;
}

.bc-done-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand-700, #24483a);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.bc-done-badge svg {
  width: 26px;
  height: 26px;
}

.bc-done img {
  width: 100%;
  height: 150px;
  margin-bottom: 14px;
  border-radius: var(--r-md, 16px);
  object-fit: cover;
}

.bc-done h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.bc-done p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--bc-muted);
}

.bc-done p b {
  color: var(--brand-700, #24483a);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 手机 / iPad 竖屏 ---------- */
@media (max-width: 640px) {
  .bc-steps { font-size: 11px; padding-bottom: 14px; }
  .bc-zone { height: 210px; }
  .bc-zone h3 { font-size: 16px; }
  .bc-hero-photo { width: 96px; height: 96px; }
  .bc-hero-info h3 { font-size: 20px; }
  .bc-card { padding: 14px; }
  .bc-btn { min-height: 46px; padding: 12px 14px; font-size: 13px; }
  .bc-done img { height: 130px; }
}
