html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d7d7d7;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

#app,
#map {
  width: 100%;
  height: 100%;
}

#app {
  position: relative;
}

#map {
  position: absolute;
  inset: 0;
}

.gear-button {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 20;
  width: 54px;
  height: 54px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(92, 92, 92, 0.96);
  cursor: pointer;
}

.gear-button svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.gear-button:hover {
  color: rgba(70, 70, 70, 1);
}

.gear-button:focus-visible,
.close-pill:focus-visible {
  outline: 2px solid rgba(70, 70, 70, 0.9);
  outline-offset: 4px;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
}

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

.outer-frame {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border: 1px solid #2c2c2c;
  border-radius: 28px;
  background: transparent;
  box-shadow: 0 0 0 9999px #5a5d5f;
}

.info-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  border: 1px solid #2c2c2c;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(220, 224, 227, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.info-panel-body {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 34px 34px 30px;
  color: #222;
}

.info-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #2c2c2c;
  letter-spacing: 0.05em;
  padding: 24px;
}

.info-title {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 500;
}

.info-subtitle {
  margin-top: 18px;
  font-size: clamp(15px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.close-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-width: 118px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid #555555;
  border-radius: 999px;
  background: #5f666b;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  color: #222;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  user-select: none;
  cursor: pointer;
}

.settings-option-checkbox {
  width: 22px;
  height: 22px;
  accent-color: #5f6368;
  cursor: pointer;
}

.settings-option-label {
  display: inline-block;
}

.debug-panel {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 999999;
  display: none;
  min-width: 320px;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(32, 36, 40, 0.92);
  color: #ffffff;
  font: 12px/1.45 Arial, Helvetica, sans-serif;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  white-space: normal;
}

.maplibregl-ctrl-top-right {
  top: 92px;
  right: 18px;
}

.maplibregl-ctrl-group {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.map-service-summary {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 10px 28px;
  align-content: start;
  max-width: 980px;
  margin: 0 auto;
  padding-top: 8px;
}

.map-service-summary-title {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: 0;
  color: #111;
}

.map-service-summary-headline {
  grid-column: 1 / -1;
  margin: 0 0 14px;
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 700;
  color: #111;
}

.map-service-summary-spacer {
  grid-column: 1 / -1;
  height: 10px;
}

.map-service-summary-key {
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 700;
  color: #2d2d2d;
}

.map-service-summary-value {
  min-width: 0;
  word-break: break-word;
  font-size: clamp(15px, 1.35vw, 19px);
  color: #111;
}

.map-service-summary-value a {
  color: #1558d6;
  text-decoration: none;
  font-weight: 700;
}

.map-service-summary-empty,
.map-service-summary-loading,
.map-service-summary-error {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0 0;
  font-size: 20px;
  color: #222;
}

@media (max-width: 700px) {
  .gear-button {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  .outer-frame {
    top: 4%;
    left: 4%;
    width: 92%;
    height: 92%;
    border-radius: 22px;
  }

  .info-panel {
    width: 80%;
    height: 80%;
    border-radius: 22px;
  }

  .info-panel-body {
    padding: 26px 22px 22px;
  }

  .close-pill {
    top: 14px;
    right: 14px;
    min-width: 102px;
    height: 40px;
    font-size: 14px;
  }

  .map-service-summary {
    grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
    gap: 8px 16px;
    max-width: none;
    padding-top: 14px;
  }

  .map-service-summary-key {
    margin-top: 0;
  }

  .map-service-summary-spacer {
    height: 8px;
  }
}