:root {
  --ink: #1c3626;
  --ink-2: #294a34;
  --paper: #eef0e6;
  --paper-2: #e2e6d6;
  --white: #ffffff;
  --line: #c8cdb8;
  --contour: #a9853a;
  --contour-soft: #d8c48f;
  --alert: #a13f24;
  --alert-soft: #f1ddd3;
  --ok: #3d6b47;
  --ok-soft: #dce9dd;
  --shadow: 0 16px 42px rgba(28, 54, 38, .12);
  --radius: 6px;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--ink); }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    radial-gradient(ellipse at 15% 10%, transparent 0 32%, rgba(169, 133, 58, .18) 33% 33.3%, transparent 34% 47%, rgba(169, 133, 58, .14) 48% 48.2%, transparent 49%),
    radial-gradient(ellipse at 88% 82%, transparent 0 38%, rgba(169, 133, 58, .13) 39% 39.2%, transparent 40% 54%, rgba(169, 133, 58, .1) 55% 55.2%, transparent 56%);
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(18px, calc((100vw - 1080px) / 2));
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  border-bottom: 1px solid rgba(28, 54, 38, .13);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: block;
  object-fit: contain;
}
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; font: 700 18px/1.1 Georgia, 'Times New Roman', serif; }
.brand-copy span { display: block; font-size: 11px; opacity: .68; margin-top: 3px; }

.support-box {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px 7px 12px;
  border: 1px solid var(--contour); background: #f5ead1; border-radius: 999px;
}
.support-box strong { font-size: 12px; white-space: nowrap; }
.support-link {
  width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(28, 54, 38, .2); background: rgba(255, 255, 255, .55);
  text-decoration: none; font-weight: 700;
}
.support-link:hover { background: white; }

#offline-banner {
  position: relative; z-index: 25;
  padding: 10px 18px;
  background: #f2e3bd; border-bottom: 1px solid #d7b973;
  text-align: center; font-size: 13px;
}

#app { position: relative; z-index: 10; }
.app-shell { width: min(100%, 900px); margin: 0 auto; padding: 24px 18px 52px; }
.panel { width: min(100%, 760px); margin: 0 auto; }

.progress {
  width: min(100%, 760px); margin: 0 auto 28px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.progress-item { min-width: 0; display: flex; align-items: center; gap: 7px; color: rgba(28, 54, 38, .48); font-size: 11px; }
.progress-item::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.progress-item:last-child::after { display: none; }
.progress-dot {
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 50%; font: 600 10px/1 ui-monospace, monospace; background: var(--paper);
}
.progress-item.active, .progress-item.done { color: var(--ink); }
.progress-item.active .progress-dot { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.progress-item.done .progress-dot { border-color: var(--ok); background: var(--ok); color: white; }

h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; color: var(--ink); }
h1 { margin: 4px 0 10px; font-size: clamp(30px, 5vw, 42px); line-height: 1.04; letter-spacing: -.02em; }
h2 { margin: 0 0 8px; font-size: 22px; }
h3 { margin: 0 0 8px; font-size: 18px; }
p { line-height: 1.55; }
.lead { margin: 0 0 24px; font-size: 15px; opacity: .78; max-width: 680px; }
.eyebrow { font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; color: #6c551f; }
.muted { color: rgba(28, 54, 38, .62); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.btn {
  min-height: 44px; border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 11px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none; font-weight: 700; transition: .15s ease; background: transparent; color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary { border-color: var(--line); background: rgba(255,255,255,.28); }
.btn-secondary:hover { border-color: var(--ink); background: rgba(255,255,255,.58); }
.btn-small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 700; }
.back-button { border: 0; background: transparent; color: var(--ink); padding: 4px 0 16px; cursor: pointer; font-weight: 700; }
.icon-button { border: 0; background: transparent; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }

.bottom-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  padding: 0;
}
.bottom-actions .btn { width: min(100%, 724px); }

.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.45; }
.check-row input { margin-top: 3px; accent-color: var(--ink); }
.rules-check { margin: 18px 0 22px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.25); }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.choice-card {
  min-height: 142px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px;
  padding: 20px; border: 1.5px solid var(--line); border-radius: var(--radius); background: rgba(238,240,230,.84); color: var(--ink); cursor: pointer; text-align: left;
}
.choice-card:hover { border-color: var(--contour); background: var(--paper-2); }
.choice-card.selected { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-card strong { font-family: Georgia, serif; font-size: 19px; }
.choice-card span:not(.choice-icon) { font-size: 12px; opacity: .68; line-height: 1.4; }
.choice-icon { font-size: 28px; color: #7c6328; }

.info-box, .alert-box, .warning-box, .success-box {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); font-size: 13px; line-height: 1.5;
}
.info-box { border: 1px solid var(--line); background: rgba(226,230,214,.68); }
.alert-box { color: var(--alert); border: 1px solid rgba(161,63,36,.28); background: var(--alert-soft); }
.warning-box { color: #6d5317; border: 1px solid rgba(169,133,58,.35); background: #f3e8c7; margin-top: 12px; }
.success-box { color: var(--ok); border: 1px solid rgba(61,107,71,.28); background: var(--ok-soft); }
.compact { padding: 10px 12px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 22px; }
.photo-grid-compact { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.photo-thumb { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.25); position: relative; }
.photo-thumb[role="button"] { cursor: pointer; }
.photo-thumb.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.photo-image-wrap { position: relative; aspect-ratio: 1.2; background: #d8dbd0; overflow: hidden; }
.photo-image-wrap img, .review-card > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.photo-thumb-body strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-thumb-body span { font-size: 10px; opacity: .64; }
.photo-check { position: absolute; top: 7px; left: 7px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; border: 2px solid white; font-weight: 800; }
.photo-remove { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(28,54,38,.88); color: white; cursor: pointer; font-size: 18px; }
.badge { align-self: flex-start; padding: 3px 6px; border-radius: 999px; background: #e7dbc0; color: #5c4413; opacity: 1 !important; }

.field-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; position: relative; }
.field-group label { font-size: 12px; font-weight: 700; }
.field-group small { font-size: 11px; opacity: .65; }
.input {
  width: 100%; min-height: 45px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 4px; background: white; color: var(--ink);
}
.input:focus { outline: 2px solid rgba(169,133,58,.18); border-color: var(--ink); }
.textarea { resize: vertical; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }

.autocomplete-results {
  position: absolute; z-index: 220; left: 0; right: 0; top: calc(100% - 8px);
  max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fafbf6; box-shadow: var(--shadow);
}
.autocomplete-option { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border: 0; border-bottom: 1px solid rgba(200,205,184,.72); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.autocomplete-option:hover { background: var(--paper-2); }
.autocomplete-option strong { font-size: 13px; }
.autocomplete-option span { font-size: 11px; opacity: .7; }
.autocomplete-option small { font: 10px/1.3 ui-monospace, monospace; opacity: .55; }
.autocomplete-empty { padding: 14px; font-size: 12px; opacity: .65; }
.selected-location { padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.28); display: flex; flex-direction: column; gap: 4px; }
.selected-location strong { font-family: Georgia, serif; }
.selected-location span { font-size: 11px; opacity: .67; }

.selection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.selection-toolbar strong { font-size: 13px; }
.editor-card, .auth-card, .auth-success {
  margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.25);
}
.editor-card p, .auth-card p { margin: 0 0 14px; font-size: 13px; opacity: .7; }
.disabled-section { opacity: .5; pointer-events: none; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.status-pill { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; background: rgba(255,255,255,.5); }
.chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.chip-grid.compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
.chip { min-height: 45px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 12px; font-weight: 700; }
.chip span { margin-right: 5px; color: #7a6025; }
.chip.active { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--ink); }
.applied-items { display: flex; flex-wrap: wrap; gap: 7px; }
.applied-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: var(--paper-2); font-size: 11px; }
.applied-tag small { font-family: ui-monospace, monospace; opacity: .55; }
.applied-tag button { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.button-row.centered { justify-content: center; }

.auth-success { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: rgba(61,107,71,.35); background: var(--ok-soft); }
.auth-success div { display: flex; flex-direction: column; gap: 3px; }
.auth-success span { font-size: 12px; opacity: .7; }
.challenge-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.challenge-card > strong { display: block; margin-bottom: 12px; font-size: 13px; line-height: 1.45; }

.review-list { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.review-card { display: grid; grid-template-columns: 190px minmax(0,1fr); min-height: 230px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.28); }
.review-card > img { min-height: 100%; background: #d8dbd0; }
.review-body { padding: 16px; }
.review-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.review-head > div { min-width: 0; }
.review-head span.mono { display: block; font-size: 10px; opacity: .5; margin-bottom: 3px; }
.review-head strong { display: block; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; background: var(--paper-2); }
.status-uploading, .status-queued { background: #efe2bd; color: #6b521c; }
.status-partial, .status-error { background: var(--alert-soft); color: var(--alert); }
.status-sent { background: var(--ok-soft); color: var(--ok); }
.review-meta { display: grid; gap: 6px; margin: 10px 0 14px; }
.review-meta div { display: grid; grid-template-columns: 86px 1fr; gap: 8px; font-size: 11px; }
.review-meta dt { font-weight: 800; opacity: .65; }
.review-meta dd { margin: 0; }
.commons-link { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; }
.queue-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.queue-summary div { padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.22); }
.queue-summary strong { display: block; font: 700 18px/1.1 Georgia, serif; }
.queue-summary span { display: block; margin-top: 4px; font-size: 10px; opacity: .6; }

.success-page { text-align: center; padding: 50px 0; }
.success-icon { width: 74px; height: 74px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: white; font-size: 38px; }
.sent-links { display: flex; flex-direction: column; gap: 7px; margin: 20px auto; max-width: 620px; }
.sent-links a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.3); font-size: 12px; overflow-wrap: anywhere; }

.site-footer {
  position: relative; z-index: 0; padding: 28px 18px 42px; text-align: center; color: rgba(28,54,38,.62); font-size: 11px;
}
.site-footer strong { color: var(--ink); }
.site-footer a { color: inherit; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 6px; }

.modal, .camera-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; }
.modal-backdrop, .camera-backdrop { position: absolute; inset: 0; background: rgba(14, 28, 19, .74); }
.modal-dialog, .camera-dialog { position: relative; width: min(760px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: #f4f5ec; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 25px 70px rgba(0,0,0,.35); overflow: hidden; }
.modal-header, .camera-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2, .camera-header h2 { margin: 2px 0 0; }
.modal-scroll { overflow: auto; padding: 18px; }
.modal-footer, .camera-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.reg-section + .reg-section { margin-top: 24px; }
.reg-section p, .reg-section li { font-size: 13px; line-height: 1.62; }
.reg-section ul { padding-left: 20px; }
.camera-header p { margin: 4px 0 0; font-size: 12px; opacity: .65; }
.camera-stage { aspect-ratio: 16/9; background: #101713; display: grid; place-items: center; }
.camera-stage video { width: 100%; height: 100%; object-fit: contain; }
.camera-error { margin: 12px 16px 0; padding: 10px 12px; background: var(--alert-soft); color: var(--alert); border-radius: 4px; font-size: 12px; }

#toast-region { position: fixed; z-index: 2000; top: 84px; right: 16px; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 5px; box-shadow: var(--shadow); background: #fafbf6; border: 1px solid var(--line); font-size: 12px; line-height: 1.45; }
.toast-success { border-color: rgba(61,107,71,.35); background: var(--ok-soft); color: var(--ok); }
.toast-error { border-color: rgba(161,63,36,.35); background: var(--alert-soft); color: var(--alert); }
.fade-in { animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .site-header { padding: 10px 12px; }
  .brand-copy span { display: none; }
  .support-box strong { display: none; }
  .app-shell { padding: 18px 12px 112px; }
  .progress-item span:last-child { display: none; }
  .progress-item::after { display: block; }
  .choice-grid, .form-grid.two { grid-template-columns: 1fr; }
  .choice-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chip-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .review-card { grid-template-columns: 1fr; }
  .review-card > img { height: 220px; min-height: 0; }
  .queue-summary { grid-template-columns: 1fr 1fr; }
  .queue-summary div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .brand-copy strong { font-size: 15px; }
  .brand-logo { width: 38px; height: 38px; flex-basis: 38px; }
  .support-link { width: 29px; height: 29px; }
  h1 { font-size: 31px; }
  .choice-grid.two, .chip-grid, .chip-grid.compact { grid-template-columns: 1fr; }
  .photo-grid, .photo-grid-compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section-heading, .selection-toolbar, .auth-success { align-items: stretch; flex-direction: column; }
  .review-meta div { grid-template-columns: 72px 1fr; }
  .modal, .camera-modal { padding: 0; }
  .modal-dialog, .camera-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .modal-footer, .camera-actions { flex-direction: column-reverse; }
  .modal-footer .btn, .camera-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}


/* Identidade visual e ações de entrada */
.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 5px;
}
.footer-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.footer-brand span { opacity: .62; }
.footer-brand strong { font-size: 12px; }

.upload-choice-card {
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  min-height: 190px;
}
.choice-graphic {
  width: 92px;
  height: 74px;
  object-fit: contain;
  display: block;
  margin: 0 auto 3px;
}
.upload-choice-card strong { margin-top: 2px; }

/* Regulamento rolável na própria primeira etapa */
.regulation-preview {
  margin: 18px 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.24);
}
.regulation-preview-heading { margin-bottom: 10px; }
.regulation-preview-heading p {
  margin: 0;
  font-size: 12px;
  opacity: .68;
}
.regulation-mini-scroll {
  height: 230px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(250,251,246,.8);
  scrollbar-gutter: stable;
}
.regulation-mini-scroll .reg-section + .reg-section { margin-top: 18px; }
.regulation-mini-scroll h3 { font-size: 16px; }
.regulation-mini-scroll p,
.regulation-mini-scroll li {
  font-size: 12px;
  line-height: 1.55;
}
.regulation-mini-scroll ul { padding-left: 18px; }

/* Autoria: Sim e Não com o mesmo alinhamento */
.author-choice-grid { align-items: stretch; }
.author-choice {
  min-height: 112px;
  height: 100%;
  justify-content: flex-start;
  padding-top: 18px;
}
.author-choice strong,
.author-choice span {
  width: 100%;
}
.auth-return-note {
  margin: 10px 0 0 !important;
  font-size: 11px !important;
  opacity: .66 !important;
}

/* Lista de autocomplete sempre acima de rodapé e barra inferior */
.autocomplete { z-index: 40; }
.autocomplete-results.open-up {
  top: auto;
  bottom: calc(100% + 4px);
}

/* Categoria principal mais limpa */
.content-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.content-choice {
  min-height: 148px;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.18);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}
.content-choice:hover {
  border-color: var(--contour);
  background: var(--paper-2);
}
.content-choice.active {
  border-color: var(--ink);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.content-choice-icon {
  font-size: 24px;
  color: #7a6025;
}
.content-choice strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
}
.content-choice small {
  font-size: 11px;
  line-height: 1.45;
  opacity: .66;
}

.optional-editors {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 14px 0;
}
.editor-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.20);
  overflow: visible;
}
.editor-disclosure summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 13px;
  list-style-position: inside;
}
.editor-disclosure[open] summary {
  border-bottom: 1px solid var(--line);
}
.editor-disclosure-body {
  padding: 15px 16px;
  position: relative;
}
.editor-disclosure-body p {
  margin: 0 0 13px;
  font-size: 12px;
  line-height: 1.5;
  opacity: .7;
}

/* Verificação do nome na Commons */
.filename-status {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
}
.filename-status.checking { color: rgba(28,54,38,.58); }
.filename-status.available { color: var(--ok); }
.filename-status.exists { color: var(--alert); }
.filename-status.error { color: #7a6025; }

.review-auth-warning {
  margin: 14px 0;
  align-items: flex-start;
}
.review-auth-warning .btn { margin-top: 6px; }

@media (max-width: 760px) {
  .content-choice-grid { grid-template-columns: 1fr; }
  .content-choice { min-height: 0; }
  .regulation-preview-heading { flex-direction: column; }
}


/* Revisão 1.2.0 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.queue-button {
  position: relative;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.queue-button:hover { background: var(--paper-2); }
.queue-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--alert);
  color: white;
  font-size: 10px;
}

.no-photo-badge,
.inline-no-photo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(122,96,37,.28);
  border-radius: 999px;
  background: rgba(220,195,80,.13);
  color: #72591d;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.autocomplete-option .no-photo-badge {
  display: flex;
  margin-top: 6px;
}
.applied-tag .inline-no-photo {
  margin: 0 0 0 5px;
  padding: 2px 5px;
}

.workflow-hint {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 14px 0;
  padding: 13px 15px;
  border-left: 4px solid var(--contour);
  background: rgba(255,255,255,.26);
}
.workflow-hint strong {
  font-family: Georgia, 'Times New Roman', serif;
}
.workflow-hint span {
  font-size: 12px;
  line-height: 1.5;
  opacity: .72;
}

.compact-selected-location {
  margin: 8px 0 12px;
}
.badge-location {
  background: rgba(91,120,93,.12);
}
.badge-species {
  background: rgba(83,129,79,.13);
}
.badge-impact {
  background: rgba(165,90,54,.12);
}

.filename-auto-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,.34);
  word-break: break-word;
}
.filename-auto-box strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.review-payload {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.review-payload summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.wikitext-preview {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  padding: 10px;
  background: rgba(255,255,255,.32);
  border: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.45;
}

.queue-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.queue-modal-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.26);
}
.queue-modal-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 3px;
}
.queue-modal-item div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.queue-modal-item strong {
  font-size: 12px;
  word-break: break-word;
}
.queue-modal-item span,
.queue-modal-item small {
  font-size: 10px;
  opacity: .7;
}

@media (max-width: 680px) {
  .header-actions { gap: 6px; }
  .queue-button { padding: 7px 9px; }
}


/* Revisão 1.3.0: autenticação e navegação sem sobreposição */
.auth-card {
  overflow: visible;
}
.auth-card .button-row {
  margin-top: 4px;
}
.auth-card .button-row .btn {
  min-width: 150px;
}
@media (max-width: 640px) {
  .auth-card .button-row {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-card .button-row .btn {
    width: 100%;
  }
}


/* Revisão 1.4.0: local resumido, alteração somente quando necessária */
.current-location-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 14px 0;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.18);
}
.current-location-summary > span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .58;
}
.current-location-summary > strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.25;
}
.current-location-summary > small {
  font-size: 10px;
  opacity: .58;
}


/* Revisão 1.5.0: progresso real de envio */
.global-upload-panel {
  margin: 16px 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.34);
}
.global-upload-head,
.photo-upload-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.global-upload-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.global-upload-head strong { font-size: 13px; }
.global-upload-head span {
  font-size: 10px;
  opacity: .66;
  overflow-wrap: anywhere;
}
.upload-progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(28,54,38,.22);
  border-radius: 999px;
  background: rgba(28,54,38,.07);
}
.upload-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width .16s linear;
}
.upload-progress-phase {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  opacity: .68;
}
.photo-upload-progress {
  margin: 10px 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.24);
}
.photo-upload-progress-head {
  margin-bottom: 6px;
}
.photo-upload-progress-head span,
.photo-upload-progress-head strong {
  font-size: 10px;
}
.photo-upload-progress .upload-progress-track {
  height: 8px;
}

/* 1.6.0: impactos comuns + busca de outros impactos */
.impact-search-disclosure {
  margin-top: 14px;
}
.impact-search-disclosure summary {
  font-weight: 800;
}
.impact-applied-items {
  margin-top: 14px;
}
.impact-applied-items:empty {
  display: none;
}


/* 1.6.1: regulamento sincronizado com o texto oficial mais recente */
.reg-document {
  font-size: 12px;
  line-height: 1.62;
}
.reg-document-header {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.reg-title {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.2;
}
.reg-subtitle {
  font-size: 10.5px;
  opacity: .62;
}
.reg-document > p {
  margin: 0 0 10px;
}
.reg-section {
  margin: 20px 0 0;
}
.reg-section:first-of-type {
  margin-top: 18px;
}
.reg-section h3 {
  margin: 0 0 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(28,54,38,.14);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ink);
}
.reg-section-number {
  font-variant-numeric: tabular-nums;
}
.reg-section p {
  margin: 0 0 9px;
}
.reg-list,
.reg-sublist {
  margin: 7px 0 0;
  padding-left: 20px;
}
.reg-list > li {
  margin: 0 0 8px;
}
.reg-sublist {
  margin-top: 6px;
}
.reg-sublist > li {
  margin: 0 0 5px;
}
.reg-item-label {
  font-weight: 800;
}
.regulations-box .reg-document,
.regulation-modal .reg-document {
  max-width: 920px;
}


/* 1.6.4: logo do WhatsApp mais reconhecível em "Tem dúvidas?" */
.help-icon-image {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.help-icon-whatsapp,
.help-icon-wa {
  padding: 0;
  overflow: hidden;
}

/* 1.6.5: corrige de fato o botão de WhatsApp do cabeçalho */
.support-link-whatsapp img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}


/* 1.8.0: editor por fotografia, com estados visuais e cópia entre caixas */
.photo-detail-list { display: grid; gap: 18px; margin-top: 18px; }
.photo-detail-card { position: relative; border: 1px solid var(--line); background: rgba(255,255,255,.46); border-radius: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(28,54,38,.035); }
.photo-detail-number { position: absolute; top: -10px; left: -10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; border: 3px solid var(--paper); z-index: 2; }
.photo-detail-layout { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 20px; align-items: start; }
.photo-detail-preview { display: grid; gap: 8px; position: sticky; top: 90px; }
.photo-detail-preview img { width: 100%; max-height: 260px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.photo-detail-preview span { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.photo-detail-fields { display: grid; gap: 14px; min-width: 0; }
.detail-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.detail-status { min-height: 70px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; text-align: left; cursor: pointer; background: #eceee7; color: var(--ink); }
.detail-status-done { background: #e4efdb; border-color: #9eb87f; }
.detail-status-warning { background: #fff3cf; border-color: #d9b85c; }
.detail-status.open { outline: 2px solid rgba(34,88,53,.18); }
.detail-status-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); font-weight: 900; flex: 0 0 auto; }
.detail-status-copy { display: grid; gap: 3px; min-width: 0; }
.detail-status-copy small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card-inline-editor { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 14px; display: grid; gap: 12px; }
.inline-editor-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.empty-inline { color: var(--muted); font-size: .86rem; }
.metadata-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metadata-state { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 7px; }
.metadata-state-done { background: #e4efdb; border-color: #9eb87f; }
.metadata-state-warning { background: #fff3cf; border-color: #d9b85c; }
.metadata-state-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.metadata-state small { color: var(--muted); }
.compact-check { margin-top: 2px; font-size: .82rem; }
.copy-panel { border: 1px dashed #aebaa4; background: #f6f7f2; border-radius: 10px; padding: 12px; display: grid; gap: 9px; }
.copy-source-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-source-row label, .copy-source-row strong { margin-right: auto; }
.copy-number { width: 78px !important; flex: 0 0 78px; }
.copy-fields { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; }
.copy-fields > span { font-weight: 800; }
.copy-fields label { display: inline-flex; gap: 5px; align-items: center; }
.copy-all-panel { margin-top: 4px; }
.card-impact-shortcuts { margin-top: 4px; }
.applied-items .applied-tag { align-items: center; }
.applied-tag strong { font-weight: 700; }

@media (max-width: 900px) {
  .photo-detail-layout { grid-template-columns: 1fr; }
  .photo-detail-preview { position: static; grid-template-columns: 120px 1fr; align-items: end; }
  .photo-detail-preview img { max-height: 180px; }
  .detail-status-grid { grid-template-columns: 1fr; }
  .metadata-field-grid { grid-template-columns: 1fr; }
}


/* 1.8.1: ficha limpa por foto, resumo à esquerda e formulário à direita */
.photo-detail-list {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}

.photo-detail-card {
  position: relative;
  border: 2px solid #cfd6c8;
  background: rgba(255,255,255,.48);
  border-radius: 14px;
  padding: 18px;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease;
}

.photo-detail-card-done {
  border-color: #78a93d;
  background: rgba(242,248,235,.78);
}

.photo-detail-card-warning {
  border-color: #d5ad42;
  background: rgba(255,250,233,.76);
}

.photo-detail-card-empty {
  border-color: #cfd6c8;
}

.photo-detail-layout {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.photo-detail-preview {
  display: block;
  position: sticky;
  top: 90px;
  min-width: 0;
}

.photo-detail-preview img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: block;
}

.photo-file-info {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.photo-file-info > div {
  display: grid;
  gap: 2px;
}

.photo-file-info span {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .045em;
}

.photo-file-info strong {
  font-size: .83rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.photo-current-info {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.photo-current-title {
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--ink);
}

.photo-current-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.photo-current-list > div {
  display: grid;
  gap: 2px;
}

.photo-current-list dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .045em;
  color: var(--muted);
  font-weight: 800;
}

.photo-current-list dd {
  margin: 0;
  font-size: .88rem;
  line-height: 1.42;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.summary-item {
  display: block;
  margin-top: 2px;
}

.summary-item small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 1px;
}

.summary-empty {
  color: var(--muted);
}

.summary-warning {
  color: #8b6411;
  font-weight: 800;
}

.photo-detail-fields {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.detail-form-section {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 9px;
  background: transparent;
}

.detail-form-section:last-child {
  border-bottom: 0;
}

.detail-form-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-weight: 800;
}

.detail-form-heading > span:last-child {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}

.compact-field-group {
  margin: 0;
}

.form-state-ok {
  color: #4f7a24 !important;
}

.form-state-empty {
  color: var(--muted) !important;
}

.form-state-warning {
  color: #8b6411 !important;
}

.form-selected-readable {
  display: grid;
  gap: 2px;
  padding: 7px 0 0;
}

.form-selected-readable strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.form-selected-readable span {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.35;
}

.form-empty-state {
  color: var(--muted);
  font-size: .84rem;
  padding: 2px 0;
}

.selected-form-list {
  display: grid;
  gap: 6px;
}

.selected-form-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 10px;
  border-left: 3px solid #7aa348;
  background: rgba(228,239,219,.58);
  border-radius: 0 7px 7px 0;
}

.selected-form-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.selected-form-copy strong {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.selected-form-copy span,
.selected-form-copy small {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-form-remove {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
}

.form-limit-note {
  color: var(--muted);
  font-size: .82rem;
}

.impact-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.impact-quick-button {
  border: 1px solid var(--line);
  background: #f4f5ef;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .76rem;
  cursor: pointer;
}

.impact-quick-button:hover {
  border-color: #879b78;
  background: #eef3e7;
}

.compact-metadata-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.metadata-form-section {
  border-bottom: 0;
  padding-bottom: 0;
}

.metadata-form-section small {
  color: var(--muted);
  line-height: 1.35;
}

.metadata-form-warning {
  border-left: 3px solid #d5ad42;
  padding-left: 10px;
}

.copy-panel {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 0 0 14px;
  display: grid;
  gap: 8px;
}

.copy-panel-compact {
  margin-bottom: 2px;
}

.copy-source-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-source-row label,
.copy-source-row strong {
  margin-right: auto;
  font-weight: 800;
}

.copy-options-disclosure {
  margin-top: 2px;
}

.copy-options-disclosure summary {
  cursor: pointer;
  font-size: .8rem;
  font-weight: 800;
  color: #476f2e;
  width: fit-content;
}

.copy-options-body {
  padding-top: 9px;
  display: grid;
  gap: 7px;
}

.copy-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: .8rem;
}

.copy-fields > span {
  display: none;
}

.copy-all-panel {
  margin-top: 2px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding-top: 14px;
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .photo-detail-layout {
    grid-template-columns: 1fr;
  }

  .photo-detail-preview {
    position: static;
  }

  .photo-detail-preview img {
    max-height: 300px;
  }

  .compact-metadata-grid {
    grid-template-columns: 1fr;
  }
}


/* 1.8.2: compactação real da ficha */
.photo-detail-layout {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 22px;
}

.photo-detail-card {
  padding: 14px 16px;
}

.photo-detail-preview img {
  max-height: 285px;
}

.photo-current-info {
  margin-top: 12px;
  padding-top: 10px;
}

.photo-current-title {
  margin-bottom: 7px;
  font-size: .9rem;
}

.photo-current-list {
  gap: 7px;
}

.photo-current-list dt {
  font-size: .66rem;
}

.photo-current-list dd {
  font-size: .81rem;
  line-height: 1.32;
}

.photo-detail-fields {
  gap: 11px;
}

.detail-form-section {
  padding: 0 0 10px;
  gap: 6px;
}

.compact-core-section .field-group {
  margin-bottom: 0;
}

.taxonomy-compact-section {
  gap: 7px;
}

.detail-form-heading {
  font-size: .92rem;
}

.add-inline-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #315d29;
  padding: 3px 0;
  font-weight: 900;
  cursor: pointer;
  font-size: .88rem;
}

.add-inline-button:hover {
  text-decoration: underline;
}

.inline-add-editor {
  display: grid;
  gap: 7px;
  padding: 8px 0 2px;
}

.form-autocomplete-results {
  position: static !important;
  inset: auto !important;
  max-height: 230px;
  overflow: auto;
  box-shadow: 0 5px 14px rgba(28,54,38,.10);
  margin-top: 2px;
}

.selected-form-list {
  gap: 4px;
}

.selected-form-row {
  padding: 6px 8px;
  border-left-width: 2px;
}

.selected-form-copy strong {
  font-size: .84rem;
}

.selected-form-copy span {
  font-size: .73rem;
}

.selected-form-copy small {
  display: none;
}

.impact-quick-row {
  gap: 5px;
}

.impact-quick-button {
  padding: 4px 7px;
  font-size: .69rem;
}

.compact-metadata-grid {
  gap: 12px;
}

.metadata-form-section {
  gap: 5px;
}

.compact-meta-input {
  min-height: 39px;
  padding: 8px 9px;
}

.metadata-form-section small {
  font-size: .72rem;
}

.copy-panel {
  padding-bottom: 8px;
  gap: 5px;
}

.copy-source-row {
  display: grid;
  grid-template-columns: 1fr 74px 118px;
  gap: 8px;
  align-items: center;
}

.copy-source-row label {
  font-size: .78rem;
}

.copy-number {
  min-height: 40px;
  padding: 7px 8px;
}

.copy-primary-button {
  min-height: 44px;
  padding: 9px 18px;
  font-size: .92rem;
  font-weight: 900;
}

.copy-all-panel {
  padding-top: 10px;
  display: grid;
  justify-items: start;
}

.copy-all-button {
  min-width: 190px;
}

.copy-options-disclosure summary {
  font-size: .72rem;
}

.copy-options-body {
  padding-top: 6px;
}

.copy-fields {
  gap: 5px 10px;
  font-size: .72rem;
}

.form-selected-readable {
  display: none;
}

.photo-file-info strong {
  font-size: .77rem;
}

.workflow-hint {
  padding: 10px 12px;
  margin: 10px 0;
}

.workflow-hint strong {
  font-size: .86rem;
}

.workflow-hint span {
  font-size: .75rem;
}

@media (max-width: 900px) {
  .copy-source-row {
    grid-template-columns: 1fr 70px;
  }

  .copy-source-row label {
    grid-column: 1 / -1;
  }

  .copy-primary-button {
    min-width: 110px;
  }
}


/* 1.8.3: formulário realmente enxuto */
.photo-detail-card {
  padding: 12px 14px;
}

.photo-detail-layout {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 20px;
}

.photo-detail-fields {
  gap: 8px;
}

.inline-data-section,
.taxonomy-minimal-section {
  padding: 5px 0 9px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.field-kicker {
  margin-bottom: 3px;
  font-size: 8pt;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .035em;
  color: var(--muted);
  text-transform: uppercase;
}

.field-kicker span {
  margin-left: 5px;
  font-size: 7pt;
  font-weight: 800;
  color: #5d7b36;
}

.inline-read-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.inline-read-value {
  min-width: 0;
  font-size: .92rem;
  line-height: 1.34;
  font-weight: 650;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.text-action {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: #52752f;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-edit-block {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}

.compact-edit-input {
  min-height: 38px;
  padding: 7px 9px;
  font-size: .86rem;
}

.inline-data-section small {
  display: block;
  margin-top: 3px;
  font-size: .68rem;
  line-height: 1.3;
  color: var(--muted);
}

.inline-data-warning {
  border-left: 2px solid #d5ad42;
  padding-left: 8px;
}

.inline-warning-text {
  color: #876313;
}

.inline-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.taxonomy-help {
  margin: 0 0 3px;
  font-size: .72rem;
  line-height: 1.35;
  color: var(--muted);
}

.taxonomy-minimal-section .selected-form-list {
  margin-bottom: 4px;
}

.add-inline-button {
  font-size: .82rem;
  padding: 2px 0;
}

.inline-add-editor {
  position: relative;
  z-index: 80;
  padding: 6px 0 0;
}

.form-autocomplete-results.floating-results,
.inline-edit-block .form-autocomplete-results {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 3px) !important;
  bottom: auto !important;
  z-index: 1200 !important;
  max-height: 250px;
  overflow: auto;
  margin: 0;
  background: #fafbf6;
  box-shadow: 0 10px 28px rgba(28,54,38,.18);
}

.inline-add-editor .form-autocomplete-results {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 3px) !important;
  z-index: 1200 !important;
}

.copy-panel {
  padding-bottom: 7px;
}

.copy-source-row {
  grid-template-columns: 1fr 68px 126px;
}

.copy-primary-button {
  min-height: 46px;
  font-size: 1rem;
  padding: 10px 20px;
}

.copy-options-disclosure summary {
  font-size: .68rem;
}

.copy-options-body,
.copy-fields {
  font-size: .68rem;
}

.photo-file-info {
  margin-top: 9px;
}

.photo-current-info {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .inline-meta-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}


/* 1.8.4: mais respiro visual e autocomplete realmente acima */
.photo-detail-card {
  overflow: visible !important;
}

.photo-detail-layout {
  align-items: stretch;
}

.photo-detail-preview {
  color: #5e695f;
}

.photo-detail-preview .photo-file-info,
.photo-current-info {
  color: #59665b;
}

.photo-detail-preview .photo-file-info strong {
  color: #405044;
  font-weight: 650;
}

.photo-current-title {
  color: #445347;
  font-size: .82rem;
}

.photo-current-list dt {
  color: #718076;
  font-size: 7.5pt;
  font-weight: 750;
}

.photo-current-list dd {
  color: #5b675e;
  font-weight: 450;
}

.photo-current-list .summary-item strong {
  color: #4f5e53;
  font-weight: 650;
}

.photo-detail-fields {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  align-self: stretch;
}

.inline-data-section,
.taxonomy-minimal-section,
.copy-panel {
  background: transparent;
}

.inline-meta-grid .inline-read-value {
  font-size: .76rem;
  line-height: 1.28;
  font-weight: 650;
}

.inline-meta-grid .field-kicker {
  font-size: 7.5pt;
}

.inline-meta-grid small {
  font-size: .64rem;
}

.photo-detail-card:has(.autocomplete:focus-within),
.photo-detail-card:has(.inline-add-editor input:focus) {
  z-index: 5000 !important;
}

.photo-detail-fields:has(.autocomplete:focus-within),
.photo-detail-fields:has(.inline-add-editor input:focus) {
  z-index: 6000 !important;
}

.autocomplete,
.inline-add-editor,
.inline-edit-block {
  position: relative;
}

.autocomplete:focus-within,
.inline-add-editor:focus-within,
.inline-edit-block:focus-within {
  z-index: 7000 !important;
}

.form-autocomplete-results,
.form-autocomplete-results.floating-results,
.inline-add-editor .form-autocomplete-results,
.inline-edit-block .form-autocomplete-results {
  z-index: 99999 !important;
  background: #fff !important;
  border: 1px solid #bfc8b6 !important;
  box-shadow: 0 12px 32px rgba(28,54,38,.24) !important;
}

.autocomplete-option {
  background: #fff;
}

.autocomplete-option:hover {
  background: #f2f6ed;
}

.inline-data-section,
.taxonomy-minimal-section,
.inline-meta-grid,
.copy-panel {
  position: relative;
  z-index: 1;
}

.inline-data-section:has(.autocomplete:focus-within),
.taxonomy-minimal-section:has(.autocomplete:focus-within),
.taxonomy-minimal-section:has(input:focus),
.inline-data-section:has(input:focus) {
  z-index: 8000;
}

@media (max-width: 900px) {
  .photo-detail-fields {
    padding: 11px 12px;
  }
}


/* 1.9.0: identificação taxonômica em níveis mais amplos */
.taxon-rank-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2e8;
  color: #51634f;
  font-size: .66rem;
  font-weight: 800;
}

.selected-form-copy small {
  display: block;
  color: #637066;
  font-size: .68rem;
}


/* 1.9.1: grupos comuns e categorias de organismos não identificados */
.unidentified-category-hint {
  display: block;
  margin-top: 3px;
  color: #65745f;
  font-size: .64rem;
  line-height: 1.25;
}

.taxon-rank-badge {
  margin-right: 4px;
}


/* 1.9.2: autocomplete em fluxo normal, sem sobrepor o restante da ficha */
.photo-detail-card,
.photo-detail-fields,
.taxonomy-minimal-section,
.inline-add-editor,
.autocomplete,
.inline-edit-block {
  overflow: visible;
}

/* Desfaz regras antigas de dropdown absoluto. */
.form-autocomplete-results,
.form-autocomplete-results.floating-results,
.inline-add-editor .form-autocomplete-results,
.inline-edit-block .form-autocomplete-results {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: auto !important;

  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;

  background: #fff !important;
  border: 1px solid #c7d0bf !important;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(28,54,38,.10) !important;
}

/* A área de busca cresce e empurra o restante do formulário para baixo. */
.inline-add-editor {
  display: block;
  position: static;
  z-index: auto;
}

.taxonomy-minimal-section:has(.inline-add-editor) {
  padding-bottom: 12px;
}

/* Resultado mais compacto para não virar outra tela inteira. */
.form-autocomplete-results .autocomplete-option {
  padding: 8px 10px;
  min-height: auto;
  background: #fff;
}

.form-autocomplete-results .autocomplete-option strong {
  font-size: .82rem;
  line-height: 1.25;
}

.form-autocomplete-results .autocomplete-option span,
.form-autocomplete-results .autocomplete-option small,
.form-autocomplete-results .autocomplete-option em {
  font-size: .68rem;
  line-height: 1.25;
}

/* Remove contextos de empilhamento que faziam a busca atravessar outras seções. */
.photo-detail-card:has(.autocomplete:focus-within),
.photo-detail-card:has(.inline-add-editor input:focus),
.photo-detail-fields:has(.autocomplete:focus-within),
.photo-detail-fields:has(.inline-add-editor input:focus),
.autocomplete:focus-within,
.inline-add-editor:focus-within,
.inline-edit-block:focus-within,
.inline-data-section:has(.autocomplete:focus-within),
.taxonomy-minimal-section:has(.autocomplete:focus-within),
.taxonomy-minimal-section:has(input:focus),
.inline-data-section:has(input:focus) {
  z-index: auto !important;
}

/* Mantém a coluna direita branca e legível mesmo quando a busca cresce. */
.photo-detail-fields {
  background: #fff;
}


/* 1.10.0: ficha horizontal compacta */
.photo-detail-list {
  gap: 16px;
}

.photo-detail-card.compact-photo-row {
  position: relative;
  overflow: visible !important;
  padding: 14px 18px 12px 42px;
  border: 1px solid #d5ddd0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(28,54,38,.08);
}

.photo-detail-card.compact-photo-row.photo-detail-card-done {
  border-color: #7fa557;
}

.photo-detail-card.compact-photo-row.photo-detail-card-warning {
  border-color: #d5ad42;
}

.compact-photo-number {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 29px;
  height: 29px;
  border: 1.5px solid #376a2d;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .9rem;
  color: #285622;
  background: #fff;
}

.compact-photo-main {
  display: grid;
  grid-template-columns: 150px minmax(220px, .9fr) minmax(340px, 1.45fr) minmax(340px, 1.45fr);
  gap: 22px;
  align-items: start;
}

.compact-photo-thumb-wrap {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1e8;
}

.compact-photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compact-photo-field {
  min-width: 0;
  position: relative;
}

.compact-field-label {
  margin-bottom: 8px;
  font-size: .82rem;
  font-weight: 800;
  color: #344535;
}

.compact-field-label span {
  font-weight: 500;
  color: #737f75;
}

.compact-value-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd6ca;
  background: #fff;
  border-radius: 7px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  color: #273628;
  cursor: pointer;
  font-size: .92rem;
}

.compact-value-button:hover {
  border-color: #769366;
}

.compact-chevron {
  font-size: 1.1rem;
  color: #305d28;
}

.compact-inline-editor {
  position: relative;
}

.compact-chip-area {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  padding-right: 4px;
}

.compact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: fit-content;
  max-width: 100%;
  border: 1px solid #759b67;
  background: #f7faf4;
  color: #2f5d28;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: .8rem;
  line-height: 1.2;
}

.compact-chip button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #37642e;
  cursor: pointer;
  font-size: .92rem;
  line-height: 1;
}

.compact-add-chip {
  border: 0;
  background: transparent;
  color: #48753a;
  padding: 5px 2px;
  height: fit-content;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.compact-add-chip:hover {
  text-decoration: underline;
}

.compact-search-editor {
  position: relative;
  margin-top: 8px;
}

.compact-search-editor .form-autocomplete-results,
.compact-inline-editor .form-autocomplete-results {
  position: static !important;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  margin-top: 4px;
  z-index: auto !important;
}

.compact-impact-quick {
  margin-bottom: 7px;
}

.compact-photo-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #dde2d9;
  display: grid;
  grid-template-columns: minmax(190px, .9fr) 1px minmax(190px, .9fr) 1px minmax(300px, 1.35fr) 36px;
  gap: 16px;
  align-items: center;
}

.compact-footer-divider {
  width: 1px;
  height: 28px;
  background: #d7ddd3;
}

.compact-meta-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.compact-meta-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  color: #4e813d;
}

.compact-meta-button {
  border: 0;
  background: transparent;
  padding: 2px 0;
  min-width: 0;
  color: #314134;
  font-size: .82rem;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.compact-meta-warning {
  color: #956f19;
  font-weight: 800;
}

.compact-meta-editor {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.compact-meta-editor .compact-edit-input {
  min-width: 0;
  width: 100%;
}

.compact-cancel-link {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 2px;
  color: #567d45;
  text-decoration: underline;
  font-size: .68rem;
  cursor: pointer;
}

.compact-copy-block {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.compact-copy-block label {
  font-size: .8rem;
  color: #3f4d40;
  white-space: nowrap;
}

.compact-copy-number {
  width: 66px;
  min-height: 40px;
  padding: 6px 8px;
}

.compact-copy-button {
  width: 42px;
  height: 42px;
  border: 1px solid #c8d0c3;
  border-radius: 7px;
  background: #fff;
  color: #347127;
  font-size: 1.25rem;
  cursor: pointer;
}

.compact-copy-button:hover {
  background: #f4f8f0;
}

.compact-copy-all {
  justify-content: flex-end;
}

.compact-copy-all-button {
  min-height: 42px;
  border: 1px solid #c8d0c3;
  border-radius: 7px;
  background: #fff;
  padding: 8px 16px;
  color: #263a28;
  font-weight: 800;
  cursor: pointer;
}

.compact-copy-options {
  position: relative;
}

.compact-copy-options > summary,
.compact-more-details > summary {
  list-style: none;
  cursor: pointer;
  color: #39702f;
  font-size: 1.05rem;
}

.compact-copy-options > summary::-webkit-details-marker,
.compact-more-details > summary::-webkit-details-marker {
  display: none;
}

.compact-copy-options .copy-options-body {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 310px;
  padding: 10px 12px;
  border: 1px solid #ccd4c6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28,54,38,.14);
  z-index: 50;
}

.compact-copy-options .copy-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}

.compact-more-details {
  position: relative;
  justify-self: end;
}

.compact-more-body {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(440px, 80vw);
  padding: 12px;
  border: 1px solid #ccd4c6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28,54,38,.14);
  z-index: 40;
  display: grid;
  gap: 10px;
}

.compact-more-body > div {
  display: grid;
  gap: 2px;
}

.compact-more-body span {
  color: #748076;
  font-size: .68rem;
  text-transform: uppercase;
}

.compact-more-body strong {
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.photo-current-info,
.photo-file-info {
  display: none !important;
}

/* Mantém os resultados dentro do fluxo sem invadir os campos abaixo. */
.form-autocomplete-results,
.form-autocomplete-results.floating-results,
.inline-add-editor .form-autocomplete-results,
.inline-edit-block .form-autocomplete-results {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
}

@media (max-width: 1250px) {
  .compact-photo-main {
    grid-template-columns: 120px minmax(190px, .8fr) minmax(260px, 1.2fr) minmax(260px, 1.2fr);
    gap: 16px;
  }

  .compact-photo-thumb-wrap {
    width: 120px;
    height: 120px;
  }

  .compact-photo-footer {
    grid-template-columns: minmax(160px, .8fr) 1px minmax(160px, .8fr) 1px minmax(250px, 1.2fr) 32px;
    gap: 10px;
  }
}

@media (max-width: 950px) {
  .photo-detail-card.compact-photo-row {
    padding: 14px 14px 12px 46px;
  }

  .compact-photo-main {
    grid-template-columns: 110px 1fr;
  }

  .compact-photo-thumb-wrap {
    width: 110px;
    height: 110px;
    grid-row: span 3;
  }

  .compact-uc-field,
  .compact-taxonomy-field,
  .compact-impact-field {
    grid-column: 2;
  }

  .compact-photo-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .compact-footer-divider {
    display: none;
  }

  .compact-copy-block {
    justify-content: flex-start;
  }

  .compact-more-details {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .compact-photo-main {
    grid-template-columns: 1fr;
  }

  .compact-photo-thumb-wrap {
    width: 100%;
    height: 180px;
    grid-row: auto;
  }

  .compact-uc-field,
  .compact-taxonomy-field,
  .compact-impact-field {
    grid-column: 1;
  }

  .compact-chip-area {
    min-height: auto;
  }
}


/* 1.11.0: ficha editorial compacta */
.photo-detail-list {
  gap: 14px;
}

.photo-detail-card.editorial-photo-row {
  padding: 12px 14px 10px;
  background: #fff;
  border: 1px solid #d6ddd1;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(28,54,38,.07);
  overflow: visible !important;
}

.photo-detail-card.editorial-photo-row.photo-detail-card-done {
  border-color: #79a24f;
}

.editorial-photo-header {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.editorial-photo-number {
  width: 29px;
  height: 29px;
  border: 1.5px solid #2f6b2b;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #285a25;
  font-weight: 900;
  font-size: .86rem;
}

.editorial-photo-title {
  min-width: 0;
  color: #29392c;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.editorial-photo-grid {
  display: grid;
  grid-template-columns: 145px minmax(210px,.95fr) minmax(290px,1.4fr) minmax(290px,1.4fr);
  grid-template-areas:
    "photo uc species impacts"
    "photo date gps copy";
  gap: 10px 18px;
  align-items: start;
}

.editorial-photo-column { grid-area: photo; }
.editorial-uc { grid-area: uc; }
.editorial-species { grid-area: species; }
.editorial-impacts { grid-area: impacts; }
.editorial-date { grid-area: date; }
.editorial-gps { grid-area: gps; }
.editorial-copy { grid-area: copy; }

.editorial-photo-preview-button {
  position: relative;
  display: block;
  width: 145px;
  height: 145px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #edf1e8;
  cursor: zoom-in;
}

.editorial-photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-photo-zoom {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #2d6428;
  font-size: .95rem;
  opacity: 0;
  transition: opacity .15s ease;
}

.editorial-photo-preview-button:hover .editorial-photo-zoom,
.editorial-photo-preview-button:focus-visible .editorial-photo-zoom {
  opacity: 1;
}

.editorial-field,
.editorial-meta {
  min-width: 0;
  position: relative;
}

.editorial-label {
  margin-bottom: 4px;
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: .035em;
  color: #6e796f;
}

.editorial-label span {
  color: #8b948c;
  font-weight: 600;
}

.editorial-text-value {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: #344336;
  font-size: .78rem;
  line-height: 1.3;
  cursor: pointer;
}

.editorial-text-value > span {
  margin-left: 5px;
  color: #537844;
  font-size: .65rem;
  font-weight: 800;
  text-decoration: underline;
}

.editorial-uc-value {
  font-size: .8rem;
  font-weight: 700;
}

.editorial-warning {
  color: #8b6815;
  font-weight: 700;
}

.editorial-chip-row {
  min-height: 29px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
}

.editorial-chip-row .compact-chip {
  padding: 4px 7px;
  font-size: .72rem;
}

.editorial-add-link {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  color: #48763b;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}

.editorial-add-link:hover {
  text-decoration: underline;
}

.editorial-copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.editorial-copy-number {
  width: 60px;
  min-height: 35px;
  padding: 5px 7px;
}

.editorial-copy-button {
  width: 37px;
  height: 37px;
  border: 1px solid #c9d1c4;
  border-radius: 7px;
  background: #fff;
  color: #347229;
  font-size: 1.08rem;
  cursor: pointer;
}

.editorial-copy-all-button {
  min-height: 36px;
  border: 1px solid #c9d1c4;
  border-radius: 7px;
  background: #fff;
  color: #2e4030;
  padding: 7px 11px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.editorial-copy-options {
  position: relative;
}

.editorial-copy-options > summary {
  list-style: none;
  cursor: pointer;
  color: #3b7031;
  font-size: .95rem;
}

.editorial-copy-options > summary::-webkit-details-marker {
  display: none;
}

.editorial-copy-options .copy-options-body {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 300px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #ccd4c6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28,54,38,.14);
  z-index: 40;
}

.editorial-file-details {
  margin-top: 7px;
  border-top: 1px solid #e3e7e0;
  padding-top: 5px;
}

.editorial-file-details > summary {
  list-style: none;
  width: fit-content;
  color: #7b857d;
  font-size: .63rem;
  cursor: pointer;
}

.editorial-file-details > summary::-webkit-details-marker {
  display: none;
}

.editorial-file-details-body {
  margin-top: 7px;
  display: grid;
  gap: 7px;
  color: #5d685f;
}

.editorial-file-details-body > div {
  display: grid;
  gap: 2px;
}

.editorial-file-details-body span {
  font-size: .6rem;
  text-transform: uppercase;
  color: #7a857d;
}

.editorial-file-details-body strong {
  font-size: .68rem;
  overflow-wrap: anywhere;
}

/* Lightbox */
.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  background: rgba(10,16,11,.95);
  padding: 24px;
}

.photo-lightbox-figure {
  margin: 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.photo-lightbox-figure img {
  max-width: min(92vw, 1500px);
  max-height: 86vh;
  object-fit: contain;
  display: block;
}

.photo-lightbox-figure figcaption {
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  text-align: center;
}

.photo-lightbox-close,
.photo-lightbox-nav {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.photo-lightbox-close {
  position: absolute;
  right: 20px;
  top: 14px;
  font-size: 2rem;
}

.photo-lightbox-nav {
  font-size: 3rem;
  opacity: .72;
}

.photo-lightbox-nav:hover {
  opacity: 1;
}

body.lightbox-open {
  overflow: hidden;
}

/* Buscas continuam no fluxo, sem cobrir outras áreas. */
.editorial-inline-editor,
.compact-search-editor {
  position: relative;
}

.editorial-inline-editor .form-autocomplete-results,
.compact-search-editor .form-autocomplete-results {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .editorial-photo-grid {
    grid-template-columns: 120px minmax(180px,.9fr) minmax(240px,1.2fr) minmax(240px,1.2fr);
    gap: 9px 13px;
  }

  .editorial-photo-preview-button {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 920px) {
  .editorial-photo-grid {
    grid-template-columns: 105px 1fr 1fr;
    grid-template-areas:
      "photo uc uc"
      "photo species impacts"
      "date gps copy";
  }

  .editorial-photo-preview-button {
    width: 105px;
    height: 105px;
  }
}

@media (max-width: 680px) {
  .editorial-photo-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "uc"
      "species"
      "impacts"
      "date"
      "gps"
      "copy";
  }

  .editorial-photo-preview-button {
    width: 100%;
    height: 210px;
  }

  .photo-lightbox {
    grid-template-columns: 42px 1fr 42px;
    padding: 16px 4px;
  }
}


/* 1.11.1: correção do lightbox parcial */
#photo-lightbox-portal.photo-lightbox {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;

  z-index: 2147483000 !important;
  display: grid;
  grid-template-columns: minmax(44px, 72px) minmax(0, 1fr) minmax(44px, 72px);
  align-items: center;
  justify-items: stretch;

  padding:
    max(18px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));

  background: rgba(8, 13, 9, .96) !important;
  isolation: isolate;
  transform: none !important;
  filter: none !important;
  contain: none !important;
}

#photo-lightbox-portal.photo-lightbox[hidden] {
  display: none !important;
}

#photo-lightbox-portal .photo-lightbox-figure {
  grid-column: 2;
  width: 100%;
  height: min(90dvh, 100%);
  min-width: 0;
  min-height: 0;
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#photo-lightbox-portal .photo-lightbox-figure img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 86px) !important;
  object-fit: contain !important;
  opacity: 0;
  transition: opacity .12s ease;
}

#photo-lightbox-portal.photo-lightbox-loaded .photo-lightbox-figure img {
  opacity: 1;
}

#photo-lightbox-portal .photo-lightbox-prev {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

#photo-lightbox-portal .photo-lightbox-next {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
}

#photo-lightbox-portal .photo-lightbox-close {
  position: fixed !important;
  right: max(18px, env(safe-area-inset-right)) !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  z-index: 2;
}

#photo-lightbox-portal .photo-lightbox-nav {
  z-index: 2;
  width: 52px;
  height: 72px;
  display: grid;
  place-items: center;
}

#photo-lightbox-portal .photo-lightbox-figure figcaption {
  max-width: min(1000px, 90vw);
  color: rgba(255,255,255,.9);
  line-height: 1.35;
}

body.lightbox-open {
  overflow: hidden !important;
}


/* foto.wiki.br app 0.1.0 */
.generic-uploader {
  --green: #111111;
  --green-dark: #000000;
  --cream: #f7f7f3;
  background:
    radial-gradient(circle at 8% 38%, rgba(0,0,0,.025), transparent 25%),
    #f7f7f3;
}

.generic-site-header {
  background: rgba(247,247,243,.96);
  border-bottom-color: #d8d8d1;
}

.generic-brand {
  gap: 10px;
}

.generic-brand-symbol {
  object-fit: contain;
}

.generic-brand .brand-copy strong {
  color: #0a0a0a;
  font-size: 1.42rem;
  letter-spacing: -.045em;
}

.generic-brand .brand-copy span {
  color: #62645f;
  max-width: 240px;
}

.generic-uploader .progress-item.done .progress-dot,
.generic-uploader .progress-item.active .progress-dot,
.generic-uploader .btn-primary {
  background: #111;
  border-color: #111;
  color: #fff;
}

.generic-uploader .btn-primary:hover {
  background: #292929;
}

.generic-uploader .photo-detail-card.editorial-photo-row.photo-detail-card-done {
  border-color: #111;
}

.generic-uploader .editorial-photo-number {
  border-color: #111;
  color: #111;
}

.generic-uploader .editorial-add-link,
.generic-uploader .editorial-text-value > span,
.generic-uploader .editorial-copy-button,
.generic-uploader .editorial-copy-options > summary {
  color: #111;
}

.generic-uploader .panel {
  border-color: #d8d8d1;
}

.generic-uploader .eyebrow {
  color: #111;
  letter-spacing: .12em;
}

.generic-uploader .site-footer {
  border-top-color: #d8d8d1;
}

.generic-footer .footer-brand img {
  object-fit: contain;
}
