:root {
  --bg-main: #f3f1e9;
  --bg-panel: #f9f8f3;
  --ink: #132f2a;
  --ink-soft: #355b54;
  --accent: #ed7f2f;
  --accent-strong: #cb6218;
  --line: #d6d3c7;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 15%, #f8d6ad 0%, transparent 35%),
    radial-gradient(circle at 5% 90%, #d6eadf 0%, transparent 30%),
    var(--bg-main);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: 100vh;
  overflow: hidden;
}

.map-column {
  height: 100%;
  overflow: hidden;
}

#map {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 18px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-panel), #efece0 100%);
  height: 100%;
  overflow-y: auto;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.panel label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.panel select,
.panel input[type="range"] {
  width: 100%;
}

.panel select,
.panel input[type="text"] {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: inherit;
  background: #fffdf8;
}

.village-combobox {
  position: relative;
}

.village-combobox-control {
  position: relative;
  display: flex;
  align-items: center;
}

.village-search-trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 38px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: left;
}

.village-search-trigger.has-selection {
  color: var(--ink);
}

.village-search-trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.village-trigger-icon {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.village-clear-btn {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #e3dfd2;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.village-clear-btn:hover {
  background: #d2cdbf;
  color: var(--ink);
}

.village-search-dropdown {
  position: absolute;
  z-index: 500;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.village-search-dropdown.hidden,
.village-clear-btn.hidden {
  display: none;
}

.village-search-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.village-search-input-row span {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.village-search-input-row input {
  min-width: 0;
  flex: 1;
  padding: 6px 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
}

.village-search-helper {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #f5f1e7;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.village-search-results {
  max-height: 280px;
  overflow-y: auto;
}

.village-search-state {
  padding: 20px 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-align: center;
}

.village-search-state.error {
  color: #a94442;
}

.village-search-option {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.village-search-option:hover,
.village-search-option.selected {
  background: #ebe6d8;
}

.village-search-option-label {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.village-search-option-meta {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

.village-info {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.village-info.hidden {
  display: none;
}

.village-info.loading {
  background: #f0ede4;
  color: var(--ink-soft);
}

.village-info.success {
  background: #e6f4ea;
  border: 1px solid #a8dab5;
  color: #1e5631;
}

.village-info.error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #a94442;
}

.village-info p {
  margin: 4px 0;
}

.village-info .village-label {
  font-weight: 600;
  color: inherit;
  opacity: 0.7;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#detect-btn {
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

#detect-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(203, 98, 24, 0.3);
}

#detect-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.edit-existing-btn {
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.edit-existing-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(124, 58, 237, 0.3);
}

.edit-existing-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.save-boundary-btn {
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.save-boundary-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(75, 85, 99, 0.3);
}

.save-boundary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card {
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card p {
  margin: 6px 0;
  line-height: 1.35;
  font-size: 0.9rem;
}

.card progress {
  width: 100%;
  height: 10px;
  margin: 4px 0 2px;
}

.card span {
  font-weight: 700;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #0f3f3f;
}

/* Controls View */
.controls-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.controls-view.hidden {
  display: none;
}

/* Results View */
.results-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

.results-view.hidden {
  display: none;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.back-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.back-btn:hover {
  background: var(--bg-panel);
  border-color: var(--ink-soft);
}

.polygon-cards-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
  min-height: 0;
}

.polygon-card {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.polygon-card:hover {
  border-color: var(--ink-soft);
}

.polygon-card.selected {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(237, 127, 47, 0.2);
}

.polygon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.polygon-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.polygon-card-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.polygon-card-meta {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.polygon-delete-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #e0b4b4;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #a94442;
  background: #fdecea;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.polygon-delete-btn:hover {
  background: #f5c6cb;
  border-color: #a94442;
  transform: scale(1.05);
}

.polygon-card-field {
  margin-top: 8px;
}

.polygon-card-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.polygon-card-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fffdf8;
}

.polygon-card-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.save-btn {
  margin-top: auto;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.save-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(46, 125, 50, 0.3);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.push-btn {
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.push-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(21, 101, 192, 0.3);
}

.push-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.push-status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
}

.push-status.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.push-status.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.push-status .push-stat-row {
  display: flex;
  justify-content: space-between;
}

.push-status .push-stat-label {
  color: #4b5563;
}

.push-status .push-stat-value {
  font-weight: 600;
}

.push-status .push-issues {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.78rem;
  color: #92400e;
  max-height: 100px;
  overflow-y: auto;
}

.no-polygons-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Run Status Card clickable state */
#run-status-card.clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#run-status-card.clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(237, 127, 47, 0.15);
}

/* Polygon Popup Styles */
.polygon-popup-container .leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 8px 24px rgba(33, 50, 46, 0.2);
}

.polygon-popup-container .leaflet-popup-content {
  margin: 0;
  min-width: 180px;
}

.polygon-popup-container .leaflet-popup-tip {
  background: var(--card);
}

.polygon-popup {
  padding: 14px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.popup-field {
  margin-bottom: 12px;
}

.popup-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.popup-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fffdf8;
}

.popup-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.popup-delete-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e0b4b4;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a94442;
  background: #fdecea;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.popup-delete-btn:hover {
  background: #f5c6cb;
  border-color: #a94442;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.toast-notification.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-success {
  background: #1e5631;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 86, 49, 0.3);
}

.toast-notification.toast-error {
  background: #a94442;
  color: #fff;
  box-shadow: 0 4px 12px rgba(169, 68, 66, 0.3);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.mode-toggle button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--card);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.mode-toggle button:first-child {
  border-right: 1px solid var(--line);
}

.mode-toggle button:hover:not(.active) {
  background: var(--bg-panel);
}

.mode-toggle button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

/* Drawing Steps */
.drawing-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawing-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f3ed;
  transition: background 160ms ease, border 160ms ease;
}

.drawing-step.active {
  background: #fff3e0;
  border: 1px solid var(--accent);
}

.drawing-step.complete {
  background: #e6f4ea;
  border: 1px solid #a8dab5;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink-soft);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.drawing-step.complete .step-number {
  background: #2e7d32;
}

.drawing-step.active .step-number {
  background: var(--accent);
}

.step-label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--ink);
}

.step-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.drawing-step.complete .step-status {
  color: #2e7d32;
}

/* Checkbox Row */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-row label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

/* Training Button */
.training-btn {
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.training-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(59, 130, 246, 0.3);
}

.training-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Clear Button */
.clear-btn {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.clear-btn:hover {
  background: var(--bg-panel);
  border-color: var(--ink-soft);
}

/* Training Status Card Clickable */
#training-status-card.clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

#training-status-card.clickable:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Artifacts View */
.artifacts-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

.artifacts-view.hidden {
  display: none;
}

.artifacts-card {
  padding: 14px;
}

.artifact-field {
  margin-top: 6px;
}

.artifact-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.gcs-path {
  display: block;
  padding: 10px;
  background: #f5f3ed;
  border-radius: 6px;
  font-size: 0.75rem;
  word-break: break-all;
  user-select: all;
}

/* Metrics Grid */
.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
}

/* Logs Link */
.logs-link {
  display: block;
  margin-top: 6px;
  padding: 10px 14px;
  text-align: center;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease;
}

.logs-link:hover {
  background: #3b82f6;
  color: #fff;
}

/* OCR Button */
.ocr-btn {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.ocr-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(139, 92, 246, 0.3);
}

.ocr-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* OCR Section */
.ocr-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

/* OCR Status Badge */
.ocr-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ocr-badge.assigned {
  background: #dcfce7;
  color: #166534;
}

.ocr-badge.missing {
  background: #fecaca;
  color: #991b1b;
}

.ocr-badge.low-confidence {
  background: #fef3c7;
  color: #92400e;
}

.ocr-badge.not-in-db {
  background: #dbeafe;
  color: #1e40af;
}

/* Polygon card OCR status */
.polygon-card.ocr-missing {
  border-color: #ef4444;
  background: #fef2f2;
}

.polygon-card.ocr-low-confidence {
  border-color: #f59e0b;
  background: #fffbeb;
}

.polygon-card.ocr-assigned {
  border-color: #22c55e;
}

/* Polygon stats summary */
.polygon-stats {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.polygon-stats.hidden {
  display: none;
}

.polygon-stats .stat {
  padding: 4px 10px;
  border-radius: 4px;
}

.polygon-stats .stat.assigned {
  background: #dcfce7;
  color: #166534;
}

.polygon-stats .stat.missing {
  background: #fecaca;
  color: #991b1b;
}

.polygon-stats .stat.low-conf {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 60vh auto;
    height: auto;
    min-height: 100vh;
  }

  .map-column {
    height: 100%;
  }

  #map {
    height: 100%;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 14px 22px;
    height: auto;
    overflow-y: visible;
  }
}
