/* atlas.css — the constellation view. Dark, spacious, cinematic. Rides daily.css theme vars. */
.atlas-body { margin: 0; overflow: hidden; background: #05070d; color: var(--text); height: 100vh; height: 100dvh; font-family: var(--sans); }
#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; cursor: grab; }
#sky:active { cursor: grabbing; }

/* HUD */
.atlas-hud { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 18px 22px;
  background: linear-gradient(180deg, rgba(5,7,13,0.82) 0%, rgba(5,7,13,0) 100%); pointer-events: none; }
.atlas-hud > * { pointer-events: auto; }
.atlas-back { font-family: var(--display); font-size: 22px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; opacity: 0.9; }
.atlas-back span { font-style: italic; color: var(--cyan); }
.atlas-title { flex: 1; text-align: center; }
.atlas-h { font-family: var(--display); font-size: 20px; letter-spacing: 0.01em; }
.atlas-sub { font-size: 12.5px; color: var(--soft); margin-top: 3px; letter-spacing: 0.02em; }
.atlas-sub b { color: var(--cyan); font-weight: 700; }
.atlas-sub .rank { color: var(--gold); font-weight: 700; font-family: var(--display); font-style: italic; font-size: 15px; }
.atlas-sub .hud-detail { display: block; margin-top: 3px; font-size: 11px; color: var(--faint); letter-spacing: 0.02em; }
.atlas-sub .hud-detail b { color: var(--cyan); }
.atlas-actions { display: flex; gap: 8px; }
.atlas-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: var(--text); font-family: var(--sans);
  font-size: 13px; font-weight: 600; border-radius: 999px; padding: 8px 15px; cursor: pointer; transition: background .2s, border-color .2s; }
.atlas-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }

.atlas-hint { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 4; font-size: 12.5px; color: var(--faint);
  letter-spacing: 0.03em; background: rgba(5,7,13,0.6); padding: 7px 15px; border-radius: 999px; pointer-events: none; transition: opacity .6s; }
.atlas-hint.gone { opacity: 0; }

/* model filter (bottom-left): a single labelled button that opens an explained panel */
.atlas-models { position: fixed; left: 16px; bottom: 18px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; max-width: min(520px, 90vw); }
.atlas-mtoggle { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--soft);
  background: rgba(10,14,22,0.74); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: all .18s; }
.atlas-mtoggle:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.atlas-mtoggle .mt-star { color: var(--cyan); }
.atlas-mtoggle.open { border-color: rgba(58,214,230,0.5); color: var(--text); }
.atlas-mtoggle.active { background: var(--cyan); border-color: transparent; color: #06121a; }
.atlas-mtoggle.active .mt-star { color: #06121a; }
/* an explicit display wins over the [hidden] attribute's UA rule — restore hiding */
.atlas-mtoggle[hidden] { display: none; }
.atlas-mpanel { background: rgba(10,14,22,0.86); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 15px 16px; box-shadow: 0 16px 44px rgba(0,0,0,0.4); animation: mpanel-in .2s ease-out; }
@keyframes mpanel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.atlas-mhint { font-size: 12.5px; color: var(--soft); line-height: 1.5; margin-bottom: 12px; max-width: 40ch; }
.atlas-mchips { display: flex; flex-wrap: wrap; gap: 6px; max-width: min(500px, 86vw); }
.atlas-chip { font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; border-radius: 999px; padding: 5px 11px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: var(--soft); transition: all .18s; white-space: nowrap; }
.atlas-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.atlas-chip.on { background: var(--cyan); border-color: transparent; color: #06121a; }

/* active-model card: replaces the old floating top strip. Sits in the bottom-left cluster,
   right where the button was, so cause (you picked a model) and effect (this) are together. */
.atlas-active { background: rgba(10,14,22,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(58,214,230,0.4);
  border-radius: 16px; padding: 14px 15px; box-shadow: 0 16px 44px rgba(0,0,0,0.45); max-width: min(340px, 88vw); animation: mpanel-in .2s ease-out; }
.atlas-active .aa-top { font-size: 14px; color: var(--text); letter-spacing: 0.01em; }
.atlas-active .aa-top .aa-star { color: var(--cyan); }
.atlas-active .aa-top b { color: var(--cyan); font-weight: 700; }
.atlas-active .aa-def { font-family: var(--serif); font-size: 14px; line-height: 1.5; color: var(--onDarkSoft, #b9c4c5); margin: 7px 0 8px; }
.atlas-active .aa-hint { font-size: 12px; color: var(--soft); line-height: 1.45; margin-bottom: 12px; }
.atlas-active .aa-clear { width: 100%; background: var(--cyan); border: 0; color: #06121a; font-family: var(--sans); font-size: 13px; font-weight: 700; border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: filter .15s; }
.atlas-active .aa-clear:hover { filter: brightness(1.08); }

/* the detail panel */
.atlas-panel { position: fixed; z-index: 6; right: 18px; top: 50%; transform: translateY(-50%); width: min(380px, calc(100vw - 36px));
  max-height: 82vh; overflow-y: auto; background: rgba(11,15,24,0.94); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.13);
  border-radius: 20px; padding: 24px 24px 22px; box-shadow: 0 24px 70px rgba(0,0,0,0.55); animation: panel-in .32s cubic-bezier(.2,.9,.2,1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-50%) translateX(14px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }
@media (max-width: 640px) { .atlas-panel { right: 12px; left: 12px; top: auto; bottom: 12px; transform: none; width: auto; max-height: 62vh; animation: panel-up .32s cubic-bezier(.2,.9,.2,1); }
  @keyframes panel-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } } }
.atlas-panel .px { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--faint); font-size: 22px; line-height: 1; cursor: pointer; }
.atlas-panel .px:hover { color: var(--text); }
.p-dom { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-bottom: 12px; }
.p-title { font-family: var(--display); font-size: 25px; line-height: 1.2; margin: 0 0 4px; }
.p-state { font-size: 12.5px; color: var(--soft); margin-bottom: 16px; }
.p-state.lit { color: var(--good); }
.p-state.cooling { color: var(--gold); }
.p-state.fading { color: var(--soft); }
.atlas-sub .hud-detail .fade { color: var(--gold); font-weight: 700; }
.p-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 18px 0 9px; }
.p-models { display: flex; flex-wrap: wrap; gap: 6px; }
.p-model { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: var(--soft); cursor: pointer; }
.p-model:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.p-conn { border-top: 1px solid rgba(255,255,255,0.08); padding: 13px 0 0; margin-top: 6px; }
.p-conn:first-of-type { border-top: 0; }
.p-conn-h { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 5px; cursor: pointer; }
.p-conn-h:hover { color: var(--cyan); }
.p-conn-h .arrow { color: var(--cyan); }
.p-conn-m { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-left: 6px; }
.p-conn-line { font-family: var(--serif); font-size: 14px; line-height: 1.5; color: var(--onDarkSoft, #b9c4c5); }
.p-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; background: var(--cyan); color: #06222a; font-family: var(--sans);
  font-size: 14px; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 11px 20px; }
.p-cta.locked { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.16); }
