* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
}

.topbar {
  padding: 24px 16px 16px;
  text-align: center;
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  border-bottom: 1px solid #30363d;
}

.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.topbar .sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #8b949e;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.map-wrap {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 16px;
}

#map {
  width: 100%;
  height: auto;
  display: block;
}

#map .ocean { fill: #0a1929; }
#map .land { fill: #1c2d3f; stroke: #2c3d4f; stroke-width: 0.5; }
#map .equator,
#map .prime-meridian,
#map .date-line {
  stroke: #30363d;
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
#map .equator { stroke: #4a4f57; }
#map .prime-meridian { stroke: #4a4f57; }
#map .date-line { stroke: #4d2a0e; stroke-dasharray: 4 4; }

#map .hour-line {
  stroke: #1c2331;
  stroke-width: 0.5;
}
#map .hour-label {
  fill: #4a4f57;
  font-size: 9px;
  font-family: ui-monospace, monospace;
}

#map .terminator {
  fill: rgba(20, 20, 25, 0.45);
}

#map .marker {
  cursor: pointer;
  transition: r 0.15s;
}
#map .marker.kind-capital { fill: #58a6ff; }
#map .marker.kind-major { fill: #7cffa1; }
#map .marker.kind-outlier { fill: #ff7b72; }

#map .marker:hover { stroke: #fff; stroke-width: 1.5; }

#map .label {
  fill: #c9d1d9;
  font-size: 8px;
  pointer-events: none;
  text-anchor: middle;
}

#map .label-bg {
  fill: rgba(13, 17, 23, 0.85);
  pointer-events: none;
}

.legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.legend .now {
  font-family: ui-monospace, monospace;
}

.legend .now .label { color: #8b949e; }

.legend .now .value {
  font-size: 1.1rem;
  color: #ffd33d;
  font-weight: 600;
  margin-left: 6px;
}

.legend-items {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.legend-items .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dot.kind-capital { background: #58a6ff; }
.dot.kind-major { background: #7cffa1; }
.dot.kind-outlier { background: #ff7b72; }

.table-wrap {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.table-wrap h2 {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  text-align: left;
  padding: 8px;
  color: #8b949e;
  font-weight: 600;
  border-bottom: 1px solid #30363d;
  white-space: nowrap;
}

tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #1c2331;
}

tbody tr:hover td { background: #1c2331; }

.col-offset, .col-local { font-family: ui-monospace, monospace; }
.col-offset { color: #ffd33d; font-weight: 600; }

.col-skew.aligned { color: #8b949e; }
.col-skew.skewed { color: #ffa657; }
.col-skew.very-skewed { color: #ff7b72; font-weight: 600; }

.col-dst.yes { color: #79c0ff; }
.col-dst.no { color: #6e7681; }

.about {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.about h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.about p, .about li {
  font-size: 0.9rem;
}

.about code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: #21262d;
  padding: 1px 5px;
  border-radius: 3px;
}

footer {
  border-top: 1px solid #30363d;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #8b949e;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1100px;
  margin: 24px auto 0;
}

footer a { color: #58a6ff; }
.about a { color: #58a6ff; }
