:root {
  color-scheme: light;
  --ink: #17251d;
  --muted: #6e796f;
  --paper: #f6f4ed;
  --card: #fffdf7;
  --line: #dfe2d8;
  --moss: #285b3f;
  --leaf: #6f9b67;
  --sun: #e6ae42;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 56px max(5vw, 24px) 48px;
  color: #f8f5e9;
  background:
    radial-gradient(circle at 78% 10%, rgba(230, 174, 66, .22), transparent 30%),
    linear-gradient(130deg, #173426, #2b6043 62%, #446d4a);
}
.eyebrow { margin: 0 0 8px; color: #bed5bd; font-size: 12px; font-weight: 700; letter-spacing: .18em; }
h1 { margin: 0; font-family: ui-serif, Georgia, serif; font-size: clamp(36px, 5vw, 64px); font-weight: 600; letter-spacing: -.04em; }
.subtitle { max-width: 600px; margin: 12px 0 0; color: #d7e3d4; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-self: end; min-width: min(440px, 100%); }
.filters label { color: #d7e3d4; font-size: 12px; }
.filters label:first-child { grid-column: 1 / -1; }
input, select, button { width: 100%; margin-top: 4px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 9px 11px; font: inherit; }
input, select { color: var(--ink); background: rgba(255,255,255,.92); }
button { align-self: end; color: #16251c; background: var(--sun); border-color: var(--sun); font-weight: 700; cursor: pointer; }
.app-tabs { position: sticky; top: 0; z-index: 20; padding: 0 max(5vw, 24px); border-bottom: 1px solid #d8ddd4; background: rgba(255, 253, 247, .96); box-shadow: 0 5px 18px rgba(23, 37, 29, .06); backdrop-filter: blur(12px); }
.app-tabs > div { display: flex; gap: 6px; max-width: 1440px; margin: 0 auto; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.app-tabs > div::-webkit-scrollbar { display: none; }
.app-tabs button { flex: 0 0 auto; width: auto; min-width: max-content; margin: 0; padding: 8px 14px; color: var(--muted); border-color: transparent; background: transparent; font-size: 13px; }
.app-tabs button:hover { color: var(--moss); background: #eef2e9; }
.app-tabs button.active { color: #fff; border-color: var(--moss); background: var(--moss); }
main { max-width: 1440px; margin: 0 auto; padding: 28px max(5vw, 24px) 72px; }
body[data-app-page="personal"] .community-panel { display: none; }
body:not([data-app-page="personal"]) .filters { display: none; }
body:not([data-app-page="personal"]) main > :not(.community-panel) { display: none !important; }
body:not([data-app-page="personal"]) .hero { padding-bottom: 34px; }
.status { margin-bottom: 16px; padding: 12px 16px; border-radius: 8px; background: #e8eee6; }
.status.error { color: #7f2424; background: #f8dddd; }
.status.success { color: #1f5638; background: #e4f1e7; }
.hidden { display: none; }
.import-panel { display: block; }
.import-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -22px -22px 0; padding: 22px; cursor: pointer; list-style: none; }
.import-summary::-webkit-details-marker { display: none; }
.import-summary:focus-visible { outline: 3px solid rgba(111, 155, 103, .45); outline-offset: -3px; border-radius: 12px; }
.import-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--moss); font-size: 12px; font-weight: 700; }
.import-toggle i { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(225deg); transition: transform .18s ease; }
.when-closed { display: none; }
.import-panel:not([open]) .when-open { display: none; }
.import-panel:not([open]) .when-closed { display: inline; }
.import-panel:not([open]) .import-toggle i { transform: rotate(45deg); }
.import-panel:not([open]) .import-summary { margin-bottom: -22px; }
.import-panel[open] .import-content { animation: reveal-import .18s ease-out; }
@keyframes reveal-import { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.import-copy h2 { margin: 3px 0 8px; font: 600 25px/1.2 ui-serif, Georgia, serif; }
.import-copy p:last-child { max-width: 580px; margin: 0; color: var(--muted); }
.eyebrow.dark { color: var(--leaf); }
.import-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.import-option { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f3; }
.import-option h3 { margin: 0 0 4px; font-size: 17px; }
.import-option > p { min-height: 42px; margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.import-form { position: relative; }
.import-picker-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.import-dropzone { display: flex; min-height: 118px; margin: 0; padding: 18px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--moss); border: 1.5px dashed #9caf98; background: #eef3ea; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease; }
.import-dropzone:hover:not(:disabled), .import-dropzone.drag-over { color: #173f2b; border-color: var(--moss); background: #e2eddf; transform: translateY(-1px); }
.import-dropzone:focus-visible { outline: 3px solid rgba(111, 155, 103, .42); outline-offset: 2px; }
.import-dropzone:disabled { cursor: wait; opacity: .64; }
.import-dropzone-title { font-size: 15px; }
.import-dropzone-action { color: var(--leaf); font-size: 13px; }
.import-dropzone small { color: var(--muted); font-size: 11px; font-weight: 500; }
.import-status { min-height: 22px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.success-text { color: var(--moss); }
.error-text { color: #9a2f2f; }
.history-panel .panel-title > div h2 { margin-top: 2px; }
.history-panel .eyebrow { margin-bottom: 0; }
.import-history-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.secondary-button { width: auto; margin: 0; padding: 7px 13px; color: var(--moss); border-color: var(--line); background: #f0f2e9; font-size: 13px; }
.import-history { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center; padding: 15px 16px; border: 1px solid transparent; border-left: 4px solid var(--leaf); border-radius: 8px; background: #f0f2e9; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.history-item:hover { border-color: #c8d3c5; border-left-color: var(--leaf); background: #eaeee4; transform: translateY(-1px); }
.history-item:focus-visible { outline: 3px solid rgba(111, 155, 103, .4); outline-offset: 2px; }
.history-item.deleted { opacity: .62; border-left-color: var(--muted); }
.history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .history-meta, .history-item .history-stats { color: var(--muted); font-size: 12px; }
.history-item .history-stats { align-self: center; text-align: right; white-space: nowrap; }
.history-item .history-stats b { color: #9a2f2f; font-weight: 700; }
.history-item .history-stats .merge-warning { color: #9a6117; }
.history-actions { display: flex; gap: 6px; }
.history-actions button { width: auto; min-width: max-content; margin: 0; padding: 6px 9px; font-size: 12px; }
.text-button { color: var(--moss); border-color: var(--line); background: var(--card); }
.danger-button { color: #8c2d2d; border-color: #d9b6b6; background: #fff8f7; }
.danger-button:hover:not(:disabled) { color: #fff; border-color: #9a2f2f; background: #9a2f2f; }
.danger-button:disabled { cursor: default; opacity: .6; }
.source-badge { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 20px; color: #fff; background: var(--moss); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.import-detail-dialog { width: min(920px, calc(100vw - 32px)); max-height: min(880px, calc(100vh - 32px)); padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 24px 80px rgba(16, 35, 24, .28); }
.import-detail-dialog::backdrop { background: rgba(15, 29, 20, .48); backdrop-filter: blur(2px); }
.dialog-shell { max-height: calc(100vh - 34px); overflow: auto; }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: rgba(255, 253, 247, .96); }
.dialog-header h2 { margin: 2px 0 0; font: 600 25px/1.2 ui-serif, Georgia, serif; }
.dialog-header .eyebrow { max-width: 680px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-close { width: auto; margin: 0; padding: 7px 12px; color: var(--moss); border-color: var(--line); background: #f0f2e9; font-size: 13px; }
.dialog-content { padding: 22px 24px 28px; }
.checklist-dialog { width: min(1040px, calc(100vw - 32px)); }
.checklist-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.checklist-summary > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f3; }
.checklist-summary span, .checklist-summary strong { display: block; }
.checklist-summary span { color: var(--muted); font-size: 11px; }
.checklist-summary strong { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.checklist-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.checklist-editor-heading h3 { margin: 0; font-size: 17px; }
.checklist-editor-heading button { width: auto; margin: 0; padding: 7px 11px; color: var(--moss); border-color: var(--line); background: #f0f2e9; font-size: 12px; }
.checklist-observations { display: grid; gap: 9px; }
.checklist-observation { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(90px, .25fr) minmax(180px, 1fr) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #faf9f4; }
.checklist-observation label { color: var(--muted); font-size: 11px; }
.checklist-observation input { margin-top: 3px; border-color: var(--line); background: #fff; }
.checklist-species-field small { display: block; min-height: 17px; margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.checklist-observation .remove-observation { width: auto; margin: 0 0 21px; padding: 8px 10px; color: #8c2d2d; border-color: #d9b6b6; background: #fff8f7; font-size: 12px; }
.checklist-editor-actions { position: sticky; bottom: -28px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 18px -24px -28px; padding: 14px 24px; border-top: 1px solid var(--line); background: rgba(255, 253, 247, .96); }
.checklist-editor-status { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: 13px; }
.checklist-editor-actions button { width: auto; min-width: 112px; margin: 0; }
.detail-loading { padding: 70px 0; }
.deleted-notice { margin: 0 0 16px; padding: 11px 13px; color: #685f51; border-radius: 8px; background: #eeeae1; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-metrics .metric { padding: 14px; box-shadow: none; }
.detail-metrics .metric strong { font-size: 26px; }
.detail-section { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.detail-section.has-failures { border-color: #e1c1bd; background: #fffafa; }
.detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.detail-heading h3 { margin: 0; font-size: 17px; }
.detail-heading .eyebrow { margin-bottom: 2px; }
.detail-heading > span { color: var(--muted); font-size: 12px; text-align: right; }
.mapping-merges { border-color: #e4c98f; background: #fffbef; }
.merge-eyebrow { color: #a56c1e; }
.merge-explanation { margin: -2px 0 13px; color: #715d3a; font-size: 13px; }
.merged-species-list { display: grid; gap: 9px; }
.merged-species-list > article { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 13px; border: 1px solid #ead8ae; border-radius: 8px; background: #fffdf7; }
.merge-target > span, .merge-target strong, .merge-target em { display: block; }
.merge-target > span { color: #9a6117; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.merge-target strong { margin-top: 3px; }
.merge-target em { color: var(--muted); font-size: 11px; font-style: italic; }
.merge-sources { display: grid; gap: 5px; }
.merge-sources > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border-radius: 6px; background: #f7efd9; }
.merge-sources strong, .merge-sources em { display: block; }
.merge-sources em { color: var(--muted); font-size: 11px; font-style: italic; }
.merge-sources small { min-width: max-content; color: #9a6117; }
.unmapped-list { display: grid; gap: 7px; }
.unmapped-list article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px; border-radius: 7px; background: #f6e8e6; }
.unmapped-list strong, .unmapped-list em { display: block; }
.unmapped-list em { margin-top: 1px; color: var(--muted); font-size: 12px; font-style: italic; }
.unmapped-list article > span { min-width: max-content; color: #8c2d2d; font-size: 12px; font-weight: 700; }
.mapping-success { margin: 22px 0 8px; color: var(--moss); }
.mapping-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mapping-methods div { padding: 11px; border-radius: 7px; background: #f0f2e9; }
.mapping-methods span, .mapping-methods strong { display: block; }
.mapping-methods span { min-height: 36px; color: var(--muted); font-size: 11px; }
.mapping-methods strong { margin-top: 3px; font-size: 20px; }
.batch-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.batch-facts dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.batch-facts dt { color: var(--muted); }
.batch-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.source-items { padding: 0; }
.source-items summary { padding: 16px 18px; color: var(--moss); font-weight: 700; cursor: pointer; }
.source-items .table-wrap { max-height: 360px; padding: 0 10px 10px; overflow: auto; }
.source-items code { font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 22px rgba(39, 58, 45, .05); }
.metric { padding: 18px; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { margin-right: 4px; font-family: inherit; font-size: 32px; font-weight: 600; line-height: 1.2; }
.metric small { display: inline; }
.conservation-panel { padding: 0; }
.conservation-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 22px 24px 18px; }
.conservation-header h2 { margin: 3px 0 6px; font: 600 25px/1.2 ui-serif, Georgia, serif; }
.conservation-header p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; }
.conservation-header .compact-control { flex: 0 0 210px; }
.conservation-stats { display: grid; grid-template-columns: minmax(0, .58fr) minmax(0, .58fr) minmax(0, 1.05fr) minmax(0, 1.55fr) minmax(0, 1.65fr); border-top: 1px solid var(--line); }
.conservation-stats > article { min-width: 0; min-height: 216px; padding: 20px 22px; background: #fbfcf7; }
.conservation-stats > article + article { border-left: 1px solid var(--line); }
.conservation-count-card { position: relative; overflow: hidden; }
.conservation-count-card::after { position: absolute; right: -28px; bottom: -36px; width: 110px; height: 110px; border: 20px solid rgba(95, 141, 90, .09); border-radius: 50%; content: ''; }
.conservation-count-card > span, .conservation-card-title > span { color: var(--moss); font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.conservation-count-card > strong { position: relative; z-index: 1; display: block; margin: 13px 0 7px; color: var(--ink); font-size: 42px; font-weight: 600; line-height: 1; }
.conservation-count-card > strong small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.conservation-count-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.rare-card::after { border-color: rgba(41, 100, 66, .12); }
.conservation-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.conservation-card-title small { color: var(--muted); font-size: 10px; text-align: right; }
.protection-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.protection-levels > div { min-width: 0; padding: 12px 8px; border-radius: 9px; background: #eef3e9; text-align: center; }
.protection-levels span, .protection-levels strong { display: block; }
.protection-levels span { color: var(--muted); font-size: 10px; }
.protection-levels strong { margin: 4px 0 1px; color: var(--moss); font-size: 24px; line-height: 1; }
.protection-levels small { color: var(--muted); font-size: 9px; }
.rarity-bands { display: grid; gap: 8px; margin-top: 14px; }
.rarity-band { display: grid; grid-template-columns: 48px minmax(55px, 1fr) 50px; gap: 9px; align-items: center; }
.rarity-band > span { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.rarity-band > div { height: 8px; overflow: hidden; border-radius: 20px; background: #e3e9df; }
.rarity-band i { display: block; width: 0; height: 100%; border-radius: inherit; background: #285b3f; }
.rarity-band:nth-child(2) i { background: #477d52; }
.rarity-band:nth-child(3) i { background: #5e9360; }
.rarity-band:nth-child(4) i { background: #71a36d; }
.rarity-band:nth-child(5) i { background: #86b17f; }
.rarity-band:nth-child(6) i { background: #9abb91; }
.rarity-band:nth-child(7) i { background: #b0c9a8; }
.rarity-band > strong { color: var(--ink); font-size: 12px; text-align: right; }
.rarity-band > strong small { margin-left: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.iucn-bands { gap: 6px; }
.iucn-bands .rarity-band { grid-template-columns: 88px minmax(48px, 1fr) 50px; }
.iucn-bands .rarity-band > span { white-space: nowrap; }
.iucn-bands .iucn-band > span b { display: inline-flex; width: 27px; height: 17px; align-items: center; justify-content: center; color: var(--iucn-text, #fff); border: 1px solid var(--iucn-border, transparent); border-radius: 4px; background: var(--iucn-color); font-size: 9px; line-height: 1; }
.iucn-bands .iucn-band > div { background: var(--iucn-track); }
.iucn-bands .iucn-band i { background: var(--iucn-color); }
.iucn-band[data-iucn="CR"] { --iucn-color: #c93534; --iucn-track: #f4dddd; }
.iucn-band[data-iucn="EN"] { --iucn-color: #c96835; --iucn-track: #f2e2d9; }
.iucn-band[data-iucn="VU"] { --iucn-color: #ca9b08; --iucn-track: #f3ebcc; --iucn-text: #302600; }
.iucn-band[data-iucn="NT"] { --iucn-color: #0b6563; --iucn-track: #d9e8e6; }
.iucn-band[data-iucn="LC"] { --iucn-color: #0a6564; --iucn-track: #d6e7e6; }
.iucn-band[data-iucn="DD"] { --iucn-color: #9e9e9e; --iucn-track: #e5e5e5; }
.iucn-band[data-iucn="NE"] { --iucn-color: #cfcfcf; --iucn-track: #eeeeec; --iucn-text: #333; --iucn-border: #aaa; }
.conservation-note { min-height: 34px; padding: 10px 24px; color: var(--muted); border-top: 1px solid var(--line); background: #f7f8f3; font-size: 10px; }
.conservation-stats > .empty { grid-column: 1 / -1; min-height: 164px; margin: 0; display: grid; place-items: center; }
.activity-panel { padding: 0; }
.activity-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px 12px; border-bottom: 1px solid var(--line); }
.activity-stats article { min-width: 0; padding: 2px 16px; text-align: center; }
.activity-stats article + article { border-left: 1px solid var(--line); }
.activity-stats strong, .activity-stats span { display: block; }
.activity-stats strong { color: var(--ink); font-size: 25px; font-weight: 500; line-height: 1.25; }
.activity-stats strong small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.activity-stats span { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 20px 24px 12px; }
.activity-heading h2 { margin: 0; font: 600 23px/1.2 ui-serif, Georgia, serif; }
.activity-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.activity-actions { display: flex; align-items: center; gap: 14px; min-width: 0; }
.activity-range-options { display: flex; gap: 5px; max-width: min(56vw, 720px); overflow-x: auto; scrollbar-width: none; }
.activity-range-options::-webkit-scrollbar { display: none; width: 0; height: 0; }
.activity-range-options button { width: auto; min-width: max-content; margin: 0; padding: 6px 10px; color: var(--moss); border-color: var(--line); background: #f0f2e9; font-size: 11px; }
.activity-range-options button.active { color: #fff; border-color: var(--moss); background: var(--moss); }
.activity-legend { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.activity-legend i { width: 12px; height: 12px; border-radius: 3px; background: #eff0eb; }
.activity-legend i[data-level="1"], .activity-day[data-level="1"] { background: #dcebd9; }
.activity-legend i[data-level="2"], .activity-day[data-level="2"] { background: #afd0a7; }
.activity-legend i[data-level="3"], .activity-day[data-level="3"] { background: #73a96b; }
.activity-legend i[data-level="4"], .activity-day[data-level="4"] { background: var(--moss); }
.activity-calendar { padding: 2px 24px 24px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.activity-calendar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.activity-plot { min-width: 840px; }
.activity-months { display: grid; grid-template-columns: repeat(var(--activity-weeks), minmax(10px, 1fr)); gap: 4px; margin: 0 0 7px 31px; color: var(--muted); font-size: 10px; }
.activity-months span { white-space: nowrap; }
.activity-chart-body { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 4px; }
.activity-weekdays { display: grid; grid-template-rows: repeat(7, minmax(10px, 1fr)); gap: 4px; color: var(--muted); font-size: 9px; line-height: 1; }
.activity-weekdays span { display: flex; align-items: center; }
.activity-days { display: grid; grid-template-columns: repeat(var(--activity-weeks), minmax(10px, 1fr)); grid-template-rows: repeat(7, minmax(10px, 1fr)); gap: 4px; }
.activity-day { aspect-ratio: 1; min-width: 0; border-radius: 4px; background: #eff0eb; transition: outline-color .12s ease, transform .12s ease; }
.activity-day:not(.outside):hover { z-index: 1; outline: 2px solid rgba(40, 91, 63, .38); outline-offset: 1px; transform: scale(1.08); }
.activity-day.outside { background: transparent; }
.lit-map-panel { padding: 0; }
.lit-map-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 26px 12px; }
.lit-map-header h2 { margin: 0; font: 600 28px/1.2 ui-serif, Georgia, serif; }
.lit-map-header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.map-compliance-badge { flex: 0 0 auto; margin-top: 3px; padding: 5px 9px; color: #8c2d2d; border: 1px solid #deb7b2; border-radius: 999px; background: #fff2ef; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.map-compliance-badge.approved { color: var(--moss); border-color: #b8d0b7; background: #edf6e9; }
.map-breadcrumbs { display: flex; align-items: center; gap: 5px; min-height: 35px; padding: 0 26px 12px; overflow-x: auto; scrollbar-width: none; }
.map-breadcrumbs::-webkit-scrollbar { display: none; }
.map-breadcrumbs span { color: #a7aea8; font-size: 11px; }
.map-breadcrumbs button { width: auto; min-width: max-content; margin: 0; padding: 5px 8px; color: var(--moss); border-color: var(--line); background: #f4f5ee; font-size: 11px; font-weight: 650; }
.map-breadcrumbs button.current { color: var(--ink); border-color: transparent; background: transparent; cursor: default; }
.map-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 26px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f2; }
.map-summary article { min-width: 0; padding: 13px 18px; }
.map-summary article + article { border-left: 1px solid var(--line); }
.map-summary strong, .map-summary span { display: block; }
.map-summary strong { font-size: 24px; font-weight: 550; line-height: 1.2; }
.map-summary strong small { margin-left: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.map-summary span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 26px 4px; }
.map-toolbar p { margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.map-metric-tabs { display: flex; gap: 6px; }
.map-metric-tabs button { width: auto; min-width: 58px; margin: 0; padding: 6px 10px; color: var(--muted); border-color: var(--line); background: #f7f8f3; font-size: 11px; }
.map-metric-tabs button.active { color: #fff; border-color: var(--moss); background: var(--moss); }
.map-region-strip { display: flex; align-items: center; gap: 6px; margin: 4px 26px 0; padding: 5px 0 2px; overflow-x: auto; scrollbar-width: none; }
.map-region-strip::-webkit-scrollbar { display: none; }
.map-region-strip > span { flex: 0 0 auto; margin-right: 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.map-region-strip button { flex: 0 0 auto; width: auto; min-width: max-content; margin: 0; padding: 5px 8px; color: var(--moss); border-color: #d8ded3; background: #f4f6ef; font-size: 10px; font-weight: 600; }
.map-region-strip button b { margin-left: 3px; color: var(--moss); }
.map-region-strip button:disabled { color: var(--muted); cursor: default; opacity: .72; }
.map-stage { position: relative; min-height: 520px; }
.lit-map { width: 100%; height: 520px; }
.map-state { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: var(--muted); background: rgba(255, 253, 247, .86); text-align: center; }
.map-state.hidden { display: none; }
.map-source-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 12px 26px 18px; color: var(--muted); border-top: 1px solid var(--line); background: #faf9f2; font-size: 10px; }
.map-source-note span:last-child { max-width: 720px; color: #8c2d2d; text-align: right; }
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.two-columns { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.dashboard-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.panel { margin-bottom: 20px; padding: 22px; overflow: hidden; }
.grid .panel { margin-bottom: 0; }
.dashboard-panel { display: flex; flex-direction: column; min-width: 0; height: 680px; padding: 18px; }
.dashboard-panel .panel-title { gap: 8px; margin-bottom: 12px; }
.dashboard-panel .panel-title h2 { white-space: nowrap; font-size: 21px; }
.dashboard-panel .panel-title > span { text-align: right; line-height: 1.3; }
.panel-scroll { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; }
.dashboard-panel .panel-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.recent-checklists-panel { display: flex; flex-direction: column; max-height: 1120px; }
.recent-checklists-panel .panel-title { flex: 0 0 auto; }
.recent-checklists-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.recent-checklists-scroll th { position: sticky; top: 0; z-index: 1; background: var(--card); }
.checklist-row { cursor: pointer; transition: background .15s ease; }
.checklist-row:hover { background: #f0f2e9; }
.checklist-row:focus-visible { outline: 3px solid rgba(111, 155, 103, .4); outline-offset: -3px; }
.checklist-pagination { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; padding-top: 16px; }
.checklist-pagination.hidden { display: none; }
.checklist-pagination > button, .pagination-pages button { width: auto; min-width: 34px; margin: 0; padding: 6px 10px; color: var(--moss); border-color: var(--line); background: #f0f2e9; font-size: 12px; }
.checklist-pagination button.active { color: #fff; border-color: var(--moss); background: var(--moss); }
.checklist-pagination button:disabled { cursor: default; opacity: .4; }
.pagination-pages { display: flex; align-items: center; gap: 5px; }
.pagination-pages span { padding: 0 3px; color: var(--muted); }
.panel-scroll,
.table-wrap,
.dialog-shell {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.panel-scroll::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.dialog-shell::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.panel-caption { min-height: 36px; margin: 10px 0 8px; color: var(--muted); font-size: 12px; }
.compact-control { display: block; color: var(--muted); font-size: 11px; }
.compact-control select { margin-top: 3px; padding: 7px 9px; border-color: var(--line); background: #f7f8f3; font-size: 12px; }
.life-list-controls { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.time-trends { margin-top: 12px; }
.trend-section + .trend-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.trend-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.trend-section-title h3 { margin: 0; color: var(--moss); font-size: 13px; }
.trend-section-title span { color: var(--muted); font-size: 10px; text-align: right; }
.trend-columns, .trend-comparison-row { display: grid; grid-template-columns: 30px 40px minmax(24px, 1fr) 28px 30px; gap: 3px; align-items: center; }
.trend-columns { padding: 0 4px 4px; color: var(--muted); font-size: 9px; text-align: right; }
.trend-columns span:first-child { text-align: left; }
.trend-comparison-row { min-height: 36px; padding: 4px; border-radius: 7px; }
.trend-comparison-row.latest { background: #fff5c9; }
.trend-period { color: var(--muted); font-size: 11px; font-weight: 600; }
.trend-partial, .trend-total, .trend-new { font-size: 11px; text-align: right; }
.trend-partial { color: var(--moss); }
.trend-total { color: var(--ink); }
.trend-new { color: #a56c1e; }
.trend-scale { height: 9px; }
.trend-scale > span { display: block; height: 100%; border-radius: 20px; background: #e1e7e1; overflow: hidden; }
.trend-scale i { display: block; height: 100%; border-radius: inherit; background: var(--leaf); }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel-title h2 { margin: 0; font: 600 23px/1.2 ui-serif, Georgia, serif; }
.panel-title span { color: var(--muted); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 80px 1fr 60px; gap: 12px; align-items: center; margin: 13px 0; }
.bar-track { height: 10px; border-radius: 20px; background: #e6e9df; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), var(--moss)); }
.bar-row strong { text-align: right; font-size: 13px; }
.dashboard-panel .bar-row { grid-template-columns: 48px minmax(28px, 1fr) 48px; gap: 7px; margin: 11px 0; font-size: 12px; }
.dashboard-panel .bar-row strong { white-space: nowrap; font-size: 11px; }
.region { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.region:last-child { border-bottom: 0; }
.region strong, .region small { display: block; }
.region small, .region span { color: var(--muted); font-size: 12px; }
.region-group + .region-group { margin-top: 18px; }
.region-group h3 { display: flex; justify-content: space-between; margin: 0; padding-bottom: 7px; color: var(--moss); border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.region-group h3 span { color: var(--muted); font-weight: 500; }
.dashboard-panel .region { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 9px 0; }
.dashboard-panel .region strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-panel .region > span { align-self: center; text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 600; }
td:nth-child(2) { white-space: normal; }
td strong, td small { display: block; }
td small { max-width: 560px; color: var(--muted); }
.species-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.species-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 9px; background: #f0f2e9; }
.species-index { color: var(--leaf); font: 600 12px ui-monospace, monospace; }
.species-card strong, .species-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.species-card em { color: var(--muted); font-size: 11px; font-style: normal; }
.species-record { min-width: 110px; text-align: right; }
.species-record small, .species-record span { display: block; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.species-record span { max-width: 190px; color: var(--moss); }
.species-record small { margin-top: 3px; }
.species-location { display: flex; align-items: center; gap: 3px; max-width: 220px; color: var(--moss); font-size: 11px; }
.species-location span { min-width: 0; max-width: none; text-overflow: ellipsis; }
.species-location b { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.dashboard-columns .species-grid { grid-template-columns: 1fr; gap: 8px; }
.dashboard-columns .species-card { grid-template-columns: 26px minmax(0, 1fr); gap: 7px; padding: 10px; }
.dashboard-columns .species-record { grid-column: 2; min-width: 0; text-align: left; }
.dashboard-columns .species-record span { max-width: none; }
.dashboard-columns .species-location { max-width: none; }
.empty { color: var(--muted); text-align: center; }

.community-panel { padding: 0; }
.community-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px 26px 18px; }
.community-header h2 { margin: 2px 0 5px; font: 600 25px/1.2 ui-serif, Georgia, serif; }
.community-header p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.community-refreshed { color: var(--muted); font-size: 11px; white-space: nowrap; }
.community-view { display: none; padding: 20px 26px 26px; }
.community-view.active { display: block; }
.community-filters { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 9px; align-items: end; }
.community-filters label { min-width: 0; color: var(--muted); font-size: 11px; }
.community-filters input, .community-filters select { margin-top: 3px; border-color: var(--line); background: #f8f8f3; font-size: 12px; }
.community-filters button { width: auto; min-width: max-content; margin: 0; padding: 9px 16px; }
.nearby-filters { grid-template-columns: repeat(5, minmax(105px, 1fr)) auto auto; }
.trip-filters { grid-template-columns: repeat(2, minmax(160px, 220px)) auto; justify-content: start; }
.admin-filters { grid-template-columns: repeat(3, minmax(150px, 220px)) auto; justify-content: start; }
.community-check { display: flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 4px; white-space: nowrap; }
.community-check input { width: 16px; height: 16px; margin: 0; }
.community-inline-note { min-height: 31px; padding: 10px 0 7px; color: var(--muted); font-size: 11px; }
.community-table-wrap { max-height: 580px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; scrollbar-width: none; }
.community-table-wrap::-webkit-scrollbar { display: none; }
#realtime-checklists { max-height: none; overflow: visible; }
.community-table { font-variant-numeric: tabular-nums; }
.community-table th { position: sticky; top: 0; z-index: 1; background: #f5f6ef; }
.community-table th, .community-table td { padding: 10px 12px; font-size: 12px; }
.community-table td small { margin-top: 2px; font-size: 10px; }
.community-table .community-current-user { background: #fff8d9; box-shadow: inset 4px 0 #e1aa32; }
.community-table .community-current-user td { border-color: #eadfab; }
.community-rank { color: var(--moss); font-size: 15px; }
.community-user { display: inline-flex; align-items: center; gap: 9px; min-width: 150px; }
.community-user i { display: inline-grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; font-size: 10px; font-style: normal; }
.community-user-copy { display: inline-flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.community-user-copy b,
.community-user-copy small { overflow: hidden; max-width: 180px; text-overflow: ellipsis; white-space: nowrap; }
.community-user-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.ranking-last-species { display: inline-flex; min-width: 145px; flex-direction: column; align-items: flex-start; }
.ranking-last-species strong { font-weight: 650; }
.ranking-last-species small { color: var(--muted); }
.ranking-last-species em { margin-top: 2px; color: var(--muted); font: italic 10px/1.25 ui-serif, Georgia, serif; }
.target-badge { display: inline-block; padding: 2px 6px; color: #80510f; border-radius: 20px; background: #fff0bf; font-size: 10px; font-weight: 700; }
.community-summary-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: #faf9f2; }
.community-summary-cards:empty { display: none; }
.community-summary-cards article { min-width: 0; padding: 13px 16px; text-align: center; }
.community-summary-cards article + article { border-left: 1px solid var(--line); }
.community-summary-cards strong, .community-summary-cards span { display: block; }
.community-summary-cards strong { overflow: hidden; font-size: 22px; font-weight: 550; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.community-summary-cards strong small { margin-left: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.community-summary-cards span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.community-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.community-split h3 { margin: 0 0 9px; color: var(--moss); font-size: 14px; }
.community-list { max-height: 370px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; scrollbar-width: none; }
.community-list::-webkit-scrollbar { display: none; }
.community-list article { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.community-list article:last-child { border-bottom: 0; }
.community-list article span { color: var(--muted); text-align: right; }
.trip-workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.trip-workspace-heading h3 { margin: 2px 0 3px; color: var(--moss); font: 600 22px/1.2 ui-serif, Georgia, serif; }
.trip-workspace-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.trip-workspace-heading > button,
.trip-editor-actions button,
.trip-report-actions button { width: auto; min-width: max-content; margin: 0; padding: 8px 14px; }
.button-secondary { color: var(--moss); border-color: var(--line); background: #f0f2e9; }
.button-danger { color: #8c2d2d; border-color: #d9b6b6; background: #fff8f7; }
.button-danger:hover { color: #fff; border-color: #9a2f2f; background: #9a2f2f; }
.trip-library { display: grid; gap: 9px; }
.trip-library-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #faf9f3; }
.trip-library-main { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 16px 18px; color: var(--ink); border: 0; border-radius: 0; background: transparent; text-align: left; }
.trip-library-main:hover { background: #f1f3e9; }
.trip-library-main > span:first-child,
.trip-library-stats { display: inline-flex; min-width: 0; flex-direction: column; }
.trip-library-main strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.trip-library-main small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.trip-library-stats { flex: 0 0 auto; align-items: flex-end; }
.trip-library-stats b { color: var(--moss); font-size: 13px; }
.trip-library-edit { width: auto; min-width: 70px; margin: 10px; padding: 6px 10px; color: var(--moss); border-color: var(--line); background: #fffef9; font-size: 11px; }
.trip-library-empty { padding: 50px 20px; border: 1px dashed #bcc7b8; border-radius: 10px; background: #faf9f3; text-align: center; }
.trip-library-empty strong { font: 600 20px/1.2 ui-serif, Georgia, serif; }
.trip-library-empty p { margin: 7px 0 16px; color: var(--muted); font-size: 11px; }
.trip-library-empty button { width: auto; margin: 0; }
.trip-editor { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f3; }
.trip-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 14px; }
.trip-editor-fields label { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.trip-editor-fields input,
.trip-editor-fields textarea { margin-top: 5px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fffef9; font: inherit; font-size: 12px; line-height: 1.5; }
.trip-editor-fields textarea { display: block; width: 100%; padding: 10px 11px; resize: vertical; }
.trip-name-field,
.trip-narrative-field { grid-column: 1 / -1; }
.trip-checklist-picker { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fffef9; }
.trip-checklist-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f3f5ed; }
.trip-checklist-picker-heading h4 { margin: 0; color: var(--moss); font-size: 13px; }
.trip-checklist-picker-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.trip-checklist-candidates { max-height: 460px; overflow: auto; scrollbar-width: none; }
.trip-checklist-candidates::-webkit-scrollbar { display: none; }
.trip-checklist-candidate { display: grid; grid-template-columns: 18px minmax(88px, .45fr) minmax(180px, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.trip-checklist-candidate:last-child { border-bottom: 0; }
.trip-checklist-candidate:hover { background: #f7f8f1; }
.trip-checklist-candidate input { width: 16px; height: 16px; margin: 0; }
.trip-checklist-candidate > span { display: inline-flex; min-width: 0; flex-direction: column; }
.trip-checklist-candidate strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.trip-checklist-candidate small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.trip-checklist-count { align-items: flex-end; text-align: right; }
.trip-editor-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.trip-report-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.trip-report-header h3 { margin: 2px 0 4px; font: 600 26px/1.15 ui-serif, Georgia, serif; }
#trip-report-dates { margin: 0; color: var(--muted); font-size: 11px; }
.trip-cache-status { display: block; margin-top: 5px; color: #8b6a22; font-size: 9px; }
.trip-cache-status.ready { color: var(--muted); }
.trip-cache-status.failed { color: #9a2f2f; }
.trip-report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.trip-report-narrative { margin: 16px 0; padding: 15px 17px; color: #465249; border-left: 3px solid var(--leaf); border-radius: 0 8px 8px 0; background: #f0f3ea; font: 12px/1.75 ui-serif, Georgia, serif; white-space: pre-wrap; }
.trip-conservation { margin: 4px 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8f8f2; }
.trip-conservation-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.trip-conservation-heading h3 { margin: 0; color: var(--moss); font-size: 14px; }
.trip-conservation-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.trip-conservation-heading > small { color: var(--muted); font-size: 9px; }
.trip-conservation-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffef9; }
.trip-conservation-summary article { min-width: 0; padding: 12px 8px; text-align: center; }
.trip-conservation-summary article + article { border-left: 1px solid var(--line); }
.trip-conservation-summary strong,
.trip-conservation-summary span { display: block; }
.trip-conservation-summary strong { font-size: 18px; font-weight: 600; }
.trip-conservation-summary strong small { margin-left: 2px; color: var(--muted); font-size: 9px; }
.trip-conservation-summary span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.trip-report-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 18px; align-items: start; }
.trip-report-primary,
.trip-report-section { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f3; }
.trip-report-aside { display: grid; min-width: 0; gap: 14px; }
.trip-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.trip-section-heading h3 { margin: 0; color: var(--moss); font-size: 14px; }
.trip-section-heading span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.trip-section-note { margin: -3px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.trip-species-list { max-height: 850px; background: #fffef9; }
#trip-species .trip-species-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 11px; }
.trip-species-item > i { color: #9aa196; font-size: 9px; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.trip-species-item > strong { display: inline-flex; min-width: 0; flex-direction: column; }
.trip-species-item > strong em { margin-top: 2px; overflow: hidden; color: var(--muted); font: italic 9px/1.15 ui-serif, Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.trip-species-item > span { display: inline-flex; flex-direction: column; align-items: flex-end; font-size: 10px; white-space: nowrap; }
.trip-species-item > span small { margin-top: 2px; color: #9aa196; font-size: 8px; }
.trip-highlights-list { max-height: 330px; background: #fffef9; }
.trip-side-list { max-height: 230px; background: #fffef9; }
.community-list .trip-lifer-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.trip-lifer-item > i { color: #8b938b; font-size: 9px; font-style: normal; font-variant-numeric: tabular-nums; }
.trip-lifer-item > strong { display: inline-flex; min-width: 0; flex-direction: column; }
.trip-lifer-item > strong small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 450; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.trip-lifer-item > time { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-location-item > strong { display: inline-flex; min-width: 0; flex-direction: column; }
.trip-location-item > strong small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 450; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.trip-location-item > span { align-self: center; white-space: nowrap; }
#trip-highlights .trip-highlight-item { display: grid; grid-template-columns: minmax(128px, .7fr) minmax(0, 1.3fr); gap: 10px; align-items: center; min-height: 42px; padding: 8px 12px; }
#trip-highlights .trip-highlight-species { display: inline-flex; min-width: 0; flex-direction: column; color: var(--ink); }
#trip-highlights .trip-highlight-species em { margin-top: 2px; overflow: hidden; color: var(--muted); font: italic 9px/1.15 ui-serif, Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
#trip-highlights .trip-highlight-meta { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; color: inherit; text-align: right; }
.trip-tag { display: inline-flex; box-sizing: border-box; height: 24px; align-items: center; padding: 0 8px; border-radius: 5px; font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; }
.trip-tag-rarity-index { color: #626a64; background: #eceee9; }
.trip-tag-rarity-index strong { margin-left: 4px; color: #303833; font-size: 11px; font-variant-numeric: tabular-nums; }
.trip-tag-endemic { color: #235c41; background: #dcebdd; }
.trip-tag-rare { color: #604276; background: #eadff0; }
.trip-highlight-meta .trip-tag-protection-1 { color: #fff; background: #b9342b; }
.trip-highlight-meta .trip-tag-protection-2 { color: #fff; background: #cf6f1d; }
.trip-tag-protection-3 { color: #31576a; background: #d9e9ef; }
.trip-iucn { display: inline-flex; box-sizing: border-box; height: 24px; align-items: center; overflow: hidden; border-radius: 5px; color: #657068; background: #eef0ea; font-size: 9px; font-weight: 650; line-height: 1; white-space: nowrap; }
.trip-iucn strong { display: inline-flex; box-sizing: border-box; min-width: 30px; height: 24px; align-items: center; justify-content: center; padding: 0 6px; color: #fff; font-size: 10px; letter-spacing: .02em; }
.trip-iucn span { padding: 0 7px 0 6px; }
.trip-iucn[data-iucn="CR"] strong { background: #d33535; }
.trip-iucn[data-iucn="EN"] strong { background: #dc6a32; }
.trip-iucn[data-iucn="VU"] strong { color: #302a00; background: #d9a600; }
.trip-iucn[data-iucn="NT"] strong,
.trip-iucn[data-iucn="LC"] strong { background: #117874; }
.trip-iucn[data-iucn="DD"] strong { background: #a7aaa8; }
.trip-iucn[data-iucn="EW"] strong { background: #63356b; }
.trip-iucn[data-iucn="EX"] strong { background: #202321; }
.trip-iucn[data-iucn="NE"] { border: 1px solid #b4b7b5; }
.trip-iucn[data-iucn="NE"] strong { height: 22px; color: #59615c; background: #dfe1df; }
.admin-split .community-table-wrap { max-height: 470px; }

@media (max-width: 1200px) {
  .conservation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conservation-stats > article:nth-child(odd) { border-left: 0; }
  .conservation-stats > article:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 1000px) {
  .hero { flex-direction: column; }
  .import-options { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .conservation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-stats { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .activity-stats::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .two-columns { grid-template-columns: 1fr; }
  .species-grid { grid-template-columns: repeat(2, 1fr); }
  .map-stage, .lit-map { height: 480px; min-height: 480px; }
  .community-filters, .nearby-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .community-summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-summary-cards article:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .community-summary-cards article:nth-child(n + 5) { border-top: 1px solid var(--line); }
  .trip-conservation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trip-conservation-summary article:nth-child(4) { border-left: 0; }
  .trip-conservation-summary article:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .trip-report-grid { grid-template-columns: 1fr; }
  .trip-species-list { max-height: 520px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 36px; }
  .app-tabs { padding-right: 12px; padding-left: 12px; }
  .app-tabs > div { gap: 4px; }
  .app-tabs button { padding: 7px 8px; font-size: 11px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .conservation-header { align-items: stretch; flex-direction: column; gap: 14px; padding-right: 18px; padding-left: 18px; }
  .conservation-header .compact-control { flex-basis: auto; }
  .conservation-stats { grid-template-columns: 1fr; }
  .conservation-stats > article + article { border-top: 1px solid var(--line); border-left: 0; }
  .conservation-stats > article { min-height: 140px; padding-right: 18px; padding-left: 18px; }
  .conservation-note { padding-right: 18px; padding-left: 18px; }
  .activity-heading { align-items: flex-start; flex-direction: column; padding-right: 18px; padding-left: 18px; }
  .activity-actions { align-items: flex-start; flex-direction: column; gap: 9px; width: 100%; }
  .activity-range-options { width: 100%; max-width: none; }
  .activity-calendar { padding-right: 18px; padding-left: 18px; }
  .lit-map-header { flex-direction: column; gap: 10px; padding: 20px 18px 10px; }
  .map-breadcrumbs { padding-right: 18px; padding-left: 18px; }
  .map-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-right: 18px; margin-left: 18px; }
  .map-summary article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .map-summary article:nth-child(4) { border-top: 1px solid var(--line); }
  .map-toolbar { align-items: flex-start; flex-direction: column; padding-right: 18px; padding-left: 18px; }
  .map-toolbar p { text-align: left; }
  .map-region-strip { margin-right: 18px; margin-left: 18px; }
  .map-stage, .lit-map { height: 300px; min-height: 300px; }
  .map-source-note { flex-direction: column; padding-right: 18px; padding-left: 18px; }
  .map-source-note span:last-child { text-align: left; }
  .filters { grid-template-columns: 1fr; }
  .filters label:first-child { grid-column: auto; }
  .import-form { grid-template-columns: 1fr; }
  .import-form label, .import-status { grid-column: auto; }
  .history-item { grid-template-columns: 1fr; }
  .history-item .history-stats { text-align: left; }
  .history-actions { justify-content: flex-start; }
  .detail-metrics, .mapping-methods, .batch-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merged-species-list > article { grid-template-columns: 1fr; }
  .dialog-header, .dialog-content { padding-left: 16px; padding-right: 16px; }
  .checklist-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist-observation { grid-template-columns: 1fr 100px; }
  .checklist-observation .observation-notes { grid-column: 1 / -1; }
  .checklist-observation .remove-observation { grid-column: 1 / -1; margin: 0; }
  .checklist-editor-actions { align-items: stretch; flex-direction: column; margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
  .checklist-editor-actions button { width: 100%; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .community-header { align-items: flex-start; flex-direction: column; gap: 8px; padding-right: 18px; padding-left: 18px; }
  .community-refreshed { white-space: normal; }
  .community-view { padding-right: 18px; padding-left: 18px; }
  .community-filters, .nearby-filters, .trip-filters, .admin-filters { grid-template-columns: 1fr; }
  .community-filters button { width: 100%; }
  .community-check { min-height: 30px; }
  .community-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-summary-cards article:nth-child(odd) { border-left: 0; }
  .community-summary-cards article:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .trip-conservation-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-conservation-summary article:nth-child(odd) { border-left: 0; }
  .trip-conservation-summary article:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .trip-report-primary, .trip-report-section { padding: 12px; }
  .trip-workspace-heading, .trip-report-header { align-items: stretch; flex-direction: column; }
  .trip-workspace-heading > button { width: 100%; }
  .trip-editor-fields { grid-template-columns: 1fr; }
  .trip-name-field, .trip-narrative-field { grid-column: auto; }
  .trip-checklist-candidate { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; }
  .trip-checklist-place { grid-column: 2 / -1; grid-row: 2; }
  .trip-checklist-count { grid-column: 3; grid-row: 1; }
  .trip-report-actions { justify-content: flex-start; }
  #trip-species .trip-species-item { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 9px 8px; }
  #trip-highlights .trip-highlight-item { grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 8px; padding: 8px 10px; }
  #trip-highlights .trip-highlight-meta { justify-content: flex-end; text-align: right; }
  .community-split { grid-template-columns: 1fr; }
  .species-grid { grid-template-columns: 1fr; }
  .species-card { grid-template-columns: 28px 1fr; }
  .species-record { grid-column: 2; text-align: left; }
  .species-record span { max-width: none; }
}

.checklist-media-list { grid-column: 1 / -1; display: grid; gap: 8px; }
.checklist-media-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checklist-media-item span { overflow-wrap: anywhere; min-width: 0; }
.checklist-media-item.pending-removal span { text-decoration: line-through; opacity: .6; }
.checklist-media-item span { flex: 1; }
.checklist-media-item button { flex: 0 0 auto; width: auto; white-space: nowrap; padding: 6px 10px; font-size: 12px; }

[hidden] { display: none !important; }
.token-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.token-panel { width: min(520px, 100%); padding: 32px; border-radius: 16px; background: #fffdf7; box-shadow: 0 12px 40px #17251d18; }
.token-panel h1 { font-size: 30px; }
.token-panel p { color: var(--muted); }
.token-panel .error-text { color: #a83232; }
.token-panel input { border-color: #c6cfc1; }
.token-panel button:disabled { opacity: .6; cursor: wait; }

.community-user i img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.realtime-pagination { display: flex; align-items: center; gap: 16px; margin: 16px 0 32px; }
.realtime-pagination button { width: auto; margin: 0; }
.realtime-pagination button:disabled { opacity: .45; cursor: default; }

.hero .logout-button { width: auto; margin: 0; align-self: start; justify-self: end; }

/* Separate cumulative and daily metrics while keeping the overview compact. */
#realtime-summary { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; margin: 20px 0; border: 0; border-radius: 0; background: transparent; }
#realtime-summary article { grid-column: span 2; padding: 18px 20px; border: 1px solid #e2e6dc; border-radius: 12px; background: #fffef9; text-align: left; }
#realtime-summary article:nth-child(-n + 2) { grid-column: span 5; padding: 20px 24px; border-color: #d4dfd0; background: #edf3e9; }
#realtime-summary strong { color: #244f3b; font-size: 28px; font-weight: 650; letter-spacing: -.6px; }
#realtime-summary article:nth-child(-n + 2) strong { font-size: 34px; }
#realtime-summary strong small { margin-left: 5px; font-size: 11px; font-weight: 500; letter-spacing: 0; }
#realtime-summary span { margin-top: 6px; color: #69776b; font-size: 12px; }
@media (max-width: 700px) {
  #realtime-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #realtime-summary article, #realtime-summary article:nth-child(-n + 2) { grid-column: span 1; padding: 16px; }
  #realtime-summary article:last-child { grid-column: 1 / -1; }
}
