:root {
  --bg: #f5f4ef;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #5f6b62;
  --accent: #2f6b3f;
  --accent-dark: #214d2d;
  --border: #d9ddd5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  padding: 18px 22px;
  background: var(--accent);
  color: white;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.topbar p {
  margin: 0;
  opacity: 0.95;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 420px;
  gap: 18px;
  padding: 18px;
  min-height: calc(100vh - 92px);
}

.map-card, .form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}

#map {
  width: 100%;
  height: 60vh;
  min-height: 360px;
  border-radius: 12px;
}

.hint {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}

.form-card {
  padding: 18px;
  overflow: auto;
}

h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

label {
  display: block;
  margin-bottom: 13px;
  font-weight: 650;
}

input, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  background: white;
}

textarea { resize: vertical; }

button {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 750;
  font-size: 1rem;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.55; cursor: wait; }

.status {
  min-height: 1.2em;
  font-weight: 650;
}

.status.ok { color: #216b38; }
.status.err { color: #9a2d22; }

.smallprint {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .layout {
    display: flex;
    flex-direction: column;
    padding: 10px;
    min-height: auto;
  }

  .map-card {
    width: 100%;
    display: block;
    margin-bottom: 14px;
  }

  #map {
    width: 100%;
    height: 65vh;
    min-height: 420px;
    display: block;
    border-radius: 12px;
  }

  .form-card {
    width: 100%;
    max-height: none;
    overflow: visible;
  }
}