* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

#panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: 280px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  padding: 14px 16px;
}

#panel h1 {
  font-size: 15px;
  margin: 0 0 10px;
}

#search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

#search-input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#search-form button {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f5f5f5;
  cursor: pointer;
}

#search-form button:hover {
  background: #eaeaea;
}

#search-status {
  font-size: 12px;
  color: #a33;
  margin: 0 0 10px;
}

.locate-btn {
  display: block;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f5f5f5;
  cursor: pointer;
  margin-bottom: 6px;
}

.locate-btn:hover {
  background: #eaeaea;
}

#app-status {
  font-size: 12px;
  color: #a33;
  margin: 0 0 10px;
}

#segments {
  font-size: 13px;
  margin-bottom: 10px;
  max-height: 160px;
  overflow-y: auto;
}

#segments .segment {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid #eee;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid #ddd;
  font-size: 13px;
}

.stat strong {
  font-size: 15px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.actions button {
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f5f5f5;
  cursor: pointer;
}

.actions button:hover {
  background: #eaeaea;
}

.actions button.active {
  background: #2c7be5;
  color: #fff;
  border-color: #2c7be5;
}

.hint {
  font-size: 11px;
  color: #777;
  margin: 10px 0 0;
  line-height: 1.4;
}

.point-marker-inner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2c7be5;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  #panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
  }

  #segments {
    max-height: 90px;
  }
}
