/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #FFF;
  box-shadow: 0 2px 8px rgba(139, 191, 143, 0.25);
}
.btn-primary:active { background: #78A87B; box-shadow: none; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:active { background: var(--bg-secondary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:active { color: var(--text-primary); }

.btn-danger {
  background: rgba(212, 149, 138, 0.10);
  color: var(--error);
}
.btn-danger:active { background: rgba(212, 149, 138, 0.22); }

.btn-block { width: 100%; }
.btn-lg { padding: 17px 36px; font-size: 17px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ===== Home Action Bar ===== */
.home-action-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 24px;
}

.home-action-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

/* 主功能「相册」(识别入口) 拉得更宽更突出 */
#btn-gallery { flex: 1.5; }

.home-action-item:active {
  transform: scale(0.95);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: var(--bg-elevated);
}

.home-action-icon { font-size: 28px; line-height: 1; }

.home-action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* ===== Record Card (Timeline) ===== */
.record-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.record-card:active {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.record-bird-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.record-bird-icon img { width: 100%; height: 100%; object-fit: cover; }
.record-bird-icon.audio-icon { background: var(--accent-blue-soft); }
.record-bird-icon.manual-icon { background: var(--bg-elevated); }

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

.record-species {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.record-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
}
.record-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

.date-group {
  padding: 22px 24px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Result Cards ===== */
.result-cards {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.result-card:active {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  background: var(--bg-elevated);
}
.result-card.top-match {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 2px 12px rgba(139, 191, 143, 0.12);
}

.result-rank {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 26px;
}
.result-card.top-match .result-rank { color: var(--accent); }

.result-info { flex: 1; min-width: 0; }
.result-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.result-name small {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 6px;
}
.result-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-confidence {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.confidence-high { color: var(--confidence-high); }
.confidence-mid  { color: var(--confidence-mid); }
.confidence-low  { color: var(--confidence-low); }
.result-arrow { font-size: 14px; color: var(--text-muted); }

/* ===== Record Preview / Save Form ===== */
.record-preview { padding: 20px 24px; }
.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.preview-card .preview-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.preview-species {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.preview-species small {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-left: 8px;
}
.preview-fields {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.preview-field {
  display: flex;
  align-items: center;
  gap: 12px;
}
.preview-field .field-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.preview-field .field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 36px;
}
.preview-field .field-value {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}
.preview-field .field-auto {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.editable-field { cursor: pointer; }
.editable-field .field-input-hidden {
  display: none;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}
.editable-field.editing .field-value { display: none; }
.editable-field.editing .field-input-hidden { display: block; }
.field-edit-btn {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.field-edit-btn:active { color: var(--accent); background: var(--accent-soft); }
.editable-field.editing .field-edit-btn { color: var(--accent); }
.editable-field:not(.editing) .field-edit-btn::before { content: '✎'; }
.editable-field.editing .field-edit-btn::before { content: '✓'; }

.preview-note { padding: 0 24px 20px; }
.preview-note textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  resize: none;
  height: 72px;
}
.preview-note textarea::placeholder { color: var(--text-muted); }

.preview-actions {
  display: flex;
  gap: 12px;
  padding: 0 24px 20px;
}
.preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

/* ===== Manual Species Selector ===== */
.manual-select-view {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}
.manual-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.manual-select-back {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
}
.manual-select-title { font-size: 16px; font-weight: 600; }
.manual-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 16px 12px;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.manual-search-input {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
  border: none;
  outline: none;
  background: transparent;
}
.manual-search-input::placeholder { color: var(--text-muted); }
.manual-bird-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px calc(16px + var(--safe-bottom));
}
.manual-bird-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.manual-bird-item:active { border-color: var(--accent); background: var(--accent-soft); }
.manual-bird-icon { font-size: 28px; width: 40px; text-align: center; flex-shrink: 0; }
.manual-bird-info { flex: 1; min-width: 0; }
.manual-bird-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.manual-bird-name small { font-weight: 400; font-size: 12px; color: var(--text-tertiary); margin-left: 6px; }
.manual-bird-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.manual-bird-family {
  font-size: 11px; color: var(--text-muted); background: var(--bg-elevated);
  display: inline-block; padding: 2px 10px; border-radius: var(--radius-full);
}
.manual-bird-arrow { font-size: 16px; color: var(--text-muted); }


/* ===== Photo Preview ===== */
.photo-preview {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.photo-preview img { max-width: 100%; max-height: 65vh; object-fit: contain; }
.preview-actions { display: flex; gap: 20px; padding: 32px 24px; }

/* ===== Recording UI ===== */
.recording-view {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--bg-primary); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 48px;
}
.recording-timer { font-size: 56px; font-weight: 200; letter-spacing: 0.06em; }
.recording-waves { display: flex; align-items: center; gap: 3px; height: 56px; }
.wave-bar { width: 4px; border-radius: 2px; background: var(--accent); animation: wave 0.8s ease-in-out infinite; }
.wave-bar:nth-child(odd)  { animation-delay: 0s; }
.wave-bar:nth-child(even) { animation-delay: 0.4s; }
.wave-bar:nth-child(3n)   { animation-delay: 0.2s; }
@keyframes wave {
  0%, 100% { height: 6px;  opacity: 0.3; }
  50%      { height: 44px; opacity: 1; }
}
.recording-hint { font-size: 14px; color: var(--text-tertiary); }
.record-stop-btn {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--error); display: flex; align-items: center; justify-content: center;
}
.record-stop-btn::after { content: ''; width: 24px; height: 24px; background: #fff; border-radius: 4px; }
.record-stop-btn:active { transform: scale(0.9); }

/* ===== Recognition Loading ===== */
.recognition-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 32px; padding: 100px 40px;
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.recognition-text { font-size: 16px; color: var(--text-secondary); }
.recognition-sub { font-size: 13px; color: var(--text-tertiary); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(50, 45, 40, 0.40);
  backdrop-filter: blur(4px); z-index: var(--z-modal);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: var(--app-max-width);
  max-height: 80vh; overflow-y: auto;
  padding: 20px 24px calc(20px + var(--safe-bottom));
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 20px;
}
.modal-title { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.modal-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.modal-field {
  padding: 14px 16px; background: var(--bg-elevated); border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
.modal-field .field-label {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.modal-field .field-value { font-size: 15px; color: var(--text-primary); }
.editable-modal-field .field-display { cursor: pointer; }
.editable-modal-field .field-input-hidden { display: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 56px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast);
  padding: 12px 24px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  background: #4A4A4A; color: #FFF;
  box-shadow: 0 4px 16px rgba(0,0,0,0.20);
  animation: toastIn 0.25s ease, toastOut 0.25s ease 2s forwards;
  white-space: nowrap;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

/* ===== Success Overlay ===== */
.success-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  animation: fadeIn 0.3s ease;
}
.success-icon { animation: successPop 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.success-icon svg { width: 64px; height: 64px; }
.success-text { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.success-sub { font-size: 14px; color: var(--text-tertiary); }
@keyframes successPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== Detail Photo ===== */
.detail-photo {
  width: 100%; border-radius: var(--radius-md);
  margin-bottom: 16px; max-height: 220px; object-fit: cover;
}

/* ===== Seasonal Bird Cards ===== */
.seasonal-bird-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.seasonal-bird-scroll::-webkit-scrollbar { display: none; }
.seasonal-bird-card {
  min-width: 140px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 14px; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.seasonal-bird-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.seasonal-bird-latin { font-size: 11px; color: var(--text-muted); font-style: italic; margin-bottom: 6px; }
.seasonal-bird-desc { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; }

/* ===== Season Selector ===== */
.season-selector { display: flex; gap: 6px; margin-bottom: 18px; }
.season-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-tertiary); transition: all var(--transition-fast);
}
.season-btn .season-icon { font-size: 18px; line-height: 1; }
.season-btn .season-label { font-size: 11px; font-weight: 500; }
.season-btn.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
  font-weight: 600;
}

/* ===== Spot Cards ===== */
.spot-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-full); margin-bottom: 10px;
}
.spot-search-input { flex: 1; font-size: 14px; color: var(--text-primary); border: none; outline: none; background: transparent; }
.spot-search-input::placeholder { color: var(--text-muted); }
.spot-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.spot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.spot-name { font-size: 15px; font-weight: 600; }
.spot-season { font-size: 10px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: var(--radius-full); }
.spot-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 6px; }
.spot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-tag { font-size: 11px; color: var(--text-tertiary); }

/* ===== City Chip ===== */
.city-chip {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast); white-space: nowrap;
}
.city-chip.active, .city-chip:active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ===== Home Stats Card ===== */
.home-stats-card {
  margin: 0 20px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.home-stats-card .stat-item {
  flex: 1;
  text-align: center;
  position: relative;
}

.home-stats-card .stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-light);
}

.home-stats-card .stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.home-stats-card .stat-num.accent {
  color: var(--accent);
}

.home-stats-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 4px;
  letter-spacing: 0.06em;
}

.home-stats-card .stat-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.home-stats-card .stat-date-num {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.home-stats-card .stat-date-year {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.home-stats-empty {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0 8px;
  letter-spacing: 0.04em;
}

/* ===== Handbook Cards ===== */
.handbook-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); margin: 0 24px 16px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}
.handbook-card.template-nature   { border-top: 3px solid var(--accent); }
.handbook-card.template-minimal  { border-radius: 0; border-left: none; border-right: none; margin: 0 0 1px; }
.handbook-card.template-vintage  { border-color: #E2DFD5; background: #FDFCFA; }

/* Handbook sort */
.handbook-sort-row {
  display: flex; gap: 8px; margin-top: 12px;
}
.sort-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.sort-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Handbook search bar */
.handbook-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin: 0 24px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.handbook-search-bar .search-icon { font-size: 14px; line-height: 1; flex-shrink: 0; }
.handbook-search-input {
  flex: 1; font-size: 14px; color: var(--text-primary);
  border: none; outline: none; background: transparent;
}
.handbook-search-input::placeholder { color: var(--text-muted); }
.search-clear-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: var(--bg-secondary);
  color: var(--text-tertiary); font-size: 12px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: all var(--transition-fast);
}
.search-clear-btn:active { background: var(--border); color: var(--text-primary); }

/* Editable trip title */
.handbook-title-row {
  display: flex; align-items: center; gap: 8px;
  padding: 20px 24px 12px; cursor: pointer;
  transition: background var(--transition-fast);
}
.handbook-title-row:hover { background: var(--bg-elevated); }
.handbook-title-text {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-primary); flex: 1;
}
.handbook-title-edit-icon {
  font-size: 14px; color: var(--text-muted);
  opacity: 0; transition: opacity var(--transition-fast);
}
.handbook-title-row:hover .handbook-title-edit-icon { opacity: 1; }
.handbook-title-input {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-primary); background: transparent;
  border: none; border-bottom: 2px solid var(--accent);
  outline: none; padding: 0 2px 4px; flex: 1;
  font-family: inherit;
}
.handbook-title-input::placeholder { color: var(--text-muted); font-weight: 400; }

.handbook-card .card-header { padding: 0 24px 12px; }
.handbook-card .card-date { font-size: 12px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.08em; margin-bottom: 6px; }
.handbook-card .card-location { font-size: 15px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.handbook-card .card-weather { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.handbook-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 0 24px 14px; }
.handbook-photos.single { grid-template-columns: 1fr; }
.handbook-photos.double { grid-template-columns: 1fr 1fr; }
.handbook-photo { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-secondary); }
.handbook-photo img { width: 100%; height: 100%; object-fit: cover; }
.handbook-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--accent-soft); }

.handbook-species { padding: 0 24px 12px; }
.handbook-species .checklist-title { font-size: 11px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.1em; margin-bottom: 10px; }
.handbook-species .checklist-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--border); font-size: 14px; }
.handbook-species .checklist-item:last-child { border-bottom: none; }
.handbook-species .check-num { font-size: 11px; font-weight: 700; color: var(--accent); min-width: 28px; }
.handbook-species .check-name { flex: 1; font-weight: 500; }
.handbook-species .check-count { font-size: 12px; color: var(--text-tertiary); background: var(--bg-elevated); padding: 2px 10px; border-radius: var(--radius-full); }
.handbook-species .checklist-item { cursor: pointer; }
.handbook-species .check-arrow { color: var(--text-muted); font-size: 16px; flex-shrink: 0; }

.handbook-stats { display: flex; margin: 0 24px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.handbook-stats .stat-item { flex: 1; text-align: center; padding: 10px 8px; background: var(--bg-elevated); border-right: 1px solid var(--border); }
.handbook-stats .stat-item:last-child { border-right: none; }
.handbook-stats .stat-val { font-size: 18px; font-weight: 700; color: var(--accent); }
.handbook-stats .stat-lbl { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }

.handbook-notes { padding: 12px 24px 20px; }
.handbook-notes .field-log-label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.12em; margin-bottom: 8px; }
.handbook-notes .field-log-text {
  font-size: 15px; color: var(--text-secondary); line-height: 1.8;
  font-family: "KaiTi", "STKaiti", "楷体", "Noto Serif SC", "Songti SC", serif;
}
.handbook-notes textarea {
  width: 100%; padding: 10px 14px; font-size: 15px; color: var(--text-primary);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); resize: none; height: 60px;
  font-family: "KaiTi", "STKaiti", "楷体", "Noto Serif SC", "Songti SC", serif;
  line-height: 1.8;
}
.handbook-notes textarea::placeholder { color: var(--text-muted); font-family: -apple-system, "PingFang SC", sans-serif; }

.template-switcher { display: flex; gap: 8px; padding: 0 24px 20px; overflow-x: auto; }
.template-btn {
  padding: 7px 16px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  white-space: nowrap; transition: all var(--transition-fast);
}
.template-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ===== Profile ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 24px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-num { font-size: 36px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

.user-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.user-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden; border: 3px solid var(--border-light);
  transition: all var(--transition-fast);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar:active { transform: scale(0.95); }
.user-nickname { font-size: 18px; font-weight: 600; }
.user-subtitle { font-size: 13px; color: var(--text-tertiary); }

.user-header-row { display: flex; align-items: center; gap: 12px; }
.user-header-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden; flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.user-header-avatar:active {
  transform: scale(0.92);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.user-header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Species Delete ===== */
.species-card { position: relative; }
.species-delete-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.species-delete-btn:active { background: rgba(212, 149, 138, 0.12); color: var(--error); }

/* ===== Home Handbook Cards ===== */
.home-handbook-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px 20px; margin: 0 24px 10px;
  box-shadow: var(--shadow-sm); transition: all var(--transition-fast);
}
.home-handbook-card:active { border-color: var(--accent); box-shadow: var(--shadow-md); }
.home-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.home-card-date { font-size: 14px; font-weight: 600; }
.home-card-stats { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: var(--radius-full); }
.home-card-location { font-size: 13px; color: var(--text-secondary); margin: 8px 0; }
.home-card-species { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.home-species-tag { font-size: 12px; color: var(--text-tertiary); background: var(--bg-elevated); padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid var(--border-light); }
.home-photo-strip { display: flex; gap: 4px; overflow: hidden; border-radius: var(--radius-sm); }
.home-photo-thumb { width: 68px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.home-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Map Page ===== */
.map-page-container { position: fixed; inset: 0; z-index: var(--z-overlay); display: flex; flex-direction: column; }
.bird-map { flex: 1; width: 100%; z-index: 1; }
.map-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: calc(16px + var(--safe-top)) 16px 12px; background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent); }
.map-back-btn { padding: 8px 16px; font-size: 14px; font-weight: 600; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.map-title { font-size: 15px; font-weight: 600; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }
.map-panel { position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.10); max-height: 45vh; overflow-y: auto; }
.map-panel-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 10px auto 8px; }
.map-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 4px 24px 12px; font-size: 15px; font-weight: 600; }
.map-panel-count { font-size: 12px; font-weight: 500; color: var(--text-tertiary); background: var(--bg-elevated); padding: 3px 10px; border-radius: var(--radius-full); }
.map-spot-list { padding: 0 20px 20px; }
.spot-rank-card { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.spot-rank-card:last-child { border-bottom: none; }
.spot-rank-num { font-size: 18px; font-weight: 700; color: var(--text-muted); width: 32px; text-align: center; flex-shrink: 0; }
.spot-rank-name { font-size: 15px; font-weight: 600; }
.spot-rank-rate { font-size: 16px; font-weight: 700; flex-shrink: 0; }
.spot-rank-rate-bar { height: 3px; background: var(--border-light); border-radius: 2px; margin: 6px 0; overflow: hidden; }
.spot-rank-rate-fill { height: 100%; border-radius: 2px; }
.spot-rank-desc { font-size: 12px; color: var(--text-tertiary); margin-bottom: 6px; line-height: 1.5; }
.spot-rank-species { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.spot-species-chip { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--radius-full); }
.spot-rank-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.spot-rank-tag { font-size: 10px; color: var(--text-muted); }
.btn-map-entry { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; background: var(--accent); border: none; border-radius: var(--radius-full); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; position: relative; z-index: 10; }

/* ===== SVG Icon Helpers ===== */
.tab-icon svg, .home-action-icon svg, .field-icon svg,
.manual-bird-icon svg, .record-bird-icon svg,
.empty-icon svg, .success-icon svg { display: block; color: inherit; }
.tab-icon svg { width: 24px; height: 24px; }
.home-action-icon svg { width: 28px; height: 28px; }
.field-icon svg { width: 18px; height: 18px; flex-shrink: 0; }
.manual-bird-icon svg { width: 24px; height: 24px; }
.record-bird-icon svg { width: 24px; height: 24px; }
.empty-icon svg { width: 48px; height: 48px; color: var(--text-muted); }
.success-icon svg { width: 64px; height: 64px; color: var(--accent); }
.user-avatar svg { width: 40px; height: 40px; }

/* 通用内联图标：替换原 emoji，尺寸随字号（1em），支持在按钮/标题/标签里内联使用 */
.ico { display: inline-flex; vertical-align: -0.15em; line-height: 0; }
.ico svg { width: 1em; height: 1em; }
/* 徽章/里程碑图标容器 */
.badge-icon svg { width: 24px; height: 24px; }
.milestone-icon svg { width: 28px; height: 28px; }
/* 页头装饰鸟（识别首页右上角） */
.header-bird { margin-left: auto; opacity: 0.35; color: var(--ink-light); flex-shrink: 0; }
.header-bird svg { width: 32px; height: 32px; }
/* 徽章分享卡片封面大图标（原 emoji 用 font-size 放大，SVG 需显式给尺寸） */
.badge-card-icon svg { width: 100px; height: 100px; }

/* ===== Misc ===== */
.file-input-hidden { display: none; }
.location-loading { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-tertiary); }
.nickname-input { font-size: 18px; font-weight: 600; color: var(--text-primary); background: transparent; border: none; border-bottom: 2px solid var(--accent); text-align: center; outline: none; width: 180px; padding: 2px 4px; }
.nickname-input::placeholder { color: var(--text-muted); font-weight: 400; }
.note-save-hint { font-size: 11px; color: var(--accent); margin-top: 4px; cursor: pointer; display: none; }
.handbook-notes textarea:focus + .note-save-hint, .note-save-hint.visible { display: block; }
/* ===== Trajectory View ===== */
.trajectory-view {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--bg-primary); display: flex; flex-direction: column;
}
.trajectory-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(16px + var(--safe-top)) 16px 12px;
  background: var(--bg-primary); border-bottom: 1px solid var(--border);
  z-index: 2;
}
.trajectory-title { font-size: 14px; font-weight: 600; }
.trajectory-marker { background: transparent !important; border: none !important; }

.city-picker-dropdown { padding: 4px 0; }

/* ===== Welcome / Onboarding Pages ===== */
.welcome-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px calc(48px + var(--safe-bottom));
  background: var(--bg-primary);
}

.welcome-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.welcome-logo {
  color: var(--accent);
  margin-bottom: 16px;
  animation: welcomePopIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes welcomePopIn {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.welcome-app-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.welcome-tagline {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.welcome-sub {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.welcome-actions {
  padding: 48px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.welcome-skip {
  font-size: 14px;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: none;
  padding: 8px;
  transition: color var(--transition-fast);
}
.welcome-skip:active { color: var(--text-secondary); }

.welcome-form-wrap {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-avatar-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  cursor: pointer;
}

.welcome-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--transition-fast);
}
.welcome-avatar svg {
  width: 52px;
  height: 52px;
  color: var(--accent);
}
.welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.welcome-avatar.has-photo {
  border-style: solid;
  border-color: var(--accent);
  border-width: 3px;
}
.welcome-avatar-area:active .welcome-avatar {
  transform: scale(0.95);
  border-color: var(--accent);
}

.welcome-avatar-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

.welcome-form-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.welcome-form-sub {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

.welcome-input-wrap {
  width: 100%;
  margin-bottom: 28px;
}
.welcome-input-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.welcome-input-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color var(--transition-fast);
}
.welcome-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.welcome-input {
  width: 100%;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  padding-right: 50px;
}
.welcome-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
.welcome-input-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.welcome-submit-btn {
  margin-bottom: 8px;
}

/* Profile: onboarding reminder card */
.profile-onboard-card {
  margin: 0 24px 20px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.profile-onboard-card:active {
  transform: scale(0.98);
}
.profile-onboard-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.profile-onboard-body {
  flex: 1;
  min-width: 0;
}
.profile-onboard-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.profile-onboard-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.profile-onboard-btn {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  white-space: nowrap;
}

/* Voice input button */
.voice-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--accent-soft);
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.voice-btn:active { background: var(--accent); transform: scale(0.9); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Achievements Page ===== */
.achievement-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px; padding: 0 20px 16px;
}
.achievement-stat {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px 8px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.ach-stat-num { font-size: 24px; font-weight: 700; color: var(--accent); }
.ach-stat-lbl { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; font-weight: 500; }

.achievement-section { padding: 8px 20px 20px; }

/* Protected */
.achievement-protected { display: flex; gap: 12px; }
.protected-item {
  flex: 1; padding: 16px; border-radius: var(--radius-lg);
  text-align: center; border: 1px solid var(--border-light);
  background: var(--bg-card);
}
.protected-item.level1 { border-color: var(--error); background: rgba(212,149,138,0.04); }
.protected-item.level2 { border-color: var(--warning); background: rgba(201,179,106,0.04); }
.protected-label { font-size: 12px; font-weight: 600; margin-bottom: 4px; display: block; }
.level1 .protected-label { color: var(--error); }
.level2 .protected-label { color: var(--warning); }
.protected-count { font-size: 22px; font-weight: 700; color: var(--text-primary); }

/* Progress */
.achievement-progress-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.progress-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.progress-bar-wrap {
  height: 8px; border-radius: 4px; background: var(--border-light);
  overflow: hidden; margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #9DCEA0);
  transition: width 0.5s ease;
}
.progress-pct { font-size: 13px; font-weight: 700; color: var(--accent); text-align: right; }

/* Milestones */
.milestone-grid { display: flex; flex-direction: column; gap: 10px; }
.milestone-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.milestone-icon { font-size: 28px; flex-shrink: 0; width: 40px; text-align: center; }
.milestone-info { flex: 1; min-width: 0; }
.milestone-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.06em; margin-bottom: 2px; }
.milestone-value { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.milestone-value small { font-weight: 400; font-size: 12px; color: var(--text-tertiary); margin-left: 6px; }

/* Habitat */
.habitat-list { display: flex; flex-direction: column; gap: 6px; }
.habitat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.habitat-item span { font-size: 14px; }
.habitat-count { font-weight: 600; color: var(--accent); }

/* New species tags */
.new-species-list { display: flex; flex-wrap: wrap; gap: 8px; }
.new-species-tag {
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius-full); border: 1px solid var(--accent);
}

/* City Search Results Dropdown */
.city-search-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.city-search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}
.city-search-item:last-child { border-bottom: none; }
.city-search-item:active { background: var(--accent-soft); }

.city-search-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.city-search-item-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Province Tracker Grid */
.province-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.province-chip {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.province-chip.visited {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.province-chip-count {
  display: inline-block;
  margin-left: 3px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #FFF;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  vertical-align: middle;
}

/* Badges */
.badge-list { display: flex; flex-direction: column; gap: 8px; }
.badge-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); opacity: 0.6;
  transition: all var(--transition-fast);
}
.badge-item.unlocked { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.badge-icon { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }
.badge-info { flex: 1; min-width: 0; }
.badge-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.badge-desc { font-size: 11px; color: var(--text-tertiary); margin-bottom: 6px; }
.badge-bar { height: 4px; margin-bottom: 0; }
.badge-status { font-size: 12px; font-weight: 600; color: var(--text-tertiary); flex-shrink: 0; }
.badge-item.unlocked .badge-status { color: var(--accent); }

/* 已解锁徽章的「分享海报」小圆按钮 */
.badge-share-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; border: none;
  background: var(--accent); color: #FFF;
  font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
}
.badge-share-btn:active { transform: scale(0.9); background: #78A87B; }

/* ===== OPC Team Section ===== */
.team-section { padding: 0 20px 32px; }

.team-section .team-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 20px;
}
.team-section .team-divider::before,
.team-section .team-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.team-section .team-divider span {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap;
}

/* CEO Card — standout */
.team-ceo-card {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px var(--accent-glow);
  margin-bottom: 16px;
}
.team-ceo-card .team-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.team-ceo-card .team-avatar svg { width: 40px; height: 40px; }
.team-ceo-info { flex: 1; min-width: 0; }
.team-ceo-info .team-name {
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.team-ceo-info .team-role-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-full);
  background: var(--accent); color: #FFF;
  letter-spacing: 0.06em;
}
.team-ceo-info .team-bio {
  font-size: 13px; color: var(--text-secondary);
  margin-top: 4px; line-height: 1.6;
}

/* Agent Cards — grid */
.team-agent-grid {
  display: flex; flex-direction: column;
  gap: 10px;
}
.team-agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.team-agent-card:active {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}
.team-agent-card .team-agent-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px;
}
.team-agent-card .team-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}
.team-agent-card .team-avatar svg { width: 32px; height: 32px; }
.team-agent-card .team-agent-name {
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.team-agent-card .team-role-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-full);
  letter-spacing: 0.06em;
}
.team-agent-card .team-agent-title {
  font-size: 12px; color: var(--text-tertiary);
  margin-top: 2px;
}
.team-agent-card .team-bio {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 10px;
}
.team-agent-card .team-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.team-agent-card .team-meta-item {
  font-size: 11px; padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
}
.team-agent-card .team-meta-item.model-tag {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 600;
}

/* Agent accent colors */
.team-agent-card.sunsun .team-avatar { border-color: #D4958A; background: rgba(212, 149, 138, 0.06); }
.team-agent-card.sunsun .team-role-badge { background: #D4958A; color: #FFF; }
.team-agent-card.yuanyuan .team-avatar { border-color: #C9B36A; background: rgba(201, 179, 106, 0.06); }
.team-agent-card.yuanyuan .team-role-badge { background: #C9B36A; color: #FFF; }
.team-agent-card.akuang .team-avatar { border-color: #7A7874; background: rgba(122, 120, 116, 0.06); }
.team-agent-card.akuang .team-role-badge { background: #7A7874; color: #FFF; }

.team-footer {
  text-align: center; padding: 8px 0 4px;
  font-size: 12px; color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===== Accent Blue Usage ===== */
/* 识别页「手动记录」按钮：蓝色强调 */
.home-action-item.blue-accent .home-action-label { color: var(--accent-blue); }
.home-action-item.blue-accent:active { border-color: var(--accent-blue); box-shadow: 0 0 16px var(--accent-blue-glow); }

/* 地图页排名数字：蓝色半透明 */
.spot-rank-num.top { color: var(--accent-blue); background: var(--accent-blue-soft); border-radius: var(--radius-sm); padding: 2px 6px; }

/* 个人中心统计：记录数 = 蓝色 */
.stat-card.records .stat-num { color: var(--accent-blue); }

/* ===== Admin Dashboard ===== */
.admin-page { padding-bottom: 80px; }

.admin-stats-row { display: flex; gap: 8px; padding: 0 20px; margin-bottom: 6px; }
.admin-stat-card { flex: 1; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 12px 8px; text-align: center; }
.admin-stat-card .as-num { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.admin-stat-card .as-num.accent { color: var(--accent); }
.admin-stat-card .as-label { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.admin-new-week { text-align: center; font-size: 12px; color: var(--text-tertiary); padding: 4px 0 12px; }

.admin-search-bar { display: flex; align-items: center; gap: 8px; margin: 0 20px 12px; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.admin-search-input { flex: 1; border: none; background: none; font-size: 14px; outline: none; color: var(--text-primary); }

.admin-user-list { margin: 0 20px; }
.admin-user-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.admin-user-row:last-child { border-bottom: none; }
.aur-info { flex: 1; }
.aur-name { font-size: 14px; font-weight: 500; }
.aur-name small { font-size: 12px; color: var(--text-tertiary); font-weight: 400; }
.aur-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.aur-action { flex-shrink: 0; }

.admin-ban-btn { padding: 4px 12px; font-size: 12px; border-radius: var(--radius-sm); border: 1px solid #D35A5A; background: none; color: #D35A5A; cursor: pointer; }

.admin-pagination { display: flex; justify-content: center; gap: 6px; padding: 16px; }
.admin-page-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); font-size: 13px; cursor: pointer; color: var(--text-secondary); }
.admin-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.admin-record-row { padding: 10px 14px; border-bottom: 1px solid var(--border-light); }
.admin-record-row:last-child { border-bottom: none; }

/* ===== Cloud Login Card ===== */
.cloud-status-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.cloud-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; outline: none; background: var(--bg-elevated); color: var(--text-primary); box-sizing: border-box; }

/* ===== 同步密码（profile 已登录卡片） ===== */
.sync-pw-block { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-light); }
.sync-pw-hint { font-size: 12px; color: var(--text-tertiary); line-height: 1.6; }
.sync-pw-link { color: var(--accent); text-decoration: none; margin-left: 4px; font-weight: 600; }
.sync-pw-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.sync-pw-label { font-size: 12px; color: var(--text-tertiary); }
.sync-pw-masked { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.05em; }

/* ===== Sub Tab Bar (记录 tab internal) ===== */
.sub-tab-bar {
  display: flex; gap: 12px; padding: 14px 24px 8px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-primary);
  position: sticky; top: 0; z-index: 10;
}
.sub-tab-btn {
  padding: 10px 22px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.sub-tab-btn.active {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent);
}

/* ===== Feed Mode Bar (社区动态 / 我的日志 toggle) ===== */
.feed-mode-bar {
  display: flex; gap: 8px; padding: 12px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-primary);
}
.feed-mode-btn {
  flex: 1; padding: 10px 16px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  text-align: center; transition: all var(--transition-fast);
}
.feed-mode-btn.active {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent);
}

/* ===== Social Feed Card ===== */
.feed-list { padding: 8px 20px 20px; }

.feed-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.feed-card:active { border-color: var(--border); box-shadow: var(--shadow-md); }

.feed-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.feed-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.feed-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-user-avatar svg { width: 20px; height: 20px; color: var(--accent); }

.feed-user-info { flex: 1; min-width: 0; }
.feed-user-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.feed-user-name { font-size: 14px; font-weight: 600; }
.feed-post-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.feed-follow-btn {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.feed-follow-btn:active { background: var(--accent); color: #fff; }
.feed-follow-btn.following {
  border-color: var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.feed-species-tag {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px;
  border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0;
}

.feed-card-body { margin-bottom: 10px; }
.feed-card-content {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 8px;
}
.feed-card-image {
  border-radius: var(--radius-md); overflow: hidden;
  max-height: 240px;
}
.feed-card-image img { width: 100%; object-fit: cover; max-height: 240px; }

.feed-card-actions {
  display: flex; gap: 24px; padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.feed-action-btn {
  font-size: 13px; font-weight: 500; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px;
  transition: all var(--transition-fast);
  border: none; background: none; padding: 4px 0; cursor: pointer;
}
.feed-action-btn:active { color: var(--text-primary); }
.feed-like-btn.liked { color: #E55B5B; }
.feed-like-btn.liked span { color: #E55B5B; }

/* ===== Feed Pagination ===== */
.feed-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 16px 0 24px;
}
.feed-page-btn {
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.feed-page-btn:active { border-color: var(--accent); background: var(--accent-soft); }
.feed-page-info { font-size: 13px; color: var(--text-tertiary); }

/* ===== Feed Post Detail ===== */
.feed-detail { padding: 4px 0; }

.feed-detail-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}

.feed-detail-user { flex: 1; }

.feed-detail-body { margin-bottom: 14px; }
.feed-detail-content {
  font-size: 15px; color: var(--text-primary);
  line-height: 1.8; margin-bottom: 10px;
}
.feed-detail-image {
  width: 100%; border-radius: var(--radius-md);
  max-height: 300px; object-fit: cover;
}

.feed-detail-stats {
  display: flex; gap: 20px; padding: 10px 0;
  border-top: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-tertiary);
  margin-bottom: 12px;
}

.feed-comment-input-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.feed-comment-input {
  flex: 1; padding: 10px 14px; font-size: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-elevated); color: var(--text-primary);
  outline: none;
}
.feed-comment-input::placeholder { color: var(--text-muted); }
.feed-comment-input:focus { border-color: var(--accent); }

/* ===== Comment Item ===== */
.feed-comments-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.comment-item {
  padding: 12px 14px; background: var(--bg-elevated);
  border-radius: var(--radius-sm); margin-bottom: 4px;
}
.comment-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 4px;
}
.comment-author { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-content { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== Handbook Share ===== */
.handbook-share-row {
  padding: 6px 24px 16px;
  display: flex; justify-content: flex-end;
}
.handbook-share-btn {
  padding: 7px 16px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent);
  transition: all var(--transition-fast); cursor: pointer;
}
.handbook-share-btn:active { background: var(--accent); color: #fff; }

/* ===== Share Modal ===== */
.share-modal-content { padding: 6px 0; }
.share-preview-species {
  font-size: 16px; font-weight: 600; margin-bottom: 10px;
}
.share-preview-image {
  width: 100%; border-radius: var(--radius-md);
  max-height: 180px; object-fit: cover; margin-bottom: 12px;
}
.share-content-input {
  width: 100%; height: 80px; padding: 12px 14px;
  font-size: 14px; color: var(--text-primary);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); resize: none;
  box-sizing: border-box;
}
.share-content-input::placeholder { color: var(--text-muted); }
.share-content-input:focus { border-color: var(--accent); outline: none; }
.share-char-count {
  text-align: right; font-size: 12px; color: var(--text-muted);
  margin-bottom: 10px;
}
.share-public-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 8px;
}
.share-public-label input[type="checkbox"] { accent-color: var(--accent); }

/* ===== Follow List ===== */
.profile-social-links { padding: 0 0 6px; }
.follow-list { padding: 4px 0; }
.follow-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.follow-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  font-size: 18px;
}
.follow-avatar img { width: 100%; height: 100%; object-fit: cover; }
.follow-info { flex: 1; min-width: 0; }
.follow-name { font-size: 14px; font-weight: 600; }
.follow-username { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.unfollow-btn {
  font-size: 12px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; flex-shrink: 0;
  transition: all var(--transition-fast);
}
.unfollow-btn:active { border-color: var(--error); color: var(--error); }

/* ===== Public Profile Modal ===== */
.public-profile-modal {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  animation: pageIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.pp-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 12px 12px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; z-index: 2;
}

.pp-back-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-primary);
  transition: all var(--transition-fast);
}
.pp-back-btn:active { background: var(--bg-elevated); transform: scale(0.95); }

.pp-header-title {
  font-size: 16px; font-weight: 600;
  color: var(--text-primary);
}

.pp-body {
  flex: 1; padding-bottom: calc(24px + var(--safe-bottom));
}

/* Public Profile Header */
.public-profile-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px 24px;
  text-align: center;
}

.pp-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 12px;
  border: 3px solid var(--border-light);
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-avatar svg { width: 40px; height: 40px; color: var(--accent); }

.pp-nickname {
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pp-username {
  font-size: 14px; color: var(--text-tertiary);
  margin-bottom: 6px;
}

.pp-created {
  font-size: 12px; color: var(--text-muted);
}

.pp-follow-btn {
  margin-top: 12px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pp-follow-btn:active { background: var(--accent); color: #fff; }
.pp-follow-btn.following {
  border-color: var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* 关注 / 私信按钮并排容器 */
.pp-action-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 12px;
}
.pp-action-row .pp-follow-btn { margin-top: 0; }
.pp-msg-btn {
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pp-msg-btn:active { background: var(--accent-soft); color: var(--accent); }

/* Public Profile Stats */
.public-profile-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 0 24px 24px;
}

.pp-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
  box-shadow: var(--shadow-sm);
}

.pp-stat-num {
  font-size: 36px; font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.pp-stat-label {
  font-size: 13px; color: var(--text-tertiary);
  margin-top: 4px;
}

/* Public Species List */
.public-species-list {
  padding: 12px 24px 24px;
  display: flex; flex-direction: column; gap: 6px;
}

.public-species-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}

.ps-info { flex: 1; min-width: 0; }
.ps-name {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.ps-meta {
  font-size: 12px; color: var(--text-tertiary);
}

.ps-count {
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px; border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Public Profile Posts */
.pp-posts-list {
  padding: 12px 24px 24px;
  display: flex; flex-direction: column; gap: 10px;
}

.pp-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.pp-post-species {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.pp-post-content {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 8px;
}

.pp-post-meta {
  display: flex; gap: 16px;
  font-size: 12px; color: var(--text-muted);
}

/* Feed Username Link */
.feed-username-link {
  cursor: pointer;
  transition: color var(--transition-fast);
}
.feed-username-link:hover,
.feed-username-link:active {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== Messages ===== */
.unread-badge {
  display: inline-block;
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== 十鸟斩勋章卡片弹层 ===== */
.badge-card-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(50, 45, 40, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: fadeIn 0.25s ease;
}

.badge-card {
  position: relative;
  width: 100%; max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: badgePop 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes badgePop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.badge-card-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--bg-secondary);
  color: var(--text-tertiary); font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
}
.badge-card-close:active { background: var(--border); color: var(--text-primary); }

.badge-card-cover {
  margin: 4px auto 16px;
  display: flex; justify-content: center;
}
.badge-card-cover svg { display: block; }
/* 大号 emoji 封面（非小鸟插画的勋章用） */
.badge-card-icon {
  font-size: 100px;
  line-height: 1.2;
}

.badge-card-title {
  font-size: 28px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--text-primary);
}
.badge-card-sub {
  font-size: 14px; color: var(--text-tertiary);
  margin-top: 8px; margin-bottom: 22px;
}
.badge-card-actions { display: flex; gap: 12px; }
.badge-card-btn { flex: 1; padding: 14px 0; font-size: 15px; }

/* ===== 海报图片预览层 ===== */
.badge-poster-overlay {
  position: fixed; inset: 0; z-index: var(--z-toast);
  background: rgba(20, 18, 15, 0.82);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.badge-poster-inner {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 340px;
}
.badge-poster-img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.badge-poster-hint {
  margin-top: 16px; font-size: 14px; color: #FFF;
  text-align: center;
}
.badge-poster-close {
  margin-top: 18px; padding: 10px 32px;
  font-size: 14px; font-weight: 600;
  color: #FFF; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--transition-fast);
}
.badge-poster-close:active { background: rgba(255,255,255,0.3); }

/* ===== 观鸟规划助手 ===== */

/* 识别页「当季鸟况」入口卡片 */
.planner-entry-card {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; padding: 14px 16px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius-lg); cursor: pointer;
  transition: all var(--transition-fast);
}
.planner-entry-card:active { transform: scale(0.98); background: var(--accent-glow); }
.planner-entry-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.planner-entry-body { flex: 1; min-width: 0; }
.planner-entry-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.planner-entry-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.planner-entry-arrow { font-size: 20px; color: var(--accent); flex-shrink: 0; }

/* 全屏规划页 */
.planner-view {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: var(--bg-primary); display: flex; flex-direction: column;
}
.planner-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.planner-back {
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-primary);
}
.planner-title { font-size: 16px; font-weight: 600; }
.planner-body {
  flex: 1; overflow-y: auto;
  padding: 16px 16px calc(16px + var(--safe-bottom));
}

.planner-section-label {
  font-size: 12px; font-weight: 700; color: var(--text-tertiary);
  letter-spacing: 0.06em; margin: 4px 0 8px;
}

/* 「📍 定位」按钮：城市输入框右侧，小而明确（复用 planner-plan-point-add 风格） */
.planner-locate-btn {
  flex-shrink: 0; padding: 8px 12px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-full); border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent); cursor: pointer;
  transition: all var(--transition-fast); white-space: nowrap;
}
.planner-locate-btn:active { background: var(--accent); color: #FFF; }

/* 月份 chips */
.planner-month-chips {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.planner-month-chips::-webkit-scrollbar { display: none; }
.planner-month-chip {
  flex-shrink: 0; padding: 8px 12px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.planner-month-chip.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.planner-season-hint {
  font-size: 12px; color: var(--text-tertiary); margin: 8px 0 12px;
}

/* 行程天数分段 */
.planner-day-seg {
  display: flex; gap: 6px; margin-bottom: 4px;
}
.planner-day-seg-btn {
  flex: 1; padding: 10px 0; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.planner-day-seg-btn.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}

/* 偏好 pills */
.planner-tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.planner-tag-pill {
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.planner-tag-pill.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600;
}

/* 我的计划 banner + 列表 */
.planner-plans-wrap { margin-top: 20px; }
.planner-plans-banner {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 14px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text-primary); cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.planner-plans-toggle { font-size: 12px; font-weight: 500; color: var(--accent); }
.planner-plans-list {
  margin-top: 8px; display: flex; flex-direction: column; gap: 8px;
}
.planner-plan-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.planner-plan-info { flex: 1; min-width: 0; }
.planner-plan-name { font-size: 14px; font-weight: 600; }
.planner-plan-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.planner-plan-remove {
  flex-shrink: 0; padding: 6px 12px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-card); color: var(--text-secondary); cursor: pointer;
}
.planner-plan-remove:active { border-color: var(--error); color: var(--error); }
.planner-plan-empty { text-align: center; font-size: 13px; color: var(--text-tertiary); padding: 12px; }

/* 结果态 */
.planner-headline {
  padding: 12px 14px; font-size: 14px; line-height: 1.6;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius-lg); color: var(--text-primary);
  margin-bottom: 12px;
}
.planner-generic-tip {
  padding: 10px 14px; font-size: 13px;
  background: #FFF8E1; border: 1px solid #FFE082;
  border-radius: var(--radius-md); color: #795548; margin-bottom: 12px;
}
.planner-itinerary {
  margin-bottom: 14px; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.planner-itinerary .planner-section-label { margin-top: 0; }
.planner-day {
  padding: 10px 0; border-bottom: 1px dotted var(--border);
}
.planner-day:last-of-type { border-bottom: none; }
.planner-day-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.planner-day-slot { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.planner-itinerary-hint { font-size: 12px; color: var(--warning); margin-top: 8px; line-height: 1.5; }

.planner-empty { text-align: center; padding: 40px 20px; color: var(--text-tertiary); font-size: 14px; }

/* 推荐点卡片 */
.planner-spot-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.planner-spot-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.planner-rank {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  background: var(--bg-elevated); border-radius: var(--radius-sm);
}
.planner-rank-top { background: var(--accent); color: #FFF; }
.planner-spot-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.planner-spot-label {
  flex-shrink: 0; font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-full);
}
.planner-label-best { color: var(--success); background: var(--accent-soft); }
.planner-label-all { color: var(--text-secondary); background: var(--bg-elevated); }
.planner-label-off { color: var(--text-muted); background: var(--bg-secondary); }
.planner-spot-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.planner-spot-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.planner-meta-row { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; }

.planner-spot-birds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.planner-bird-chip { font-size: 12px; padding: 3px 10px; }
.planner-bird-chip:active { background: var(--accent-soft); color: var(--accent); }

.planner-tip {
  display: flex; gap: 6px; align-items: flex-start;
  font-size: 12px; color: var(--text-secondary); line-height: 1.6;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  padding: 8px 10px; margin-bottom: 8px; cursor: pointer;
}
.planner-tip-icon { flex-shrink: 0; }
.planner-tip-text {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.planner-tip.expanded .planner-tip-text {
  display: block; -webkit-line-clamp: unset; overflow: visible;
}

.planner-spot-actions { display: flex; gap: 10px; }
.planner-btn-add, .planner-btn-go {
  flex: 1; padding: 11px 0; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-full); cursor: pointer;
  transition: all var(--transition-fast);
}
.planner-btn-add {
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent);
}
.planner-btn-add:active { background: var(--accent); color: #FFF; }
.planner-btn-add.added {
  border-color: var(--border); background: var(--bg-elevated); color: var(--text-tertiary); cursor: default;
}
.planner-btn-add:disabled { cursor: default; }
.planner-btn-go { border: none; background: var(--accent); color: #FFF; }
.planner-btn-go:active { background: #78A87B; }

/* ===== 顺路观鸟推荐：天数 stepper / 计划地点 / 距离标注 ===== */
.planner-day-stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.planner-day-chips { display: flex; gap: 6px; }
.planner-day-chip {
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.planner-day-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.planner-day-input-wrap { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.planner-day-input {
  width: 60px; padding: 8px 10px; font-size: 14px; font-weight: 700;
  color: var(--text-primary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md); outline: none;
  text-align: center; transition: all var(--transition-fast);
  /* 隐藏原生 number 上下箭头，保持移动端整洁 */
  -moz-appearance: textfield; appearance: textfield;
}
.planner-day-input::-webkit-outer-spin-button,
.planner-day-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.planner-day-input:focus { border-color: var(--accent); }
.planner-day-input-unit { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

.planner-plan-point-input { display: flex; gap: 8px; margin-bottom: 8px; }
.planner-plan-point-input input {
  flex: 1; min-width: 0; padding: 11px 14px; font-size: 14px;
  color: var(--text-primary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-full); outline: none;
}
.planner-plan-point-input input::placeholder { color: var(--text-muted); }
.planner-plan-point-input input:focus { border-color: var(--accent); }
.planner-plan-point-add {
  flex-shrink: 0; padding: 10px 18px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-full); border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent); cursor: pointer;
  transition: all var(--transition-fast);
}
.planner-plan-point-add:active { background: var(--accent); color: #FFF; }

.planner-plan-point-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.planner-plan-point-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  font-size: 12px; font-weight: 500; background: var(--accent-soft);
  border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius-full);
}
.planner-plan-point-remove {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: rgba(139, 191, 143, 0.18); color: var(--accent);
  font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.planner-plan-point-remove:active { background: var(--accent); color: #FFF; }

.planner-spot-dist { font-size: 12px; color: var(--accent); margin-bottom: 8px; line-height: 1.5; }
.planner-spot-dist.far { color: var(--text-tertiary); }

/* ===== 新手引导蒙层 (Coach Marks) ===== */
.guide-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: var(--z-guide);
  background: transparent;
}
.guide-spotlight {
  position: fixed; z-index: var(--z-guide);
  background: transparent; pointer-events: none;
  border-radius: 20px; /* JS 动态：目标 computed border-radius + 4px */
  box-shadow:
    0 0 0 3px var(--accent),                          /* 绿色高亮环 */
    0 0 0 6px var(--accent-glow),                     /* 柔和绿晕 */
    0 0 0 9999px rgba(60, 60, 60, 0.65);              /* 暗色遮罩 */
  transition: left .35s, top .35s, width .35s, height .35s, border-radius .35s, opacity .25s;
}
.guide-bubble {
  position: fixed; z-index: var(--z-guide);
  width: min(320px, calc(100vw - 40px));
  padding: 16px 18px; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); color: var(--text-primary);
  font-size: 15px; line-height: 1.6;
  transition: left .35s, top .35s, opacity .25s;
}
.guide-bubble-text { display: block; }
.guide-bubble-text.pulse { animation: guidePulse 0.35s ease; }
@keyframes guidePulse {
  0% { opacity: 1; }
  40% { opacity: 0.45; }
  100% { opacity: 1; }
}
/* 指向目标的小白方块箭头（8px 旋转 45°，朝目标一侧） */
.guide-arrow {
  position: absolute; width: 8px; height: 8px;
  background: var(--bg-card); transform: rotate(45deg);
  transition: left .35s;
}
.guide-arrow.up   { top: -4px;    border-top: 1px solid var(--border-light);    border-left: 1px solid var(--border-light); }
.guide-arrow.down { bottom: -4px; border-bottom: 1px solid var(--border-light); border-right: 1px solid var(--border-light); }
.guide-no-transition { transition: none !important; }
.guide-hidden { opacity: 0 !important; }
.guide-footer {
  position: fixed; bottom: calc(var(--safe-bottom) + 20px);
  left: 50%; transform: translateX(-50%);
  width: min(430px, 100%);
  z-index: var(--z-guide);
  display: flex; align-items: center; gap: 10px;
  padding: 0 24px; box-sizing: border-box;
}
.guide-dots { display: flex; gap: 8px; margin-right: auto; }
.guide-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: all var(--transition-fast);
}
.guide-dot.active { width: 22px; border-radius: 4px; background: var(--accent); }
.guide-next {
  padding: 11px 22px; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #FFF; border: none;
  border-radius: var(--radius-full); cursor: pointer;
  box-shadow: 0 2px 8px rgba(139, 191, 143, 0.25);
  transition: all var(--transition-fast);
}
.guide-next:active { background: #78A87B; transform: scale(0.97); }
.guide-skip {
  padding: 11px 22px; font-size: 14px; font-weight: 600;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--transition-fast);
  white-space: nowrap;
}
.guide-skip:active { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--accent); }
