:root {
  --bg: #f4f2ea;
  --panel: #ffffff;
  --ink: #1d2a24;
  --muted: #65756c;
  --line: #d7ded5;
  --green: #315c3d;
  --green-strong: #23442d;
  --cream: #fbf8ef;
  --danger: #a6432b;
  --warning: #76522b;
  --shadow: 0 14px 36px rgba(28, 49, 38, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 999px;
  padding: .75rem 1rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
button:hover:not(.disabled):not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(35, 68, 45, .12); }
button:disabled, button.disabled { opacity: .55; cursor: not-allowed; }
.primary { color: #fff; background: var(--green); }
.secondary { color: var(--green-strong); background: #e6eee4; }
.danger { color: #fff; background: var(--danger); }
.small-button { padding: .58rem .78rem; font-size: .88rem; white-space: nowrap; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  min-height: 112px;
  background: linear-gradient(135deg, #1f3d2b, #406f4a);
  color: #fff;
}
.brand-wrap { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 50%; box-shadow: 0 8px 20px rgba(0,0,0,.18); flex: 0 0 auto; }
.brand-minimal h1 { margin: 0; display: grid; gap: .05rem; line-height: .96; }
.brand-minimal h1 span { display: block; font-size: clamp(2rem, 4.1vw, 2.85rem); font-weight: 850; letter-spacing: -.035em; }
.header-actions-minimal { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; padding-right: 4.5rem; }
.oauth-status { padding: .48rem .6rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--warning); font-weight: 750; font-size: .75rem; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-version-badge { position: absolute; top: .55rem; right: .75rem; padding: .18rem .48rem; border-radius: 999px; background: rgba(255,255,255,.18); color: rgba(255,255,255,.92); font-size: .7rem; font-weight: 850; letter-spacing: .04em; }

.app-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(420px, 1040px) minmax(320px, 430px);
  gap: 1rem;
  width: min(100%, 1840px);
  margin: 0 auto;
  padding: 1rem;
  align-items: start;
  justify-content: center;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; min-width: 0; }
.panel h2, .panel h3 { margin: 0 0 .75rem; }
.panel section + section { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.hint { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.warning { color: var(--warning); }

.folder-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  text-align: left;
}
.file-picker-icon { font-size: 1.6rem; }
.file-picker-texts { display: grid; gap: .1rem; }
.file-picker-title { font-size: 1rem; font-weight: 900; }
.file-picker-subtitle { font-size: .82rem; opacity: .92; font-weight: 650; }
.folder-current { margin-top: .9rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 14px; background: #f6f8f5; }
.folder-label { display: block; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .25rem; }
.folder-current strong { display: block; color: var(--green-strong); overflow-wrap: anywhere; }

.section-row, .top-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.pill { background: #e6eee4; color: var(--green-strong); padding: .22rem .6rem; border-radius: 999px; font-weight: 800; }
.playlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; max-height: calc(100vh - 330px); overflow: auto; }
.playlist button { width: 100%; border-radius: 12px; text-align: left; background: #f6f8f5; color: var(--ink); font-weight: 650; padding: .65rem .75rem; display: grid; gap: .22rem; }
.playlist button.active { background: var(--green); color: #fff; }
.playlist button.reviewed:not(.active) { border: 1px solid rgba(49, 92, 61, .25); }
.playlist button.ignored:not(.active) { opacity: .66; }
.video-title-line { overflow-wrap: anywhere; }
.video-status-line { display: flex; gap: .3rem; flex-wrap: wrap; font-size: .72rem; font-weight: 850; opacity: .9; }
.status-chip { padding: .08rem .38rem; border-radius: 999px; background: rgba(49,92,61,.12); }
.playlist button.active .status-chip { background: rgba(255,255,255,.20); }
.current-video { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.nav-buttons, .capture-bar, .location-actions, .ocr-actions, .observation-actions-inline, .video-state-bar { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }

.player-panel { justify-self: center; width: 100%; max-width: 1074px; }
.video-stage { width: 100%; max-width: 1024px; aspect-ratio: 16 / 9; background: #111; border-radius: 16px; overflow: hidden; margin: .9rem auto; }
.video-stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: #111; }
.video-state-bar { justify-content: space-between; padding: .65rem .7rem; margin-bottom: .8rem; border-radius: 14px; background: #f6f8f5; border: 1px solid var(--line); }
.video-state-text { color: var(--muted); font-size: .88rem; font-weight: 750; }
.capture-bar { margin-bottom: 1rem; }


.ocr-card { background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }
#footerCanvas { display: block; width: 100%; height: auto; background: #111; border-radius: 12px; border: 1px solid var(--line); }
.ocr-fields, .two-cols, .observed-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .7rem; }
label { display: grid; gap: .35rem; color: var(--muted); font-size: .92rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .72rem .82rem; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(49, 92, 61, .14); }
.source-box, .ocr-status { padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: #f6f8f5; color: var(--muted); font-weight: 700; line-height: 1.35; margin: .65rem 0; overflow-wrap: anywhere; }
.source-box { color: var(--green-strong); }
#ocrRawText { min-height: 4.1rem; }

.status-box { display: flex; justify-content: space-between; gap: .7rem; padding: .8rem; border-radius: 14px; background: #f6f8f5; }
.date-format-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .6rem; margin-top: .6rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: #f6f8f5; }
.date-format-line label { display: block; color: var(--muted); font-size: .9rem; font-weight: 800; }
.date-warning { margin: .7rem 0 0; padding: .65rem .75rem; border-radius: 12px; background: #fff4dc; border: 1px solid rgba(118, 82, 43, .28); color: var(--warning); font-weight: 850; line-height: 1.35; }
.selected-taxon, .selected-place { color: var(--green-strong); font-weight: 750; margin: .55rem 0 .7rem; overflow-wrap: anywhere; }
.taxon-results, .place-results { margin-top: .45rem; display: grid; gap: .35rem; }
.taxon-results button, .place-results button { border-radius: 12px; background: #f6f8f5; color: var(--ink); padding: .6rem .7rem; text-align: left; }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.thumb-card { position: relative; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #f6f8f5; cursor: pointer; }
.thumb-card.selected { border-color: var(--green); }
.thumb-card img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.thumb-meta { font-size: .72rem; padding: .35rem; color: var(--muted); overflow-wrap: anywhere; }
.thumb-delete { position: absolute; top: .3rem; right: .3rem; background: rgba(166, 67, 43, .92); color: #fff; padding: .24rem .42rem; border-radius: 999px; font-size: .75rem; }
.submit-card { display: grid; gap: .55rem; }
.validation-output { min-height: 1.2rem; margin: 0; color: var(--muted); font-weight: 650; }

.app-footer { display: grid; grid-template-columns: 220px minmax(0, 1fr) 150px; align-items: center; gap: 1.25rem; padding: 1rem 1.35rem 1.2rem; color: #f4f2ea; background: #153220; }
.footer-side { display: flex; align-items: center; }
.footer-branding { justify-content: flex-start; }
.footer-center { display: grid; gap: .22rem; text-align: center; line-height: 1.35; }
.footer-center strong { color: #fff; font-size: 1.05rem; letter-spacing: .01em; }
.footer-center span { line-height: 1.35; }
.footer-center a { color: #d8e79d; text-decoration: none; font-weight: 750; }
.footer-center a:hover { text-decoration: underline; }
.footer-line { color: #e9eee2; }
.footer-copyright { color: #cbd8c8; font-size: .88rem; margin-top: .15rem; }
.footer-qr-wrap { justify-content: flex-end; }
.footer-polones-logo { max-width: 200px; width: 100%; height: auto; }
.footer-qr { width: 108px; height: 108px; object-fit: contain; border-radius: 12px; background: #fff; padding: .25rem; border: 1px solid rgba(255,255,255,.3); }

@media (max-width: 1180px) {
  .app-grid { grid-template-columns: 1fr; }
  .playlist { max-height: 260px; }
  .player-panel { max-width: none; }
  .header-actions-minimal { padding-right: 0; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .app-header, .app-footer, .section-row, .top-row { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .footer-branding, .footer-qr-wrap { justify-content: center; }
  .footer-polones-logo { max-width: 190px; }
  .brand-logo { width: 64px; height: 64px; }
  .app-header { min-height: auto; }
  .oauth-status { max-width: none; }
  .ocr-fields, .two-cols, .observed-fields, .date-format-line { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-side, .footer-branding, .footer-qr-wrap { justify-content: center; }
}


/* APP V15 — compatibilidade e modos de acesso às pastas */
.compatibility-card {
  margin: 1rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compatibility-kicker {
  display: inline-flex;
  margin-bottom: .25rem;
  color: var(--green-strong);
  font-weight: 850;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.compatibility-card h2 {
  margin: 0 0 .35rem;
  color: var(--ink);
  font-size: 1.15rem;
}

.compatibility-status {
  margin: 0 0 .45rem;
  font-weight: 850;
}

.compatibility-status.compat-ok { color: var(--green-strong); }
.compatibility-status.compat-warning { color: var(--warning); }

.compatibility-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.compatibility-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compatibility-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.mode-explainer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.mode-explainer div {
  display: grid;
  gap: .2rem;
  padding: .7rem .8rem;
  border-radius: 14px;
  background: #f6f8f5;
  border: 1px solid var(--line);
}

.mode-explainer strong {
  color: var(--green-strong);
}

.mode-explainer span {
  color: var(--muted);
  line-height: 1.35;
}

.mode-explainer code {
  background: rgba(49, 92, 61, .1);
  color: var(--green-strong);
  padding: .05rem .25rem;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .compatibility-card {
    grid-template-columns: 1fr;
  }

  .compatibility-actions {
    justify-content: flex-start;
  }

  .mode-explainer {
    grid-template-columns: 1fr;
  }
}


/* APP V15 — pasta mãe otimizada e subpastas/coletas */
.subfolder-section {
  background: #fbf8ef;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .9rem;
}

.subfolder-list {
  display: grid;
  gap: .55rem;
  max-height: 310px;
  overflow: auto;
  padding-right: .15rem;
}

.subfolder-card {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: .75rem .85rem;
  text-align: left;
  display: grid;
  gap: .35rem;
  cursor: pointer;
}

.subfolder-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(35, 68, 45, .10);
}

.subfolder-card.active {
  border-color: var(--green);
  background: #eef6ed;
}

.subfolder-card.cataloged {
  border-color: rgba(49, 92, 61, .38);
}

.subfolder-card.partial {
  border-color: rgba(118, 82, 43, .38);
}

.subfolder-title {
  font-weight: 850;
  color: var(--green-strong);
  overflow-wrap: anywhere;
}

.subfolder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  color: var(--muted);
  font-size: .8rem;
}

.subfolder-meta .status-chip {
  background: #e6eee4;
}

.large-folder-warning {
  margin: .65rem 0;
  padding: .7rem .8rem;
  border-radius: 12px;
  border: 1px solid rgba(118, 82, 43, .28);
  background: #fff4dc;
  color: var(--warning);
  font-weight: 750;
  line-height: 1.35;
}

.folder-button.complete-active .file-picker-title::after {
  content: " — modo completo ativo";
  font-weight: 750;
}


.folder-button.basic-quiet {
  background: #eef2ec;
  color: var(--green-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.folder-button.basic-quiet .file-picker-icon {
  opacity: .8;
}


/* APP V20 — bloco de pasta selecionada mais limpo */
.complete-mode-box {
  display: grid;
  gap: .45rem;
  padding: .9rem;
  border: 1px solid rgba(49, 92, 61, .24);
  border-radius: 16px;
  background: #f2f7ef;
  color: var(--ink);
}

.complete-mode-box strong {
  color: var(--green-strong);
  font-size: 1.15rem;
}

.complete-mode-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.basic-fallback {
  margin-top: .7rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8faf7;
}

.basic-fallback summary {
  cursor: pointer;
  color: var(--green-strong);
  font-weight: 850;
}

.basic-fallback p {
  margin: .55rem 0;
  color: var(--muted);
  line-height: 1.35;
}

.mode-complete-active .compatibility-actions #btnUseBasicMode {
  display: none;
}

.mode-complete-active .folder-button {
  display: none;
}

@media (max-width: 720px) {
  .brand-minimal h1 span {
    font-size: clamp(1.35rem, 8vw, 2rem);
  }
}


/* APP V20 — bloco 1 limpo: sem controles do modo básico */
#btnSelectFolder,
#basicFallbackBox {
  display: none !important;
}


/* APP V20 — layout centralizado para monitores largos */
@media (min-width: 1841px) {
  .app-grid {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}


/* APP V20 — estado claro da pasta no bloco 1 */
.complete-mode-box-v20 {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem .75rem;
  padding: .75rem .85rem;
  background: #f6f8f5;
}

.complete-mode-box-v20 .selected-folder-state {
  min-width: 0;
}

.complete-mode-box-v20 .selected-folder-state strong {
  font-size: 1.02rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.active-mode-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .24rem .55rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: .78rem;
  font-weight: 850;
}

.tiny-button {
  padding: .38rem .58rem;
  font-size: .76rem;
  font-weight: 800;
}

.complete-mode-box-v20 .tiny-button {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

@media (max-width: 720px) {
  .complete-mode-box-v20 {
    grid-template-columns: 1fr;
  }

  .complete-mode-box-v20 .tiny-button {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }
}


/* APP V27 — rodapé institucional */
.app-footer { background: #153220; }


/* APP V27 — multilingual header */
.language-control {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.92);
  font-size: .82rem;
  font-weight: 800;
}
.language-control select {
  width: auto;
  min-width: 118px;
  padding: .42rem .58rem;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--green-strong);
}
@media (max-width: 720px) {
  .language-control {
    width: 100%;
    justify-content: flex-start;
  }
  .language-control select {
    width: 100%;
  }
}


/* APP V27 — player header navigation aligned in one compact row */
.player-panel .top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .65rem;
}

.player-panel .top-row > div:first-child {
  min-width: 0;
}

.player-panel .nav-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: .32rem;
  white-space: nowrap;
}

.player-panel .nav-buttons button {
  padding: .43rem .58rem;
  min-height: 32px;
  border-radius: 999px;
  font-size: .78rem;
  line-height: 1.05;
  font-weight: 800;
}

@media (max-width: 900px) {
  .player-panel .top-row {
    grid-template-columns: 1fr;
  }

  .player-panel .nav-buttons {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: .15rem;
  }
}

/* APP V27 — spacing, visual grouping and UX consistency */
:root {
  --space-xs: .35rem;
  --space-sm: .65rem;
  --space-md: 1rem;
  --space-lg: 1.45rem;
  --space-xl: 2rem;
}

.panel {
  padding: var(--space-lg);
}

.panel section + section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
}

.subsection-label {
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.player-panel .video-stage {
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
}

.video-state-bar {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.capture-bar {
  margin-top: 0;
  margin-bottom: var(--space-lg);
}

.ocr-card {
  margin-top: 0;
}

.ocr-card > * + * {
  margin-top: var(--space-md);
}

.ocr-fields,
.two-cols,
.observed-fields {
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.status-box {
  margin-bottom: var(--space-md);
}

.observed-fields {
  margin-bottom: var(--space-md);
}

.date-format-line {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.date-warning {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
}

.observation-actions-inline {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.observation-label {
  margin-top: var(--space-md);
}

.observation-label:first-of-type {
  margin-top: var(--space-md);
}

.subfolder-progress {
  display: grid;
  gap: .25rem;
  margin: var(--space-sm) 0 var(--space-md);
  padding: .7rem .8rem;
  border: 1px solid rgba(49, 92, 61, .18);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--green-strong);
  font-weight: 750;
  line-height: 1.35;
}

.subfolder-progress strong {
  font-size: .92rem;
}

.subfolder-progress span {
  color: var(--muted);
  font-size: .86rem;
}

.mode-complete-active .compatibility-card {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .75rem 1rem;
}

.mode-complete-active .compatibility-card .compatibility-text,
.mode-complete-active .compatibility-card .mode-explainer {
  display: none;
}

.mode-complete-active .compatibility-card h2 {
  margin-bottom: .15rem;
}

.mode-complete-active .compatibility-status {
  margin-bottom: 0;
}

.thumb-card:focus-visible,
.subfolder-card:focus-visible,
.playlist button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 92, 61, .35);
  outline-offset: 2px;
}

.subfolder-card.cataloged .status-chip:first-child {
  background: #dfeedd;
  color: var(--green-strong);
}

.subfolder-card.partial .status-chip:first-child {
  background: #fff4dc;
  color: var(--warning);
}

@media (max-width: 720px) {
  .panel { padding: var(--space-md); }
  .subsection-label { margin-top: var(--space-md); }
  .mode-complete-active .compatibility-card { grid-template-columns: 1fr; }
}


/* APP V27 — map location and location action spacing */
.location-actions {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  row-gap: var(--space-sm);
}

.map-card {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8f5;
}

.map-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.map-card-header strong {
  color: var(--green-strong);
  font-size: .95rem;
}

.map-card-header .hint {
  margin: .25rem 0 0;
}

.location-map {
  width: 100%;
  height: 260px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #dfe8dd;
}

.map-status {
  margin: var(--space-sm) 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: .88rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .map-card-header {
    display: grid;
  }

  .location-map {
    height: 230px;
  }
}


/* APP V27 — geoprivacy/i18n cleanup and advanced JSON tools */
.advanced-tools {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f6f8f5;
}

.advanced-tools summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--green-strong);
}

.advanced-tools .hint {
  margin: var(--space-sm) 0 var(--space-md);
}

.location-actions {
  margin-top: calc(var(--space-lg) + .35rem);
  margin-bottom: calc(var(--space-md) + .25rem);
  gap: var(--space-md);
}

/* APP V32 — iNaturalist extras: tags, projects, observation fields */
.extra-field-block {
  margin-top: var(--space-lg, 1.45rem);
}

.project-results,
.field-results {
  margin-top: var(--space-sm, .65rem);
  display: grid;
  gap: .4rem;
}

.project-results button,
.field-results button {
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--ink);
  padding: .62rem .75rem;
  text-align: left;
}

.chip-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: var(--space-sm, .65rem);
}

.chip-list-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .45rem .35rem .7rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-weight: 800;
  line-height: 1.1;
}

.tag-chip button {
  padding: .05rem .35rem;
  border-radius: 999px;
  background: rgba(35, 68, 45, .12);
  color: var(--green-strong);
  line-height: 1.2;
}

.field-list {
  display: grid;
  gap: .55rem;
  margin-top: var(--space-sm, .65rem);
}

.observation-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: .5rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
}

.observation-field-row strong {
  overflow-wrap: anywhere;
  color: var(--green-strong);
}

.compact-hint {
  margin-top: .45rem;
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .observation-field-row {
    grid-template-columns: 1fr;
  }
}


/* APP V32 — collapsed iNaturalist details and location project suggestions */
.inat-details-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8f5;
  overflow: hidden;
}

.inat-details-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md);
  cursor: pointer;
  color: var(--green-strong);
  font-weight: 900;
}

.inat-details-body {
  display: grid;
  gap: var(--space-lg);
  padding: 0 var(--space-md) var(--space-md);
}

.details-pill {
  padding: .18rem .5rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}

.suggested-project-block {
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.project-suggestions {
  display: grid;
  gap: .55rem;
  margin-top: var(--space-sm);
}

.suggested-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem .65rem;
  align-items: center;
  width: 100%;
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--ink);
  padding: .7rem .8rem;
  text-align: left;
}

.suggested-project-card.selected {
  opacity: .72;
}

.suggested-project-title {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.suggested-project-meta {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.suggested-project-action {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: .78rem;
  font-weight: 850;
}

@media (max-width: 720px) {
  .suggested-project-card {
    grid-template-columns: 1fr;
  }

  .suggested-project-action {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }
}


/* APP V32 — simplified project autocomplete */
.project-results {
  max-height: 260px;
  overflow: auto;
}
.project-results .hint {
  margin: 0;
  padding: .65rem .75rem;
  border-radius: 12px;
  background: #f6f8f5;
}


/* APP V32 — real iNaturalist submission and prioritized projects */
.submit-progress { min-height: 1.25rem; margin-top: .55rem; font-weight: 700; line-height: 1.35; }
.project-result-section { display: grid; gap: .35rem; margin-top: .55rem; }
.project-result-section + .project-result-section { padding-top: .7rem; border-top: 1px solid var(--line); }
.project-result-section-title { font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.project-results button { display: grid; gap: .15rem; width: 100%; }
.project-results button small { color: var(--muted); font-weight: 650; }
.project-results button.selected { opacity: .65; }


/* APP V32 — API authorization pending state */
.api-pending-button,
button.disabled {
  opacity: .72;
}
.submit-progress {
  margin-top: .75rem;
}
