[hidden] { display: none !important; }
:root {
  --bg: #04050a; --ink: #e8e6f0; --muted: #8a8fa8; --panel: rgba(12, 14, 26, 0.78);
  --line: rgba(160, 170, 220, 0.18); --accent: #f4c542;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.4 Inter, system-ui, sans-serif; overflow: hidden; }
#globe { position: fixed; inset: 0; }
#globe .view { position: absolute; inset: 0; }
.map-tip { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; max-width: 320px; padding: 5px 8px; border-radius: 4px;
  background: rgba(4, 5, 10, 0.8); color: var(--ink); font: 12px/1.35 Inter, system-ui, sans-serif; }
.hud { position: fixed; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; backdrop-filter: blur(8px); }
#date { top: 16px; left: 50%; transform: translateX(-50%); padding: 6px 18px; font: 600 30px/1.1 "Cormorant Garamond", serif; letter-spacing: 0.02em; text-align: center; white-space: nowrap; }
#date { cursor: pointer; }
#date .tonight { font: 400 12px/1.3 Inter, system-ui, sans-serif; color: var(--muted); letter-spacing: 0.04em; }
#date .tonight:empty { display: none; }
#legend { top: 16px; left: 16px; padding: 10px 12px; max-height: 60vh; display: flex; flex-direction: column; width: 310px; max-width: calc(100vw - 32px); }
#legend .lg-tools { display: flex; gap: 4px; margin-bottom: 6px; }
#legend .lg-search { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: inherit; border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12px; }
#legend .lg-tools button { margin-left: 0; padding: 2px 6px; }
#legend .lg-top { background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: inherit; border-radius: 6px; font: inherit; font-size: 12px; padding: 2px 4px; }
#legend .lg-top option { color: #000; }
#legend .rank { color: var(--muted); font-size: 11px; min-width: 2.6em; font-variant-numeric: tabular-nums; }
#fps { left: 16px; bottom: calc(var(--controls-h, 56px) + 56px); padding: 4px 8px; font: 500 12px Inter, sans-serif; font-variant-numeric: tabular-nums; }
#panel h2 .rank { color: var(--muted); font-size: 16px; }
#legend .lg-list { overflow: auto; min-height: 0; }
#legend label[hidden], #legend .lg-empty[hidden] { display: none; }
#legend .lg-empty { color: var(--muted); font-size: 12px; padding: 4px 0; }
#legend label { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
#legend .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
#legend .dot, #legend .rank, #legend .count, #legend button { flex-shrink: 0; }
#legend .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#legend .count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#legend button { margin-left: 0; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; font-size: 11px; cursor: pointer; }
#legend button.on { color: var(--accent); border-color: var(--accent); }
#panel { top: 16px; right: 16px; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 14px 16px; }
#panel h2 { margin: 0 0 8px; font: 600 22px "Cormorant Garamond", serif; }
#panel .close { float: right; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
#panel li { margin: 8px 0; list-style: none; }
#panel ul { padding: 0; }
#panel .when { color: var(--accent); }
#panel .go { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
#panel .go:hover .when, #panel .go:focus-visible .when { text-decoration: underline; }
#panel li.past { opacity: 0.45; }
#panel li:not(.today) .tag { display: none; }
#panel .one-day .go, #panel .one-day .tag { display: none; }   /* the day is the heading */
#panel .one-day li.today { border-left: 0; padding-left: 0; }
#panel li.today { border-left: 2px solid var(--accent); padding-left: 8px; }
#panel .tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bg); background: var(--accent); border-radius: 3px; padding: 0 4px; }
#panel .who { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
#panel .who:hover, #panel .who:focus-visible { text-decoration: underline; }
#panel .prog { color: var(--muted); font-size: 12px; }
#panel .prog summary { cursor: pointer; color: var(--ink); opacity: 0.7; }
#panel .prog details[open] summary { display: none; }
#panel a { color: #9fb4ff; font-size: 12px; margin-right: 8px; }
#controls { left: 16px; right: 16px; bottom: 16px; padding: 10px 14px; display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; }
#controls button { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
#controls button.on { border-color: var(--accent); color: var(--accent); }
#controls .scrub { position: relative; height: 34px; }
#controls .scrub-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 2px 8px; border-radius: 4px;
  background: rgba(4, 5, 10, 0.85); border: 1px solid var(--line); font-size: 11px; white-space: nowrap; pointer-events: none; z-index: 1; }
#controls canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#controls input[type=range].timeline { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; }
#controls .speed { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.city-tonight { display: inline-block; pointer-events: none; transform: translateX(calc(50% + 5px)); font: 500 11px Inter, system-ui, sans-serif;
  color: rgba(255, 236, 190, 0.95); text-shadow: 0 0 6px rgba(0, 0, 0, 0.9); white-space: nowrap; }
body.capture .city-tonight { font-size: 13px; }
#zoom { right: 16px; bottom: calc(var(--controls-h, 56px) + 44px); display: flex; flex-direction: column; padding: 4px; gap: 4px; }
#zoom button { width: 32px; height: 32px; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; font-size: 18px; line-height: 1; cursor: pointer; }
#zoom button.mode { font: 600 11px Inter, system-ui, sans-serif; letter-spacing: 0.03em; }
#help { top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 14px 20px; z-index: 3;
  width: max-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
#help h2 + dl { margin-bottom: 12px; }
#help h2 { margin: 0 0 8px; font: 600 22px "Cormorant Garamond", serif; }
#help dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
#help dt { text-align: right; color: var(--ink); }
#help dd { margin: 0; color: var(--muted); }
#help kbd { font: 500 12px Inter, system-ui, sans-serif; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--accent); }
#zoom button:hover { border-color: var(--accent); color: var(--accent); }
#attribution { position: fixed; z-index: 2; right: 16px; bottom: calc(var(--controls-h, 56px) + 22px); font-size: 10px; color: var(--muted); opacity: 0.8; pointer-events: none; }
body.capture #attribution { display: none; }
#error { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #ffb4b4; z-index: 5; }
body.capture .hud:not(#date) { display: none; }
body.capture #date { background: none; border: 0; }
@media (max-width: 700px) {
  #legend .lg-top { font-size: 16px; }
  #controls { grid-template-columns: auto 1fr; }
  #controls .speed { grid-column: 1 / -1; flex-wrap: wrap; order: 3; }
  #controls .play { order: 1; justify-self: start; }
  #controls .capture { order: 2; justify-self: end; }
  #controls .scrub { grid-column: 1 / -1; order: 4; }
  #legend { top: 76px; max-height: 30vh; }      /* below the date and its concert count */
  #date { font-size: 22px; }
  #legend .lg-search { font-size: 16px; }
  /* Below the date and above the zoom buttons, ending just over the controls bar. */
  #panel { top: 76px; z-index: 3; max-height: calc(100dvh - var(--controls-h, 56px) - 108px); }
}
