body {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Independent field-management screens */
.field-page-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 18px 22px 28px;
}

.field-list-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 620px) auto auto minmax(112px, auto);
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.area-display-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.area-unit-control {
  display: grid;
  grid-template-columns: auto minmax(76px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.area-unit-control select {
  min-width: 76px;
  min-height: 42px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: #fff;
  color: var(--text);
  font: inherit;
}

.field-list-search input {
  width: 100%;
  min-height: 44px;
}

.field-list-panel {
  overflow: hidden;
}

.field-list-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.field-list-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.field-list-table th,
.field-list-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.field-list-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-list-table th:nth-child(1) { width: 18%; }
.field-list-table th:nth-child(2) { width: 25%; }
.field-list-table th:nth-child(3) { width: 15%; }
.field-list-table th:nth-child(4) { width: 11%; }
.field-list-table th:nth-child(5) { width: 11%; }
.field-list-table th:nth-child(6) { width: 20%; }

.field-list-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.field-row-actions,
.field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.field-state-ready { background: #dcfce7; color: #166534; }
.field-state-pending { background: #fef3c7; color: #92400e; }
.field-state-deleted { background: #fee2e2; color: #991b1b; }
.field-row-deleted { opacity: 0.68; }

.registration-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.registration-progress li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.registration-progress li > span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
}

.registration-progress li.is-current {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}

.registration-progress li.is-current > span,
.registration-progress li.is-done > span {
  background: #16a34a;
  color: #fff;
}

.registration-step-panel { display: grid; gap: 14px; }
.step-kicker { margin: 0 0 3px; color: #166534; font-size: 0.78rem; font-weight: 800; }

.location-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.location-methods legend {
  width: 100%;
  margin-bottom: 8px;
  font-weight: 700;
}

.location-methods label { position: relative; display: block; min-width: 0; cursor: pointer; }
.location-methods input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.location-methods label > span {
  display: grid;
  gap: 4px;
  min-height: 80px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.location-methods label > span::before { content: "○"; color: #64748b; font-weight: 800; }
.location-methods input:checked + span { border-color: #16a34a; background: #f0fdf4; }
.location-methods input:checked + span::before { content: "●"; color: #16a34a; }
.location-methods input:focus-visible + span { outline: 3px solid rgba(22, 163, 74, 0.25); outline-offset: 2px; }
.location-methods strong { font-size: 0.88rem; white-space: nowrap; }
.location-methods small { color: var(--muted); line-height: 1.35; }

.location-method-panel { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; }
.coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.location-instruction { display: grid; gap: 3px; padding: 12px; border-left: 4px solid #16a34a; background: #f0fdf4; }
.location-instruction span { color: var(--muted); font-size: 0.86rem; }
.address-search-results { display: grid; gap: 7px; }
.address-search-result { display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.address-search-result:hover { border-color: #16a34a; background: #f0fdf4; }
.address-search-result span { color: var(--muted); font-size: 0.78rem; }
.selected-location-summary { display: grid; gap: 3px; min-height: 58px; padding: 11px 12px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; }
.selected-location-summary span { color: var(--muted); font-size: 0.82rem; }
.registration-next { width: 100%; }
.registration-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.registration-actions .button { width: 100%; }
.required-label, .optional-label { margin-left: 5px; font-size: 0.72rem; font-style: normal; font-weight: 700; }
.required-label { color: #b91c1c; }
.optional-label { color: var(--muted); }
.map-location-pick { cursor: crosshair; }

.field-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.field-editor-map-panel,
.field-editor-form-panel {
  min-width: 0;
}

.field-editor-map-wrap {
  position: relative;
  height: clamp(430px, 62dvh, 720px);
  min-height: 430px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.field-editor-map-wrap .map {
  width: 100%;
  height: 100%;
}

.field-shape-actions { margin-top: 12px; }
.field-primary-actions { margin-top: 14px; }
.field-primary-actions .button { flex: 1 1 150px; }

.field-editor-form-panel {
  position: sticky;
  top: 102px;
}

.field-editor-form-panel .field-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-span-full { grid-column: 1 / -1; }
.field-record-management { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.field-record-management .field-actions { margin-top: 10px; }
.field-point-label { background: #fff; border: 0; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25); font-weight: 700; }

.satellite-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.satellite-map-panel { min-width: 0; }
.satellite-map-panel > .section-head { align-items: flex-start; }
.satellite-control-bar { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 14px; align-items: end; margin-bottom: 16px; }
.satellite-layer-switch { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; }
.satellite-layer-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.satellite-layer-switch label { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.satellite-map-wrap { position: relative; height: clamp(470px, 66dvh, 760px); min-height: 470px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; }
.satellite-map-wrap .map { width: 100%; height: 100%; }
.satellite-map-state { position: absolute; z-index: 500; top: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 28px); padding: 9px 12px; border-radius: 6px; background: rgba(15, 23, 42, 0.9); color: #fff; font-weight: 700; text-align: center; }
.satellite-inspector { display: grid; gap: 14px; min-width: 0; }
.satellite-inspector #syncSatelliteButton { flex: 0 0 auto; white-space: nowrap; }
.satellite-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 12px 0 0; background: var(--border); border: 1px solid var(--border); }
.satellite-metrics div { min-width: 0; padding: 11px; background: #fff; }
.satellite-metrics dt { color: var(--muted); font-size: 0.76rem; }
.satellite-metrics dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.satellite-photo-frame { margin: 0; }
.satellite-photo-frame img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #111827; }
.satellite-photo-frame figcaption { margin-top: 8px; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.satellite-photo-empty { padding: 18px; background: #f8fafc; color: var(--muted); text-align: center; }
.satellite-history-list { display: grid; }
.satellite-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.satellite-history-row time { grid-column: 1 / -1; color: var(--muted); font-size: 0.78rem; }
.growth-legend-scale i { display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; border-radius: 2px; }
.satellite-sync-progress { display: grid; gap: 9px; margin-top: 12px; padding: 12px; border: 1px solid #93c5fd; border-radius: 6px; background: #eff6ff; }
.satellite-sync-progress[hidden] { display: none; }
.satellite-sync-progress-head { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.satellite-sync-progress-head strong { min-width: 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.satellite-sync-progress-head > :last-child { font-weight: 800; color: #1d4ed8; }
.satellite-sync-spinner { width: 16px; height: 16px; border: 2px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: satellite-sync-spin 0.8s linear infinite; }
.satellite-sync-progress-track { position: relative; width: 100%; height: 12px; overflow: hidden; border-radius: 4px; background: #dbeafe; }
.satellite-sync-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #2563eb; transition: width 300ms ease; }
.satellite-sync-progress.is-indeterminate .satellite-sync-progress-track span { animation: satellite-sync-indeterminate 1.2s ease-in-out infinite; }
.satellite-sync-progress-meta { display: grid; gap: 3px; color: #475569; font-size: 0.78rem; }
.satellite-sync-progress.is-complete { border-color: #86efac; background: #f0fdf4; }
.satellite-sync-progress.is-complete .satellite-sync-spinner { border-color: #16a34a; animation: none; }
.satellite-sync-progress.is-complete .satellite-sync-progress-track span { background: #16a34a; }
.satellite-sync-progress.is-failed { border-color: #fecaca; background: #fef2f2; }
.satellite-sync-progress.is-failed .satellite-sync-spinner { border-color: #dc2626; animation: none; }
.button.is-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 50%; animation: satellite-sync-spin 0.8s linear infinite; }
@keyframes satellite-sync-spin { to { transform: rotate(360deg); } }
@keyframes satellite-sync-indeterminate { from { transform: translateX(-120%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .satellite-sync-spinner, .button.is-loading::before, .satellite-sync-progress.is-indeterminate .satellite-sync-progress-track span { animation: none; } }

@media (max-width: 900px) {
  .field-page-content { padding: 14px; }
  .field-editor-layout { grid-template-columns: 1fr; }
  .field-editor-layout:has(#locationStep:not([hidden])) .field-editor-form-panel { order: -1; }
  .field-editor-form-panel { position: static; }
  .field-editor-map-wrap { height: 52dvh; min-height: 360px; }
  .satellite-layout { grid-template-columns: 1fr; }
  .satellite-inspector { grid-template-columns: 1fr 1fr; }
  .satellite-inspector > :first-child { grid-column: 1 / -1; }
  .satellite-map-wrap { height: 54dvh; min-height: 400px; }
}

@media (max-width: 640px) {
  .field-list-toolbar { grid-template-columns: 1fr 1fr; }
  .field-list-search { grid-column: 1 / -1; }
  .field-list-toolbar .area-unit-control { grid-column: 1 / -1; justify-self: end; }
  .area-display-toolbar { margin-top: -2px; }
  .field-list-table thead { display: none; }
  .field-list-table,
  .field-list-table tbody,
  .field-list-table tr,
  .field-list-table td { display: block; width: 100%; }
  .field-list-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .field-list-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 6px 12px; border: 0; }
  .field-list-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.78rem; font-weight: 700; }
  .field-row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .field-row-actions .button { width: 100%; }
  .field-editor-map-wrap { height: 360px; min-height: 360px; }
  .field-editor-form-panel .field-form { grid-template-columns: 1fr; }
  .registration-progress li { min-height: 42px; padding: 7px 8px; font-size: 0.78rem; }
  .registration-progress li > span { flex-basis: 24px; width: 24px; height: 24px; }
  .location-methods { grid-template-columns: 1fr; }
  .location-methods label > span { min-height: 0; }
  .coordinate-fields, .registration-actions { grid-template-columns: 1fr; }
  .field-span-full { grid-column: auto; }
  .satellite-control-bar { grid-template-columns: 1fr; }
  .satellite-map-panel > .section-head { align-items: flex-start; flex-direction: column; }
  .satellite-layer-switch { width: 100%; }
  .satellite-map-wrap { height: 360px; min-height: 360px; }
  .satellite-inspector { grid-template-columns: 1fr; }
  .satellite-inspector > :first-child { grid-column: auto; }
  .satellite-metrics { grid-template-columns: 1fr 1fr; }
}

:root {
  --field-sidebar-width: clamp(180px, 13vw, 224px);
  --field-workspace-gap: clamp(10px, 1vw, 18px);
  --field-topbar-offset: 88px;
  --field-topbar-padding: 16px 22px;
  --field-topbar-gap: 14px;
  --field-topbar-actions-gap: 12px;
  --field-title-font-size: 1.3rem;
  --field-title-line-height: 1.2;
}

.field-app-shell {
  display: block;
  min-height: 100dvh;
  background: #eef2f7;
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--field-sidebar-width);
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  z-index: 700;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #16a34a 0 48%, #84cc16 48% 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(5, 150, 105, 0.28);
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  transform: skew(-10deg) rotate(-6deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 4px solid #f8fafc;
  border-right: 4px solid #f8fafc;
  border-radius: 2px;
  transform: translate(1px, -1px) rotate(45deg);
  filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.24));
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.875rem;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.sidebar-group {
  margin: 6px 0 12px;
}

.sidebar-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.sidebar-group-title:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-group-title::after {
  content: "▸";
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.7);
}

.sidebar-group[open] .sidebar-group-title::after {
  content: "▾";
}

.sidebar-group-title::-webkit-details-marker {
  display: none;
}

.sidebar-group-links {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.sidebar-group-links .sidebar-link {
  padding-left: 24px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-link-active {
  background: rgba(34, 197, 94, 0.16);
  color: #f8fafc;
  box-shadow: inset 3px 0 0 #22c55e;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
}

.sidebar-footer .button {
  white-space: nowrap;
  font-size: 0.92rem;
}

.sidebar-mobile-menu {
  display: block;
}

.sidebar-mobile-summary {
  display: none;
  pointer-events: none;
}

.sidebar-mobile-content {
  display: grid;
  gap: 18px;
}

.button-block {
  width: 100%;
}

.workspace-shell {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  min-height: 100dvh;
  margin-left: var(--field-sidebar-width);
  width: calc(100% - var(--field-sidebar-width));
  max-width: none;
  overflow-x: clip;
}

.field-topbar {
  margin: 0;
  padding: var(--field-topbar-padding);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  min-width: 0;
  gap: var(--field-topbar-gap);
  position: sticky;
  top: 0;
  z-index: 520;
}

.page-title-block {
  min-width: 0;
  flex: 1 1 320px;
}

.page-title-block h1 {
  font-size: var(--field-title-font-size);
  line-height: var(--field-title-line-height);
  overflow-wrap: anywhere;
}

.topbar-actions-tight {
  gap: var(--field-topbar-actions-gap);
  min-width: 0;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.icon-button {
  position: relative;
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-weight: 700;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button-badge {
  overflow: visible;
}

.icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

.user-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.user-role {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.2;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(292px, 22vw, 360px);
  gap: var(--field-workspace-gap);
  min-width: 0;
  min-height: 0;
  flex: 1;
  padding: 22px 16px 16px;
  overflow: visible;
  align-items: start;
}

.workspace-content {
  display: grid;
  gap: var(--field-workspace-gap);
  min-width: 0;
  padding: 16px;
  align-items: start;
}

.workspace-content-wide {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-content-split {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 28vw, 420px);
}

.workspace-main,
.workspace-aside {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}

.workspace-page-card {
  margin-bottom: 0;
}

.map-stage {
  display: flex;
  min-width: 0;
  min-height: 0;
}

.map-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: calc(100dvh - var(--field-topbar-offset) - 48px);
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.map-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-search {
  display: block;
  min-width: 0;
}

.map-search input {
  height: 50px;
  border-radius: 12px;
  border-color: #d1d5db;
  padding-left: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.map-canvas-wrap {
  flex: 1;
  min-height: calc(100dvh - var(--field-topbar-offset) - 72px);
  position: relative;
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #dbeafe;
}

.map-loading-state {
  position: absolute;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.94), rgba(226, 232, 240, 0.92));
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0;
}

.map-loading-state[hidden] {
  display: none;
}

.selected-field-badge {
  position: absolute;
  top: 66px;
  right: 12px;
  z-index: 480;
  min-width: 180px;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 12px;
  background: rgba(240, 253, 244, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  color: #14532d;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

.selected-field-badge[hidden] {
  display: none;
}

.map-mode-badge {
  position: absolute;
  top: 66px;
  left: 12px;
  z-index: 480;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  pointer-events: none;
}

.map-mode-badge[hidden] {
  display: none;
}

.map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.map-overlay > * {
  pointer-events: auto;
}

.map-overlay .map-search {
  flex: 1;
  min-width: 0;
}

.map-overlay .button {
  flex: 0 0 auto;
  white-space: nowrap;
  box-shadow: none;
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - var(--field-topbar-offset) - 72px);
}

.leaflet-container {
  background: #f8fafc;
}

.leaflet-tile-pane {
  filter: saturate(1.35) contrast(1.12) brightness(0.94);
}

.leaflet-fade-anim .leaflet-tile {
  opacity: 1;
}

.inspector-column {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-height: calc(100dvh - var(--field-topbar-offset) - 36px);
  overflow: auto;
  padding-right: 2px;
  align-content: start;
  scrollbar-gutter: stable;
}

.inspector-card {
  margin-bottom: 0;
}

.inspector-card .section-head {
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.inspector-card .section-head h2 {
  font-size: 1rem;
  line-height: 1.25;
}

.field-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field-form-single {
  grid-template-columns: minmax(0, 1fr);
}

.field-form .field > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.mode-switch .button-current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.field-form > .field:last-child {
  grid-column: 1 / -1;
}

.field-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.field-actions-tight {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.task-list {
  gap: 10px;
}

.task-card {
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.point-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.summary {
  min-height: 40px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.inspector-card:first-child .summary {
  color: var(--text);
  font-weight: 500;
}

.inspector-primary-link {
  margin-top: 12px;
}

.radio-stack {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.radio-stack legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.radio-stack label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  line-height: 1.35;
}

.radio-stack input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.growth-legend {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #d9e8dd;
  border-radius: 8px;
  background: #f8fbf6;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
}

.growth-legend-title {
  font-weight: 800;
  color: #14532d;
}

.growth-legend-current,
.growth-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 700;
  flex-wrap: wrap;
}

.growth-legend-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.growth-legend-scale span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.growth-legend-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.satellite-photo-preview {
  margin-top: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
}

.satellite-photo-frame {
  display: grid;
  gap: 0;
  margin: 0;
}

.satellite-photo-frame img {
  display: block;
  width: 100%;
  min-height: 128px;
  max-height: 240px;
  object-fit: contain;
  background: #020617;
  image-rendering: auto;
}

.sentinel-map-overlay {
  image-rendering: auto;
}

.ndvi-map-overlay,
.satellite-photo-frame .ndvi-preview-image {
  image-rendering: pixelated;
}

.satellite-photo-frame figcaption,
.satellite-photo-empty {
  padding: 9px 11px;
  line-height: 1.35;
}

.satellite-photo-frame figcaption {
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
}

.map-popup {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: #0f172a;
  line-height: 1.35;
}

.range-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.range-field span,
.range-field input {
  grid-column: 1 / -1;
}

.range-field input {
  accent-color: var(--primary);
}

.range-field output {
  color: var(--text);
  font-weight: 700;
}

.catalog-card .task-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.catalog-card .task-card:not(.task-card-selected) .task-grid {
  display: none;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.task-grid,
.point-row {
  overflow-wrap: anywhere;
}

.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;
}

@media (max-width: 960px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 16px;
  }

  .workspace-content,
  .workspace-content-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-stage {
    min-height: 46vh;
  }

  .map-panel {
    height: auto;
    min-height: 46vh;
  }

  .inspector-column {
    overflow: visible;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .sidebar {
    padding: 14px 12px;
    gap: 14px;
  }

  .brand-lockup {
    padding: 4px 4px 12px;
    gap: 8px;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    font-size: 0.74rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .sidebar-link {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.92rem;
  }

  .workspace-grid {
    padding: 10px;
    gap: 10px;
  }

  .map-status {
    padding: 8px 8px 0;
  }

  .map-canvas-wrap {
    margin: 8px;
    border-radius: 14px;
  }

  .inspector-column {
    gap: 8px;
  }

  .inspector-card {
    padding: 11px 12px;
  }

  .section-head {
    margin-bottom: 8px;
  }

  .task-card {
    padding: 9px 10px;
  }

  .field-form {
    gap: 8px;
  }

  .field-actions {
    margin-top: 8px;
  }

  .map-panel {
    position: sticky;
    top: var(--field-topbar-offset);
    max-height: calc(100dvh - var(--field-topbar-offset) - 16px);
    z-index: 20;
  }
}

@media (min-width: 761px) and (max-width: 860px) and (min-height: 700px) {
  .field-topbar {
    --field-topbar-padding: 10px 14px;
    --field-topbar-gap: 8px;
  }

  .page-title-block h1 {
    --field-title-font-size: 1.05rem;
    --field-title-line-height: 1.15;
  }

  .user-chip {
    display: none;
  }

  .topbar-actions-tight {
    --field-topbar-actions-gap: 8px;
  }
}

@media (min-width: 761px) and (max-width: 960px) {
  .field-topbar {
    --field-topbar-padding: 8px 12px;
    --field-topbar-gap: 6px;
  }

  .page-title-block .eyebrow {
    display: none;
  }

  .page-title-block h1 {
    --field-title-font-size: 0.98rem;
    --field-title-line-height: 1.1;
  }

  .topbar-actions-tight {
    --field-topbar-actions-gap: 6px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.92fr);
    gap: 6px;
    padding: 8px;
  }

  .map-panel {
    min-height: clamp(320px, 54dvh, 620px);
  }

  .map-canvas-wrap,
  .map {
    min-height: clamp(240px, 36dvh, 500px);
  }

  .inspector-column {
    gap: 8px;
  }

  .inspector-card {
    padding: 10px;
  }

  .section-head {
    margin-bottom: 8px;
  }

  .task-card {
    padding: 10px;
  }
}

@media (min-width: 1121px) and (max-width: 1440px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(272px, 23vw);
    gap: clamp(10px, 0.8vw, 14px);
  }

  .map-panel {
    min-height: clamp(440px, 68dvh, 800px);
  }

  .map-canvas-wrap,
  .map {
    min-height: clamp(320px, 48dvh, 680px);
  }
}

@media (min-width: 1121px) and (max-width: 1240px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(260px, 24vw);
  }
}

@media (min-width: 1121px) {
  .map-panel {
    position: sticky;
    top: 12px;
    align-self: start;
  }

  .inspector-column {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 2px;
  }

  .workspace-shell {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .field-topbar {
    --field-topbar-padding: 12px 16px;
    --field-topbar-gap: 10px;
    --field-title-font-size: 1.06rem;
    --field-title-line-height: 1.25;
    flex-direction: column;
    align-items: stretch;
    position: static;
  }

  .page-title-block {
    flex: 0 0 auto;
  }

  body {
    overflow: auto;
  }

  .field-app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    order: 0;
    width: auto;
    grid-template-rows: auto;
    gap: 8px;
    padding: 12px 12px 14px;
  }

  .workspace-shell {
    order: 1;
    margin-left: 0;
    width: auto;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    overflow: visible;
  }

  .map-stage {
    min-height: 50vh;
  }

  .map-panel {
    height: auto;
    min-height: 50vh;
  }

  .map-status {
    padding: 10px 10px 0;
  }

  .map-canvas-wrap {
    min-height: 42vh;
    margin: 10px;
  }

  .map {
    min-height: 42vh;
  }

  .map-overlay {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
  }

  .map-mode-badge {
    top: 66px;
    bottom: auto;
    left: 10px;
    right: auto;
    min-width: 0;
    max-width: none;
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .selected-field-badge {
    top: 10px;
    bottom: auto;
    left: 10px;
    right: 10px;
    max-width: none;
    box-shadow: none;
  }

  .page-title-block h1 {
    overflow-wrap: anywhere;
  }

  .page-title-block .eyebrow {
    font-size: 0.8rem;
  }

  .sidebar-mobile-menu {
    display: grid;
    gap: 10px;
  }

  .sidebar-mobile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
    pointer-events: auto;
  }

  .sidebar-mobile-summary:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
  }

  .sidebar-mobile-summary::after {
    content: "▾";
    font-size: 1rem;
    line-height: 1;
    opacity: 0.9;
  }

  .sidebar-mobile-menu[open] .sidebar-mobile-summary::after {
    content: "▴";
  }

  .sidebar-mobile-summary::-webkit-details-marker {
    display: none;
  }

  .sidebar-mobile-content {
    display: none;
    gap: 8px;
  }

  .sidebar-mobile-menu[open] .sidebar-mobile-content {
    display: grid;
  }

  .sidebar-mobile-menu:not([open]) .sidebar-mobile-summary::after {
    content: "▾";
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 6px;
  }

  .sidebar-group {
    display: block;
    grid-column: 1 / -1;
    margin: 0;
  }

  .sidebar-group-title {
    min-height: 36px;
    padding: 0 9px;
    font-size: 0.86rem;
  }

  .sidebar-group-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 6px;
  }

  .sidebar-group-links .sidebar-link {
    padding-left: 9px;
  }

  .sidebar-link {
    min-height: 36px;
    padding: 0 9px;
    font-size: 0.86rem;
    border-radius: 8px;
  }

  .sidebar-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .topbar-actions-tight {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    --field-topbar-actions-gap: 8px;
    align-items: center;
  }

  .user-chip {
    display: none;
  }

  .user-name {
    font-size: 0.9rem;
  }

  .user-role {
    font-size: 0.75rem;
  }

  .field-form,
  .field-actions {
    grid-template-columns: 1fr;
  }

  .field-actions-tight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .field-topbar {
    --field-topbar-padding: 8px 12px;
    --field-topbar-gap: 8px;
    --field-title-font-size: 0.9rem;
    --field-title-line-height: 1.2;
  }

  .page-title-block .eyebrow {
    display: none;
  }

  .page-title-block h1 {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  .icon-button {
    width: 36px;
    min-height: 36px;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .topbar-actions-tight {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    --field-topbar-actions-gap: 6px;
  }

  .user-avatar {
    width: 24px;
    height: 24px;
  }

  .user-role {
    display: none;
  }

  .map-canvas-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .map-overlay {
    position: static;
    inset: auto;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    align-items: stretch;
  }

  .map-overlay .button {
    width: 100%;
  }

  .map {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-height: 42vh;
    height: 42vh;
  }

  .map-loading-state {
    inset: 0;
  }

  .map-mode-badge,
  .selected-field-badge {
    position: static;
    inset: auto;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .brand-lockup {
    padding-bottom: 8px;
  }

  .sidebar {
    padding: 8px 8px 10px;
    gap: 4px;
  }

  .brand-subtitle {
    display: none;
  }

  .sidebar-mobile-summary {
    min-height: 38px;
    padding: 0 10px;
  }

  .sidebar-link {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .field-topbar {
    --field-topbar-padding: 4px 8px;
    --field-topbar-gap: 4px;
  }

  .page-title-block h1 {
    font-size: 0.9rem;
    line-height: 1.08;
  }

  .topbar-actions-tight {
    --field-topbar-actions-gap: 4px;
  }

  .icon-button {
    width: 40px;
    min-height: 40px;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .selected-field-badge {
    max-width: 240px;
    padding: 6px 8px;
    font-size: 0.78rem;
    line-height: 1.25;
  }
}

@media (max-width: 440px) and (min-height: 880px) {
  /* iPhone Plus / Max 系の縦持ちを少しだけ詰める。 */
  .field-topbar {
    --field-topbar-padding: 10px 12px;
    --field-topbar-gap: 6px;
    --field-title-font-size: 0.88rem;
    --field-title-line-height: 1.15;
  }

  .page-title-block .eyebrow {
    display: none;
  }

  .topbar-actions-tight {
    --field-topbar-actions-gap: 6px;
  }
}

@media (max-width: 920px) and (max-height: 500px) {
  .field-topbar {
    position: static;
    --field-topbar-padding: 8px 12px;
    --field-topbar-gap: 8px;
    --field-title-font-size: 1rem;
    --field-title-line-height: 1.1;
  }

  .page-title-block .eyebrow {
    display: none;
  }

  .topbar-actions-tight {
    --field-topbar-actions-gap: 8px;
  }

  .icon-button {
    width: 36px;
    min-height: 36px;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .user-chip {
    padding: 6px 10px 6px 8px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
  }

  .user-name {
    font-size: 0.82rem;
  }

  .user-role {
    display: none;
  }

  .workspace-grid {
    padding: 10px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .map-stage {
    min-height: 34vh;
  }

  .map-panel {
    min-height: 34vh;
  }

  .map-canvas-wrap {
    min-height: 24vh;
  }

  .map {
    min-height: 24vh;
  }

  .map-mode-badge {
    top: 10px;
    bottom: auto;
    max-width: 180px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .selected-field-badge {
    top: 10px;
    bottom: auto;
    max-width: 280px;
    padding: 8px 10px;
    font-size: 0.8rem;
    line-height: 1.3;
  }
}
