:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #64707d;
  --line: #d9dee5;
  --field: #f9fafb;
  --accent: #c51f2f;
  --accent-dark: #971725;
  --blue: #2563eb;
  --shadow: 0 18px 40px rgba(22, 32, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  min-height: 100vh;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 2;
}

.brand-row h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.brand-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field span {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

input {
  height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 220px;
  resize: vertical;
  padding: 11px;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: rgba(197, 31, 47, 0.7);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 31, 47, 0.12);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button,
.secondary-button {
  flex: 1;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: #1f5f8b;
  color: #ffffff;
}

.secondary-button:hover {
  background: #174a6f;
}

.ghost-button {
  background: #ffffff;
  color: #344054;
  border-color: var(--line);
}

.ghost-button:hover {
  border-color: #b9c0ca;
  background: #f7f8fa;
}

.status-panel {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.status-panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.4;
}

.status-panel dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.status-panel dl div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfd;
}

.status-panel dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.status-panel dd {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
}

#status-message {
  min-height: 42px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  background: #d7dde3;
}

#map {
  position: absolute;
  inset: 0;
}

.point-label {
  color: #e1262f;
  font-size: 15px;
  font-weight: 800;
  text-shadow:
    0 1px 0 #fff,
    1px 0 0 #fff,
    0 -1px 0 #fff,
    -1px 0 0 #fff;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }

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

@media (max-width: 540px) {
  .control-panel {
    padding: 18px;
  }

  .two-column,
  .status-panel dl {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
