GODSIGH/css/style.css
monsterrobotparty d06ebf07cb 🪐 portal: the orrery gets a door — 🪐 SOLARGOD button deep-links at GODSIGH's scrubbed moment
Reciprocal to SOLARGOD's Earth-card link into GODSIGH. A subtle HUD pill
(above the footer, styled to the mode-button family) opens the orrery in a
new tab. The href is rebuilt fresh at click time from viewer.clock.currentTime
via the shared `#t=@<unixMs>` convention, so scrubbing GODSIGH's clock carries
straight through to SOLARGOD's sim time.

- index.html: <a#solargod-link.portal-link> between #layers and footer
- css: .portal-link (matches .modes button; accent on hover)
- ui.js: wireSolargodLink(getMs) — rebuilds href on pointerdown+click
  (covers ⌘/middle-click new-tab); Cesium stays out of the DOM module
- main.js: wire it with a getMs closure over viewer.clock

Verified in-browser: button renders, zero console errors, all layers boot;
live click → href tracks the clock; scrub -3h → href exactly 3h behind now +
chip flips SCRUBBED + live layers pause; opening the link launches SOLARGOD
in SCRUBBED state at the passed epoch (its hash echoes the exact ms).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 09:45:48 +10:00

256 lines
5.5 KiB
CSS

:root {
--panel: rgba(10, 14, 18, 0.82);
--panel-solid: rgba(10, 14, 18, 0.95);
--border: rgba(255, 255, 255, 0.08);
--accent: #35e0ff;
--text: #d6e2ea;
--dim: #7c8b97;
--ok: #46e08a;
--warn: #ffcf50;
--err: #ff5964;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
height: 100%;
overflow: hidden;
background: #05080b;
color: var(--text);
font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
#cesiumContainer {
position: absolute;
inset: 0;
}
/* ---- HUD ---- */
#hud {
position: absolute;
top: 14px;
left: 14px;
width: 288px;
max-height: calc(100vh - 28px);
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 12px;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
z-index: 10;
font-size: 12px;
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
#hud header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.brand {
font-weight: 700;
letter-spacing: 0.5px;
font-size: 14px;
color: #fff;
}
.brand span {
color: var(--accent);
font-weight: 500;
font-size: 11px;
}
#live-chip {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.5px;
padding: 3px 8px;
border-radius: 999px;
white-space: nowrap;
border: 1px solid transparent;
}
#live-chip[data-state="live"] {
color: var(--ok);
border-color: rgba(70, 224, 138, 0.4);
background: rgba(70, 224, 138, 0.1);
}
#live-chip[data-state="scrub"] {
color: var(--warn);
border-color: rgba(255, 207, 80, 0.4);
background: rgba(255, 207, 80, 0.1);
font-size: 9px;
}
.modes {
display: flex;
gap: 6px;
}
.modes button {
flex: 1;
padding: 6px 8px;
font: inherit;
font-size: 11px;
color: var(--dim);
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
border-radius: 8px;
cursor: pointer;
transition: all 0.15s;
}
.modes button:hover { color: var(--text); }
.modes button.active {
color: #04121a;
background: var(--accent);
border-color: var(--accent);
font-weight: 700;
}
/* ---- portal to SOLARGOD (sibling orrery) ---- */
.portal-link {
display: block;
text-align: center;
padding: 6px 8px;
font-size: 11px;
color: var(--dim);
text-decoration: none;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.15s;
}
.portal-link:hover {
color: var(--accent);
border-color: var(--accent);
}
/* ---- layer rows ---- */
#layers {
display: flex;
flex-direction: column;
gap: 1px;
overflow-y: auto;
}
/* ---- collapsible category sections ---- */
.cat:has(.cat-body:empty) { display: none; } /* hide unused categories */
.cat-header {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 4px 3px;
margin-top: 4px;
cursor: pointer;
user-select: none;
color: var(--dim);
font-size: 9.5px;
letter-spacing: 0.6px;
text-transform: uppercase;
border-top: 1px solid var(--border);
}
.cat-header:hover { color: var(--text); }
.cat-chevron { font-size: 8px; width: 8px; transition: transform 0.15s; }
.cat.collapsed .cat-chevron { transform: rotate(-90deg); }
.cat.collapsed .cat-body { display: none; }
.cat-body { display: flex; flex-direction: column; gap: 1px; }
.layer-row {
padding: 5px 4px;
border-radius: 6px;
}
.layer-row:hover { background: rgba(255, 255, 255, 0.03); }
.layer-row label {
display: flex;
align-items: center;
gap: 7px;
cursor: pointer;
user-select: none;
}
.layer-row input[type="checkbox"] {
accent-color: var(--accent);
margin: 0;
cursor: pointer;
}
.layer-row .lname {
flex: 1;
color: var(--text);
}
.dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex: none;
background: var(--dim);
transition: background 0.2s;
}
.dot[data-state="ok"] { background: var(--ok); box-shadow: 0 0 6px rgba(70, 224, 138, 0.6); }
.dot[data-state="warn"] { background: var(--warn); box-shadow: 0 0 6px rgba(255, 207, 80, 0.6); }
.dot[data-state="err"] { background: var(--err); box-shadow: 0 0 6px rgba(255, 89, 100, 0.6); }
.dot[data-state="off"] { background: var(--dim); }
.lstatus {
padding: 0 0 0 24px;
color: var(--dim);
font-size: 10px;
line-height: 1.3;
min-height: 0;
}
.lstatus:empty { display: none; }
#hud footer {
border-top: 1px solid var(--border);
padding-top: 8px;
color: var(--dim);
font-size: 9.5px;
line-height: 1.4;
}
#hud footer .demo { color: var(--warn); }
/* ---- aircraft pick overlay ---- */
#pick-overlay {
position: absolute;
bottom: 130px;
right: 14px;
width: 220px;
padding: 12px 14px;
background: var(--panel-solid);
border: 1px solid var(--border);
border-left: 2px solid var(--accent);
border-radius: 10px;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
z-index: 10;
font-size: 11px;
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
#pick-overlay[hidden] { display: none; }
#pick-overlay .po-title {
font-weight: 700;
color: #fff;
font-size: 13px;
margin-bottom: 6px;
}
#pick-overlay .po-row {
display: flex;
justify-content: space-between;
gap: 10px;
padding: 1px 0;
}
#pick-overlay .po-row span:first-child { color: var(--dim); }
#pick-overlay .po-close {
position: absolute;
top: 8px;
right: 10px;
cursor: pointer;
color: var(--dim);
font-size: 14px;
}
#pick-overlay .po-close:hover { color: var(--text); }
/* Keep Cesium's info box on-theme without fighting it */
.cesium-infoBox { font-family: ui-monospace, monospace; }