* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef7f3;
  color: #222;
}

.app {
  display: grid;
  grid-template-columns: 310px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: white;
  padding: 20px;
  border-right: 3px solid #d8e6e0;
  box-shadow: 4px 0 12px rgba(0,0,0,0.08);
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 25px;
  margin: 0;
  color: #1d3557;
}

.sidebar h2 {
  font-size: 18px;
  margin-top: 8px;
  color: #457b9d;
}

.box {
  background: #e8f4ff;
  border-left: 6px solid #2d7dd2;
  padding: 12px;
  margin: 16px 0;
  border-radius: 10px;
}

.box h3 {
  margin-top: 0;
}

.palette {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 3px solid #333;
  cursor: pointer;
}

.color.selected {
  outline: 5px solid black;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

button {
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: #2d7dd2;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background: #1f5fa3;
}

.map-area {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

object {
  width: 100%;
  height: calc(100vh - 40px);
  background: #dff3ff;
  border: 2px solid #c7dce8;
  border-radius: 16px;
}

#message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
}

.ok {
  background: #e7f8e8;
  color: #1b7f2a;
}

.error {
  background: #fdeaea;
  color: #b71c1c;
}

.warning {
  background: #fff7d6;
  color: #8a6500;
}

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

  .sidebar {
    border-right: none;
    border-bottom: 3px solid #d8e6e0;
  }

  object {
    height: 70vh;
  }
}