*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  background: #1a1a2e;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Top bar ── */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #1a1a2e;
  color: #fff;
  z-index: 1000;
  flex-shrink: 0;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

#logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #e94560;
  white-space: nowrap;
  user-select: none;
}

/* ── Color palette ── */
#palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: calc(100vw - 120px);
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  flex-shrink: 0;
}

.swatch:hover {
  transform: scale(1.25);
  z-index: 1;
}

.swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
  transform: scale(1.2);
}

/* ── Map ── */
#map {
  flex: 1;
  cursor: crosshair;
}

/* ── Toast notification ── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,50,0.92);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  letter-spacing: 0.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
  white-space: nowrap;
}

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

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  #topbar {
    padding: 6px 10px;
  }
  #logo {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .swatch {
    width: 22px;
    height: 22px;
  }
}
