/* /constellation: an experimental, isolated page. Nothing else links this
   file. The sky is one full-screen canvas; everything else floats on top. */
html, body.cs-body { margin: 0; height: 100%; overflow: hidden; background: #03040a; color: #e4e6ff; overscroll-behavior: none; }
#csSky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#csSky.is-dragging { cursor: grabbing; }

.cs-hud { position: fixed; z-index: 5; font-family: var(--font-mono); }
.cs-title { left: 18px; top: 14px; max-width: min(420px, calc(100vw - 220px)); pointer-events: none; }
.cs-title a { pointer-events: auto; }
.cs-back { font-size: 12px; color: #9aa0c8; text-decoration: none; }
.cs-back:hover { color: #fff; }
.cs-title h1 { margin: 6px 0 2px; font-size: clamp(18px, 3vw, 24px); font-weight: 600; letter-spacing: .02em; text-shadow: 0 0 18px rgba(140, 150, 255, .5); }
.cs-title p { margin: 0; font-size: 12px; color: #8a90b8; font-family: var(--font-sans); }

.cs-readout { right: 196px; top: 16px; font-size: 11px; color: #8a90b8; text-align: right; line-height: 1.6; pointer-events: none; white-space: nowrap; }
.cs-map { right: 16px; top: 14px; width: 168px; height: 120px; border-radius: 10px; border: 1px solid #2a2f5a; background: rgba(8, 10, 24, .75); cursor: pointer; }

.cs-near {
  left: 50%; top: calc(50% + 46px); transform: translateX(-50%);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  background: rgba(14, 16, 36, .85); border: 1px solid #3a4180; color: #dfe3ff; pointer-events: none;
}
.cs-near kbd { border: 1px solid #4a5190; border-radius: 4px; padding: 0 5px; margin: 0 2px; }

.cs-help { left: 16px; bottom: 16px; max-width: 360px; font-size: 11.5px; color: #aab0d8; }
.cs-help-toggle { font: inherit; color: #c9ccf0; background: rgba(14, 16, 36, .85); border: 1px solid #2a2f5a; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.cs-help-body { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(8, 10, 24, .8); border: 1px solid #2a2f5a; }
.cs-help-body p { margin: 0 0 5px; line-height: 1.6; }
.cs-help-body p:last-child { margin: 0; }
.cs-help-body b { color: #fff; font-weight: 600; margin-right: 4px; }
.cs-help kbd { display: inline-block; min-width: 18px; text-align: center; border: 1px solid #3a4180; border-radius: 4px; padding: 0 4px; margin: 0 1px; color: #fff; }
.cs-help[data-closed] .cs-help-body { display: none; }

.cs-pad { position: fixed; z-index: 6; right: 16px; bottom: 16px; display: none; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); gap: 6px; }
.cs-pad button { border-radius: 12px; border: 1px solid #3a4180; background: rgba(14, 16, 36, .8); color: #dfe3ff; font: 600 12px var(--font-mono); touch-action: none; user-select: none; -webkit-user-select: none; }
.cs-pad button:active, .cs-pad button.is-on { background: #3a4180; }
.cs-pad [data-k="up"] { grid-column: 2; grid-row: 1; }
.cs-pad [data-k="left"] { grid-column: 1; grid-row: 2; }
.cs-pad [data-k="down"] { grid-column: 2; grid-row: 3; }
.cs-pad [data-k="right"] { grid-column: 3; grid-row: 2; }
.cs-pad [data-k="climb"] { grid-column: 1; grid-row: 1; font-size: 10px; }
.cs-pad [data-k="dive"] { grid-column: 3; grid-row: 1; font-size: 10px; }
@media (pointer: coarse) { .cs-pad { display: grid; } .cs-help { bottom: auto; top: 96px; } .cs-help[data-closed] { top: 96px; } }

.cs-card {
  position: fixed; z-index: 8; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px)); padding: 14px 16px 16px;
  background: rgba(12, 14, 32, .94); border: 1px solid #3a4180; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(110, 120, 255, .15);
  font-family: var(--font-sans); animation: cs-up .25s ease;
}
@keyframes cs-up { from { transform: translate(-50%, 20px); opacity: 0; } }
.cs-card-top { display: flex; gap: 12px; align-items: center; }
.cs-card img { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.cs-card h2 { margin: 0; font-size: 18px; }
.cs-card .cs-sub { font: 11px var(--font-mono); color: #9aa0c8; margin-top: 3px; }
.cs-card p { margin: 10px 0 12px; font-size: 13.5px; line-height: 1.5; color: #c4c8ee; }
.cs-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-btn { font: 600 12px var(--font-mono); padding: 8px 14px; border-radius: 999px; text-decoration: none; color: #dfe3ff; border: 1px solid #3a4180; background: transparent; cursor: pointer; }
.cs-btn:hover { background: #1c2048; }
.cs-btn-go { background: #8b7cf6; border-color: #8b7cf6; color: #120f1f; }
.cs-btn-go:hover { background: #a194ff; }
.cs-card-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #9aa0c8; font-size: 20px; cursor: pointer; }
.cs-card-hint { margin-top: 10px; font: 10.5px var(--font-mono); color: #7a80a8; }
@media (pointer: coarse) { .cs-card { bottom: 186px; } }

/* The plain list, for screen readers and anyone who wants it: visually hidden. */
.cs-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cs-list:focus-within { position: fixed; z-index: 9; inset: 20px; width: auto; height: auto; clip: auto; overflow: auto; background: #0b0c18; border: 1px solid #3a4180; border-radius: 12px; padding: 16px; }
.cs-list a { color: #c9ccf0; }

@media (max-width: 640px) { .cs-readout { display: none; } .cs-map { width: 120px; height: 86px; } .cs-title { max-width: calc(100vw - 160px); } .cs-title p { display: none; } }
@media (prefers-reduced-motion: reduce) { .cs-card { animation: none; } }
