:root {
  color-scheme: light;
  --bg: #f2efe8;
  --panel: rgba(250, 247, 240, 0.94);
  --ink: #162025;
  --muted: #5b676d;
  --accent: #cc5f27;
  --accent-2: #1c7c7d;
  --line-remo: #cc5f27;
  --line-piki: #2b59c3;
  --edge: rgba(22, 32, 37, 0.12);
  --shadow: 0 20px 60px rgba(33, 36, 38, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(204, 95, 39, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(28, 124, 125, 0.16), transparent 24%),
    linear-gradient(135deg, #f7f2ea 0%, #ddd6c6 100%);
}

.layout {
  display: grid;
  gap: 18px;
  padding: 20px;
  max-width: 1440px;
  margin: 0 auto;
}

.hero,
.panel,
.map-shell {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  padding: 18px;
}

.hero-copy {
  padding: 8px 8px 18px;
}

.panel {
  padding: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
legend {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.96;
}

.intro {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 70ch;
}

.controls {
  display: grid;
  gap: 18px;
}

.controls-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: end;
}

.controls-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

label,
legend,
button,
input {
  font: inherit;
}

input[type="number"] {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

fieldset {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  display: grid;
  gap: 10px;
}

.control-card {
  min-height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--accent) 0%, #9f3410 100%);
  cursor: pointer;
}

.api-help {
  margin-top: 24px;
}

pre {
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #1d2528;
  color: #f6ede3;
}

.map-shell {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 72vh;
}

.status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 500;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(18, 25, 28, 0.74);
  color: #fff;
  font-size: 0.92rem;
}

.avatar-marker {
  position: relative;
  width: 72px;
  height: 92px;
}

.avatar-bubble {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  border: 4px solid #fff7ef;
  box-shadow: 0 18px 28px rgba(15, 22, 25, 0.28);
  background: #fff;
}

.avatar-bubble img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 18px;
  height: 18px;
  background: #fff7ef;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  z-index: -1;
}

.avatar-label {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 32, 37, 0.9);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .controls-head,
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .map-shell,
  #map {
    min-height: 60vh;
  }

  .controls-head {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .panel,
  .hero {
    padding: 16px;
  }

  .avatar-marker {
    width: 60px;
    height: 80px;
  }

  .avatar-bubble {
    width: 60px;
    height: 60px;
  }
}
