:root {
  --bg-1: #04101f;
  --bg-2: #102746;
  --panel: rgba(8, 20, 40, 0.72);
  --panel-strong: rgba(11, 27, 53, 0.86);
  --border: rgba(159, 197, 255, 0.2);
  --text: #f0f7ff;
  --muted: rgba(228, 239, 255, 0.72);
  --gold: #ffc266;
  --sun: #ffb347;
  --earth: #55b7ff;
  --north: #71d5ff;
  --south: #ffb66e;
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 180, 94, 0.16), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(75, 151, 255, 0.2), transparent 30%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

.season-lab {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#seasonCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar,
.guide-panel,
.insight-panel {
  position: absolute;
  z-index: 2;
}

.topbar {
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.brand-group,
.control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.back-link,
.page-tag,
.control-btn,
.guide-panel,
.insight-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.back-link,
.page-tag {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.page-tag {
  color: #ffd395;
}

.control-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
}

.control-btn:not(.primary) {
  background: rgba(12, 28, 56, 0.92);
  border-color: rgba(194, 216, 255, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.control-btn.primary {
  background: linear-gradient(135deg, rgba(255, 182, 82, 0.96), rgba(255, 126, 72, 0.92));
  border-color: rgba(255, 202, 120, 0.38);
}

.guide-panel {
  top: 90px;
  left: 22px;
  width: min(430px, calc(100vw - 44px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
  border-radius: 26px;
}

.insight-panel {
  right: 22px;
  bottom: 22px;
  width: min(390px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px 20px;
  border-radius: 26px;
}

.eyebrow {
  display: inline-flex;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.04;
}

h2 {
  margin-top: 8px;
  font-size: 1.45rem;
}

.guide-panel p,
.insight-panel p {
  margin-top: 10px;
  line-height: 1.7;
  color: var(--muted);
}

.metric-grid,
.season-grid,
.city-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric-grid div,
.season-grid div,
.city-grid div,
.task-card {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(169, 204, 255, 0.13);
}

.metric-grid span,
.season-grid span,
.city-grid span {
  display: block;
  color: rgba(226, 238, 255, 0.62);
  font-size: 0.78rem;
}

.metric-grid strong,
.season-grid strong,
.city-grid strong {
  display: block;
  margin-top: 7px;
  color: #fff7df;
}

.controls,
.bar-list {
  margin-top: 16px;
}

.slider-row + .slider-row,
.speed-grid {
  margin-top: 14px;
}

.slider-topline,
.bar-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: rgba(235, 243, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  margin-top: 10px;
  accent-color: var(--gold);
}

.jump-grid,
.view-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.jump-btn,
.view-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(11, 25, 49, 0.82);
  cursor: pointer;
  font-weight: 800;
}

.jump-btn.active,
.view-btn.active {
  color: #251506;
  background: linear-gradient(135deg, #ffe098, #ffad58);
  border-color: rgba(255, 224, 152, 0.62);
}

.bar-item + .bar-item {
  margin-top: 14px;
}

.bar-track {
  height: 12px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  width: 50%;
  height: 100%;
  border-radius: inherit;
  transition: width 180ms ease;
}

.bar-fill.north {
  background: linear-gradient(90deg, #377cff, var(--north));
}

.bar-fill.south {
  background: linear-gradient(90deg, #ff8b52, var(--south));
}

.speed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.city-card,
.orbit-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(169, 204, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.city-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(235, 243, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 900;
}

.city-select {
  appearance: none;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, #ffd99b 50%) right 13px center / 7px 7px no-repeat,
    linear-gradient(135deg, #ffd99b 50%, transparent 50%) right 8px center / 7px 7px no-repeat,
    rgba(11, 25, 49, 0.88);
  cursor: pointer;
}

.city-card p,
.orbit-note p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.orbit-note {
  border-color: rgba(255, 199, 113, 0.24);
  background: rgba(255, 178, 86, 0.07);
}

.orbit-note strong {
  color: #ffe0a8;
}

.task-card {
  margin-top: 16px;
  border-color: rgba(255, 199, 113, 0.24);
  background: rgba(255, 178, 86, 0.08);
}

.task-card strong {
  color: #ffe0a8;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .season-lab {
    min-height: 100vh;
    height: auto;
  }

  #seasonCanvas {
    min-height: 760px;
  }

  .topbar,
  .guide-panel,
  .insight-panel {
    position: static;
    margin: 14px 18px 0;
  }

  .topbar {
    padding-top: 14px;
  }

  .guide-panel,
  .insight-panel {
    width: auto;
  }

  .speed-grid {
    grid-template-columns: 1fr;
  }
}
