* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0d10; color: #e6e8ea;
  font: 14px/1.4 -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif; }
#map { position: absolute; inset: 0; }

#topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 5;
  display: flex; align-items: center; gap: 16px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(11,13,16,.95), rgba(11,13,16,.55));
  backdrop-filter: blur(6px);
}
.brand { font-weight: 700; letter-spacing: .08em; font-size: 15px; }
.brand span { display: block; font-weight: 400; font-size: 10px; letter-spacing: .16em; color: #8b939c; text-transform: uppercase; }
.status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #9aa3ad; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 8px #35d07f; }
.dot.off { background: #7a828a; box-shadow: none; }
.src { margin-left: auto; font-size: 12px; color: #8b939c; }
.src a { color: #9fd0ff; text-decoration: none; }

#side {
  position: absolute; top: 46px; right: 0; width: 380px; bottom: 0; z-index: 4;
  display: flex; flex-direction: column;
  background: rgba(13,16,20,.9); border-left: 1px solid #1d2229; backdrop-filter: blur(8px);
}
#now { padding: 12px 14px 8px; border-bottom: 1px solid #1d2229; }
#now h2, #feedWrap h2 { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8b939c; }
.now-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; }
.now-item { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.now-item .t { color: #8b939c; font-variant-numeric: tabular-nums; min-width: 62px; }
.now-item .d { font-weight: 600; }
.now-item .a { color: #8b939c; font-size: 12px; }

#feedWrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.feed-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 0; }
.feed-head select { background: #161a20; color: #cfd5db; border: 1px solid #262d36; border-radius: 6px; padding: 4px 6px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; }
.chip { border: 1px solid #262d36; background: #14181e; color: #aeb6bf; border-radius: 999px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.chip.on { background: #1e2833; color: #e8eef4; border-color: #37475a; }
.chip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }

.feed { flex: 1; overflow: auto; padding: 0 8px 40px; }
.card { padding: 9px 10px; border-radius: 8px; margin: 6px 6px; cursor: pointer; border: 1px solid transparent; background: #11151a; }
.card:hover { border-color: #2a3441; background: #151a21; }
.card.sel { border-color: #3d6ea8; background: #16202b; }
.card .row1 { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: #8b939c; }
.card .kind { color: #cfd5db; }
.card .ttl { font-weight: 600; font-size: 13px; margin: 3px 0 2px; }
.card .txt { font-size: 12px; color: #9aa3ad; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 11px; color: #6f7781; margin-top: 4px; }

#timeline {
  position: absolute; left: 14px; bottom: 14px; right: 400px; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: rgba(13,16,20,.9); border: 1px solid #1d2229; border-radius: 10px; backdrop-filter: blur(8px);
}
#play { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #2a3441; background: #161b22; color: #cfd5db; cursor: pointer; }
#slider { flex: 1; accent-color: #4da3ff; }
#timeLabel { font-variant-numeric: tabular-nums; color: #9aa3ad; font-size: 12px; min-width: 118px; text-align: right; }

#legend { position: absolute; left: 14px; bottom: 64px; z-index: 4; display: flex; gap: 12px; font-size: 11px; color: #8b939c; }
#legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

#disclaimer {
  position: absolute; left: 14px; top: 56px; z-index: 3; max-width: 380px;
  font-size: 11px; color: #6f7781; line-height: 1.35;
}
.muted { color: #6f7781; font-size: 12px; }

.ev-marker { width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px;
  border-radius: 50%; background: rgba(10,12,15,.85); border: 1px solid #2a3441; cursor: pointer; }
.ev-marker.hot { border-color: #ff4d4d; box-shadow: 0 0 12px rgba(255,77,77,.6); }
.lbl { font-size: 11px; color: #7d858f; text-shadow: 0 1px 2px #000; white-space: nowrap; pointer-events: none; }

.maplibregl-popup-content { background: #12161c; color: #dfe5ea; border: 1px solid #262d36; border-radius: 10px; font-size: 12px; max-width: 300px; }
.maplibregl-popup-tip { border-top-color: #12161c !important; }

@media (max-width: 820px) {
  #side { width: 100%; top: auto; height: 45%; border-left: 0; border-top: 1px solid #1d2229; }
  #timeline { right: 14px; bottom: calc(45% + 14px); }
  #legend, #disclaimer { display: none; }
}
