/* iNat TrailCam Local — consolidated current stylesheet. */

/* Foundation and shared components */
: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, 0.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: 0.75rem 1rem;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}
button:hover:not(.disabled):not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(35, 68, 45, 0.12);
}
button:disabled,
button.disabled {
  opacity: 0.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: 0.58rem 0.78rem;
  font-size: 0.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: 0.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, 0.18);
  flex: 0 0 auto;
}
.brand-minimal h1 {
  margin: 0;
  display: grid;
  gap: 0.05rem;
  line-height: 0.96;
}
.brand-minimal h1 span {
  display: block;
  font-size: clamp(2rem, 4.1vw, 2.85rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}
.header-actions-minimal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-right: 4.5rem;
}
.app-version-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.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 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: 0.9rem;
  line-height: 1.35;
}
.warning {
  color: var(--warning);
}

.folder-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.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: 0.1rem;
}
.file-picker-title {
  font-size: 1rem;
  font-weight: 900;
}
.file-picker-subtitle {
  font-size: 0.82rem;
  opacity: 0.92;
  font-weight: 650;
}
.folder-current {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f6f8f5;
}
.folder-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.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: 0.8rem;
}
.pill {
  background: #e6eee4;
  color: var(--green-strong);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
}
.status-chip {
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(49, 92, 61, 0.12);
}
.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: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.player-panel {
  justify-self: center;
  width: 100%;
  max-width: 1074px;
}
.video-stage {
  position: relative;
  width: 100%;
  max-width: 1024px;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  margin: 0.9rem auto;
}
.video-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #111;
}
.video-state-bar {
  justify-content: space-between;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.8rem;
  border-radius: 14px;
  background: #f6f8f5;
  border: 1px solid var(--line);
}
.video-state-text {
  color: var(--muted);
  font-size: 0.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: 0.6rem;
  margin-top: 0.7rem;
}
label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.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, 0.14);
}
.source-box,
.ocr-status {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
  margin: 0.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: 0.7rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: #f6f8f5;
}
.date-format-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
}
.date-format-line label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}
.date-warning {
  margin: 0.7rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #fff4dc;
  border: 1px solid rgba(118, 82, 43, 0.28);
  color: var(--warning);
  font-weight: 850;
  line-height: 1.35;
}
.selected-taxon,
.selected-place {
  color: var(--green-strong);
  font-weight: 750;
  margin: 0.55rem 0 0.7rem;
  overflow-wrap: anywhere;
}
.taxon-results,
.place-results {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
}
.taxon-results button,
.place-results button {
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.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: 0.72rem;
  padding: 0.35rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.thumb-delete {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: rgba(166, 67, 43, 0.92);
  color: #fff;
  padding: 0.24rem 0.42rem;
  border-radius: 999px;
  font-size: 0.75rem;
}
.submit-card {
  display: grid;
  gap: 0.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: 0.22rem;
  text-align: center;
  line-height: 1.35;
}
.footer-center strong {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.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: 0.88rem;
  margin-top: 0.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: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 1180px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .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;
  }
  .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;
  }
}

/* Base — 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: 0.25rem;
  color: var(--green-strong);
  font-weight: 850;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.compatibility-status {
  margin: 0 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: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

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

.mode-explainer div {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.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, 0.1);
  color: var(--green-strong);
  padding: 0.05rem 0.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;
  }
}

/* Base — pasta principal otimizada e subpastas/coletas */
.subfolder-section {
  background: #fbf8ef;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
}

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

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

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

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

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

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

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

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

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

.large-folder-warning {
  margin: 0.65rem 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(118, 82, 43, 0.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: 0.8;
}

/* Base — bloco de pasta selecionada mais limpo */
.complete-mode-box {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid rgba(49, 92, 61, 0.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: 0.7rem;
  padding: 0.65rem 0.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: 0.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);
  }
}

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

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

/* Base — estado claro da pasta no bloco 1 */
.complete-mode-box-v20 {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  padding: 0.75rem 0.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: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.tiny-button {
  padding: 0.38rem 0.58rem;
  font-size: 0.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;
  }
}

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

/* Base — multilingual header */
.language-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
}
.language-control select {
  width: auto;
  min-width: 118px;
  padding: 0.42rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green-strong);
}
@media (max-width: 720px) {
  .language-control {
    width: 100%;
    justify-content: flex-start;
  }
  .language-control select {
    width: 100%;
  }
}

/* Base — 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: 0.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: 0.32rem;
  white-space: nowrap;
}

.player-panel .nav-buttons button {
  padding: 0.43rem 0.58rem;
  min-height: 32px;
  border-radius: 999px;
  font-size: 0.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: 0.15rem;
  }
}

/* Base — local player video counter */
.player-panel .player-nav-block {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 0.28rem;
}

.player-video-counter {
  margin: 0;
  padding: 0.25rem 0.58rem;
  border-radius: 999px;
  background: #f6f8f5;
  border: 1px solid var(--line);
  color: var(--green-strong);
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .player-panel .player-nav-block {
    justify-items: start;
  }

  .player-video-counter {
    text-align: left;
    white-space: normal;
  }
}

/* Base — spacing, visual grouping and UX consistency */
:root {
  --space-xs: 0.35rem;
  --space-sm: 0.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: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.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: 0.25rem;
  margin: var(--space-sm) 0 var(--space-md);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(49, 92, 61, 0.18);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--green-strong);
  font-weight: 750;
  line-height: 1.35;
}

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

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

.mode-complete-active .compatibility-card {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.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: 0.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, 0.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;
  }
}

/* Base — 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: 0.95rem;
}

.map-card-header .hint {
  margin: 0.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: 0.88rem;
  line-height: 1.35;
}

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

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

/* Base — location panel cleanup */
.location-privacy-inline {
  margin-top: var(--space-md);
}

.gps-exif-location-option {
  margin-top: var(--space-md);
}

.map-coordinate-fields {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.map-coordinate-fields .two-cols {
  margin-bottom: var(--space-sm);
}

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

/* Base — 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, 0.65rem);
  display: grid;
  gap: 0.4rem;
}

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

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

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

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

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

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

.observation-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.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: 0.45rem;
  margin-bottom: 0;
}

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

/* Base — 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-panel summary::-webkit-details-marker {
  display: none;
}

.inat-details-panel summary::marker {
  content: "";
}

.details-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.details-chevron {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.inat-details-panel[open] .details-chevron {
  transform: rotate(90deg);
}

.notes-detail-block textarea {
  width: 100%;
  margin-top: 0.45rem;
}

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

.details-pill {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: 0.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: 0.55rem;
  margin-top: var(--space-sm);
}

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

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

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

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

.suggested-project-action {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #e6eee4;
  color: var(--green-strong);
  font-size: 0.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;
  }
}

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

/* Local V01 — public iNaturalist API project suggestions */
.submit-progress {
  min-height: 1.25rem;
  margin-top: 0.55rem;
  font-weight: 700;
  line-height: 1.35;
}
.project-result-section {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.project-result-section + .project-result-section {
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.project-result-section-title {
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-results button {
  display: grid;
  gap: 0.15rem;
  width: 100%;
}
.project-results button small {
  color: var(--muted);
  font-weight: 650;
}
.project-results button.selected {
  opacity: 0.65;
}

.submit-progress {
  margin-top: 0.75rem;
}

/* Local V01 — local save package with JPG metadata */
.local-save-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.local-save-option input {
  width: auto;
  margin-top: 0.15rem;
}

/* Base — centered confirmation modal for local saves */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(18, 32, 27, 0.58);
}

.app-modal-overlay[hidden] {
  display: none;
}

.app-modal {
  width: min(92vw, 560px);
  max-height: 88vh;
  overflow: auto;
  padding: 1.25rem 1.35rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 20px;
  background: #fffdf6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  text-align: left;
}

.app-modal h2 {
  margin: 0 0 0.75rem;
  color: var(--green-strong);
  font-size: 1.35rem;
  line-height: 1.2;
}

.app-modal-body {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.app-modal-body p {
  margin: 0;
}

.app-modal-warning {
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(166, 67, 43, 0.28);
  border-radius: 12px;
  background: #fff2ec;
  color: #8d3524;
  font-weight: 750;
}

.finish-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.finish-confirm-summary span {
  display: flex;
  align-items: baseline;
  gap: 0.36rem;
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.finish-confirm-summary strong {
  color: var(--green-strong);
  font-size: 1.05rem;
}

.app-modal-folder-name {
  display: block;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8f5;
  color: var(--green-strong);
  font-weight: 850;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.app-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.app-modal-actions > button:only-child,
.app-modal-actions > button[hidden] + button {
  grid-column: 1 / -1;
}

.app-modal-ok,
.app-modal-cancel {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
}

/* Base — Review workflow UI cleanup */
.player-panel .screenshots-workflow-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.thumb-grid-player {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.observation-panel .status-box {
  border: 1px solid rgba(49, 92, 61, 0.16);
}

.submit-card .main-save-button {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(35, 68, 45, 0.1);
}

.submit-card .pending-submit-button {
  opacity: 0.48;
}

.ocr-details,
.map-details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f6f8f5;
  padding: 0.7rem 0.8rem;
}

.ocr-details summary,
.map-details summary,
.inat-details-panel summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.ocr-details summary::-webkit-details-marker,
.map-details summary::-webkit-details-marker,
.inat-details-panel summary::-webkit-details-marker {
  display: none;
}

.ocr-details[open] summary,
.map-details[open] summary {
  margin-bottom: var(--space-sm);
}

.ocr-details[open] .details-chevron,
.map-details[open] .details-chevron,
.inat-details-panel[open] .details-chevron {
  transform: rotate(90deg);
}

.details-chevron {
  display: inline-flex;
  transition: transform 0.15s ease;
  margin-right: 0.35rem;
}

.ocr-card .ocr-status {
  border-color: rgba(49, 92, 61, 0.18);
  background: #f6f8f5;
}

.ocr-card textarea[readonly] {
  background: #fff;
  font-weight: 750;
}

.map-details {
  margin-top: var(--space-lg);
}

.map-details .map-card {
  margin-top: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.video-state-bar,
.capture-bar,
.observation-actions-inline,
.ocr-actions {
  align-items: center;
}

.capture-bar .primary {
  min-width: 210px;
}

.status-chip {
  border: 1px solid transparent;
}

.status-chip-pending {
  background: #fff4dc;
  color: var(--warning);
  border-color: rgba(118, 82, 43, 0.18);
}

.status-chip-reviewed {
  background: #dfeedd;
  color: var(--green-strong);
  border-color: rgba(49, 92, 61, 0.16);
}

.status-chip-saved {
  background: #e6eee4;
  color: var(--green-strong);
  border-color: rgba(49, 92, 61, 0.18);
}

.status-chip-ignored {
  background: #eadfdb;
  color: var(--danger);
  border-color: rgba(166, 67, 43, 0.16);
}

.status-chip-captured {
  background: #eef2eb;
  color: var(--ink);
  border-color: rgba(29, 42, 36, 0.1);
}

@media (max-width: 1180px) {
  .thumb-grid-player {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .thumb-grid-player {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .capture-bar .primary {
    min-width: 0;
    width: 100%;
  }
}

/* Local V01 — screenshot fullscreen preview */
body.modal-open {
  overflow: hidden;
}

.screenshot-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 24, 19, 0.82);
}

.screenshot-preview-overlay[hidden] {
  display: none;
}

.screenshot-preview-shell {
  width: min(96vw, 1180px);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background: #fffdf6;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.screenshot-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.screenshot-preview-header h2 {
  margin: 0;
  color: var(--green-strong);
  font-size: 1.2rem;
}

.screenshot-preview-close {
  white-space: nowrap;
}

.screenshot-preview-stage {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: #101812;
}

.screenshot-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 9.5rem);
  object-fit: contain;
}

.screenshot-preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 4.25rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.82);
  color: var(--green-strong);
  font-size: 2.2rem;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.screenshot-preview-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.screenshot-preview-prev {
  left: 0.8rem;
}
.screenshot-preview-next {
  right: 0.8rem;
}

.screenshot-preview-meta {
  margin: 0;
  padding: 0.45rem 0.55rem 0.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  overflow-wrap: anywhere;
}

.thumb-card::after {
  content: "⤢";
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.88);
  color: var(--green-strong);
  font-size: 0.85rem;
  font-weight: 900;
  opacity: 0.92;
}

@media (max-width: 700px) {
  .screenshot-preview-shell {
    width: 98vw;
    max-height: 96vh;
    padding: 0.6rem;
  }
  .screenshot-preview-stage img {
    max-height: calc(96vh - 9rem);
  }
  .screenshot-preview-nav {
    width: 2.25rem;
    height: 3.5rem;
    font-size: 1.8rem;
  }
}

/* Local V01 — compact review console layout */
.player-panel .top-row {
  display: block;
}

.player-panel .video-stage {
  margin-bottom: 0.72rem;
}

.player-controls-layout-v01 {
  display: grid;
  gap: 0.72rem;
  margin: 0 0 var(--space-lg);
  padding: 0.9rem 1rem;
  border: 1px solid #d5d9cc;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfaf4 0%, #f7f5ed 100%);
  box-shadow: 0 6px 16px rgba(35, 68, 45, 0.07);
}

.player-controls-layout-v01 .player-control-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.player-primary-actions-row {
  justify-content: flex-start;
}

.fine-seek-controls,
.capture-actions-group,
.player-navigation-group,
.player-controls-layout-v01 .nav-buttons,
.review-actions-group {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  flex-wrap: wrap;
  margin: 0;
}

.player-controls-layout-v01 button {
  min-height: 38px;
  border-radius: 10px;
  padding: 0.55rem 0.78rem;
  box-shadow: none;
}

.player-controls-layout-v01 .compact-control,
.player-controls-layout-v01 .compact-nav {
  color: var(--green-strong);
  background: #fffef9;
  border: 1px solid #c9cdbc;
  font-size: 0.82rem;
  line-height: 1.05;
  font-weight: 850;
}

.player-controls-layout-v01 .compact-control:hover:not(:disabled),
.player-controls-layout-v01 .compact-nav:hover:not(:disabled) {
  background: #eef3e9;
  border-color: rgba(49, 92, 61, 0.45);
}

.capture-actions-group {
  flex: 1 1 300px;
}

.player-controls-layout-v01 .capture-primary {
  min-width: 180px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.control-divider {
  align-self: stretch;
  width: 1px;
  min-height: 34px;
  background: #c8cdbf;
  flex: 0 0 1px;
}

.player-status-summary {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0.05rem 0.05rem 0;
}

.player-status-summary .video-state-text {
  color: #27342d;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.35;
}

.player-controls-divider {
  height: 1px;
  background: #c8cdbf;
}

.player-review-navigation-row {
  justify-content: space-between;
}

.player-navigation-group {
  flex: 1 1 480px;
  min-width: 0;
}

.player-controls-layout-v01 .player-video-counter {
  flex: 0 0 auto;
  margin: 0 0.18rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #26332c;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.review-actions-group {
  justify-content: flex-end;
  flex: 0 1 auto;
}

.player-controls-layout-v01 .ignore-action {
  color: #b32929;
  background: #fffdf9;
  border: 1px solid #da4b4b;
  font-weight: 900;
}

.player-controls-layout-v01 .ignore-action:hover:not(:disabled) {
  color: #fff;
  background: #b83b35;
  border-color: #b83b35;
}

.player-controls-layout-v01 .reviewed-action {
  color: #27633c;
  background: #fffdf9;
  border: 1px solid #4d8760;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.player-controls-layout-v01 .reviewed-action:hover:not(:disabled) {
  color: #fff;
  background: #315c3d;
  border-color: #315c3d;
}

.player-finish-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.1rem;
}

.player-controls-layout-v01 .finish-subfolder-action {
  min-width: 235px;
  border-radius: 9px;
  background: #244a30;
  font-weight: 950;
  letter-spacing: 0.025em;
}

@media (max-width: 980px) {
  .player-primary-actions-row,
  .player-review-navigation-row {
    align-items: flex-start;
  }

  .control-divider {
    display: none;
  }

  .fine-seek-controls,
  .capture-actions-group,
  .player-navigation-group,
  .review-actions-group {
    width: 100%;
  }

  .review-actions-group {
    justify-content: flex-start;
  }
}

@media (max-width: 660px) {
  .player-controls-layout-v01 {
    padding: 0.72rem;
  }

  .fine-seek-controls,
  .capture-actions-group,
  .player-controls-layout-v01 .nav-buttons,
  .review-actions-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-controls-layout-v01 button,
  .player-controls-layout-v01 .capture-primary {
    width: 100%;
    min-width: 0;
  }

  .player-navigation-group {
    align-items: flex-start;
  }

  .player-controls-layout-v01 .player-video-counter {
    width: 100%;
    white-space: normal;
    margin-bottom: 0.15rem;
  }

  .player-finish-row {
    justify-content: stretch;
  }

  .player-controls-layout-v01 .finish-subfolder-action {
    width: 100%;
    min-width: 0;
  }
}

/* Local V35 — save validation modal and video progress summary */
.v14-progress-header {
  flex-wrap: wrap;
}

.video-progress-summary {
  flex: 1 0 100%;
  padding: 0.48rem 0.62rem;
  border: 1px solid #d9dfd4;
  border-radius: 10px;
  background: #f5f8f3;
  color: var(--green-strong);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.video-progress-summary[data-current-status="ignored"] {
  background: #fff6ea;
  border-color: #ead5b5;
}

.video-progress-summary[data-current-status="unreviewed"] {
  background: #f8f6ef;
  color: #655f4f;
}

.validation-missing-list {
  margin: 0.05rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
  color: #8f3427;
}

.validation-missing-field {
  border-color: #b84b37 !important;
  box-shadow: 0 0 0 3px rgba(184, 75, 55, 0.16) !important;
}

button.validation-missing-field {
  outline: 3px solid rgba(184, 75, 55, 0.22);
  outline-offset: 2px;
}

/* Compact workspace and folder presentation */
:root {
  --v06-green: #14532d;
  --v06-green-2: #2f6b43;
  --v06-soft: #f3f6f1;
  --v06-line: #dbe4d8;
  --v06-warm: #fbfaf5;
}
body {
  background: #f1efe7;
}
.compatibility-card {
  margin: 12px 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 14px;
}
.compatibility-main {
  min-width: 0;
}
.compatibility-kicker {
  font-size: 11px;
}
.compatibility-main h2 {
  font-size: 16px;
  margin: 2px 0;
}
.compatibility-status {
  margin: 0;
  font-size: 13px;
}
.compatibility-text,
.mode-explainer {
  display: none !important;
}
.compatibility-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.compatibility-button {
  width: auto;
  white-space: nowrap;
}
.app-grid {
  grid-template-columns: minmax(270px, 320px) minmax(600px, 1fr) minmax(330px, 390px);
  gap: 14px;
  align-items: start;
  padding: 6px 14px 14px;
  max-width: none;
}
.panel {
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(26, 48, 31, 0.08);
}
.playlist-panel {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.playlist-panel > section:first-child {
  padding-bottom: 8px;
}
.playlist-panel h2 {
  margin-bottom: 10px;
}
.complete-mode-box-v20 {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--v06-line);
  border-radius: 12px;
  background: var(--v06-soft);
}
.complete-mode-box-v20[hidden] {
  display: none !important;
}
.selected-folder-state {
  min-width: 0;
}
.selected-folder-state strong {
  font-size: 15px;
  line-height: 1.25;
}
.active-mode-chip {
  grid-column: 1;
  padding: 5px 9px;
  width: max-content;
}
.complete-mode-box-v20 .tiny-button {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
}
#folderHelp,
#folderNameBox {
  display: none !important;
}
.subfolder-section {
  margin-top: 4px;
  padding: 0;
  border: 1px solid var(--v06-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.subfolder-section .section-row {
  padding: 12px 13px;
  background: var(--v06-soft);
  margin: 0;
}
.subfolder-section .section-row h3 {
  font-size: 14px;
}
.subfolder-section #subfolderSummary {
  display: none;
}
.subfolder-progress {
  margin: 0;
  padding: 9px 13px;
  border: 0;
  border-top: 1px solid var(--v06-line);
  border-radius: 0;
  font-size: 12px;
}
.subfolder-list {
  padding: 7px;
}
.subfolder-list button {
  min-height: 42px;
}
.player-panel {
  min-width: 0;
}
.video-stage video {
  max-height: 58vh;
}
.player-controls-stack {
  background: var(--v06-warm);
  border: 1px solid #e5e1d4;
  border-radius: 12px;
  padding: 10px;
}
.player-control-row {
  gap: 10px;
}
.player-review-navigation-row {
  align-items: center;
}
.player-navigation-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.player-video-counter {
  margin: 0;
  font-weight: 700;
}
.review-actions-group {
  margin-left: auto;
}
.player-finish-row {
  justify-content: flex-end;
}
.v06-observation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.v06-actions-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #56665b;
}
.v06-observation-actions .observation-actions-inline {
  display: flex;
  gap: 8px;
}
.observation-panel .observation-label[data-i18n="observationActionsLabel"],
.observation-panel .observation-actions-inline {
  display: none;
}
.ocr-tools-panel {
  margin-top: 12px;
  border: 1px solid var(--v06-line);
  border-radius: 10px;
  background: var(--v06-soft);
  overflow: hidden;
}
.ocr-tools-panel > summary {
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.ocr-tools-panel > summary::-webkit-details-marker {
  display: none;
}
.ocr-tools-panel > summary:before {
  content: "▶";
  font-size: 11px;
  margin-right: 8px;
}
.ocr-tools-panel[open] > summary:before {
  content: "▼";
}
.ocr-tools-panel .ocr-card {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--v06-line);
  border-radius: 0;
}
.inat-details-section {
  display: none !important;
}
.location-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.location-actions button {
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}
.observation-panel {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
}
@media (max-width: 1180px) {
  .app-grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .observation-panel {
    grid-column: 1/-1;
    position: static;
    max-height: none;
  }
  .playlist-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 780px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .playlist-panel,
  .observation-panel {
    position: static;
    max-height: none;
  }
  .compatibility-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .compatibility-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* Observation and responsive field layout */
@media (min-width: 1181px) {
  html {
    font-size: 15px;
  }

  .compatibility-card,
  .app-grid {
    width: min(calc(100% - 32px), 1600px);
    margin-left: auto;
    margin-right: auto;
  }

  .compatibility-card {
    padding: 10px 14px;
  }

  .app-grid {
    grid-template-columns: 280px minmax(720px, 900px) 340px;
    justify-content: center;
    gap: 14px;
    padding: 6px 0 14px;
  }

  .panel {
    padding: 0.88rem;
  }

  .panel h2 {
    font-size: 1.22rem;
    margin-bottom: 0.58rem;
  }

  .panel h3 {
    font-size: 1rem;
    margin-bottom: 0.55rem;
  }

  .panel section + section {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
  }

  .player-panel {
    max-width: 900px;
  }

  .player-panel .video-stage {
    width: min(100%, 860px);
    max-width: 860px;
    max-height: 484px;
    margin-top: 0.62rem;
    margin-bottom: 0.62rem;
  }

  .video-stage video {
    max-height: 484px;
  }

  .player-controls-stack {
    padding: 8px;
  }

  .player-controls-layout-v01 {
    gap: 0.58rem;
  }
  .complete-mode-box-v20 {
    padding: 10px;
  }

  .complete-mode-box-v20 .selected-folder-state strong {
    font-size: 14px;
  }

  .subfolder-section .section-row,
  .subfolder-progress {
    padding-left: 10px;
    padding-right: 10px;
  }

  button {
    padding: 0.62rem 0.82rem;
  }

  .small-button {
    padding: 0.5rem 0.68rem;
    font-size: 0.82rem;
  }

  input,
  select,
  textarea {
    padding: 0.62rem 0.7rem;
  }

  label,
  .hint,
  .current-video,
  .compatibility-status {
    font-size: 0.84rem;
  }

  .subsection-label {
    font-size: 0.7rem;
    margin-top: 0.8rem;
    margin-bottom: 0.35rem;
  }

  .status-box {
    padding: 0.65rem 0.7rem;
  }

  .observed-fields,
  .date-format-line {
    gap: 0.45rem;
  }

  .observation-panel {
    max-height: calc(100vh - 18px);
  }
}

/* Prevent translated camera-date formats from being clipped. */
.date-format-line {
  grid-template-columns: minmax(0, 0.82fr) minmax(148px, 1.18fr);
  gap: 0.5rem;
}

.date-format-line > label {
  min-width: 0;
  line-height: 1.2;
}

#cameraDateFormat {
  min-width: 0;
  width: 100%;
  padding-left: 0.65rem;
  padding-right: 2rem;
  text-overflow: ellipsis;
}

@media (max-width: 1450px) and (min-width: 1181px) {
  .app-grid {
    grid-template-columns: 255px minmax(0, 1fr) 315px;
  }

  .player-panel .video-stage {
    width: min(100%, 820px);
    max-width: 820px;
    max-height: 461px;
  }

  .video-stage video {
    max-height: 461px;
  }

  .date-format-line {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1921px) {
  .compatibility-card,
  .app-grid {
    width: min(calc(100% - 64px), 1600px);
  }
}

@media (max-width: 1180px) {
  .date-format-line {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 1fr);
  }
}

@media (max-width: 620px) {
  .date-format-line {
    grid-template-columns: 1fr;
  }
}

/* Primary action refinements */
.submit-card {
  display: grid;
  gap: 0.55rem;
}
.submit-card #btnValidate,
.submit-card #btnSaveLocalPackage {
  width: 100%;
}

/* Player workflow controls */
.player-controls-layout-v01 {
  gap: 0.62rem;
}
.v10-control-section {
  min-width: 0;
}
.v10-control-heading {
  display: block;
  margin: 0 0 0.38rem;
  color: #607067;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  line-height: 1.15;
  text-transform: uppercase;
}
.v10-fine-row,
.v10-capture-row {
  align-items: flex-end !important;
}
.v10-fine-section {
  width: 100%;
}
.v10-capture-row {
  display: grid !important;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr);
  gap: 0.8rem !important;
  padding: 0.1rem 0 0.08rem;
}
.v10-capture-section .capture-actions-group {
  flex: none;
}
.player-controls-layout-v01 .capture-primary {
  min-width: 210px;
  min-height: 44px;
  padding-inline: 1rem;
  box-shadow: 0 5px 12px rgba(33, 82, 49, 0.15);
}
.v10-capture-row .player-status-summary {
  align-self: end;
  min-height: 44px;
  padding: 0.4rem 0.65rem;
  border: 1px solid #dde2d8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}
.v10-capture-row .video-state-text {
  color: #59665e;
  font-size: 0.79rem;
  font-weight: 700;
}
.player-review-navigation-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end !important;
  gap: 0.9rem !important;
}
.v10-navigation-section,
.v10-decision-section {
  min-width: 0;
}
.v10-navigation-section .player-navigation-group {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem 0.7rem;
  align-items: center;
}
.v10-navigation-section .nav-buttons {
  flex-wrap: nowrap;
}
.v10-decision-section .review-actions-group {
  margin-left: 0;
  flex-wrap: nowrap;
}
.v06-observation-actions.v10-secondary-actions {
  justify-content: flex-start;
  margin: 0;
  padding: 0.58rem 0 0.05rem;
  border-top: 1px solid #dfe3d9;
}
.v10-secondary-actions .observation-actions-inline {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}
.v10-secondary-actions .v10-new-observation {
  color: #435148;
  background: transparent;
  border-color: #bdc6bd;
}
.v10-secondary-actions .v10-clear-captures {
  color: #a33838;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}
.v10-secondary-actions .v10-clear-captures:hover:not(:disabled) {
  color: #8d2020;
  background: #fff2f1;
  border-color: #e4b0ad;
}
@media (max-width: 980px) {
  .v10-capture-row,
  .player-review-navigation-row {
    grid-template-columns: 1fr;
  }
  .v10-navigation-section .player-navigation-group {
    grid-template-columns: 1fr;
  }
  .v10-navigation-section .nav-buttons,
  .v10-decision-section .review-actions-group {
    flex-wrap: wrap;
  }
}
@media (max-width: 660px) {
  .v10-capture-section .capture-actions-group {
    display: block;
  }
  .player-controls-layout-v01 .capture-primary {
    width: 100%;
    min-width: 0;
  }
  .v10-secondary-actions .observation-actions-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Observation form and queue refinements */
.v13-video-control-strip {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) 1px minmax(0, 0.92fr);
  align-items: end !important;
  gap: 0.75rem !important;
}

.v13-fine-section,
.v13-queue-section {
  min-width: 0;
}

.v13-control-divider {
  display: block;
  align-self: stretch;
  width: 1px;
  min-height: 42px;
  background: #d6dbd2;
}

.v13-queue-section .player-navigation-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-items: end;
}

.v13-queue-section .player-video-counter {
  margin: 0;
  min-height: 1rem;
  color: #667169;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
}

.v13-queue-section .nav-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.38rem;
  align-items: center;
}

.v13-queue-section .compact-nav,
.v13-fine-section .compact-control {
  min-width: 0;
  white-space: nowrap;
}

.v13-review-row {
  display: flex !important;
  justify-content: flex-start;
  align-items: flex-end !important;
}

.v13-review-row .v10-decision-section {
  width: 100%;
}

.v13-review-row .review-actions-group {
  margin-left: 0;
}

.v13-date-format-line {
  display: block;
}

.v13-date-format-line #cameraDateFormat {
  width: 100%;
  max-width: 190px;
  min-width: 0;
  padding-right: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
}

@media (max-width: 1450px) {
  .v13-video-control-strip {
    grid-template-columns: 1fr;
    gap: 0.55rem !important;
  }

  .v13-control-divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
  }

  .v13-queue-section .player-navigation-group {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem 0.65rem;
    align-items: center;
  }
}

@media (max-width: 760px) {
  .v13-fine-section .fine-seek-controls,
  .v13-queue-section .nav-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .v13-queue-section .player-navigation-group {
    grid-template-columns: 1fr;
  }

  .v13-fine-section .compact-control,
  .v13-queue-section .compact-nav {
    width: 100%;
  }

  .v13-queue-section .nav-buttons > :last-child {
    grid-column: 1 / -1;
  }
}

/* Review workflow presentation */
.player-controls-layout-v14 {
  position: relative;
  display: grid;
  gap: 0.58rem;
  margin: 0 0 var(--space-lg, 1rem);
  padding: 0;
}

.player-controls-layout-v14 > section + section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.v14-workflow-block {
  min-width: 0;
  border: 1px solid #d8ddd3;
  border-radius: 12px;
  padding: 0.72rem 0.78rem;
  background: #faf9f5;
}

.v14-phase-one {
  border: 2px solid rgba(49, 92, 61, 0.64);
  background: linear-gradient(180deg, #fff 0%, #fbfcf8 100%);
  box-shadow: 0 4px 12px rgba(35, 68, 45, 0.07);
}

.v14-phase-two {
  background: #f8f7f2;
}

.v14-phase-title {
  margin: 0 0 0.5rem !important;
  color: #607067;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  line-height: 1.15;
  text-transform: uppercase;
}

.v14-fine-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.5rem;
}

.player-controls-layout-v14 button {
  min-height: 39px;
  border-radius: 9px;
  padding: 0.52rem 0.7rem;
  box-shadow: none;
  white-space: nowrap;
}

.v14-fine-controls .compact-control {
  width: 100%;
  min-width: 0;
  color: var(--green-strong);
  background: #fffef9;
  border: 1px solid #c9cdbc;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.05;
}

.v14-fine-controls .compact-control:hover:not(:disabled) {
  background: #eef3e9;
  border-color: rgba(49, 92, 61, 0.48);
}

.v14-capture-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 1fr) 44px;
  gap: 0.46rem;
  align-items: stretch;
}

.v14-capture-primary {
  width: 100%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(33, 82, 49, 0.14) !important;
}

.v14-new-observation {
  width: 100%;
  color: #435148;
  background: #fffef9;
  border: 1px solid #bdc6bd;
  font-weight: 800;
}

.v14-icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.v14-clear-captures {
  color: #a33838;
  background: #fffdf9;
  border: 1px solid #d8b0ac;
}

.v14-clear-captures:hover:not(:disabled) {
  color: #fff;
  background: #a6432b;
  border-color: #a6432b;
}

.v14-capture-status {
  margin: 0.42rem 0 0;
  color: #6a756e;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.v14-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.34rem;
  color: #667169;
  font-size: 0.77rem;
  line-height: 1.2;
}

.v14-progress-header strong {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.v14-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  margin-bottom: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e3da;
}

.v14-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.18s ease;
}

.v14-decision-controls,
.v14-control-legends {
  display: grid;
  grid-template-columns: minmax(100px, auto) 44px 44px minmax(180px, 1fr) 44px;
  gap: 0.42rem;
  align-items: center;
}

.v14-previous-button {
  min-width: 100px;
  color: var(--green-strong);
  background: #fffef9;
  border: 1px solid #c9cdbc;
  font-weight: 850;
}

.v14-ignore-button {
  color: #b32929;
  background: #fffdf9;
  border: 1px solid #cf655d;
  font-weight: 950;
}

.v14-ignore-button:hover:not(:disabled) {
  color: #fff;
  background: #b83b35;
  border-color: #b83b35;
}

.v14-reviewed-button {
  color: #27633c;
  background: #fffdf9;
  border: 1px solid #57906a;
  font-weight: 950;
}

.v14-reviewed-button:hover:not(:disabled) {
  color: #fff;
  background: #315c3d;
  border-color: #315c3d;
}

.v14-next-button {
  width: 100%;
  min-width: 180px;
  background: var(--green);
  color: #fff;
  font-size: 0.91rem;
  font-weight: 950;
  letter-spacing: 0.005em;
  box-shadow: 0 5px 12px rgba(33, 82, 49, 0.14) !important;
}

.v14-unreviewed-button {
  color: #435148;
  background: #fffef9;
  border: 1px solid #bdc6bd;
}

.v14-control-legends {
  margin-top: 0.28rem;
  color: #8a8e87;
  font-size: 0.58rem;
  line-height: 1.1;
  text-align: center;
}

.v14-control-legends span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v14-phase-three {
  display: flex;
  justify-content: flex-end;
  padding: 0.03rem 0 0;
}

.player-controls-layout-v14 .v14-finish-subfolder {
  min-width: 220px;
  min-height: 38px;
  border-radius: 9px;
  background: #244a30;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* V58 — OCR progress overlay that never moves the player layout. */
.ocr-processing-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  max-width: min(420px, calc(100% - 2rem));
  margin: 0;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(17, 24, 19, 0.86);
  color: #fffdf7;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -46%, 0) scale(0.985);
  backdrop-filter: blur(5px);
}

.ocr-processing-overlay[hidden] {
  display: none;
}

.ocr-processing-overlay.is-visible {
  animation: ocr-overlay-in 0.2s ease-out forwards;
}

.ocr-processing-overlay.is-hiding {
  animation: ocr-overlay-out 0.16s ease-in forwards;
}

.ocr-processing-overlay.is-success {
  background: rgba(29, 82, 48, 0.9);
}

.ocr-processing-overlay.is-warning {
  background: rgba(117, 78, 14, 0.92);
}

.ocr-processing-overlay.is-error {
  background: rgba(125, 48, 34, 0.92);
}

.ocr-processing-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

.ocr-processing-overlay.is-running .ocr-processing-icon {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ocr-overlay-spin 0.72s linear infinite;
}

.ocr-processing-overlay.is-success .ocr-processing-icon::before {
  content: "✓";
}

.ocr-processing-overlay.is-warning .ocr-processing-icon::before {
  content: "!";
}

.ocr-processing-overlay.is-error .ocr-processing-icon::before {
  content: "×";
}

@keyframes ocr-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ocr-overlay-in {
  from {
    opacity: 0;
    transform: translate3d(-50%, -46%, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

@keyframes ocr-overlay-out {
  from {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(-50%, -54%, 0) scale(0.99);
  }
}

.local-player-action-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 30;
  max-width: min(360px, calc(100% - 2rem));
  margin: 0;
  padding: 0.58rem 0.86rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(17, 24, 19, 0.78);
  color: #fffdf7;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -46%, 0) scale(0.985);
  backdrop-filter: blur(5px);
}

.local-player-action-status.is-visible {
  animation: local-player-toast-in 0.2s ease-out forwards;
}

.local-player-action-status.is-hiding {
  animation: local-player-toast-out 0.16s ease-in forwards;
}

.player-controls-layout-v14 button.local-player-action-flash {
  animation: local-player-button-feedback 0.56s ease-out;
}

@keyframes local-player-toast-in {
  from {
    opacity: 0;
    transform: translate3d(-50%, -46%, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

@keyframes local-player-toast-out {
  from {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(-50%, -54%, 0) scale(0.99);
  }
}

@keyframes local-player-button-feedback {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(49, 92, 61, 0.34);
  }
  45% {
    transform: scale(0.985);
    box-shadow: 0 0 0 4px rgba(49, 92, 61, 0.18);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(49, 92, 61, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .local-player-action-status.is-visible,
  .local-player-action-status.is-hiding,
  .ocr-processing-overlay.is-visible,
  .ocr-processing-overlay.is-hiding,
  .ocr-processing-overlay.is-running .ocr-processing-icon,
  .player-controls-layout-v14 button.local-player-action-flash {
    animation: none;
  }
}


@media (max-width: 660px) {
  .ocr-processing-overlay {
    max-width: min(320px, calc(100% - 1.2rem));
    padding: 0.58rem 0.78rem;
    font-size: 0.78rem;
  }

  .local-player-action-status {
    max-width: min(300px, calc(100% - 1.2rem));
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
  }
}

@media (max-width: 1250px) {
  .v14-decision-controls,
  .v14-control-legends {
    grid-template-columns: minmax(95px, auto) 42px 42px minmax(150px, 1fr) 42px;
    gap: 0.35rem;
  }

  .v14-icon-button {
    width: 42px;
    min-width: 42px;
  }
}

@media (max-width: 820px) {
  .v14-capture-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  }

  .v14-decision-controls,
  .v14-control-legends {
    grid-template-columns: minmax(0, 0.85fr) 44px 44px minmax(0, 1.5fr) 44px;
  }
}

@media (max-width: 660px) {
  .v14-workflow-block {
    padding: 0.65rem;
  }

  .v14-fine-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v14-capture-actions {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .v14-capture-primary {
    grid-column: 1 / -1;
  }

  .v14-new-observation {
    min-width: 0;
  }

  .v14-decision-controls {
    grid-template-columns: 44px 44px minmax(0, 1fr) 44px;
  }

  .v14-previous-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .v14-control-legends {
    display: none;
  }

  .v14-phase-three {
    justify-content: stretch;
  }

  .player-controls-layout-v14 .v14-finish-subfolder {
    width: 100%;
    min-width: 0;
  }
}

/* Status presentation */
.player-controls-layout-v14 .v14-workflow-block {
  padding-top: 0.62rem;
  padding-bottom: 0.66rem;
}

.player-controls-layout-v14 .v14-phase-one,
.player-controls-layout-v14 .v14-phase-two {
  margin-top: 0;
}

/* Do not reserve an empty line for the removed startup message.
   Dynamic validation/error messages become visible automatically when populated. */
.validation-output:empty {
  display: none;
  min-height: 0;
}

@media (max-width: 660px) {
  .player-controls-layout-v14 .v14-workflow-block {
    padding-top: 0.58rem;
    padding-bottom: 0.62rem;
  }
}

/* Location and validation presentation */
/* Manual location persistence controls are no longer part of the interface. */
.v16-location-compat,
.v16-location-compat[hidden] {
  display: none !important;
}

/* Species/place confirmations remain available without competing with inputs. */
.observation-panel .selected-taxon,
.observation-panel .selected-place {
  margin: 0.26rem 0 0.42rem;
  color: #737d75;
  font-size: 0.69rem;
  font-weight: 500;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

/* Give the unreviewed control/legend enough room and reduce Next slightly. */
.v14-decision-controls,
.v14-control-legends {
  grid-template-columns: minmax(104px, auto) 44px 44px minmax(146px, 0.82fr) minmax(92px, auto);
  gap: 0.4rem;
}

.v14-next-button {
  min-width: 146px;
}

.v14-unreviewed-button {
  width: 100%;
  min-width: 92px;
}

.v14-control-legends {
  margin-top: 0.34rem;
  color: #667169;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.15;
}

.v14-control-legends span {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}



@media (max-width: 1250px) {
  .v14-decision-controls,
  .v14-control-legends {
    grid-template-columns: minmax(96px, auto) 42px 42px minmax(132px, 0.78fr) minmax(88px, auto);
    gap: 0.34rem;
  }

  .v14-next-button {
    min-width: 132px;
  }

  .v14-unreviewed-button {
    min-width: 88px;
  }
}

@media (max-width: 820px) {
  .v14-decision-controls,
  .v14-control-legends {
    grid-template-columns: minmax(94px, 0.8fr) 44px 44px minmax(128px, 1.15fr) minmax(88px, 0.8fr);
  }
}

@media (max-width: 660px) {
  .v14-decision-controls {
    grid-template-columns: 44px 44px minmax(0, 1fr) minmax(76px, 0.72fr);
  }

  .v14-previous-button {
    grid-column: 1 / -1;
  }

  .v14-unreviewed-button {
    min-width: 76px;
  }
}

/* Organized two-row fallback for medium-width layouts. */
@media (max-width: 900px) and (min-width: 661px) {
  .v14-decision-controls,
  .v14-control-legends {
    grid-template-columns: minmax(110px, 1fr) 88px minmax(104px, 0.72fr);
    gap: 0.36rem;
  }

  .v14-previous-button {
    grid-column: 1;
    width: 100%;
  }

  .v14-ignore-button {
    grid-column: 2;
    justify-self: center;
  }

  .v14-reviewed-button {
    grid-column: 3;
    justify-self: center;
  }

  .v14-next-button {
    grid-column: 1 / 3;
    width: 100%;
    min-width: 0;
  }

  .v14-unreviewed-button {
    grid-column: 3;
    width: 100%;
    min-width: 104px;
  }

  .v14-control-legends span:nth-child(1) {
    grid-column: 1;
  }
  .v14-control-legends span:nth-child(2) {
    grid-column: 2;
  }
  .v14-control-legends span:nth-child(3) {
    grid-column: 3;
  }
  .v14-control-legends span:nth-child(4) {
    grid-column: 1 / 3;
  }
  .v14-control-legends span:nth-child(5) {
    grid-column: 3;
  }
}

/* Responsive observation refinements */
.brand-with-subtitle {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.brand-minimal.brand-with-subtitle h1 {
  display: block;
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3.1vw, 2.35rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 0.32rem 0 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.78rem, 1.25vw, 1rem);
  font-weight: 450;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .brand-minimal.brand-with-subtitle h1 {
    font-size: clamp(1.55rem, 4.2vw, 2rem);
  }

  .brand-subtitle {
    max-width: 29rem;
    font-size: clamp(0.74rem, 1.8vw, 0.9rem);
  }
}

@media (max-width: 720px) {
  .app-header {
    gap: 0.7rem;
  }

  .brand-wrap {
    width: 100%;
    gap: 0.72rem;
  }

  .brand-minimal.brand-with-subtitle h1 {
    font-size: clamp(1.35rem, 6.3vw, 1.7rem);
  }

  .brand-subtitle {
    max-width: 100%;
    font-size: clamp(0.7rem, 3.15vw, 0.82rem);
    line-height: 1.22;
    text-wrap: balance;
  }
}

@media (max-width: 420px) {
  .brand-wrap {
    align-items: flex-start;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-minimal.brand-with-subtitle h1 {
    font-size: 1.28rem;
  }

  .brand-subtitle {
    font-size: 0.69rem;
  }
}

/* Image-limit modal */
#btnCapture.capture-limit-reached {
  opacity: 0.58;
  filter: saturate(0.55);
  cursor: not-allowed;
  box-shadow: none;
}

#btnCapture.capture-limit-reached:hover,
#btnCapture.capture-limit-reached:focus-visible {
  transform: none;
}

.image-limit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(18, 32, 27, 0.68);
}

.image-limit-modal-overlay[hidden] {
  display: none;
}

.image-limit-modal {
  width: min(92vw, 570px);
  max-height: 88vh;
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  background: #fffdf6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.image-limit-modal h2 {
  margin: 0 0 0.75rem;
  color: var(--green-strong);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  line-height: 1.2;
}

.image-limit-modal p {
  margin: 0;
  line-height: 1.55;
}

.image-limit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.image-limit-modal-actions button {
  min-width: 130px;
  justify-content: center;
}

body.image-limit-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .image-limit-modal {
    padding: 1.1rem;
    border-radius: 16px;
  }

  .image-limit-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .image-limit-modal-actions button {
    width: 100%;
  }
}

/* High-throughput controls and shortcuts */
.v14-capture-actions {
  grid-template-columns: minmax(190px, 1.35fr) minmax(160px, 0.95fr) minmax(150px, 0.72fr);
}

.v28-clear-captures {
  width: 100%;
  min-width: 0;
  padding-inline: 0.72rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9b332e;
  background: #fffdf9;
  border: 1px solid #d8b0ac;
  font-weight: 800;
}

.v28-decision-controls {
  grid-template-columns: minmax(120px, 0.72fr) minmax(180px, 1fr) minmax(240px, 1.72fr);
  gap: 0.46rem;
}

.v28-decision-controls > [hidden] {
  display: none !important;
}

.v28-ignore-next {
  width: 100%;
  min-width: 0;
  padding-inline: 0.72rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: #9e2f2a;
  background: #fffdf9;
  border: 1px solid #cf655d;
  font-weight: 900;
}

.v28-ignore-next:hover:not(:disabled) {
  color: #fff;
  background: #b83b35;
  border-color: #b83b35;
}

.v28-reviewed-next {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.shortcut-button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-hint {
  flex: 0 0 auto;
  min-width: 1.55rem;
  padding: 0.12rem 0.32rem;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.15;
  opacity: 0.78;
  text-align: center;
  white-space: nowrap;
}

.v14-previous-button,
.v28-reviewed-next,
#btnCapture,
#btnSaveLocalPackage {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.submit-card #btnSaveLocalPackage {
  min-height: 48px;
}

@media (max-width: 900px) {
  .v28-decision-controls {
    grid-template-columns: minmax(110px, 0.75fr) minmax(170px, 1fr) minmax(220px, 1.45fr);
  }
}

@media (max-width: 720px) {
  .v14-capture-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v14-capture-primary {
    grid-column: 1 / -1;
  }

  .v28-clear-captures {
    min-height: 42px;
  }

  .v28-decision-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v28-decision-controls .v14-previous-button {
    grid-column: 1;
  }

  .v28-ignore-next {
    grid-column: 2;
  }

  .v28-reviewed-next {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .v14-capture-actions,
  .v28-decision-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .v14-capture-primary,
  .v14-new-observation,
  .v28-clear-captures,
  .v28-decision-controls .v14-previous-button,
  .v28-ignore-next,
  .v28-reviewed-next {
    grid-column: 1;
    width: 100%;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .v28-decision-controls .v14-previous-button,
  .v28-decision-controls .v28-ignore-next,
  .v28-decision-controls .v28-reviewed-next {
    grid-column: auto;
    justify-self: stretch;
  }
}

/* Desktop workspace constraints */
@media (min-width: 1680px) and (max-width: 2100px) and (min-height: 820px) and (max-height: 1200px) {
  :root {
    --fhd-gap: 0.72rem;
    --fhd-panel-pad: 0.82rem;
  }

  body {
    font-size: 15px;
  }

  .app-header {
    min-height: 86px;
    padding: 0.68rem 1rem;
  }

  .brand-logo {
    width: 66px;
    height: 66px;
  }

  .brand-minimal h1 span,
  .brand-minimal h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .brand-subtitle {
    margin-top: 0.18rem;
    font-size: 0.82rem;
  }

  .header-actions-minimal {
    padding-right: 4rem;
  }

  .compatibility-card {
    width: min(calc(100% - 1.4rem), 1660px);
    margin: 0.7rem auto;
    padding: 0.72rem 0.9rem;
    gap: 0.72rem;
  }

  .compatibility-card h2 {
    margin-bottom: 0.18rem;
    font-size: 1.02rem;
  }

  .compatibility-card p {
    margin-top: 0.18rem;
    margin-bottom: 0.18rem;
  }

  .mode-complete-active .compatibility-card {
    padding: 0.58rem 0.85rem;
  }

  .app-grid {
    grid-template-columns: 294px minmax(760px, 950px) 392px;
    gap: var(--fhd-gap);
    width: min(calc(100% - 1.2rem), 1660px);
    padding: 0 0 0.8rem;
  }

  .panel {
    padding: var(--fhd-panel-pad);
    border-radius: 15px;
  }

  .panel h2 {
    margin-bottom: 0.52rem;
    font-size: 1.08rem;
  }

  .panel h3 {
    margin-bottom: 0.48rem;
    font-size: 0.98rem;
  }

  .panel section + section {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
  }

  .hint {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .player-panel {
    width: 100%;
    max-width: 950px;
  }

  .player-panel .video-stage {
    max-width: 924px;
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
    border-radius: 13px;
  }

  .player-controls-stack,
  .player-controls-layout-v14 {
    gap: 0.52rem;
  }

  .v14-workflow-block {
    padding: 0.66rem 0.72rem;
  }

  .v14-fine-controls,
  .v14-capture-actions,
  .v28-decision-controls {
    gap: 0.38rem;
  }

  .v14-capture-status,
  .v14-progress-header {
    font-size: 0.8rem;
  }

  .player-controls-layout-v14 button,
  .v14-workflow-block button {
    min-height: 36px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .v14-phase-three {
    margin-top: 0.05rem;
  }

  .v14-finish-subfolder {
    min-height: 38px;
  }

  .subsection-label {
    margin-top: 0.78rem;
    margin-bottom: 0.35rem;
    font-size: 0.69rem;
  }

  .ocr-card {
    padding: 0.72rem;
    border-radius: 13px;
  }

  .ocr-card > * + * {
    margin-top: 0.48rem;
  }

  .ocr-status,
  .source-box {
    margin: 0.42rem 0;
    padding: 0.5rem 0.62rem;
    font-size: 0.8rem;
  }

  #ocrRawText {
    min-height: 3.1rem;
    max-height: 3.1rem;
    padding: 0.52rem 0.65rem;
  }

  .ocr-details {
    padding: 0.55rem 0.65rem;
  }

  .ocr-fields {
    margin-top: 0.45rem;
    gap: 0.45rem;
  }

  .ocr-fields select,
  .ocr-actions button {
    min-height: 36px;
    padding: 0.5rem 0.65rem;
  }

  .player-panel .screenshots-workflow-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
  }

  .compact-hint {
    margin: -0.1rem 0 0.45rem;
  }

  .thumb-grid-player {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .thumb-meta {
    padding: 0.26rem 0.3rem;
    font-size: 0.66rem;
  }

  .playlist-panel,
  .observation-panel {
    font-size: 0.92rem;
  }

  .folder-current,
  .status-box,
  .date-format-line,
  .ocr-details,
  .map-details {
    border-radius: 11px;
  }

  .folder-current {
    margin-top: 0.58rem;
    padding: 0.58rem 0.65rem;
  }

  .status-box {
    padding: 0.6rem 0.65rem;
    margin-bottom: 0.6rem;
  }

  .observed-fields,
  .two-cols {
    gap: 0.45rem;
    margin-top: 0.45rem;
    margin-bottom: 0.58rem;
  }

  label {
    gap: 0.24rem;
    font-size: 0.84rem;
  }

  input,
  select,
  textarea {
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
  }

  .date-format-line {
    gap: 0.45rem;
    margin-bottom: 0.58rem;
    padding: 0.48rem 0.58rem;
  }

  .observation-label,
  .observation-label:first-of-type {
    margin-top: 0.68rem;
  }

  .submit-card {
    gap: 0.42rem;
  }

  .submit-card #btnSaveLocalPackage,
  .submit-card .main-save-button {
    min-height: 42px;
    padding: 0.68rem 0.8rem;
  }

  .app-footer {
    grid-template-columns: 170px minmax(0, 1fr) 92px;
    gap: 0.8rem;
    padding: 0.62rem 1rem 0.7rem;
  }

  .footer-polones-logo {
    max-width: 150px;
  }

  .footer-qr {
    width: 72px;
    height: 72px;
  }

  .footer-center {
    gap: 0.12rem;
    font-size: 0.78rem;
  }

  .footer-center strong {
    font-size: 0.92rem;
  }

  .footer-copyright {
    font-size: 0.72rem;
  }
}

/* V51 — camera-format date display with a separate native calendar picker. */
.observed-date-label {
  min-width: 0;
}

.observed-date-composite {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 0.42rem;
  align-items: stretch;
}

.observed-date-composite #observedDateDisplay {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
}

.date-picker-trigger {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--green-strong);
  cursor: pointer;
}

.date-picker-trigger:hover {
  border-color: var(--green);
  background: #f6f8f5;
}

.date-picker-trigger:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(49, 92, 61, 0.14);
}

.date-picker-trigger svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.native-date-proxy {
  position: absolute !important;
  right: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}


@media (max-width: 520px) {
  .finish-confirm-summary,
  .app-modal-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-modal-actions > button,
  .app-modal-actions > button[hidden] + button {
    grid-column: 1;
  }
}
