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

#hud {
  position: absolute;
  z-index: 1000;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

#status {
  flex: 1 1 100%;
  background: rgba(15, 28, 22, 0.82);
  color: #f4f7f5;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
}

#channel-badge {
  background: #b4531f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 8px;
}

#channel-badge[hidden] {
  display: none;
}

button {
  pointer-events: auto;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #1b3d2f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

button.secondary {
  background: #4a5c54;
}

#update-banner {
  position: absolute;
  z-index: 1050;
  left: 12px;
  right: 12px;
  bottom: 28px;
  background: rgba(15, 28, 22, 0.94);
  color: #f4f7f5;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: grid;
  gap: 8px;
}

#update-banner p,
#install-hint p {
  margin: 0;
}

#install-hint {
  position: absolute;
  z-index: 1001;
  left: 12px;
  right: 12px;
  bottom: 28px;
  background: rgba(15, 28, 22, 0.92);
  color: #f4f7f5;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.hint-how {
  color: #c5d0cb;
  font-size: 12px;
}

#missing {
  position: absolute;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-content: center;
  gap: 8px;
  background: #12201a;
  color: #e8eee9;
  padding: 24px;
  text-align: center;
}

#missing[hidden],
#gate[hidden],
#howto[hidden],
#settings[hidden],
#install-hint[hidden],
#update-banner[hidden],
#demo[hidden] {
  display: none;
}

#gate,
#howto,
#settings {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 18, 15, 0.95);
  color: #e8eee9;
  overflow: auto;
  padding: 24px 16px 40px;
}

#gate form,
.sheet {
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

#gate h1,
.sheet h2 {
  margin: 0;
  font-size: 22px;
}

#gate p,
.sheet li,
.meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #d5ddd8;
}

.sheet ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 500;
}

.check input {
  margin-top: 3px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.leaflet-control-attribution {
  font-size: 10px;
}
