:root {
  font-family: system-ui, sans-serif;
  color: #172725;
  background: #e7ece9;
  --dark: #172725;
  --green: #086c57;
  --muted: #51645e;
  --line: #e1e9e4;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #298d75;
  outline-offset: 3px;
}
.topbar {
  background: var(--dark);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(15px, 3.5vw, 42px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #b6f0cf;
  color: #15362a;
  font-size: 30px;
  line-height: 1;
}
h1 {
  margin: 0 0 3px;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.brand p {
  margin: 0;
  color: #c1d5cd;
  font-size: 12px;
}
.source {
  color: #d3eee2;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.source:hover {
  text-decoration: underline;
}
main {
  position: relative;
  flex: 1;
  min-height: 0;
}
#map {
  position: absolute;
  inset: 0;
}
.map-status {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 9px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px 13px;
  min-height: 40px;
  max-width: calc(100% - 75px);
  border-radius: 22px;
  box-shadow: 0 3px 14px #253b3020;
  font-size: 13px;
  font-weight: 600;
}
.legend-dot {
  flex: 0 0 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}
#retry {
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
}
.station {
  position: absolute;
  z-index: 2;
  bottom: 34px;
  left: 14px;
  width: min(365px, calc(100% - 28px));
  max-height: calc(100% - 95px);
  overflow: auto;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px #253b3033;
}
.station-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 6px;
}
.station-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-right: auto;
  font-size: 12px;
}
.station-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--dark);
  background: #edf4ef;
  font-size: 24px;
  line-height: 1;
}
.station-controls button:hover {
  background: #daeee3;
}
.station h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.station h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 6px;
  font-size: 15px;
}
.station section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.station p {
  margin: 5px 0;
  font-size: 13px;
}
.muted {
  color: var(--muted);
  line-height: 1.45;
}
#station-meta {
  white-space: pre-line;
}
.counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0 0;
}
.counts div {
  background: #f0f3f1;
  border-radius: 10px;
  padding: 7px;
  text-align: center;
}
.counts div:first-child {
  background: #e2f6ec;
  color: #085944;
}
.counts div:nth-child(2) {
  background: #faf0dc;
  color: #714813;
}
.counts dt {
  font-size: 12px;
}
.counts dd {
  margin: 1px 0 0;
  font-size: 19px;
  font-weight: 700;
}
#load-percent {
  color: var(--green);
  font-size: 19px;
}
meter {
  display: block;
  width: 100%;
  height: 15px;
  margin: 7px 0;
  accent-color: var(--green);
}
@media (max-width: 480px) {
  .station {
    bottom: 28px;
    max-height: min(55dvh, calc(100% - 95px));
    padding: 14px;
  }
}
