:root {
  --ink: #101714;
  --ink-2: #1b2520;
  --paper: #f2f0e8;
  --paper-2: #e7e4d8;
  --signal: #ff5b25;
  --signal-dark: #d93f12;
  --lime: #c9f269;
  --line: rgba(16, 23, 20, .14);
  --muted: #6f766f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--ink); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(255, 91, 37, .35); outline-offset: 2px; }

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 500; height: calc(68px + env(safe-area-inset-top, 0px));
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 10px; display: flex; align-items: center; justify-content: space-between;
  color: var(--paper); background: linear-gradient(180deg, rgba(8, 15, 12, .96), rgba(8, 15, 12, .72) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 21px; letter-spacing: .12em; line-height: 1; }
.brand small { display: block; font: 600 9px/1.4 "Barlow Condensed"; letter-spacing: .2em; color: rgba(242,240,232,.56); margin-top: 4px; }
.brand-mark { width: 31px; height: 31px; position: relative; transform: rotate(8deg); }
.brand-mark i { position: absolute; width: 11px; height: 11px; border: 2px solid var(--signal); }
.brand-mark i:nth-child(1) { inset: 0 auto auto 0; border-right: 0; border-bottom: 0; }
.brand-mark i:nth-child(2) { inset: 0 0 auto auto; border-left: 0; border-bottom: 0; }
.brand-mark i:nth-child(3) { inset: auto auto 0 0; border-right: 0; border-top: 0; }
.brand-mark i:nth-child(4) { inset: auto 0 0 auto; border-left: 0; border-top: 0; }
.system-state { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; backdrop-filter: blur(14px); }
.system-state span { width: 7px; height: 7px; background: #f4c35b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(244,195,91,.12); }
.system-state.online span { background: var(--lime); box-shadow: 0 0 0 4px rgba(201,242,105,.12); }
.system-state b { font-size: 11px; font-weight: 500; }

main, #map { position: absolute; inset: 0; }
#map { background: #26322c; z-index: 1; }
.map-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 -120px 100px -90px rgba(7,12,10,.9); }
.leaflet-control-attribution { opacity: .62; font-size: 8px !important; margin-bottom: 74px !important; }
.leaflet-control-zoom { display: none; }
.yard-label { background: transparent; border: 0; box-shadow: none; color: #fff; font: 700 12px "Barlow Condensed", sans-serif; text-shadow: 0 1px 3px #000, 0 0 7px #000; }

.search-rail { position: fixed; z-index: 400; top: calc(74px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; max-width: 520px; }
.search-rail label { height: 50px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 4px; background: rgba(16,23,20,.9); color: white; padding: 0 12px; box-shadow: 0 12px 30px rgba(0,0,0,.16); backdrop-filter: blur(16px); }
.search-rail svg, .tool-btn svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-rail input { min-width: 0; flex: 1; border: 0; outline: 0; background: none; color: white; font-size: 15px; }
.search-rail input::placeholder { color: rgba(255,255,255,.52); }
.search-rail kbd { border: 0; border-radius: 2px; background: rgba(255,255,255,.1); padding: 3px 7px; color: var(--lime); font: 600 13px "Barlow Condensed"; }
.search-results { max-height: 240px; overflow: auto; margin-top: 6px; background: var(--paper); border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.24); padding: 6px; }
.search-results button { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 11px; text-align: left; display: flex; justify-content: space-between; }
.search-results button:last-child { border-bottom: 0; }
.search-results span { color: var(--muted); font-size: 12px; }

.map-tools { position: fixed; z-index: 350; right: 16px; top: calc(140px + env(safe-area-inset-top, 0px)); display: grid; gap: 8px; }
.tool-btn { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; color: white; background: rgba(16,23,20,.88); box-shadow: 0 8px 18px rgba(0,0,0,.16); }
.tool-btn:active { transform: scale(.94); }

.nearby-hint { position: fixed; z-index: 350; left: 16px; bottom: calc(92px + var(--safe-bottom)); min-width: 200px; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--paper); border-left: 4px solid var(--signal); box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.nearby-hint .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 6px rgba(255,91,37,.14); }
.nearby-hint div { flex: 1; }
.nearby-hint small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.nearby-hint b { font-size: 15px; }
.nearby-hint strong { font: 700 16px "Barlow Condensed"; }

.add-point { position: fixed; z-index: 350; right: 16px; bottom: calc(92px + var(--safe-bottom)); height: 52px; border: 0; border-radius: 2px; background: var(--signal); color: white; display: flex; align-items: center; gap: 10px; padding: 0 17px 0 9px; box-shadow: 0 14px 28px rgba(107,29,4,.32); }
.add-point span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.36); font-size: 24px; line-height: 1; }
.add-point b { font-size: 14px; letter-spacing: .05em; }
.add-point:active { transform: translateY(2px); }

.bottom-nav { position: fixed; z-index: 500; inset: auto 0 0; height: calc(72px + var(--safe-bottom)); padding: 4px 10px var(--safe-bottom); display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ink); border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.46); }
.bottom-nav button { position: relative; border: 0; background: none; color: inherit; display: grid; place-content: center; gap: 2px; font-size: 11px; }
.bottom-nav button span { font: 500 22px "Barlow Condensed"; }
.bottom-nav button.active { color: white; }
.bottom-nav button.active::before { content: ""; position: absolute; top: 0; left: 35%; right: 35%; height: 3px; background: var(--signal); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 599; background: rgba(5,10,8,.44); backdrop-filter: blur(2px); }
.bottom-sheet { position: fixed; z-index: 600; left: 0; right: 0; bottom: 0; max-height: 72vh; overflow: auto; padding: 22px 18px calc(28px + var(--safe-bottom)); border-radius: 18px 18px 0 0; background: var(--paper); transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -18px 50px rgba(0,0,0,.22); }
.bottom-sheet.open { transform: translateY(0); }
.tall-sheet { height: 82vh; max-height: 82vh; }
.sheet-handle { position: absolute; top: 9px; left: calc(50% - 24px); width: 48px; height: 5px; padding: 0; border: 0; border-radius: 5px; background: #cbc8bd; }
.sheet-title { display: flex; align-items: end; justify-content: space-between; margin: 8px 0 18px; }
.sheet-title small, .detail-kicker, .capture-header small { color: var(--signal-dark); font: 700 11px "Barlow Condensed"; letter-spacing: .18em; }
.sheet-title h2 { margin: 2px 0 0; font-size: 25px; }
.sheet-title > b { font: 700 34px "Barlow Condensed"; color: var(--muted); }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; margin: 8px 0 14px; }
.detail-head h2 { margin: 3px 0 0; font: 700 36px/1 "Barlow Condensed"; letter-spacing: .02em; }
.version-pill { background: var(--ink); color: var(--lime); padding: 6px 9px; font: 700 12px "Barlow Condensed"; }
.detail-name-row { min-height: 52px; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.detail-name-row small, .detail-name-editor > label, .detail-name-editor > small { display: block; color: var(--muted); font-size: 9px; }
.detail-name-row b { display: block; margin-top: 2px; font-size: 16px; }
.detail-name-row button { min-height: 40px; border: 1px solid var(--line); background: var(--paper-2); padding: 0 12px; font-size: 11px; font-weight: 700; }
.detail-name-editor { margin: 0 0 14px; padding: 12px; background: var(--paper-2); }
.detail-name-editor > div { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: end; }
.detail-name-editor input { min-width: 0; width: 100%; height: 44px; border: 0; border-bottom: 2px solid var(--signal); background: transparent; color: var(--ink); font-size: 16px; font-weight: 700; }
.detail-name-editor .primary-btn { min-height: 44px; width: auto; }
.detail-name-editor .ghost-btn { min-height: 44px; }
.detail-name-editor > small { margin-top: 7px; }
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric-row div { background: var(--paper); padding: 12px 10px; }
.metric-row small { display: block; font-size: 9px; color: var(--muted); margin-bottom: 5px; }
.metric-row b { font: 600 15px "Barlow Condensed"; }
.detail-actions { display: grid; grid-template-columns: 1fr 104px; gap: 8px; margin-top: 16px; }
.history-title { margin: 20px 0 10px; font-size: 13px; }
.history-list { display: grid; gap: 7px; }
.history-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 9px; }
.history-item > b { font: 700 16px "Barlow Condensed"; color: var(--signal-dark); }
.history-item span { font-size: 12px; }
.history-item time { color: var(--muted); font-size: 10px; }

.primary-btn, .commit-btn, .danger-btn, .ghost-btn { border: 0; min-height: 49px; font-weight: 700; }
.primary-btn { width: 100%; background: var(--ink); color: white; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.primary-btn span { color: var(--lime); font-size: 20px; }
.ghost-btn { background: var(--paper-2); padding: 0 18px; }
.danger-btn { background: #b92d19; color: white; padding: 0 18px; }
.delete-btn { min-height: 49px; border: 1px solid #a72a18; color: #8d2315; background: transparent; font-size: 13px; font-weight: 700; }
.delete-btn:active, .region-delete-btn:active { background: #a72a18; color: white; }
.region-edit-btn { margin-top: 8px; background: #313d36; }

.create-sheet { max-height: 54vh; }
.create-choice { width: 100%; min-height: 92px; border: 0; background: var(--ink); color: white; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 14px; text-align: left; margin-bottom: 8px; }
.create-choice.secondary-choice { background: #dfdcd1; color: var(--ink); }
.choice-index { display: grid; place-items: center; width: 42px; height: 52px; border: 1px solid rgba(255,255,255,.25); color: var(--lime); font: 700 23px "Barlow Condensed"; }
.secondary-choice .choice-index { border-color: var(--line); color: var(--signal-dark); }
.create-choice b, .create-choice small { display: block; }
.create-choice b { font-size: 15px; margin-bottom: 5px; }
.create-choice small { color: rgba(255,255,255,.56); font-size: 10px; line-height: 1.5; }
.secondary-choice small { color: var(--muted); }
.create-choice strong { color: var(--signal); font-size: 11px; white-space: nowrap; }

.point-list { display: grid; gap: 6px; }
.point-row { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; border: 0; background: #e9e6dc; padding: 10px; text-align: left; }
.point-row .mini-shape { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink-2); color: var(--lime); font: 700 10px "Barlow Condensed"; clip-path: polygon(10% 5%,100% 16%,88% 100%,0 83%); }
.point-row b { display: block; font-size: 15px; }
.point-row small { color: var(--muted); }
.point-row > strong { color: var(--signal-dark); font: 700 13px "Barlow Condensed"; }

.data-grid { display: grid; gap: 10px; }
.data-card { position: relative; border: 1px solid var(--line); background: #ebe8de; padding: 20px 15px 15px; overflow: hidden; }
.data-card h3 { margin: 2px 0 3px; font-size: 18px; }
.data-card p { margin: 0 0 14px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.data-index { position: absolute; right: 10px; top: -12px; color: rgba(16,23,20,.07); font: 700 72px "Barlow Condensed"; }
.segmented { display: grid; grid-template-columns: repeat(2,1fr); gap: 3px; margin-bottom: 10px; padding: 3px; background: #dcd9ce; }
.segmented button { border: 0; background: transparent; min-height: 36px; font-size: 12px; }
.segmented button.active { background: var(--paper); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.file-drop { min-height: 76px; display: grid; place-content: center; text-align: center; border: 1px dashed #aaa89f; margin-bottom: 10px; background: rgba(255,255,255,.28); }
.file-drop input { display: none; }
.file-drop b { font-size: 13px; }
.file-drop small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.warning { color: #9b351d !important; border-left: 3px solid var(--signal); padding-left: 8px; }

.capture-panel { position: fixed; inset: 0; z-index: 800; overflow-y: auto; background: var(--paper); transform: translateX(105%); transition: transform .36s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(30px + var(--safe-bottom)); }
.capture-panel.open { transform: translateX(0); }
.workflow-panel { position: fixed; inset: 0; z-index: 810; overflow-y: auto; background: var(--paper); transform: translateX(105%); transition: transform .36s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(30px + var(--safe-bottom)); }
.workflow-panel.open { transform: translateX(0); }
.capture-header { min-height: calc(88px + env(safe-area-inset-top, 0px)); display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; background: var(--ink); color: white; }
.capture-header h1 { margin: 2px 0 0; font-size: 23px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: white; font-size: 28px; }
.capture-progress { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--signal); font: 700 16px "Barlow Condensed"; }
.identity-card { margin: 18px; padding: 18px; background: #e6e2d5; border-top: 4px solid var(--signal); }
.identity-card p { margin: 0 0 15px; font-size: 13px; color: var(--muted); }
.identity-card label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.identity-card input, .coordinate-fields input, .confirm-dialog input { width: 100%; border: 0; border-bottom: 1px solid #aaa89e; background: transparent; padding: 9px 0; color: var(--ink); font: 600 18px "Barlow Condensed"; }
.capture-workflow { padding: 0 16px; }
.capture-guide { position: relative; padding: 18px 16px 16px 82px; margin: 16px 0; background: var(--ink-2); color: white; overflow: hidden; }
.capture-guide::before { content: "04"; position: absolute; left: 13px; top: -9px; color: rgba(201,242,105,.18); font: 700 74px "Barlow Condensed"; }
.capture-guide span { color: var(--lime); font-size: 11px; font-weight: 700; }
.capture-guide p { margin: 4px 0 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.65; }
.corner-grid { display: grid; gap: 9px; }
.corner-card { position: relative; display: grid; grid-template-columns: 96px 1fr; min-height: 132px; background: #e7e4d9; border: 1px solid transparent; overflow: hidden; }
.corner-card.ready { border-color: #8fae47; }
.corner-card.loading { opacity: .72; pointer-events: none; }
.corner-photo { position: relative; display: grid; place-items: center; border: 0; background: var(--ink-2); color: white; overflow: hidden; }
.corner-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.corner-photo b { z-index: 1; font: 700 40px "Barlow Condensed"; color: rgba(255,255,255,.25); }
.corner-photo span { position: absolute; z-index: 2; bottom: 7px; left: 7px; background: var(--signal); padding: 3px 6px; font-size: 9px; }
.corner-card input[type=file] { display: none; }
.corner-info { padding: 10px 11px; min-width: 0; }
.corner-info header { display: flex; justify-content: space-between; align-items: center; }
.corner-info h3 { margin: 0; font: 700 17px "Barlow Condensed"; }
.corner-status { color: var(--muted); font-size: 9px; }
.corner-status.ok { color: #557718; }
.coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.coordinate-fields label { min-width: 0; font-size: 9px; color: var(--muted); }
.coordinate-fields input { font-size: 13px; padding: 5px 0; }
.retry-label { display: inline-block; margin-top: 7px; color: var(--signal-dark); font-size: 10px; text-decoration: underline; }
.commit-btn { width: 100%; min-height: 62px; margin-top: 12px; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; background: var(--signal); color: white; }
.commit-btn:disabled { background: #cbc8bd; color: #7d7b74; }
.commit-btn span { font-size: 12px; }
.commit-btn b { font-size: 16px; }

.step-rail { height: 54px; margin: 0; padding: 0 10px; list-style: none; display: grid; grid-template-columns: repeat(5,1fr); background: var(--ink-2); color: rgba(255,255,255,.43); }
.step-rail li { position: relative; display: grid; place-items: center; font-size: 10px; border-bottom: 3px solid transparent; }
.step-rail li.done { color: var(--lime); }
.step-rail li.active { color: white; border-bottom-color: var(--signal); font-weight: 700; }
.workflow-map { height: 31vh; min-height: 220px; background: #27312c; border-bottom: 4px solid var(--ink); }
.workflow-map-shell { position: relative; }
.workflow-map.pick-mode, #map.pick-mode { cursor: crosshair; }
.map-pick-hint { position: absolute; z-index: 500; left: 12px; right: 12px; bottom: 12px; min-height: 50px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 7px 8px; background: var(--ink); color: white; }
.map-pick-hint > span { display: grid; place-items: center; width: 32px; height: 32px; background: var(--signal); font-size: 20px; }
.map-pick-hint b { font-size: 12px; }
.map-pick-hint button { min-height: 34px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: white; font-size: 11px; }
.workflow-map .leaflet-control-attribution { margin-bottom: 0 !important; }
.workflow-body { max-width: 720px; margin: 0 auto; padding: 16px; }
.workflow-kicker { margin: 0 0 3px; color: var(--signal-dark); font: 700 11px "Barlow Condensed"; letter-spacing: .16em; }
.workflow-title { margin: 0 0 6px; font-size: 23px; }
.workflow-help { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.workflow-form { padding: 16px; background: #e5e1d5; border-top: 4px solid var(--signal); }
.workflow-form label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.workflow-form input, .yard-identity input, .editor-controls input, .editor-controls select { width: 100%; border: 0; border-bottom: 1px solid #a9a69c; background: transparent; padding: 9px 0; color: var(--ink); font: 600 17px "Barlow Condensed"; }
.survey-point-list { display: grid; gap: 8px; }
.survey-point { display: grid; grid-template-columns: 76px 1fr; min-height: 112px; background: #e6e3d8; border: 1px solid transparent; }
.survey-point.ready { border-color: #8da945; }
.survey-point.selected { outline: 3px solid var(--signal); outline-offset: -3px; }
.survey-shot { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--ink-2); color: white; }
.survey-shot input { display: none; }
.survey-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.survey-shot b { z-index: 1; color: var(--lime); font: 700 30px "Barlow Condensed"; }
.survey-shot small { z-index: 2; position: absolute; bottom: 5px; background: var(--signal); padding: 2px 5px; font-size: 8px; }
.survey-point-info { padding: 10px; }
.survey-point-info header { display: flex; justify-content: space-between; gap: 10px; }
.survey-point-info h3 { margin: 0; font-size: 15px; }
.survey-status { color: var(--muted); font-size: 9px; }
.survey-status.ok { color: #577719; font-weight: 700; }
.survey-source { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.survey-source small { min-width: 0; color: var(--muted); font-size: 9px; }
.survey-source small b, .survey-source small span { display: block; }
.survey-source small b { margin-bottom: 2px; color: #577719; font-size: 10px; }
.survey-source-actions { flex: 0 0 auto; display: flex; gap: 5px; }
.point-upload-btn { min-height: 32px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--signal); color: var(--signal-dark); font-size: 10px; font-weight: 700; }
.point-upload-btn input { display: none; }
.measurement-error { display: block; margin-top: 5px; color: #a72a18; font-size: 9px; }
.map-pick-btn { min-height: 32px; border: 0; background: var(--ink); color: var(--lime); padding: 0 10px; font-size: 10px; font-weight: 700; }
.map-pick-btn.active { background: var(--signal); color: white; }
.fit-card { padding: 15px; background: var(--ink-2); color: white; margin-bottom: 12px; }
.fit-card header { display: flex; justify-content: space-between; align-items: start; }
.fit-card h3 { margin: 0; font-size: 18px; }
.fit-card strong { color: var(--lime); font: 700 22px "Barlow Condensed"; }
.fit-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 12px; background: rgba(255,255,255,.15); }
.fit-metrics div { padding: 9px; background: var(--ink-2); }
.fit-metrics small, .fit-metrics b { display: block; }
.fit-metrics small { color: rgba(255,255,255,.5); font-size: 8px; }
.fit-metrics b { margin-top: 3px; font: 600 15px "Barlow Condensed"; }
.edge-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin: 12px 0; }
.edge-grid button { min-height: 50px; border: 1px solid var(--line); background: #e2dfd4; font: 700 16px "Barlow Condensed"; }
.edge-grid button.active { background: var(--signal); color: white; border-color: var(--signal); }
.edge-choice-label { display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
.selected-edge-summary { min-height: 58px; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 12px; background: #17221d; color: white; }
.selected-edge-summary b { color: var(--lime); font: 700 20px "Barlow Condensed"; }
.selected-edge-summary span { font-size: 11px; line-height: 1.5; }
.baseline-label { border: 0 !important; background: #17221d !important; color: var(--lime) !important; box-shadow: none !important; font-size: 10px !important; font-weight: 700 !important; }
.baseline-label::before { display: none !important; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 12px; background: #e5e2d7; margin-bottom: 12px; }
.toggle-row input { width: 24px; height: 24px; accent-color: var(--signal); }
.divider-capture-panel { margin-bottom: 12px; padding: 12px; background: #e4e1d6; }
.divider-capture-panel header { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-bottom: 10px; }
.divider-capture-panel header span, .divider-capture-panel header small { font-size: 9px; color: var(--muted); }
.divider-capture-panel header b { grid-row: span 2; color: var(--signal-dark); font: 700 28px "Barlow Condensed"; }
.divider-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.divider-camera, .divider-upload { min-height: 62px; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; font-weight: 700; }
.divider-camera { background: var(--signal); color: white; }
.divider-upload { border: 2px dashed var(--signal); background: rgba(255,91,37,.06); color: var(--signal-dark); }
.divider-camera input, .divider-upload input { display: none; }
.divider-list { display: grid; gap: 6px; margin-bottom: 12px; }
.divider-map-add { width: 100%; min-height: 46px; margin-top: 6px; border: 0; background: var(--ink); color: white; font-weight: 700; }
.divider-map-add.active { background: var(--signal); }
.divider-row { display: grid; grid-template-columns: 45px 1fr auto; gap: 10px; align-items: center; padding: 10px; background: #e4e1d6; }
.divider-row > b { color: var(--signal-dark); font: 700 18px "Barlow Condensed"; }
.divider-row span { font-size: 11px; }
.divider-row small { color: var(--muted); }
.yard-identity-list { display: grid; gap: 6px; margin: 12px 0; }
.yard-identity { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 8px; align-items: end; padding: 9px; background: #e6e2d6; }
.yard-identity > b { color: var(--signal-dark); font: 700 18px "Barlow Condensed"; }
.yard-identity label { min-width: 0; color: var(--muted); font-size: 8px; }
.yard-identity input { font-size: 13px; padding: 5px 0; }
.workflow-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 12px; }
.workflow-actions .ghost-btn { min-width: 96px; }
.correction-mode .step-rail { display: none; }
.locked-corners { min-height: 50px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #d9d6cb; }
.locked-corners b { color: var(--signal-dark); font-size: 12px; }
.locked-corners span { color: var(--muted); font-size: 10px; }
.correction-summary { margin-top: 12px; }
.workflow-actions .primary-btn:disabled { background: #cbc8bd; color: #777b77; }

.editor-map { height: 38vh; }
.editor-mode-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin-bottom: 12px; }
.editor-mode-grid button { min-height: 45px; border: 1px solid var(--line); background: #e3e0d5; font-size: 11px; }
.editor-mode-grid button.active { background: var(--ink); color: var(--lime); }
.editor-controls { padding: 14px; background: #e7e4d9; margin-bottom: 9px; }
.editor-controls label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 10px; }
.delta-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-top: 8px; }
.delta-presets button { min-height: 40px; border: 0; background: #d5d2c7; font: 700 13px "Barlow Condensed"; }
.impact-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 12px 0; background: var(--line); }
.impact-summary div { background: var(--paper); padding: 9px; }
.impact-summary small, .impact-summary b { display: block; }
.impact-summary small { color: var(--muted); font-size: 8px; }
.impact-summary b { margin-top: 3px; font: 700 16px "Barlow Condensed"; }
.compare-key { display: flex; gap: 12px; margin: 8px 0; color: var(--muted); font-size: 10px; }
.compare-key i { display: inline-block; width: 18px; height: 3px; margin-right: 4px; vertical-align: middle; }
.compare-key .before { background: #a7aaa7; }
.compare-key .after { background: var(--lime); }

.region-danger-zone { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(167,42,24,.35); }
.region-danger-zone h2 { margin: 0 0 4px; color: #8d2315; font-size: 16px; }
.region-danger-zone p { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.region-delete-btn { width: 100%; min-height: 49px; border: 1px solid #a72a18; background: transparent; color: #8d2315; font-weight: 700; }

.confirm-dialog { width: min(90vw, 390px); border: 0; padding: 0; background: var(--paper); box-shadow: 0 24px 80px rgba(0,0,0,.42); }
.confirm-dialog::backdrop { background: rgba(6,11,9,.7); backdrop-filter: blur(4px); }
.confirm-dialog form { padding: 24px; }
.confirm-dialog h2 { margin: 8px 0; }
.confirm-dialog p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-dialog label { display: block; font-size: 11px; color: var(--muted); margin: 16px 0; }
.confirm-dialog form > div { display: flex; justify-content: flex-end; gap: 8px; }
.danger-icon { display: grid; place-items: center; width: 38px; height: 38px; background: #b92d19; color: white; font: 700 23px "Barlow Condensed"; clip-path: polygon(50% 0,100% 100%,0 100%); padding-top: 8px; }

.toast-stack { position: fixed; z-index: 1000; top: calc(84px + env(safe-area-inset-top, 0px)); left: 14px; right: 14px; display: grid; justify-items: center; gap: 7px; pointer-events: none; }
.toast { max-width: 460px; background: var(--ink); color: white; border-left: 4px solid var(--lime); padding: 11px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.24); font-size: 12px; animation: toast-in .28s ease-out; }
.toast.error { border-left-color: var(--signal); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-9px); } }

@media (min-width: 760px) {
  .search-rail { left: 24px; }
  .bottom-nav { width: 340px; left: 50%; transform: translateX(-50%); bottom: 18px; border-radius: 4px; height: 64px; padding-bottom: 4px; box-shadow: 0 14px 42px rgba(0,0,0,.36); }
  .add-point { right: 24px; bottom: 26px; }
  .nearby-hint { left: 24px; bottom: 26px; }
  .bottom-sheet { left: auto; width: 460px; right: 22px; bottom: 94px; border-radius: 10px; max-height: 72vh; padding-bottom: 24px; transform: translateY(calc(100% + 120px)); }
  .tall-sheet { height: 72vh; }
  .capture-panel { left: auto; width: 520px; box-shadow: -24px 0 60px rgba(0,0,0,.32); }
  .workflow-panel { left: auto; width: 620px; box-shadow: -24px 0 60px rgba(0,0,0,.32); }
  .data-grid { grid-template-columns: 1fr; }
}

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