/* A field map, with controls where the thumb can reach them. */
:root {
  color-scheme: dark;
  --ink: #f5f6f7;
  --muted: #a9afb4;
  --subtle: #7e878e;
  --green: #18e9ad;
  --dark: #0b0c0d;
  --paper: #141618;
  --card: #1c1f22;
  --line: #ffffff15;
  --a: #ffb575;
  --b: #97bdff;
  --warning: #ffd28b;
  --shadow: 0 12px 36px #0005;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); background: var(--dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; border: 0; cursor: pointer; }
button, a { touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
button:not(:disabled):active { filter: brightness(.9); }
a { color: var(--green); text-underline-offset: 3px; }
input, select, textarea { color: var(--ink); accent-color: var(--green); }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Leaflet renders its own geographic SVGs; only interface icons are styled. */
.field-header svg, .action-panel svg, .map-tools svg, .map-button svg, .empty-state svg, .photo-label svg, .quick-note svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
.field-app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate; }
.map-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #28302b; }
#map { width: 100%; height: 100%; z-index: 0; background: #28302b; }
.field-header {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right));
  z-index: 10; display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px 15px;
  border: 1px solid #ffffff13; border-radius: 21px; background: #101214f2; box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.streetbar, .street-select-wrap { flex: 1; min-width: 0; }
.street-select-wrap select { width: 100%; min-height: 44px; margin: 0; padding: 0 22px 0 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 18px; font-weight: 720; letter-spacing: -.025em; }
.streetbar p { margin: -1px 0 0; font-size: 12px; line-height: 1.4; color: #b8bdc1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 2px; }
.icon-button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; background: transparent; color: #c8ced2; border-radius: 13px; }
.icon-button:hover { background: #ffffff09; }
#original-button { color: #9ca7ad; }
.map-top { position: absolute; top: calc(106px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left)); right: calc(14px + env(safe-area-inset-right)); z-index: 500; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; }
.gps-pill, .map-button { pointer-events: auto; background: #131618ed; border: 1px solid #ffffff1c; color: var(--ink); box-shadow: 0 4px 16px #0004; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.gps-pill { display: flex; align-items: center; gap: 7px; min-height: 34px; max-width: calc(100% - 62px); padding: 8px 11px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.gps-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #899297; }
.gps-pill.good .gps-dot { background: var(--green); }
.gps-pill.poor .gps-dot { background: var(--warning); }
.gps-pill.bad .gps-dot { background: #ff9797; }
.map-button { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; border-radius: 15px; }
.map-tools { position: absolute; z-index: 500; right: calc(14px + env(safe-area-inset-right)); top: calc(160px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; }
.map-tools #locate-button { color: var(--green); }
.walk-heading { position: absolute; z-index: 500; top: calc(148px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left)); display: flex; align-items: center; flex-wrap: wrap; gap: 2px 9px; max-width: calc(100% - 90px); padding: 6px 9px; border: 1px solid #ffffff0c; border-radius: 10px; background: #101416dc; color: #c0c8cd; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 11px; line-height: 1.35; }
.walk-heading strong { font-weight: 650; color: #e5e9eb; }
.walk-heading span { color: #b4bec4; }
.map-segments { position: absolute; z-index: 500; top: calc(192px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left)); display: flex; gap: 4px; max-width: calc(100% - 86px); padding: 3px; border-radius: 13px; background: #131618ec; border: 1px solid #ffffff1c; box-shadow: 0 4px 16px #0004; }
.map-segments button { min-height: 44px; padding: 6px 10px; border-radius: 9px; background: transparent; color: #b6c0c5; font-size: 12px; font-weight: 550; }
.map-segments button.active, .map-segments button[aria-pressed="true"] { color: var(--ink); background: #ffffff12; }
.map-footnote { position: absolute; z-index: 450; left: 12px; bottom: calc(var(--dock-cover, 198px) + 11px); max-width: calc(100% - 170px); padding: 4px 7px; border-radius: 6px; background: #101416dc; color: #d0d7dc; font-size: 10px; line-height: 1.3; pointer-events: none; }
.leaflet-control-attribution { background: #101416dc !important; color: #b7c0c5 !important; max-width: 84%; font-size: 9px !important; line-height: 1.4 !important; padding: 2px 6px !important; }
.leaflet-control-attribution a { color: #d0d8dd !important; }
.leaflet-bottom { bottom: calc(var(--dock-cover, 198px) + 1px); }
.leaflet-control-zoom { display: none; }
.action-panel {
  position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; padding: 8px calc(14px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  background: #111315f8; border: 1px solid #ffffff12; border-bottom: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 44px #0004; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.side-caption { min-height: 14px; margin: 0 0 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #a4afb5; font-size: 11px; line-height: 1.3; }
.capture-mode { position: absolute; right: 14px; bottom: calc(100% + 58px); display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 165px; min-height: 44px; padding: 0 12px; border: 1px solid #ffffff20; border-radius: 14px; background: #121719ed; color: #dce7e7; font-size: 12px; font-weight: 650; box-shadow: 0 4px 18px #0004; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.capture-mode svg { width: 17px; height: 17px; color: var(--green); }
.capture-mode[aria-pressed="true"] { color: var(--green); }
.side-picker { display: flex; gap: 4px; padding: 0; margin-bottom: 8px; border-radius: 13px; background: #222629; }
.side { min-height: 44px; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 9px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #b4bdc3; font-size: 13px; font-weight: 580; text-align: left; }
.side-letter { display: grid; place-items: center; width: 22px; height: 24px; flex: 0 0 auto; color: var(--a); font-size: 14px; font-weight: 700; }
#side-b .side-letter { color: var(--b); }
.side>span:nth-child(2) { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.side small { font-size: 11px; color: #94a1a8; font-weight: 500; font-variant-numeric: tabular-nums; }
.side.active { background: #3a4043; color: var(--ink); border-color: #ffffff12; box-shadow: 0 2px 6px #0002; }
.side.active small { color: #d2dadd; }
.checkmark { visibility: hidden; color: var(--green); font-size: 12px; }
.side.active .checkmark { visibility: visible; }
#normal-actions, #manual-actions { display: grid; grid-template-columns: minmax(0,1fr) 68px; gap: 8px; align-items: stretch; }
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid #3bf0bc; border-radius: 14px; background: var(--green); color: #062c23; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.primary:not(:disabled):hover { background: #3defbe; }
#normal-actions .primary, #manual-actions .primary { min-height: 56px; padding: 12px 9px; font-size: clamp(14px,3.8vw,16px); }
#normal-actions .primary svg { width: 21px; height: 21px; }
.secondary { min-height: 44px; padding: 11px 13px; border: 1px solid #ffffff17; border-radius: 12px; background: #252a2e; color: #dce2e5; font-size: 13px; font-weight: 600; }
.secondary:not(:disabled):hover { background: #2c3337; border-color: #ffffff2c; }
#manual-button, #cancel-point { min-height: 56px; padding: 5px 4px; border-radius: 14px; background: #252a2e; color: #cad4d8; font-size: 12px; }
.manual-control { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
.manual-control svg { width: 20px; height: 20px; }
.manual-control small { font-size: 10px; font-weight: 550; }
.navigation { display: flex; align-items: stretch; justify-content: space-between; gap: 4px; min-height: 44px; margin-top: 4px; padding: 0; }
.navigation button { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px; border-radius: 10px; background: transparent; color: #99a6ad; font-size: 12px; font-weight: 550; }
.navigation button.active { color: var(--green); }
.navigation svg { width: 19px; height: 19px; }
.nav-icon { position: relative; width: 19px; height: 19px; }
#record-count { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 5px; background: #39464a; color: #edf5f6; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
#record-count:empty { display: none; }
#reticle { position: absolute; z-index: 480; top: var(--reticle-y,50%); left: var(--reticle-x,50%); transform: translate(-50%,-50%); width: 44px; height: 44px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #18e9ad,0 4px 20px #0008; pointer-events: none; }
#reticle span::before, #reticle span::after { content: ""; position: absolute; background: var(--green); box-shadow: 0 0 0 1px #10352e; }
#reticle span::before { width: 2px; height: 60px; left: 19px; top: -10px; }
#reticle span::after { width: 60px; height: 2px; top: 19px; left: -10px; }
#reticle i { position: absolute; top: 16px; left: 16px; width: 8px; height: 8px; border: 2px solid #14332b; border-radius: 50%; background: var(--green); }
#manual-banner { position: absolute; z-index: 480; left: 14px; right: 14px; bottom: calc(var(--dock-cover,198px) + 12px); padding: 11px 13px; border: 1px solid #18e9ad55; border-radius: 14px; background: #10191bef; color: #e5f5f0; font-size: 12px; line-height: 1.45; box-shadow: var(--shadow); pointer-events: none; }
.manual-mode .capture-mode, .manual-mode .map-segments, .manual-mode .map-footnote, .manual-mode .walk-heading { display: none; }
.tree-pin { width: 36px; height: 36px; border: 3px solid #172125; border-radius: 50% 50% 50% 5px; background: var(--a); transform: rotate(-45deg); box-shadow: 0 3px 9px #0006,0 0 0 1px #ffffffb0; display: grid; place-items: center; }
.tree-pin.side-b { background: var(--b); }
.tree-pin span { transform: rotate(45deg); color: #17272b; font-size: 14px; font-weight: 800; }
.tree-pin.problem { border-color: #ffe282; }
.pin-icon { border: 0 !important; background: transparent !important; }
.start-pin, .end-pin { padding: 4px 7px; border: 1px solid #9faeaf; border-radius: 7px; background: #10191bea; color: #edf7f4; font-size: 10px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px #0005; }
.route-label { padding: 2px 5px; border: 1px solid #798c8b; border-radius: 5px; background: #172224e8; color: #e5efec; font-size: 11px; white-space: nowrap; }
.route-end-dot { width: 9px; height: 9px; margin: 9px auto; border: 2px solid #253e35; border-radius: 50%; background: #ffe38a; }
.gps-marker { width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: #338ffc; box-shadow: 0 0 0 1px #2179d9; }
.leaflet-popup-content-wrapper { background: #1a2023; color: var(--ink); border: 1px solid #ffffff25; border-radius: 16px; box-shadow: 0 6px 30px #0007; }
.leaflet-popup-tip { background: #1a2023; }
.leaflet-container a.leaflet-popup-close-button { width: 44px; height: 44px; padding-top: 9px; color: #d4ddde; }
.leaflet-popup-content { margin-right: 36px; line-height: 1.5; }
.leaflet-popup-content a { color: var(--green); }
.toast { position: fixed; z-index: 1100; left: var(--toast-left,50%); bottom: var(--toast-bottom,270px); transform: translateX(-50%); max-width: var(--toast-width,calc(100vw - 28px)); width: max-content; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #ffffff24; border-radius: 15px; background: #172326ee; color: #edf9f4; box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13px; line-height: 1.45; pointer-events: none; }
.toast button { min-height: 44px; padding: 0 3px; color: var(--green); background: transparent; font-size: 12px; font-weight: 650; white-space: nowrap; pointer-events: auto; }
/* Sheets share the same quiet surfaces and a single visible primary action. */
dialog { position: fixed; inset: 0; width: min(560px,calc(100% - 28px)); height: fit-content; max-height: calc(var(--viewport-height,100dvh) - 28px - env(safe-area-inset-top)); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; color: var(--ink); background: var(--paper); border: 1px solid #ffffff1c; border-radius: 25px; box-shadow: 0 24px 100px #0009; }
dialog::backdrop { background: #040609b0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sheet[open], .wide-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.dialog-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 15px; border-bottom: 1px solid #ffffff0d; background: var(--paper); }
.dialog-head h2 { margin: 0; font-size: 21px; font-weight: 730; letter-spacing: -.035em; line-height: 1.3; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.close { width: 44px; height: 44px; min-height: 44px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border-radius: 50%; background: #262b2f; color: #d6dfe3; font-size: 25px; font-weight: 350; line-height: 1; }
.screen-back { width: auto; padding: 0 13px; border-radius: 13px; color: var(--green); font-size: 13px; font-weight: 650; white-space: nowrap; }
.dialog-body { flex: 1 1 auto; min-height: 0; padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dialog-body label { display: block; margin: 12px 0; color: #b9c3c9; font-size: 13px; font-weight: 600; }
.dialog-body input:not([type="file"]):not([type="checkbox"]):not([type="hidden"]), .dialog-body select, .dialog-body textarea, .record-search, #species-search { display: block; width: 100%; min-height: 49px; margin-top: 7px; padding: 12px 13px; border: 1px solid #ffffff18; border-radius: 13px; background: #20252a; color: var(--ink); font-size: 16px; }
.dialog-body input:not([type="file"]):focus, .dialog-body select:focus, .dialog-body textarea:focus { border-color: var(--green); outline-offset: 1px; }
.dialog-body textarea { min-height: 85px; line-height: 1.45; resize: vertical; }
.dialog-body select { padding-right: 28px; }
.dialog-body input[type="hidden"] { display: none; }
.plant-card-head { align-items: flex-start; gap: 10px; padding-bottom: 16px; }
.plant-title-wrap { flex: 1; min-width: 0; }
.plant-card-head h2 { font-size: clamp(18px,5.3vw,22px); }
.plant-card-head #tree-location { margin-top: 6px; font-size: 11px; line-height: 1.5; }
.plant-card-head .draft-status { margin: 3px 0 0; color: #97b4ac; font-size: 10px; line-height: 1.4; }
.plant-kind { flex: 0 0 auto; width: 106px; padding-top: 1px; }
.plant-kind select { width: 100%; min-height: 44px; padding: 10px 21px 10px 10px; border: 1px solid #ffffff14; border-radius: 12px; background: #252b2f; color: #dbe4e8; font-size: 16px; }
.species-picker { position: relative; margin: 0 0 16px; }
.species-picker>label { margin-top: 0; margin-bottom: 7px; font-size: 13px; }
#species-search { min-height: 55px; padding-right: 48px; font-size: 17px; font-weight: 550; letter-spacing: -.015em; }
.species-selection { margin: 7px 1px 0; color: #92a1a8; font-size: 11px; line-height: 1.4; }
.species-selection.chosen { display: none; }
.species-clear { position: absolute; top: 25px; right: 4px; width: 44px; height: 44px; padding: 0; border-radius: 12px; background: transparent; color: #aab8bf; font-size: 23px; }
.recent-species { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 6px; padding: 2px 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.recent-species:empty { display: none; }
.recent-species button { flex: 0 0 auto; min-height: 44px; max-width: 90%; padding: 9px 11px; border: 1px solid #ffffff14; border-radius: 11px; background: #222c2c; color: #c7ddd5; font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.species-results { max-height: min(260px,36dvh); margin-top: 8px; overflow: auto; overscroll-behavior: contain; border: 1px solid #ffffff25; border-radius: 14px; background: #20282c; box-shadow: 0 8px 24px #0005; }
.species-results button { display: block; width: 100%; min-height: 48px; padding: 13px; border-bottom: 1px solid #ffffff0c; background: transparent; color: #edf3f5; font-size: 16px; text-align: left; line-height: 1.4; }
.species-results button:last-child { border-bottom: 0; }
.species-results [aria-selected="true"] { background: #18e9ad13; color: var(--green); outline: 1px solid #18e9ad55; }
.species-no-results { margin: 0; padding: 15px; color: var(--muted); font-size: 13px; }
.measurements { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.measurements label { min-width: 0; margin: 0; }
.measurements input { font-variant-numeric: tabular-nums; }
.measure-details { margin: 8px 0 14px; border-bottom: 1px solid #ffffff10; }
.measure-details>summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; list-style: none; cursor: pointer; color: #96a8b1; font-size: 12px; font-weight: 500; }
.measure-details>summary::-webkit-details-marker { display: none; }
.measure-details>summary::after { content: "+"; color: #bac8ce; font-size: 18px; }
.measure-details[open]>summary::after { content: "−"; }
.age-estimate { margin: 10px 0 6px; padding: 10px 12px; border-radius: 11px; background: #21302d; color: #c2ded4; font-size: 12px; line-height: 1.5; font-weight: 550; }
.hint { margin: 9px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.measure-hint { font-size: 11px; }
.assessment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-label { display: block; color: #b9c3c9; font-size: 13px; font-weight: 600; }
.dry-option, .auto-send-option { display: flex !important; align-items: center; gap: 9px; min-height: 44px; font-weight: 500 !important; }
.assessment-heading .dry-option { margin: 0; padding: 0 3px 0 9px; color: #b3bfc5; font-size: 12px; }
.dry-option input, .auto-send-option input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--green); }
.assessment-heading .dry-option:has(input:checked) { color: var(--warning); }
.assessment-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 0 0 14px; }
.assessment-picker button { min-height: 48px; padding: 9px 5px; border: 1px solid #ffffff13; border-radius: 12px; background: #242b2f; color: #aebec5; font-size: 13px; line-height: 1.25; font-weight: 580; }
.assessment-picker button.active, .assessment-picker button[aria-pressed="true"] { color: #cbffec; border-color: #18e9ad80; background: #18e9ad16; }
.assessment-picker button[data-assessment="Задовільний"][aria-pressed="true"] { color: #ffe3a9; border-color: #e3bf7280; background: #e3bf7218; }
.assessment-picker button[data-assessment="Не задовільний"][aria-pressed="true"] { color: #ffd1ca; border-color: #f8958780; background: #f8958718; }
.card-tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.photo-label, .import-label { position: relative; display: flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px; overflow: hidden; border: 1px solid #ffffff15; border-radius: 12px; background: #242b2f; color: #c6d3d8 !important; font-size: 13px !important; text-align: center; font-weight: 600; }
.card-tools-row .photo-label { margin: 0; }
.photo-label input, .import-label input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0 !important; opacity: 0; cursor: pointer; }
.photo-label svg, .quick-note svg { width: 20px; height: 20px; }
.quick-note { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; }
#photo-preview img { display: block; width: 100%; max-height: 220px; margin: 10px 0; object-fit: contain; border: 1px solid #ffffff16; border-radius: 15px; background: #0b1012; }
.plant-more { margin: 12px 0; border: 1px solid #ffffff14; border-radius: 13px; overflow: clip; background: #1a2023; }
.plant-more>summary, .registry-link-details>summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; color: #b7c5cb; font-size: 13px; font-weight: 550; list-style: none; cursor: pointer; }
.plant-more>summary::-webkit-details-marker, .registry-link-details>summary::-webkit-details-marker { display: none; }
.plant-more>summary::after, .registry-link-details>summary::after { content: "+"; color: #aab9c0; font-size: 19px; line-height: 1; font-weight: 400; }
.plant-more[open]>summary, .registry-link-details[open]>summary { border-bottom: 1px solid #ffffff10; }
.plant-more[open]>summary::after, .registry-link-details[open]>summary::after { content: "−"; }
.plant-more>div, .registry-link-details>.more-body { padding: 0 13px 11px; }
.quality-note { margin: 0 0 8px; padding: 10px 11px; border: 1px solid #ffffff13; border-radius: 11px; background: #202b2d; color: #b4c9cd; font-size: 12px; line-height: 1.5; }
.quality-note.warning, .source-measure-notice { border-color: #c5a86740; background: #30291e; color: #efd7a8; }
.source-measure-notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #c5a86740; border-radius: 12px; font-size: 12px; line-height: 1.5; }
.plant-footer { flex: 0 0 auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff12; background: var(--paper); }
.plant-footer .primary { min-height: 54px; }
.plant-sheet>.dialog-body { padding-bottom: 12px; }
.full { width: 100%; margin: 8px 0; }
.danger { width: 100%; min-height: 44px; margin-top: 8px; padding: 11px; color: #f0a5a0; background: transparent; font-size: 13px; }
.card-feedback { flex: 0 0 auto; margin: 0; padding: 11px 18px; border-bottom: 1px solid #c5a86740; background: #30291e; color: #ffe2ad; font-size: 13px; line-height: 1.5; }
.card-feedback .secondary { display: block; margin-top: 8px; min-height: 44px; }
/* Tree and registry lists are destinations, while editing remains a sheet. */
.record-search { margin-top: 0 !important; }
.record-filters { display: flex; gap: 5px; margin: 14px 0; padding: 3px; border-radius: 12px; background: #252a2e; overflow-x: auto; }
.record-filters button { flex: 1; min-height: 44px; padding: 8px 11px; border-radius: 9px; background: transparent; color: #aebcc3; font-size: 12px; font-weight: 550; white-space: nowrap; }
.record-filters button.active { background: #3a4448; color: #f0f6f8; }
.record-row, .registry-row { width: 100%; min-height: 80px; display: flex; align-items: center; gap: 12px; margin: 8px 0; padding: 13px; border: 1px solid #ffffff10; border-radius: 15px; background: #1d2428; color: var(--ink); text-align: left; }
.record-number { flex: 0 0 auto; width: 40px; min-width: 40px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #ffb57512; color: var(--a); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.record-number.b { background: #97bdff12; color: var(--b); }
.record-main, .registry-row>span:nth-child(2) { flex: 1; min-width: 0; }
.record-main strong, .registry-row strong { display: block; color: #edf3f5; font-size: 14px; font-weight: 630; line-height: 1.4; }
.record-main small, .registry-row small { display: block; margin-top: 4px; color: #9aafb9; font-size: 12px; line-height: 1.45; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record-main small+small { color: #82979f; font-size: 11px; }
.badge { flex: 0 0 auto; max-width: 80px; color: var(--warning); font-size: 11px; line-height: 1.4; text-align: right; }
.empty-state { padding: 40px 12px; text-align: center; }
.empty-state svg { width: 44px; height: 44px; margin-bottom: 12px; color: var(--green); }
.empty-state strong { display: block; font-size: 16px; line-height: 1.5; }
.empty-state p { margin: 9px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.export-row { display: flex; gap: 8px; }
.export-row button { flex: 1; min-width: 0; }
.settings-card, .link-card { margin: 0 0 14px; padding: 16px; border: 1px solid #ffffff13; border-radius: 17px; background: #1e2529; }
.settings-card h3, .link-card h3 { margin: 0 0 9px; font-size: 15px; line-height: 1.4; letter-spacing: -.02em; }
.settings-card ol { padding-left: 20px; color: #c4d0d6; font-size: 13px; line-height: 1.85; }
.settings-card>p { color: #b2c1c9; font-size: 12px; line-height: 1.6; }
.setting-switch { display: flex !important; align-items: center; justify-content: space-between; gap: 13px; min-height: 52px; margin: 0 0 13px !important; font-size: 13px !important; line-height: 1.5; }
.setting-switch>span { flex: 1; }
.setting-switch small { display: block; margin-top: 5px; color: #8fa1ac; font-size: 11px; font-weight: 450; line-height: 1.5; }
.setting-switch input { appearance: none; -webkit-appearance: none; width: 46px; min-width: 46px; height: 28px; margin: 0; position: relative; border: 1px solid #ffffff20; border-radius: 99px; background: #49565d; transition: background .15s; }
.setting-switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #edf4f5; box-shadow: 0 1px 4px #0003; transition: transform .15s; }
.setting-switch input:checked { background: var(--green); border-color: var(--green); }
.setting-switch input:checked::after { transform: translateX(18px); background: #07382b; }
#finish-button { color: #f1c2a9; border-color: #eab28c36; background: #352c28; }
.registry-toolbar { display: flex; align-items: end; gap: 9px; }
.registry-toolbar label { flex: 1; min-width: 0; margin: 0; }
.registry-toolbar .secondary { min-height: 49px; max-width: 105px; font-size: 12px; }
.registry-link-details { padding: 0; }
.link-card select { width: 100%; min-height: 48px; margin: 8px 0; padding: 12px 28px 12px 12px; border: 1px solid #ffffff1c; border-radius: 12px; background: #202c31; color: var(--ink); font-size: 16px; }
.link-card .primary { min-height: 51px; font-size: 14px; }
.registry-sheet #registry-report { margin-top: 16px; }
.link-button { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.wide-dialog { width: min(820px,calc(100% - 28px)); }
#original-image { display: block; width: 100%; height: auto; margin: 12px 0; border: 1px solid #ffffff22; border-radius: 12px; }
.confirm-dialog { padding: 23px; }
.confirm-dialog h2 { margin: 0; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.confirm-dialog p { color: #bfccd2; font-size: 14px; line-height: 1.65; }
.confirm-dialog>div { display: flex; gap: 8px; }
.confirm-dialog button { flex: 1; min-width: 0; }
.signin-warning { position: absolute; top: calc(96px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 20; padding: 10px 13px; border: 1px solid #bea06355; border-radius: 12px; background: #30281a; color: #f5d9a4; font-size: 12px; line-height: 1.5; }
.signin-warning a { color: #ffe6b6; font-weight: 650; }
/* Archived crowns have their own visual identity and never field numbers. */
.remote-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.remote-controls small { width: 100%; color: #bca5d2; font-size: 11px; line-height: 1.5; }
.remote-toggle { min-height: 44px; padding: 10px 12px; border: 1px solid #ba9ad65c; border-radius: 12px; background: #33283e; color: #e6d7f2; font-size: 13px; font-weight: 550; }
.remote-toggle[aria-pressed="false"] { border-color: #82748e55; background: #29252f; color: #b3a7bf; }
.remote-pin { display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 33px; height: 28px; padding: 0 3px; border: 1.5px dashed #d6a7fb; border-radius: 7px; background: #2a2035ef; color: #eedbfe; box-shadow: 0 2px 6px #0005; font: 650 11px system-ui; }
.remote-pin span { font-size: 9px; font-weight: 450; }
.remote-linked { background: #263533; color: #c1d1cd; border-color: #92b1a8; }
.remote-dot { width: 9px; height: 9px; margin: 5px; border: 1.5px solid #33233f; border-radius: 50%; background: #bd80e8; box-shadow: 0 1px 3px #0007,0 0 0 1px #e4c4ff; }
.remote-dot.remote-linked { background: #8bb9aa; }
.remote-warning { margin: 0 0 14px; padding: 12px; border: 1px solid #ac86c74d; border-radius: 13px; background: #2e2537; color: #dec6ed; font-size: 13px; line-height: 1.6; }
.source-street { padding: 15px 0; border-top: 1px solid #ffffff18; }
.source-street h3 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-size: 15px; }
.source-street h3 span { color: #c3a6d9; font-size: 11px; font-weight: 450; }
.source-street p { margin: 6px 0; color: #b6c5cb; font-size: 12px; line-height: 1.6; }
.source-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 12px; }
.source-links a, .provider-link { color: #95d8c1; text-underline-offset: 3px; }
.source-links span { color: #97aaa9; }
.provider-link { display: block; margin: 9px 0; font-size: 12px; line-height: 1.5; }
.text-button { min-height: 44px; padding: 4px 8px; background: transparent; color: var(--green); font-size: 13px; font-weight: 600; }
@media (max-width: 600px) {
  dialog:not(.confirm-dialog) { width: 100%; max-width: 560px; margin: auto auto 0; bottom: var(--viewport-bottom,0px); max-height: calc(var(--viewport-height,100dvh) - 18px - env(safe-area-inset-top)); border-bottom: 0; border-radius: 26px 26px 0 0; }
  .records-screen[open], .registry-screen[open] { height: var(--viewport-height,100dvh); max-height: var(--viewport-height,100dvh); border: 0; border-radius: 0; }
  .records-screen>.dialog-head, .registry-screen>.dialog-head { padding-top: calc(18px + env(safe-area-inset-top)); }
}
@media (max-width: 360px) {
  .field-header { left: 10px; right: 10px; padding-left: 12px; gap: 0; }
  .header-actions { gap: 0; }
  .street-select-wrap select { font-size: 17px; }
  .streetbar p { font-size: 11px; }
  .action-panel { padding-left: 11px; padding-right: 11px; }
  .side { padding-left: 5px; padding-right: 5px; gap: 5px; font-size: 12px; }
  .side>span:nth-child(2) { gap: 5px; }
  .side small { font-size: 10px; }
  #normal-actions, #manual-actions { grid-template-columns: minmax(0,1fr) 60px; gap: 7px; }
  .navigation button { gap: 5px; font-size: 11px; }
  .dialog-head, .dialog-body, .plant-footer { padding-left: 14px; padding-right: 14px; }
  .plant-card-head { gap: 7px; }
  .plant-kind { width: 104px; }
  .plant-kind select { padding-left: 7px; padding-right: 17px; }
  .plant-card-head #tree-location { font-size: 10px; }
  .measurements { gap: 9px; }
  .record-row, .registry-row { padding: 11px; gap: 9px; }
  .record-filters button { padding-left: 7px; padding-right: 7px; font-size: 11px; }
  .map-footnote { max-width: calc(100% - 158px); font-size: 9px; }
}
@media (min-width: 850px) {
  .field-header { right: auto; width: min(440px,calc(100% - 350px)); }
  .action-panel { top: calc(12px + env(safe-area-inset-top)); right: 12px; bottom: 12px; left: auto; width: 320px; display: flex; flex-direction: column; padding: 19px 16px 13px; border: 1px solid #ffffff1c; border-radius: 24px; box-shadow: var(--shadow); }
  .side-caption { margin-bottom: 13px; font-size: 12px; line-height: 1.5; }
  .capture-mode { position: static; max-width: none; margin-top: 6px; padding: 0 10px; box-shadow: none; background: #242e33; font-size: 11px; }
  .side-caption { flex-direction: column; align-items: stretch; }
  .side-picker { margin-bottom: 13px; }
  .side { font-size: 13px; }
  #normal-actions, #manual-actions { margin-top: auto; grid-template-columns: minmax(0,1fr) 62px; }
  .navigation { margin-top: 11px; }
  .map-top { right: 350px; }
  .map-tools { right: 350px; }
  .walk-heading { max-width: calc(100% - 435px); }
  .map-footnote { bottom: 30px; max-width: calc(100% - 390px); }
  .leaflet-bottom { bottom: 3px; }
  .leaflet-right { right: 340px; }
  #manual-banner { right: 350px; bottom: 25px; }
}
@media (orientation: landscape) and (max-height: 540px) and (min-width: 560px) and (max-width: 849px) {
  .field-header { left: calc(10px + env(safe-area-inset-left)); right: calc(290px + env(safe-area-inset-right)); top: calc(9px + env(safe-area-inset-top)); padding-top: 3px; padding-bottom: 6px; border-radius: 18px; }
  .street-select-wrap select { min-height: 38px; font-size: 16px; }
  .streetbar p { font-size: 10px; }
  .action-panel { top: 9px; left: auto; right: calc(9px + env(safe-area-inset-right)); bottom: calc(9px + env(safe-area-inset-bottom)); width: 270px; max-width: 42%; display: flex; flex-direction: column; padding: 12px; border: 1px solid #ffffff18; border-radius: 20px; }
  .side-caption { flex-direction: column; align-items: stretch; margin-bottom: 7px; font-size: 10px; }
  .capture-mode { position: static; min-height: 44px; max-width: none; margin-top: 7px; padding: 0 9px; background: #232e32; box-shadow: none; font-size: 11px; }
  .side-picker { margin-bottom: 9px; }
  .side { padding: 5px; gap: 4px; font-size: 11px; }
  .side>span:nth-child(2) { gap: 4px; }
  .side-letter { width: 18px; }
  .checkmark { display: none; }
  #normal-actions, #manual-actions { margin-top: auto; grid-template-columns: minmax(0,1fr) 58px; }
  #normal-actions .primary, #manual-actions .primary { font-size: 13px; }
  .navigation { margin-top: 7px; gap: 0; }
  .navigation button { font-size: 10px; gap: 4px; }
  .navigation svg { width: 17px; height: 17px; }
  .map-top { top: calc(87px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); right: calc(294px + env(safe-area-inset-right)); }
  .map-tools { top: calc(140px + env(safe-area-inset-top)); right: calc(294px + env(safe-area-inset-right)); }
  .walk-heading { top: calc(130px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); max-width: calc(100% - 355px - env(safe-area-inset-right)); font-size: 10px; }
  .map-segments { top: calc(176px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); max-width: calc(100% - 358px); }
  .map-segments button { padding: 5px 8px; font-size: 11px; }
  .map-footnote { left: calc(12px + env(safe-area-inset-left)); bottom: 23px; max-width: calc(100% - 340px); font-size: 9px; }
  .leaflet-bottom { bottom: 2px; }
  .leaflet-right { right: calc(286px + env(safe-area-inset-right)); }
  #manual-banner { left: calc(12px + env(safe-area-inset-left)); right: calc(290px + env(safe-area-inset-right)); bottom: 26px; }
  dialog { max-height: calc(var(--viewport-height,100dvh) - 14px); }
  .records-screen[open], .registry-screen[open] { width: 100%; max-width: none; height: var(--viewport-height,100dvh); max-height: var(--viewport-height,100dvh); margin: 0; border: 0; border-radius: 0; }
  .records-screen>.dialog-head, .registry-screen>.dialog-head { padding-left: calc(18px + env(safe-area-inset-left)); padding-right: calc(18px + env(safe-area-inset-right)); }
}
@media (max-height: 650px) and (max-width: 559px) {
  .field-header { top: calc(8px + env(safe-area-inset-top)); padding-top: 3px; padding-bottom: 7px; }
  .map-top { top: calc(96px + env(safe-area-inset-top)); }
  .walk-heading { top: calc(137px + env(safe-area-inset-top)); font-size: 10px; }
  .map-tools { top: calc(148px + env(safe-area-inset-top)); }
  .map-segments { top: calc(176px + env(safe-area-inset-top)); }
  .action-panel { padding-top: 8px; }
  .side-picker { margin-bottom: 7px; }
  .navigation { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { :root { --muted: #c6d2d8; --subtle: #aebec6; } .secondary, .record-row, .registry-row, .settings-card, .link-card, .map-button, .gps-pill { border-color: #789198; } }
