/* Space Monitor: glass panels over a full-screen globe / solar system (same look as War Monitor). */
:root {
  --glass: rgba(20, 22, 30, 0.74); --glass-border: rgba(255, 255, 255, 0.10);
  --text: #f2f3f5; --muted: #9aa0ab; --accent: #0a84ff; --yellow: #ffd60a; --orange: #ff9f0a; --green: #30d158; --red: #ff453a; --teal: #64d2ff; --purple: #bf5af2;
  --radius: 14px; --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #03050a; color: var(--text); font: 14px/1.4 var(--font); }
#map, #solar { position: fixed; inset: 0; }
#map.off { visibility: hidden; }
#map { transition: opacity .25s; }
#solar { touch-action: none; cursor: grab; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--teal); }
.glass { position: fixed; z-index: 5; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }

/* top bar */
.topbar { top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; }
.brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 15px; }
.brand .mono { font-size: 12px; }
.logo { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9fd0ff, #1f5fbf 55%, #061a3a 75%); box-shadow: 0 0 0 2px rgba(255,214,10,.0), 0 0 10px rgba(80,160,255,.6); position: relative; }
.logo::after { content: ""; position: absolute; inset: 7px -6px; border: 1.5px solid rgba(255,214,10,.85); border-radius: 50%; transform: rotate(-18deg); }
.crumbs { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.crumbs button { border: 0; background: none; color: var(--teal); padding: 2px 0; }
.crumbs b { color: var(--text); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; margin-left: auto; }
.chips::-webkit-scrollbar { display: none; }
.chips button, .chipsrow button, .filters button { border: 1px solid var(--glass-border); background: rgba(127, 127, 127, .12); border-radius: 999px; padding: 5px 11px; white-space: nowrap; font-size: 13px; }
.chips button.on, .filters button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips button:first-child, .chips button:nth-child(2) { color: var(--yellow); }

/* left panel */
.panel { top: 74px; left: 12px; bottom: 40px; width: 380px; display: flex; flex-direction: column; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 4px; }
.tabs button { flex: 1 1 auto; border: 0; background: none; padding: 7px 5px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.tabs button.on { background: rgba(127, 127, 127, .2); color: var(--text); }
.icon { border: 0; background: none; width: 28px; flex: 0 0 28px; font-size: 18px; color: var(--muted); }
.floating { top: 74px; left: 12px; width: 38px; height: 38px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 4px 10px 8px; scrollbar-width: none; flex: 0 0 auto; }
.filters::-webkit-scrollbar { display: none; }
.filters button { font-size: 12px; padding: 4px 10px; }
.list { overflow-y: auto; padding: 0 8px 14px; flex: 1; scrollbar-width: thin; }
.list h3, .card h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 16px 6px 6px; }
.item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; color: var(--text); text-decoration: none; align-items: start; }
.item:hover { background: rgba(127, 127, 127, .13); }
.item .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; margin: 2px 4px; }
.item .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #111; }
.item .t { font-weight: 600; font-size: 13px; display: block; overflow-wrap: anywhere; }
.item .m { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.item.ev { grid-template-columns: 44px 1fr; }
.item .date { width: 44px; text-align: center; background: rgba(127,127,127,.15); border-radius: 9px; padding: 3px 0; }
.item .date b { display: block; font-size: 17px; line-height: 1.1; } .item .date small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); padding: 1px 6px; border-radius: 999px; }
.pill { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; background: rgba(154,160,171,.18); color: var(--muted); }
.pill.go, .pill.ok { background: rgba(48,209,88,.18); color: var(--green); } .pill.tbc { background: rgba(255,159,10,.18); color: var(--orange); }
.pill.fail { background: rgba(255,69,58,.18); color: var(--red); }
.empty { color: var(--muted); padding: 18px 10px; font-size: 13px; }
.desc { color: #d5d8de; font-size: 13px; margin: 8px 6px; }
.hero { display: flex; align-items: center; gap: 14px; margin: 8px 6px; }
.hero img { width: 64px; height: 64px; }
.hero h2 { margin: 0; font-size: 20px; } .hero p { margin: 2px 0 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 4px; }
.facts div { background: rgba(127,127,127,.11); border-radius: 9px; padding: 6px 9px; }
.facts span { display: block; font-size: 11px; color: var(--muted); } .facts b { font-size: 12.5px; font-weight: 600; }
.chipsrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 6px; }
.cams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 4px 8px; }
.cam { border: 0; padding: 0; background: #000; border-radius: 10px; overflow: hidden; position: relative; aspect-ratio: 1; }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 14px 7px 5px; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.cam small { display: block; color: var(--muted); font-size: 10px; }
.streams { display: flex; flex-direction: column; gap: 6px; margin: 4px; }
.stream { border: 1px solid var(--glass-border); background: rgba(255,69,58,.14); color: #ffb1aa; border-radius: 10px; padding: 9px 12px; text-align: left; font-weight: 600; font-size: 13px; }

/* right card */
.card { top: 74px; right: 12px; width: 360px; max-height: calc(100% - 150px); overflow-y: auto; padding: 14px 14px 12px; }
.card h2 { margin: 0 28px 4px 0; font-size: 18px; } .card p { margin: 6px 0; font-size: 13px; }
.card .cx { position: absolute; top: 10px; right: 10px; border: 0; background: rgba(127,127,127,.2); border-radius: 50%; width: 26px; height: 26px; }
.card .cardimg { width: 100%; border-radius: 10px; margin-bottom: 8px; max-height: 200px; object-fit: cover; }
.card .big { font-size: 26px; font-weight: 700; color: var(--yellow); margin: 4px 0; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btns button, .btns a { border: 0; background: var(--accent); color: #fff; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; text-decoration: none; }
.btns a { background: rgba(127,127,127,.22); }
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

/* layers */
.layers { right: 12px; bottom: 40px; width: 230px; padding: 10px 12px; font-size: 13px; }
.layers h3 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.layers label { display: flex; gap: 7px; align-items: center; padding: 2px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 3px 9px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
body:has(#card:not([hidden])) .layers { display: none; }
.zoombox { left: 50%; transform: translateX(-50%); bottom: 40px; padding: 4px; }
.zoombox button { border: 0; background: none; padding: 6px 14px; font-weight: 600; font-size: 13px; color: var(--yellow); }
.hint { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: 92px; background: rgba(0,0,0,.6); padding: 7px 14px; border-radius: 999px; font-size: 12.5px; color: #e5e7eb; pointer-events: none; white-space: nowrap; max-width: 94vw; overflow: hidden; text-overflow: ellipsis; }
.scalebar { left: 404px; bottom: 40px; padding: 5px 10px; font-size: 11.5px; display: flex; align-items: center; gap: 8px; }
.scalebar .bar { display: inline-block; height: 6px; border: 1.5px solid #fff; border-top: 0; }
.credit { position: fixed; right: 12px; bottom: 10px; font-size: 10.5px; z-index: 4; text-align: right; max-width: 70vw; }
.maplibregl-ctrl-bottom-right { bottom: 30px; right: 250px; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 30px; }
.viewer .vbody { max-width: min(1100px, 96vw); width: 100%; text-align: center; }
.viewer img { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.viewer iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000; }
.viewer p { color: #ddd; font-size: 13px; }
.viewer .vx { position: absolute; top: 16px; right: 16px; border: 0; background: rgba(255,255,255,.15); color: #fff; border-radius: 50%; width: 36px; height: 36px; font-size: 16px; }

.mbtn, .sheet-head, .sheet-dim { display: none; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; }
  .crumbs { order: 2; font-size: 12px; }
  .chips { order: 3; width: 100%; margin-left: 0; }
  .brand .mono { display: none; }
  .mbtn { display: block; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 9px 14px; font-weight: 600; font-size: 13px; }
  #m-feed { left: 12px; } #m-layers { right: 12px; }
  .zoombox { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .panel, .layers { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 72vh; border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .25s; z-index: 20; }
  .layers { height: auto; max-height: 60vh; overflow: auto; }
  body.sheet-feed .panel, body.sheet-layers .layers { transform: none; }
  body.sheet-feed .sheet-dim, body.sheet-layers .sheet-dim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 15; }
  .sheet-head { display: flex; justify-content: center; position: relative; border: 0; background: none; padding: 8px; width: 100%; }
  .sheet-head .grab { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); }
  .sheet-head .sheet-x { position: absolute; right: 14px; top: 4px; color: var(--muted); }
  #collapse { display: none; }
  .card { left: 8px; right: 8px; width: auto; top: auto; bottom: 70px; max-height: 55vh; }
  .scalebar { left: 12px; bottom: 64px; }
  .credit { display: none; }
  .maplibregl-ctrl-bottom-right { right: 0; bottom: 60px; }
  .hint { bottom: 120px; white-space: normal; text-align: center; border-radius: 12px; }
}

/* 3D world */
#map { background: #020306; overflow: hidden; }
.w-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.w-lab { position: absolute; left: 0; top: 0; white-space: nowrap; text-align: center; font: 600 11px/1.2 var(--font); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 1px 2px #000; will-change: transform; }
.w-lab b { display: block; font-weight: 600; } .w-lab i { display: block; font-style: normal; font-weight: 500; font-size: 10.5px; color: #ffd60a; }
.w-lab.big b { font-size: 13px; font-weight: 700; }
.w-lab.probe b { color: #9fe8ff; } .w-lab.deep b { color: #ffe9b0; } .w-lab.small b { font-size: 10px; }
.w-lab.name { font: italic 500 11px var(--font); color: rgba(255,240,215,.85); }
.w-lab.pad b { color: #ffd60a; } .w-lab.event b { color: #64d2ff; font-weight: 500; } .w-lab.fac b { font-weight: 500; font-size: 10.5px; color: #d5dae3; } .w-lab.site b { color: #30d158; }
.w-warp { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.zoombox { display: flex; gap: 2px; }
.w-lab.big b { text-transform: uppercase; letter-spacing: .06em; font-weight: 800; font-size: 13.5px; }

.w-lab.spd span { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #ffd60a; color: #2a1446; text-shadow: none; font: 800 11.5px/1.2 var(--font); border: 2px solid #2a1446; box-shadow: 0 3px 0 #2a1446; }
.w-lab.vip b { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(42,20,70,.85); border: 1.5px solid #ffd60a; color: #ffd60a; font-weight: 800; font-size: 11.5px; text-shadow: none; box-shadow: 0 0 10px rgba(255,214,10,.45); }
.w-lab.vip i { margin-top: 2px; }

/* inline media: channels and pictures open inside the panels */
.player { margin: 4px 0 8px; } .player iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000; display: block; }
.player .pbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 2px 0; font-size: 12.5px; }
.player .pclose { border: 0; background: rgba(127,127,127,.25); border-radius: 8px; padding: 4px 9px; font-size: 12px; }
.wiki { margin: 6px 0; } .wiki p { margin: 6px 2px; font-size: 13px; }
.cam.wide { aspect-ratio: 16/10; width: 100%; display: block; } .cam.wide img { object-fit: cover; }
.card .cardimg.tall { max-height: 60vh; object-fit: contain; background: #000; }
.card h3 { margin: 12px 2px 6px; }
button.item { font: inherit; }
.demo-vid { aspect-ratio: 16/9; border-radius: 10px; background: #0b0716; display: grid; place-items: center; text-align: center; padding: 12px; color: #c9b6ff; font-size: 13px; border: 1px dashed rgba(255,255,255,.25); }
.cam.wide.cut { background: radial-gradient(circle at 50% 45%, #2a1a52, #0b0716 75%); } .cam.wide.cut img { object-fit: contain; padding: 10px; }

/* no scroll bars: wheel or hold-and-drag anywhere */
.list, .card, .layers, .chips, .filters, .tabs { scrollbar-width: none; -ms-overflow-style: none; }
.list::-webkit-scrollbar, .card::-webkit-scrollbar, .layers::-webkit-scrollbar, .chips::-webkit-scrollbar, .filters::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.list, .card, .chips, .filters { cursor: grab; } .dragging, .dragging * { cursor: grabbing !important; user-select: none; }
.tabs { overflow-x: auto; }

/* hover panel */
.tip { left: 0; top: 0; z-index: 30; width: 270px; padding: 10px 11px; pointer-events: none; font-size: 12.5px; border-color: rgba(255,214,10,.35); box-shadow: 0 10px 34px rgba(0,0,0,.6), 0 0 0 1px rgba(255,214,10,.08); }
.tip .tiprow { display: flex; gap: 9px; align-items: center; margin-bottom: 6px; } .tip .tiprow b { display: block; font-size: 14px; } .tip .tiprow span { font-size: 11.5px; }
.tip .tipicon { width: 38px; height: 38px; object-fit: contain; flex: 0 0 38px; }
.tip .tippic { width: 100%; max-height: 140px; object-fit: cover; border-radius: 9px; display: block; margin-bottom: 6px; } .tip .tippic.cut { object-fit: contain; background: radial-gradient(circle at 50% 45%, #2a1a52, #0b0716 75%); padding: 6px; }
.tip .tippicbox { display: none; } .tip p { margin: 4px 0 0; color: #d5d8de; } .tip .tipline { color: var(--yellow); font-weight: 600; } .tip .tiplive { color: #ff6b61; font-weight: 600; } .tip .tiphint { font-size: 11px; }
/* planet pictures are cut-outs: no dark square behind them */
.item img.thumb[src*="img/bodies"], .hero img { background: none; border-radius: 0; object-fit: contain; }
/* logo */
.logo { width: 30px; height: 30px; flex: 0 0 30px; align-self: center; margin: 0; border-radius: 0; box-shadow: none; background: url("logo.svg") center / contain no-repeat; }
.logo::after { display: none; }
