:root {
  --color-bg: #f6f5f2;
  --color-surface: #ffffff;
  --color-text: #262421;
  --color-muted: #7a746c;
  --color-border: #e4e0d8;
  --color-primary: #c96f34;
  --color-primary-hover: #b25e28;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.site-header {
  padding: 24px 20px 16px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 4px;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.map-section {
  flex: 2 1 480px;
  min-width: 300px;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

#map {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #e9e7e2;
}

.list-section {
  flex: 1 1 280px;
  min-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 480px;
  overflow-y: auto;
}

.list-section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.spot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spot-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.spot-item .spot-name {
  font-weight: 600;
  margin: 0 0 4px;
}

.spot-item .spot-desc {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: pre-wrap;
}

.spot-item-actions {
  display: flex;
  gap: 8px;
}

.empty-message {
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 20px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-primary.active {
  background: var(--color-primary-hover);
  box-shadow: 0 0 0 3px rgba(201, 111, 52, 0.25);
}

.btn-secondary {
  background: var(--color-border);
  color: var(--color-text);
}

.btn-small {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-danger {
  background: #fbeee7;
  color: #b3402a;
}

.site-footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
  padding: 10px 20px 30px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-overlay.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal h3 {
  margin: 0 0 10px;
}

.modal label {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 8px;
}

.modal input,
.modal textarea {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}

.modal textarea {
  min-height: 70px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.info-window {
  padding: 8px 10px;
  font-size: 0.85rem;
  max-width: 200px;
}

.info-window .iw-name {
  font-weight: 700;
  margin: 0 0 4px;
}

.info-window .iw-desc {
  margin: 0 0 8px;
  color: #555;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  #map {
    height: 360px;
  }
  .list-section {
    max-height: none;
  }
}
