/* ── CrowTalk · Tabs · Per-tab styles ───────────────────────────── */

/* ── Tab container (scrollable main area) ────────────────────────── */
.tab-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 12px);
}

.tab-pane {
  padding: 16px;
  min-height: 100%;
}

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.tab-header h2 {
  font-size: var(--fs-xl, 22px);
  font-weight: 700;
  letter-spacing: var(--ls-tight, -0.4px);
}

/* ── Top-bar right (profile icon) ────────────────────────────────── */
.top-bar-left  { display: flex; align-items: center; gap: 8px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }

.app-logo { font-size: 22px; line-height: 1; }

.profile-icon-btn {
  width: 36px; height: 36px;
  font-size: 18px;
  border-radius: 50%;
  background: var(--s2);
  transition: background .15s;
}
.profile-icon-btn:hover { background: var(--s3); }

/* ── Chip rows (filter + call type) ──────────────────────────────── */
.chip-row, .call-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.lib-chip {
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--s2);
  color: var(--t2);
  border: 1px solid var(--s3);
  transition: all .15s;
  white-space: nowrap;
}
.lib-chip.active,
.lib-chip:hover {
  background: var(--acc);
  color: #000;
  border-color: var(--acc);
}

/* ── Library ──────────────────────────────────────────────────────── */
.lib-toolbar {
  margin-bottom: 10px;
}

.lib-search-input {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t1);
  outline: none;
  transition: border-color .15s;
}
.lib-search-input:focus { border-color: var(--acc); }

.lib-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.lib-load-more {
  display: block;
  margin: 16px auto 0;
}

/* ── Record tab ───────────────────────────────────────────────────── */
.mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t2);
  font-weight: 500;
  font-size: 14px;
  transition: all .15s;
}
.mode-btn.active {
  background: var(--acc);
  color: #000;
  border-color: var(--acc);
}

/* Territory toggle */
.territory-toggle {
  margin-bottom: 14px;
}

.territory-label {
  display: block;
  font-size: 12px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.territory-btns {
  display: flex;
  gap: 8px;
}

.territory-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--s2);
  border: 1.5px solid var(--s3);
  color: var(--t2);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
}

.territory-btn.active {
  color: #000;
  border-color: transparent;
}

#territory-home.active { background: #4a9eff; }
#territory-new.active  { background: #ff9f43; }

/* Call type chips */
.call-chips-section {
  margin-bottom: 16px;
}

.call-chips-label {
  display: block;
  font-size: 12px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.optional-hint {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

.call-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--s2);
  border: 1.5px solid var(--chip-color, #4a9eff);
  color: var(--chip-color, #4a9eff);
  transition: all .15s;
  white-space: nowrap;
}

.call-chip.active {
  background: var(--chip-color, #4a9eff);
  color: #000;
}

/* Visualizer & recording UI */
.rec-viz-wrap {
  background: var(--s2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 80px;
}

.rec-viz {
  display: block;
  width: 100%;
  height: 80px;
}

.video-preview {
  width: 100%;
  border-radius: var(--radius-sm);
}

.record-btn-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.record-ring {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--s3);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.record-ring.pulsing {
  border-color: var(--red);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,85,85,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(232,85,85,0); }
}

.record-btn {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--s2);
  border: 2px solid var(--s3);
  font-size: 28px;
  transition: all .2s;
}
.record-btn.recording {
  background: var(--red);
  border-color: var(--red);
}

.rec-status { font-size: 13px; color: var(--t3); }
.rec-timer  { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--red); }

/* Pending zone */
.pending-zone {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-meta { display: flex; gap: 6px; flex-wrap: wrap; }

.pending-tag {
  padding: 3px 8px;
  background: var(--s2);
  border-radius: 4px;
  font-size: 11px;
  color: var(--t2);
  font-family: monospace;
}

.pending-player { width: 100%; border-radius: var(--radius-sm); }

.rec-notes {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm);
  color: var(--t1);
  padding: 8px 10px;
  resize: none;
  outline: none;
}
.rec-notes:focus { border-color: var(--acc); }

.pending-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Journal tab ──────────────────────────────────────────────────── */
.journal-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.journal-card {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--radius);
  padding: 14px;
}

.journal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.j-date { font-size: 12px; color: var(--t3); }

.j-actions { display: flex; gap: 4px; }
.icon-btn  { padding: 4px 6px; border-radius: 6px; font-size: 14px; transition: background .15s; }
.icon-btn:hover { background: var(--s3); }

.j-title  { font-size: var(--fs-ui, 15px); font-weight: 600; letter-spacing: var(--ls-snug, -0.2px); margin-bottom: 6px; }
.j-body   { font-size: var(--fs-base, 14px); color: var(--t2); line-height: 1.5; margin-bottom: 8px; }

.j-footer { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.j-tag {
  padding: 2px 8px;
  background: var(--s3);
  border-radius: 12px;
  font-size: 11px;
  color: var(--acc2);
}

.j-linked { font-size: 11px; color: var(--t3); }

/* Journal form */
.form-section-title {
  font-size: var(--fs-lg, 18px);
  font-weight: 700;
  letter-spacing: var(--ls-tight, -0.4px);
  margin-bottom: 14px;
}

.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ── Theory tab ───────────────────────────────────────────────────── */
.tab-pane-theory {
  padding: 16px;
}

/* 2-column card grid for section topics */
.theory-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.theory-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--s1);
  border: 1px solid var(--s3);
  color: var(--t1);
  text-align: left;
  transition: all .15s;
  cursor: pointer;
}
.theory-nav-btn:hover {
  background: var(--s2);
  border-color: var(--acc);
}
.theory-nav-btn.active {
  background: var(--s2);
  border-color: var(--acc);
  box-shadow: 0 0 0 1px var(--acc);
}
.theory-nav-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}
.theory-nav-label {
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  letter-spacing: var(--ls-snug, -0.2px);
}
.theory-nav-desc {
  font-size: var(--fs-xs, 11px);
  color: var(--t3);
}

/* Constrain content width on desktop */
.theory-content {
  max-width: 680px;
}

@media (min-width: 800px) {
  #tabTheory {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .theory-nav-grid {
    width: 100%;
    max-width: 680px;
    grid-template-columns: repeat(3, 1fr);
  }
  .theory-content {
    width: 100%;
    max-width: 680px;
  }
}

.theory-panel { }

.theory-section {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.theory-section h2 {
  font-size: var(--fs-lg, 18px);
  font-weight: 700;
  letter-spacing: var(--ls-tight, -0.4px);
  margin-bottom: 8px;
}

.cat-desc {
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 12px;
}

/* Territory cards */
.territory-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

@media (min-width: 600px) {
  .territory-cards { flex-direction: row; }
}

.territory-card {
  flex: 1;
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 14px;
  border-top: 3px solid var(--s3);
}
.territory-card.home { border-top-color: #4a9eff; }
.territory-card.new  { border-top-color: #ff9f43; }

.tc-icon { font-size: 28px; margin-bottom: 6px; }

.territory-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.territory-card p {
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 8px;
}

.territory-card ul {
  padding-left: 16px;
  font-size: 12px;
  color: var(--t3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theory-tip {
  background: rgba(45,212,191,.08);
  border-left: 3px solid var(--acc);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--t2);
  margin-top: 12px;
}

/* ── Synth sound cards (Theory "Try sounds" section) ── */
.theory-synths-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}
.theory-synth-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-left: 3px solid var(--cat-color, var(--acc));
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 10px;
  transition: border-color .15s;
}
.theory-synth-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cat-color, var(--acc));
  color: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  transition: opacity .15s, transform .1s;
}
.theory-synth-btn:active { transform: scale(.93); }
.theory-synth-btn.playing { opacity: .85; }
.theory-synth-body { flex: 1; min-width: 0; }
.theory-synth-name { font-size: 14px; font-weight: 600; color: var(--t1); }
.theory-synth-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.theory-synth-phonetic { font-size: 12px; color: var(--t3); font-style: italic; }
.theory-synth-cat      { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.theory-synth-warn     { font-size: 11px; color: var(--red); margin-top: 4px; }

/* Call type cards */
.ct-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ct-card {
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.ct-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ct-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ct-dot-sm {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.ct-label { font-size: 14px; }

.ct-desc {
  font-size: 12px;
  color: var(--t3);
  margin: 0;
  padding-left: 18px;
}

/* Tips grid */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 400px) {
  .tips-grid { grid-template-columns: 1fr; }
}

.tip-card {
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.tip-icon { font-size: 22px; margin-bottom: 6px; }

.tip-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tip-card p { font-size: 12px; color: var(--t3); }

/* ── Data tab ─────────────────────────────────────────────────────── */
.data-content { display: flex; flex-direction: column; gap: 0; }

.data-section {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.data-section h2 {
  font-size: var(--fs-lg, 18px);
  font-weight: 700;
  letter-spacing: var(--ls-tight, -0.4px);
  margin-bottom: 14px;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent, #2dd4bf);
  color: #000;
  border: none;
  border-radius: var(--radius-sm, 8px);
  padding: 9px 16px;
  font-size: var(--fs-sm, 14px);
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}
.export-btn:hover  { filter: brightness(1.08); }
.export-btn:active { filter: brightness(.9); }

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 340px) {
  .stat-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.stat-icon  { font-size: 20px; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--acc); }
.stat-label { font-size: 11px; color: var(--t3); margin-top: 2px; }

.data-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 10px;
}

.dr-label { font-size: 13px; color: var(--t1); display: flex; align-items: center; gap: 5px; }
.dr-count { font-size: 12px; color: var(--t3); white-space: nowrap; }

.stat-bar-wrap {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--s3);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

/* Monthly chart */
.monthly-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  min-height: 100px;
}

.month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 36px;
}

.month-bar-wrap {
  height: 70px;
  display: flex;
  align-items: flex-end;
}

.month-bar {
  width: 28px;
  background: var(--acc);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height .3s;
}

.month-val   { font-size: 11px; font-weight: 600; color: var(--t2); }
.month-label { font-size: 10px; color: var(--t3); text-align: center; line-height: 1.3; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t1);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.visible       { opacity: 1; transform: translateY(0); }
.toast.toast-success { background: rgba(62,207,114,.15); border-color: var(--green); color: var(--green); }
.toast.toast-error   { background: rgba(232,85,85,.15);  border-color: var(--red);   color: var(--red);   }
.toast.toast-warn    { background: rgba(240,168,50,.15); border-color: var(--amber); color: var(--amber); }

/* ── Confirm modal ────────────────────────────────────────────────── */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.confirm-card {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 340px;
  width: 100%;
}

.confirm-card p   { font-size: 15px; margin-bottom: 20px; color: var(--t1); }
.confirm-actions  { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Utility ──────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.loading-hint { color: var(--t3); font-size: 14px; text-align: center; padding: 24px 0; }
.error-hint   { color: var(--red); font-size: 14px; text-align: center; padding: 16px 0; }
.empty-hint   { color: var(--t3); font-size: 14px; text-align: center; padding: 24px 0; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── Player overlay — active class (used by tab-library.js) ─── */
.player-overlay.active { display: flex; }

.player-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.player-card {
  background: var(--s1);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  position: relative;
}

.overlay-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--s3);
  color: var(--t2);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.overlay-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; padding-right: 36px; }
.overlay-meta  { font-size: 12px; color: var(--t3); margin-bottom: 12px; }

.overlay-controls {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}

.overlay-progress, .overlay-vol {
  flex: 1; accent-color: var(--acc);
}
.overlay-vol { max-width: 80px; }

.overlay-time { font-size: 11px; color: var(--t3); white-space: nowrap; }

.play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--acc);
  color: #0d1117;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.birdnet-tags {
  background: rgba(45,212,191,.08);
  border: 1px solid rgba(45,212,191,.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 6px;
  flex: 1;
}
.birdnet-tag {
  background: rgba(45,212,191,.12);
  color: var(--acc);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
}
.birdnet-tag em { opacity: .7; font-style: normal; margin-left: 4px; }

.birdnet-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.bn-analyze-btn { white-space: nowrap; flex-shrink: 0; }

/* BirdNET results panel in Record tab */
.rec-birdnet-panel {
  margin: 10px 0;
  border: 1px solid rgba(45,212,191,.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(45,212,191,.06);
}
.bn-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--acc);
  margin-bottom: 8px;
}
.bn-loading, .bn-error, .bn-empty {
  font-size: 13px;
  color: var(--t3);
}
.bn-detection {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 4px;
  text-align: left;
}
.bn-detection:hover { background: rgba(45,212,191,.1); border-color: rgba(45,212,191,.3); }
.bn-detection.selected { background: rgba(45,212,191,.15); border-color: var(--acc); }
.bn-name { flex: 1; font-size: 13px; color: var(--t1); }
.bn-conf { font-size: 12px; color: var(--acc); font-weight: 600; min-width: 36px; text-align: right; }
.bn-bar-wrap { width: 60px; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.bn-bar { height: 100%; background: var(--acc); border-radius: 2px; transition: width .3s; }

.ann-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--s3); }
.ann-section h4 { font-size: 12px; color: var(--t3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.ann-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ann-form { display: flex; flex-direction: column; gap: 8px; }
.ann-call-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ann-form-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ann-conf-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t3); flex: 1; }
.ann-conf-label input { flex: 1; accent-color: var(--acc); }

/* ── Form field styles ─────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: var(--fs-xs, 11px);
  color: var(--t3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-cap, 0.6px);
  margin-bottom: 5px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field input[type="password"],
.field textarea {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--t1);
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus { border-color: var(--acc); }

.field input::placeholder,
.field textarea::placeholder { color: var(--t3); }

.field-row { display: flex; gap: 10px; }
.field-half { flex: 1; }

/* ── Profile tab ─────────────────────────────────────────────── */
.profile-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--s3);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #0d1117;
  flex-shrink: 0;
}

.profile-meta { display: flex; flex-direction: column; gap: 3px; }
.profile-role-badge {
  display: inline-block;
  font-size: 11px; padding: 2px 8px;
  border-radius: 20px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  background: rgba(45,212,191,.12); color: var(--acc);
  border: 1px solid rgba(45,212,191,.25);
}
.profile-email { font-size: 13px; color: var(--t3); }
.profile-since { font-size: 11px; color: var(--t3); }

.profile-form { margin-bottom: 24px; }

.profile-danger {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--s3);
}

.danger-btn { color: var(--red) !important; border-color: rgba(232,85,85,.3) !important; }

/* ── Magic sent form ─────────────────────────────────────────── */
.magic-sent-icon { font-size: 40px; margin-bottom: 12px; }
.magic-sent-icon + h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }

/* ── Form error ──────────────────────────────────────────────── */
.form-error {
  background: rgba(232,85,85,.12);
  border: 1px solid rgba(232,85,85,.3);
  color: #ff8080;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}

/* ── btn-secondary ───────────────────────────────────────────── */
.btn-secondary {
  background: var(--s2);
  color: var(--t1);
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-weight: 500;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-secondary:hover { background: var(--s3); }


/* ═══════════════════════════════════════════════════════════
   RECORD TAB — weather/time bar
════════════════════════════════════════════════════════════ */
.rec-weather-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--t2);
}
.rec-clock {
  font-size: 18px;
  font-weight: 700;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}
.rec-weather-icon { font-size: 20px; }
.rec-temp-display { font-weight: 600; color: var(--t1); }
.rec-weather-label { flex: 1; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   JOURNAL — required star + field improvements
════════════════════════════════════════════════════════════ */
.required-star { color: var(--red); margin-left: 2px; }

/* ═══════════════════════════════════════════════════════════
   PROFILE / SETTINGS — territory management
════════════════════════════════════════════════════════════ */
.settings-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--s3);
}
.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.settings-hint {
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* territory list items */
.territory-mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.terr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.terr-item-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.terr-item-body {
  flex: 1;
  min-width: 0;
}
.terr-item-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terr-item-meta {
  font-size: 12px;
  color: var(--t3);
}
.terr-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.terr-edit-btn,
.terr-del-btn {
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--t2);
  transition: background .15s;
}
.terr-edit-btn:hover { background: var(--s3); }
.terr-del-btn:hover  { background: rgba(232,85,85,.15); color: var(--red); }

/* territory sub-items (nests, lookouts, bounds, individuals) */
.terr-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--s2);
  border-radius: 6px;
  margin-bottom: 4px;
}
.terr-sub-icon { font-size: 18px; flex-shrink: 0; }
.terr-sub-body { flex: 1; min-width: 0; }
.terr-sub-name { font-size: 13px; font-weight: 500; color: var(--t1); }
.terr-sub-meta { font-size: 11px; color: var(--t3); margin-top: 2px; }
.terr-sub-empty { font-size: 13px; color: var(--t3); padding: 6px 0; }
.terr-sub-del {
  background: transparent;
  border: none;
  color: var(--t3);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.terr-sub-del:hover { background: rgba(232,85,85,.15); color: var(--red); }

/* nest photo thumbnail in sub-item list */
.terr-nest-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--s3);
}

/* nest photo upload in form */
.nest-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nest-photo-input { display: none; }
.nest-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--s3);
  color: var(--t2);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--s4, #30363d);
  white-space: nowrap;
}
.nest-photo-label:hover { background: var(--s4, #30363d); }
.nest-photo-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--s3);
}

/* territory add/edit form */
.territory-form {
  background: var(--s2);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 10px;
}
.territory-form .form-section-title {
  margin-bottom: 12px;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   ANNOTATION — confidence select (replacing range input)
════════════════════════════════════════════════════════════ */
.ann-conf-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--t2);
  white-space: nowrap;
}
.ann-conf-select {
  background: var(--s2);
  color: var(--t1);
  border: 1px solid var(--s3);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   THEORY — reading list
════════════════════════════════════════════════════════════ */
.reading-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}
.reading-list li {
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   LIBRARY — Builtin reference sounds
════════════════════════════════════════════════════════════ */
.builtin-section-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--t3);
  margin-bottom: 8px;
  padding: 0 2px;
}

.builtin-section-count {
  background: var(--s3);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--t2);
}

.builtin-divider {
  height: 1px;
  background: var(--s3);
  margin: 12px 0 16px;
}

.builtin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 11px 10px;
  background: var(--s1);
  border-radius: var(--radius-sm);
  border: 1px solid var(--s3);
  border-left: 3px solid var(--cat-color, #4a9eff);
  margin-bottom: 6px;
  transition: background .15s, box-shadow .15s;
  cursor: pointer;
}
.builtin-item:hover { background: var(--s2); box-shadow: var(--shadow-1); }

.builtin-play-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cat-color, #4a9eff);
  color: #0d1117;
  font-size: 13px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: opacity .15s, transform .12s;
  cursor: pointer;
}
.builtin-play-btn:not(.playing) {
  background: transparent;
  border: 1.5px solid var(--cat-color, #4a9eff);
  color: var(--cat-color, #4a9eff);
  box-shadow: none;
}
.builtin-play-btn.playing { opacity: .8; }
.builtin-play-btn:active  { transform: scale(.9); }

.builtin-item-body { flex: 1; min-width: 0; }

.builtin-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.builtin-item-name {
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  color: var(--t1);
  letter-spacing: var(--ls-tight, -0.3px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.builtin-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.builtin-badge-syn { background: rgba(62,207,114,.15); color: #3ecf72; }
.builtin-badge-xc  { background: rgba(79,195,247,.15); color: #4fc3f7; }

.builtin-species-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,.06);
  color: var(--t3, #8b949e);
  white-space: nowrap;
}

/* Species filter chip row */
.chip-row-species { margin-top: -4px; }

.lib-species-chip {
  padding: 5px 13px;
  border-radius: 20px;
  background: var(--s2);
  color: var(--t2);
  border: 1px solid var(--s3);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.lib-species-chip.active,
.lib-species-chip:hover {
  background: rgba(45,212,191,.15);
  border-color: var(--acc);
  color: var(--acc);
}

.rec-species-chip {
  padding: 5px 13px;
  border-radius: 20px;
  background: var(--s2);
  color: var(--t2);
  border: 1px solid var(--s3);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.rec-species-chip.active,
.rec-species-chip:hover {
  background: rgba(45,212,191,.15);
  border-color: var(--acc);
  color: var(--acc);
}

/* Photo identify button */
.rec-identify-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(167,139,250,.12);
  border: 1px solid rgba(167,139,250,.4);
  border-radius: 20px;
  color: #a78bfa;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s;
}
.rec-identify-btn:hover {
  background: rgba(167,139,250,.22);
  border-color: #a78bfa;
}

/* Identify result panel */
.rec-identify-result {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}
.identify-result-species {
  font-size: 15px;
  margin-bottom: 6px;
}
.identify-result-species strong { font-weight: 600; }
.identify-pct {
  font-size: 12px;
  color: var(--t3);
  margin-left: 4px;
}
.identify-conf-high .identify-pct { color: #3ecf72; }
.identify-conf-mid  .identify-pct { color: #f0a832; }
.identify-conf-low  .identify-pct { color: var(--t3); }
.identify-row {
  color: var(--t2);
  font-size: 13px;
  margin-top: 4px;
}

.builtin-item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.builtin-phonetic { font-size: 11px; color: var(--t3); font-style: italic; }
.builtin-cat      { font-size: 11px; font-weight: 500; }
.builtin-xcid     { font-size: 10px; color: var(--t3); }
.builtin-notes    { font-size: 11px; color: var(--t2); margin-top: 4px; display: block; }

/* ── Builtin item actions (edit + move) ── */
.builtin-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.builtin-move-btn, .builtin-edit-btn {
  background: none;
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm, 6px);
  color: var(--t3);
  font-size: 12px;
  width: 28px; height: 28px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.builtin-move-btn:hover, .builtin-edit-btn:hover {
  color: var(--t1); background: var(--s2);
}
.builtin-move-placeholder { display: inline-block; width: 28px; }

/* ── Inline edit form ── */
.builtin-edit-form {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: var(--s2);
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--s3);
}
.builtin-edit-form.open { display: flex; }
.builtin-edit-form input,
.builtin-edit-form textarea {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: 6px;
  color: var(--t1);
  font-size: var(--fs-sm, 12px);
  padding: 6px 8px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.builtin-edit-form textarea { resize: vertical; min-height: 48px; }
.builtin-edit-save { align-self: flex-end; }

/* ═══════════════════════════════════════════════════════════
   MAP TAB
════════════════════════════════════════════════════════════ */
/* When map tab is visible, disable scroll on the container */
.tab-container:has(#tabMap:not([hidden])) {
  overflow: hidden;
  padding-bottom: var(--nav-h);
}

.tab-pane-map {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--s1);
  border-bottom: 1px solid var(--s3);
}

.map-layer-toggles { display: flex; gap: 4px; }

.map-toggle-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--s3);
  border: 1.5px solid var(--s3);
  font-size: 15px;
  opacity: 0.45;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.map-toggle-btn.active { opacity: 1; border-color: var(--acc); }

.map-toolbar-right { display: flex; align-items: center; gap: 6px; }

.map-terr-select {
  background: var(--s2);
  color: var(--t1);
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 12px;
  max-width: 130px;
}

.map-no-terr-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px dashed var(--acc);
  color: var(--acc);
  cursor: pointer;
  white-space: nowrap;
}
.map-no-terr-btn:hover { background: rgba(45,212,191,0.1); }

.map-icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--s2);
  border: 1px solid var(--s3);
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.map-icon-btn:hover { background: var(--s3); }

/* Add-point type buttons */
.map-add-btns {
  display: flex;
  gap: 6px;
  padding: 7px 12px;
  background: var(--s1);
  border-bottom: 1px solid var(--s3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.map-add-type-btn {
  padding: 5px 10px;
  border-radius: 16px;
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t2);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.map-add-type-btn:hover { background: var(--s3); }

/* Add-point panel overlay */
.map-add-panel {
  position: absolute;
  top: 102px; /* below two toolbar rows */
  left: 12px; right: 12px;
  background: var(--s1);
  border: 1px solid var(--acc);
  border-radius: var(--radius);
  padding: 12px 14px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.map-add-type-label { font-size: 13px; font-weight: 600; color: var(--acc); }

/* Walk boundary panel */
.map-walk-panel {
  position: absolute;
  top: 102px;
  left: 12px; right: 12px;
  background: var(--s1);
  border: 1px solid #f0a832;
  border-radius: var(--radius);
  padding: 10px 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.map-walk-title  { font-size: 12px; font-weight: 600; color: #f0a832; letter-spacing: 0.5px; }
.map-walk-distance { flex: 1; font-size: 13px; font-family: var(--font-mono); color: var(--t2); }
.map-walk-btn { background: #f0a83222; border-color: #f0a832 !important; color: #f0a832 !important; }

/* Record tab info bar */
.rec-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--s2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--t3);
  flex-wrap: wrap;
}
.rec-info-item { flex: 1; }
.rec-info-item strong { color: var(--t2); }
.rec-info-link {
  background: none;
  border: none;
  color: var(--acc);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-add-input {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--radius-sm);
  color: var(--t1);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
}
.map-add-input:focus { border-color: var(--acc); }
.map-add-input::placeholder { color: var(--t3); }

.map-add-coords { font-size: 12px; color: var(--acc); font-variant-numeric: tabular-nums; }
.map-add-hint   { font-size: 12px; color: var(--t3); }
.map-add-actions { display: flex; gap: 6px; justify-content: flex-end; }
.map-popup { font-size: 13px; line-height: 1.5; min-width: 140px; }
.map-popup-meta { color: var(--t3); font-size: 11px; }
.map-popup-sensitive { color: #ffa300; font-size: 11px; }
.map-popup-actions { margin-top: 8px; display: flex; gap: 6px; }
.map-popup-del {
  font-size: 12px; padding: 3px 10px;
  background: rgba(255,59,48,0.15); color: #ff3b30;
  border: 1px solid rgba(255,59,48,0.4); border-radius: 6px;
  cursor: pointer;
}
.map-popup-del:hover { background: rgba(255,59,48,0.3); }
.map-popup-actions button {
  font-size: 12px; padding: 3px 10px;
  background: var(--s2); color: var(--t2);
  border: 1px solid var(--s3); border-radius: 6px;
  cursor: pointer;
}
.map-popup-actions button:hover { background: var(--s3); }
.map-photo-label { cursor: pointer; }
.map-add-photo-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }

.map-species-warning {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}
.map-species-warning.warn    { background: rgba(255,163,0,0.15); color: #ffa300; border-left: 3px solid #ffa300; }
.map-species-warning.blocked { background: rgba(255,59,48,0.15);  color: #ff3b30; border-left: 3px solid #ff3b30; }

/* Leaflet map container — fills whatever space the flex parent leaves */
.crow-map {
  width: 100%;
  flex: 1;
  min-height: 300px;
}

.map-error {
  color: var(--red);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

/* Leaflet popup — dark theme */
.leaflet-popup-content-wrapper {
  background: var(--s2) !important;
  color: var(--t1) !important;
  border: 1px solid var(--s3) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.5) !important;
}
.leaflet-popup-tip        { background: var(--s2) !important; }
.leaflet-popup-content    { font-size: 13px !important; margin: 10px 14px !important; }
.leaflet-container        { background: #1a1e25 !important; font-family: inherit !important; }

/* Map marker icons (Leaflet divIcon html) */
.map-terr-pin {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.map-terr-home {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45,212,191,.3), 0 2px 8px rgba(0,0,0,.5);
}

/* Scope toggle in territory form */
.scope-toggle { display: flex; gap: 8px; }
.scope-btn {
  flex: 1; padding: 10px 8px; border-radius: 8px;
  border: 1.5px solid var(--s3); background: var(--s2);
  color: var(--t2); cursor: pointer; text-align: left;
  font-size: 13px; line-height: 1.3; transition: all .15s;
}
.scope-btn .scope-hint { display: block; font-size: 11px; color: var(--t3); margin-top: 2px; }
.scope-btn.active { border-color: var(--acc); background: rgba(45,212,191,.1); color: var(--t1); }
.scope-btn.active .scope-hint { color: var(--acc); }

/* Checkbox label */
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--acc); }
.map-poi {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.map-indiv {
  border-radius: 50%;
  border: 2px solid;
  background: rgba(13,17,23,.7);
  font-size: 13px;
}

/* User GPS location dot */
.map-user-dot {
  width: 14px; height: 14px;
  background: #2dd4bf;
  border-radius: 50%;
  border: 2px solid #fff;
  position: relative;
  box-shadow: 0 0 0 0 rgba(45,212,191,.4);
}
.map-user-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(45,212,191,.15);
  animation: user-pulse 2s ease-in-out infinite;
}
@keyframes user-pulse {
  0%,100% { transform: scale(1);   opacity: .6; }
  50%      { transform: scale(1.6); opacity: 0;  }
}

/* ══════════════════════════════════════════════════════════════
   TACTICAL IDENTITY — top bar, nav labels, auth
══════════════════════════════════════════════════════════════ */

.app-logo-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--acc);
  opacity: 0.9;
}

.auth-clearance-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--acc);
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.7;
}

.auth-tagline {
  font-size: 13px;
  color: var(--t2);
  margin-top: 4px;
  margin-bottom: 20px;
}

/* Nav labels — monospace, tighter */
.nav-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

/* OP button in map toolbar */
.map-op-btn {
  font-size: 18px;
  font-weight: 700;
  color: var(--acc2);
  opacity: 0.75;
  transition: opacity .15s;
}
.map-op-btn:hover { opacity: 1; }
.map-op-btn.active { opacity: 1; color: var(--acc2); }

/* ══════════════════════════════════════════════════════════════
   PING FAB
══════════════════════════════════════════════════════════════ */

.ping-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--acc);
  color: #0d1117;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 800;
  box-shadow: 0 4px 18px rgba(45,212,191,.45);
  transition: transform .15s, box-shadow .15s;
}
.ping-fab:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(45,212,191,.25);
}
.ping-fab svg { width: 24px; height: 24px; }
.ping-fab-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════
   PING CONFIRM PANEL
══════════════════════════════════════════════════════════════ */

.ping-confirm-panel {
  position: absolute;
  bottom: 90px;
  right: 12px;
  width: 264px;
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: 12px;
  padding: 14px;
  z-index: 900;
  box-shadow: var(--shadow-3);
}
.ping-confirm-panel.hidden { display: none; }

.ping-confirm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ping-confirm-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--acc);
}
.ping-confirm-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--t3);
}
.ping-confirm-coords {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--t2);
  margin-bottom: 10px;
}
.ping-note-input {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--s3);
  color: var(--t1);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}
.ping-confirm-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   OP CREATE PANEL
══════════════════════════════════════════════════════════════ */

.op-create-panel {
  position: absolute;
  bottom: 90px;
  right: 12px;
  width: 284px;
  background: var(--s1);
  border: 1px solid var(--acc2);
  border-radius: 12px;
  padding: 14px;
  z-index: 900;
  box-shadow: 0 4px 24px rgba(167,139,250,.18);
}
.op-create-panel.hidden { display: none; }

.op-create-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.op-create-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--acc2);
}
.op-create-close {
  color: var(--t3);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

/* Ping marker on map */
.map-ping-marker {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--acc);
  opacity: 0.85;
  border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(45,212,191,.25);
}

/* OP star marker on map */
.map-op-star {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(167,139,250,.7));
}

/* ══════════════════════════════════════════════════════════════
   MISSION PROMPT BAR (on map)
══════════════════════════════════════════════════════════════ */

.map-mission-prompt {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: rgba(13,17,23,.93);
  border-top: 1px solid var(--s3);
  padding: 10px 14px;
  z-index: 700;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.map-mission-prompt[hidden] { display: none; }

.mission-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--acc);
  text-transform: uppercase;
  white-space: nowrap;
}
.mission-text {
  font-size: 12px;
  color: var(--t2);
  flex: 1;
  min-width: 0;
}
.mission-expand-btn {
  font-size: 11px;
  color: var(--acc);
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   INTEL MAP TAB
══════════════════════════════════════════════════════════════ */

.tab-pane-intel {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.intel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--s2);
  flex-shrink: 0;
  background: var(--s1);
}

.intel-graph {
  flex: 1;
  min-height: 0;
  height: calc(100dvh - var(--top-h) - var(--nav-h) - 46px);
  background: var(--bg);
}

.intel-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.intel-legend-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--t2);
}
.intel-legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.intel-spinner {
  position: absolute;
  inset: 46px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--t2);
  font-size: 13px;
  background: var(--bg);
  z-index: 10;
}
.intel-spinner[hidden] { display: none; }
.intel-spinner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--acc);
  animation: intel-pulse 1.2s ease-in-out infinite;
}
@keyframes intel-pulse {
  0%,100% { opacity: 1; transform: scale(1);   }
  50%      { opacity: .3; transform: scale(.6); }
}

.intel-detail-panel {
  position: absolute;
  bottom: 16px;
  left: 16px; right: 16px;
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: 12px;
  padding: 14px;
  z-index: 100;
  box-shadow: var(--shadow-3);
}
.intel-detail-panel.hidden { display: none; }

.intel-detail-close {
  position: absolute;
  top: 10px; right: 12px;
  color: var(--t3);
  font-size: 16px;
  line-height: 1;
}

.intel-empty-hint {
  position: absolute;
  inset: 46px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  pointer-events: none;
}
.intel-empty-hint.hidden { display: none; }

/* ══════════════════════════════════════════════════════════════
   OPS CENTER — stage bar
══════════════════════════════════════════════════════════════ */

.ops-stage-bar {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.ops-stage-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ops-stage-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 2px;
}
.ops-stage-subtitle {
  font-size: 12px;
  color: var(--t2);
  margin-bottom: 12px;
}
.ops-stage-track {
  height: 4px;
  background: var(--s3);
  border-radius: 2px;
  overflow: hidden;
}
.ops-stage-fill {
  height: 100%;
  background: var(--acc);
  border-radius: 2px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════════════════
   NARRATIVE STAGE OVERLAY
══════════════════════════════════════════════════════════════ */

.stage-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,12,20,.96);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}
.stage-overlay.hidden { display: none; }

.stage-overlay-inner {
  width: 100%;
  max-width: 420px;
}
.stage-code {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--acc);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.8;
}
.stage-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stage-sub {
  font-size: 14px;
  color: var(--acc);
  margin-bottom: 22px;
}
.stage-narrative {
  font-size: 14px;
  line-height: 1.7;
  color: var(--t2);
  margin-bottom: 24px;
  white-space: pre-line;
}
.stage-mission-block {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-left: 3px solid var(--acc);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.stage-mission-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--acc);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stage-mission-text {
  font-size: 13px;
  color: var(--t1);
  line-height: 1.55;
}
.stage-dismiss-btn {
  width: 100%;
  background: var(--acc);
  color: #0d1117;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 15px;
  border-radius: 10px;
  transition: opacity .15s;
}
.stage-dismiss-btn:active { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════
   ONBOARDING TACTICAL ELEMENTS
══════════════════════════════════════════════════════════════ */

.onb-prelude {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--t2);
  margin-bottom: 16px;
  text-transform: uppercase;
  line-height: 1.6;
}

.onb-begin-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  background: transparent;
  color: var(--acc);
  border: 1px solid var(--acc);
  padding: 14px 24px;
  border-radius: 8px;
  transition: background .15s;
  margin-top: 8px;
}
.onb-begin-btn:active { background: rgba(45,212,191,.1); }

/* ══════════════════════════════════════════════════════════════
   SIGNAL RISK BADGE (in builtin library cards)
══════════════════════════════════════════════════════════════ */

.signal-risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-top: 4px;
  margin-bottom: 2px;
}

/* ══════════════════════════════════════════════════════════════
   TRANSMISSION WARNING DIALOG
══════════════════════════════════════════════════════════════ */

.transmission-warning {
  position: fixed;
  inset: 0;
  background: rgba(8,12,20,.88);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
.transmission-warning.visible { opacity: 1; }

.tw-inner {
  width: 100%;
  max-width: 380px;
  background: var(--s1);
  border: 1px solid var(--red);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 40px rgba(232,85,85,.25);
}

.tw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}
.tw-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--red);
}
.tw-risk {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.tw-signal-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 10px;
}
.tw-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--t2);
  margin-bottom: 18px;
}
.tw-actions {
  display: flex;
  gap: 10px;
}
.tw-cancel  { flex: 1; }
.tw-proceed { flex: 1; }

/* ══════════════════════════════════════════════════════════════
   REACTION PANEL (post-playback crow response logging)
══════════════════════════════════════════════════════════════ */

.reaction-panel {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 12px; right: 12px;
  background: var(--s1);
  border: 1px solid var(--s3);
  border-top: 2px solid var(--acc);
  border-radius: 12px;
  padding: 14px;
  z-index: 950;
  box-shadow: var(--shadow-3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s;
}
.reaction-panel.visible {
  transform: translateY(0);
  opacity: 1;
}

.rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.rp-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--acc);
}
.rp-close {
  color: var(--t3);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.rp-signal-name {
  font-size: 12px;
  color: var(--t2);
  margin-bottom: 10px;
}
.rp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rp-btn {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--s2);
  color: var(--t1);
  border: 1px solid var(--s3);
  transition: background .12s, border-color .12s;
}
.rp-btn:active, .rp-btn.selected {
  background: var(--acc);
  color: #0d1117;
  border-color: var(--acc);
}

/* ── Birding hotspot pins ─────────────────────────────── */
.map-hotspot-pin {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(255, 200, 50, 0.15);
  border: 1.5px solid rgba(255, 200, 50, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.map-hotspot-pin:hover { transform: scale(1.2); }

/* ── Checklist ────────────────────────────────────────── */
.cl-progress-label { font-size: 13px; color: var(--t2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.cl-pct { color: var(--green); font-weight: 600; }
.cl-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cl-progress-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.3s; }
.cl-list { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cl-family { background: var(--surface2); border-radius: 8px; padding: 10px 12px; }
.cl-family-name { font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; display: flex; justify-content: space-between; }
.cl-family-count { color: var(--green); }
.cl-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; border-bottom: 1px solid var(--border); }
.cl-item:last-child { border-bottom: none; }
.cl-item.cl-done .cl-sv { color: var(--t3); text-decoration: line-through; }
.cl-check { accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.cl-sv { font-size: 14px; color: var(--t1); flex: 1; }
.cl-en { font-size: 11px; color: var(--t3); }

/* ── Artportalen observation pins ─────────────────────────── */
.map-obs-pin {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: rgba(167, 139, 250, 0.2);
  border: 1.5px solid rgba(167, 139, 250, 0.6);
  border-radius: 50%;
  cursor: pointer;
}

/* ── Building pins ────────────────────────────────────────── */
.map-building-pin {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  background: rgba(100, 116, 139, 0.25);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 3px;
  cursor: pointer;
}

/* ── Signal rank gating ────────────────────────────────────── */
.signal-locked-badge {
  display: inline-block;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #888;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
}
.builtin-item.signal-locked {
  opacity: 0.6;
}
.builtin-item.signal-locked .builtin-play-btn {
  background: rgba(255,255,255,0.06);
  color: #777;
  cursor: pointer;
}
.locked-rank-req {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
}
.locked-rank-label { color: var(--t3); font-size: 12px; }
.locked-rank-name  { color: var(--t1); font-weight: 600; font-size: 14px; }
.locked-rank-xp    { color: #2dd4bf; font-size: 12px; margin-left: auto; font-family: 'JetBrains Mono', monospace; }

/* ── Fieldcraft Guide ──────────────────────────────────────── */
.fc-protocols-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fc-protocol {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 14px;
}
.fc-protocol-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.fc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #2dd4bf;
  background: rgba(45,212,191,0.1);
  border: 1px solid rgba(45,212,191,0.3);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.fc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: 0.03em;
}
.fc-body {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.65;
}
.fc-transmissions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.fc-transmission-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.5;
}
.fc-tx-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }

/* ── Field Comms FAB ───────────────────────────────────── */
.field-comms-fab {
  position: absolute;
  bottom: 90px;        /* above ping FAB */
  right: 16px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(13,13,13,0.92);
  border: 1.5px solid rgba(45,212,191,0.5);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  color: #2dd4bf;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-comms-fab:hover {
  border-color: rgba(45,212,191,0.9);
  box-shadow: 0 4px 24px rgba(45,212,191,0.2);
}
.field-comms-fab-icon { font-size: 18px; line-height: 1; }
.field-comms-fab-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(45,212,191,0.85);
}

/* ── Field Comms Panel ─────────────────────────────────── */
.field-comms-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 850;
  background: rgba(13,13,13,0.97);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px 14px 0 0;
  padding: 0 0 calc(env(safe-area-inset-bottom) + 12px);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(12px);
}
.field-comms-panel.open { transform: translateY(0); }
.fcp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.fcp-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #2dd4bf;
  letter-spacing: 0.06em;
}
.fcp-close {
  background: none;
  border: none;
  color: var(--t3);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.fcp-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.1em;
  padding: 8px 16px 4px;
}
.fcp-signals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}
.fcp-signal-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.fcp-signal-btn:hover,
.fcp-signal-btn.playing {
  background: rgba(45,212,191,0.1);
  border-color: rgba(45,212,191,0.4);
}
.fcp-signal-play {
  font-size: 14px;
  color: #2dd4bf;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.fcp-signal-body { flex: 1; min-width: 0; }
.fcp-signal-name { font-size: 13px; color: var(--t1); font-weight: 500; }
.fcp-signal-cat  { font-size: 11px; margin-top: 1px; }
.fcp-signal-risk {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
  color: #0d1117;
  flex-shrink: 0;
}
.fcp-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 10px 16px;
}
.fcp-record-btn,
.fcp-library-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  margin: 0 12px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  color: var(--t1);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.fcp-record-btn { border-color: rgba(239,68,68,0.3); color: #ef4444; }
.fcp-record-btn:hover { background: rgba(239,68,68,0.1); }
.fcp-library-btn:hover { background: rgba(255,255,255,0.07); }
.fcp-arrow { margin-left: auto; color: var(--t3); font-size: 14px; }

/* ── Ping count stepper ────────────────────────────────── */
.ping-count-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}
.ping-count-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.ping-count-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  overflow: hidden;
}
.ping-count-btn {
  background: none;
  border: none;
  color: var(--t1);
  font-size: 16px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ping-count-btn:hover { background: rgba(255,255,255,0.1); }
.ping-count-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #2dd4bf;
  min-width: 30px;
  text-align: center;
}
.ping-juvenile-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
}
.ping-juvenile-cb { accent-color: #93c5fd; }
.ping-juvenile-text {
  font-size: 11px;
  color: #93c5fd;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Ping classification ───────────────────────────────── */
.ping-classification {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0 4px;
}
.ping-class-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid;
  align-self: flex-start;
}
.ping-class-desc {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.5;
}

/* ── Alpha naming ──────────────────────────────────────── */
.ping-alpha-section {
  padding: 6px 0 2px;
}
.ping-alpha-section.hidden { display: none; }
.ping-alpha-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #fbbf24;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.ping-alpha-hint {
  color: var(--t3);
  font-size: 9px;
  margin-left: 6px;
  text-transform: lowercase;
}
.ping-alpha-input {
  width: 100%;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 6px;
  padding: 7px 10px;
  color: #fbbf24;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.ping-alpha-input::placeholder { color: rgba(251,191,36,0.35); }
.ping-alpha-input:focus { outline: none; border-color: rgba(251,191,36,0.6); }

/* ── Age ladder ────────────────────────────────────────── */
.age-ladder {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 0;
}
.age-rung {
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.07);
}
.age-rung-juv   { background: rgba(147,197,253,0.06); border-color: rgba(147,197,253,0.2); }
.age-rung-sub   { background: rgba(167,139,250,0.06); border-color: rgba(167,139,250,0.2); }
.age-rung-adult { background: rgba(251,191,36,0.06);  border-color: rgba(251,191,36,0.2);  }
.age-rung-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.age-rung-juv   .age-rung-label { color: #93c5fd; }
.age-rung-sub   .age-rung-label { color: #c4b5fd; }
.age-rung-adult .age-rung-label { color: #fbbf24; }
.age-rung-markers { display: flex; flex-direction: column; gap: 8px; }
.age-marker {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.55;
}
.age-marker-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.age-ladder-arrow {
  text-align: center;
  color: var(--t3);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 0;
}

/* ── Individual crow age marker badges ─────────────────── */
.indiv-age-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.indiv-age-badge {
  font-size: 10px;
  color: var(--t3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
}
.age-marker-row .field-half select {
  font-size: 12px;
}
