body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 16px;
  background: #f0f4f8;
  color: #1f2937;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  padding: 16px;
}
h1 {
  margin: 0;
  text-align: center;
  color: #1e293b;
  font-size: 24px;
  line-height: 1.25;
}
.title-main {
  display: block;
}
.title-mode {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}
.title-mode.theme-airRide {
  color: #dc2626;
}
.title-mode.theme-topRide {
  color: #d97706;
}
.sub {
  text-align: center;
  color: #64748b;
  font-size: 13px;
  margin-top: 6px;
}
.fetch-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(71, 85, 105, 0.55);
  backdrop-filter: blur(1px);
  pointer-events: auto;
  padding: 16px;
  box-sizing: border-box;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}
.fetch-overlay-text {
  min-width: 240px;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #16a34a;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.35);
}
.fetch-overlay.error .fetch-overlay-text {
  background: #ef4444;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}
.fetch-overlay.hidden {
  display: none;
}
.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stat {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  text-align: center;
}
.stat-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}
.chart-title {
  margin: 0 0 8px;
  font-size: 18px;
  color: #1e293b;
  text-align: center;
}
.nav-link-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 10px;
  box-sizing: border-box;
  text-align: center;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  border-radius: 8px;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.62), 0 0 1px rgba(0, 0, 0, 0.72);
}
.nav-link-btn:hover { background: #1d4ed8; }
.mode-links-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.mode-links-row .nav-link-btn {
  margin-bottom: 0;
}
.mode-link-btn {
  margin-bottom: 0;
  background: #475569;
}
.mode-link-btn:hover { background: #334155; }
.mode-link-btn.btn-mode-air {
  background: #dc2626;
}
.mode-link-btn.btn-mode-air:hover {
  background: #b91c1c;
}
.mode-link-btn.btn-mode-top {
  background: #d97706;
}
.mode-link-btn.btn-mode-top:hover {
  background: #b45309;
}
.mode-link-btn.btn-mode-city {
  background: #16a34a;
}
.mode-link-btn.btn-mode-city:hover {
  background: #15803d;
}
.mode-toggle {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.mode-toggle.mode-toggle-single {
  max-width: clamp(220px, 64vw, 340px);
}
.mode-toggle-btn {
  font-size: 15px;
  cursor: pointer;
  text-shadow: none;
  width: 100%;
  box-sizing: border-box;
}
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.control-row label {
  margin-right: 4px;
}
.control-row label:nth-of-type(2) {
  margin-left: 30px;
}
select {
  min-width: 150px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.hint {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}
.chart-container {
  position: relative;
  width: 100%;
  height: 520px;
}
.pie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.pie-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}
.pie-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}
.pie-select-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.pie-select-row label {
  margin-right: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.pie-container {
  position: relative;
  width: 100%;
  height: 320px;
}
@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .control-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .control-row label:nth-of-type(2) {
    margin-left: 0;
  }
  .pie-grid {
    grid-template-columns: 1fr;
  }
  .pie-container {
    height: 300px;
  }
  .chart-container { height: 380px; }
  select { min-width: 160px; }
  .mode-toggle {
    max-width: 100%;
  }
}
