.terrain-reserved-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #123f356b;
}
.terrain-reserved-overlay[hidden] {
  display: none !important;
}
.terrain-reserved-card {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 34px;
  background: #faf8f1;
  border-radius: 28px;
  color: #153f35;
  box-shadow: 0 25px 80px #102d2680;
}
.terrain-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #c7d5d0;
  border-radius: 50%;
  background: #fff;
  color: #17483d;
  font-size: 2rem;
  line-height: 1;
}
.terrain-eyebrow {
  display: block;
  margin-right: 60px;
  color: #176f5a;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}
.terrain-reserved-card h2 {
  margin: 12px 58px 18px 0;
  font:
    700 2.05rem/1.06 Georgia,
    serif;
}
.terrain-reserved-card label {
  display: grid;
  grid-template-columns: auto 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #dbe2df;
}
.terrain-reserved-card input {
  appearance: none;
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 20px;
  background: #b9c5c1;
  position: relative;
}
.terrain-reserved-card input:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.terrain-reserved-card input:checked {
  background: #146b58;
}
.terrain-reserved-card input:checked:after {
  left: 19px;
}
.terrain-symbol {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.terrain-relief-symbol {
  background: linear-gradient(135deg, #c6dcb0, #d7cc91, #bc9470, #efe9df);
}
.terrain-contour-symbol {
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, #6a4535 5px 6px), #e8e0c8;
}
.terrain-reserved-card b,
.terrain-reserved-card small {
  display: block;
}
.terrain-reserved-card b {
  font-size: 14px;
}
.terrain-reserved-card small {
  margin-top: 3px;
  color: #68817b;
  font-size: 11px;
  line-height: 1.35;
}
.terrain-info {
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #c5d4ce;
  border-radius: 12px;
  background: #fff;
  color: #315e53;
  text-align: left;
}
.terrain-legend,
.terrain-sample {
  position: fixed;
  z-index: 97;
  width: min(330px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 18px;
  background: #faf8f1;
  color: #153f35;
  box-shadow: 0 12px 42px #102d2660;
}
.terrain-legend {
  left: 16px;
  bottom: 112px;
}
.terrain-sample {
  right: 16px;
  bottom: 112px;
}
.terrain-legend[hidden],
.terrain-sample[hidden] {
  display: none !important;
}
.terrain-legend > button,
.terrain-sample > button {
  position: absolute;
  right: 9px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #153f35;
  font-size: 1.35rem;
}
.terrain-legend strong,
.terrain-sample span {
  display: block;
  padding-right: 32px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.terrain-ramp {
  height: 12px;
  margin: 13px 0 5px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #c6dcb0,
    #97c07e,
    #d7cc91,
    #bc9470,
    #efe9df
  );
}
.terrain-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
}
.terrain-legend p,
.terrain-sample p {
  margin: 10px 0 0;
  color: #607970;
  font-size: 0.7rem;
  line-height: 1.4;
}
.terrain-sample h3 {
  margin: 8px 0 2px;
  font: 700 2rem Georgia;
}
.terrain-method {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #123f3580;
}
.terrain-method[hidden] {
  display: none !important;
}
.terrain-method article {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 32px;
  background: #faf8f1;
  border-radius: 26px;
  color: #153f35;
}
.terrain-method h2 {
  font: 700 2rem Georgia;
}
.terrain-method p {
  line-height: 1.55;
}
.terrain-method a {
  color: #126854;
  font-weight: 700;
}
@media (min-width: 701px) {
  .terrain-reserved-overlay {
    inset: 332px 16px auto auto;
    display: block;
    width: 205px;
    padding: 0;
    background: transparent;
    pointer-events: none;
  }
  .terrain-reserved-card {
    width: 205px;
    padding: 7px;
    border: 1px solid rgba(23, 91, 73, 0.18);
    border-radius: 22px;
    background: rgba(247, 245, 238, 0.92);
    box-shadow: 0 8px 28px rgba(16, 63, 52, 0.2);
    backdrop-filter: blur(12px);
    pointer-events: auto;
  }
  .terrain-close {
    right: 9px;
    top: 9px;
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
  }
  .terrain-eyebrow {
    margin: 9px 38px 3px 10px;
    font-size: 0.57rem;
  }
  .terrain-reserved-card h2 {
    margin: 4px 38px 9px 10px;
    font: 700 1rem Georgia;
  }
  .terrain-reserved-card label {
    grid-template-columns: 30px 24px 1fr;
    gap: 7px;
    min-height: 44px;
    padding: 4px 7px;
    border: 0;
    border-radius: 15px;
  }
  .terrain-reserved-card label:has(input:checked) {
    background: #175b49;
    color: #fff;
  }
  .terrain-reserved-card input {
    width: 30px;
    height: 18px;
  }
  .terrain-reserved-card input:after {
    width: 12px;
    height: 12px;
  }
  .terrain-reserved-card input:checked:after {
    left: 15px;
  }
  .terrain-symbol {
    width: 24px;
    height: 24px;
  }
  .terrain-reserved-card b {
    font-size: 11px;
  }
  .terrain-reserved-card small {
    display: none;
  }
  .terrain-info {
    padding: 8px 9px;
    font-size: 10px;
  }
  .terrain-legend {
    left: 72px;
    top: 88px;
    bottom: auto;
    width: 300px;
  }
  .terrain-sample {
    left: 16px;
    right: auto;
    bottom: 112px;
  }
}
@media (max-width: 700px) {
  .terrain-reserved-overlay {
    align-items: end;
    padding: 0;
  }
  .terrain-reserved-card {
    width: 100%;
    max-height: 88dvh;
    padding: 30px 24px calc(24px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }
  .terrain-legend {
    left: 10px;
    bottom: 106px;
    width: min(250px, calc(100vw - 20px));
    padding: 11px 13px;
  }
  .terrain-sample {
    left: 10px;
    right: 10px;
    bottom: 104px;
    width: auto;
  }
}
