.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #0c2a31 0%, #061418 55%, #02090b 100%); }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#globe { cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
#earth { pointer-events: none; }

.head { position: absolute; left: clamp(14px, 3vw, 28px); top: clamp(12px, 3vw, 24px); z-index: 2; pointer-events: none; max-width: min(28rem, 60%); }
.kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--signal-soft); }
.kicker::before { content: ''; width: 18px; height: 2px; background: var(--mark); }
.head h1 { margin: 0; font-size: clamp(24px, 4.2vw, 44px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.period { margin: 6px 0 0; font-size: 13px; color: var(--text-soft); }

.months { position: absolute; right: clamp(14px, 3vw, 28px); top: clamp(12px, 3vw, 24px); z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 50%; }
.months button, .controls button { background: rgba(7, 26, 31, 0.78); border: 1px solid var(--line); border-radius: 4px; color: var(--text); font-size: 13px; font-weight: 500; padding: 6px 10px; cursor: pointer; }
.months button:hover, .controls button:hover { border-color: var(--signal-soft); }
.months button[aria-pressed='true'] { background: var(--signal); border-color: var(--signal); color: var(--deep); font-weight: 700; }

.legend { position: absolute; left: clamp(14px, 3vw, 28px); bottom: 14px; z-index: 2; display: grid; gap: 5px; font-size: 12px; color: var(--text-soft); pointer-events: none; }
.ramp { display: block; width: 220px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #ff2e63, #ff5236 25%, #ff8a2a 50%, #ffbe55 75%, #fff0c2); }
.ticks { display: flex; justify-content: space-between; width: 220px; color: var(--text-mute); }
.controls { position: absolute; right: clamp(14px, 3vw, 28px); bottom: 14px; z-index: 2; display: flex; gap: 6px; }
.controls button { min-width: 34px; }

/* ?chrome=min hides the title when the page sits inside an article that already has one.
   ?chrome=none hides all controls, for clean video frames. */
.min .head { display: none; }
.none .head, .none .months, .none .legend, .none .controls, .none + .credits { display: none; }
@media (max-width: 560px) { .legend { display: none; } .months { max-width: 100%; left: 14px; right: 14px; top: auto; bottom: 56px; justify-content: center; } }
