Add CSS environment variables for safe-area-inset to prevent content overlap with notch/home indicator on iOS devices. - Add padding-top and padding-bottom to body using env(safe-area-inset-*) - Mobile bottom navigation already respects safe-area-inset-bottom - viewport-fit=cover meta tag already present in all HTML pages
697 lines
15 KiB
CSS
697 lines
15 KiB
CSS
/* ───────────────────────────────────────────────────────────────
|
|
Spaxel App Shell — Page-level CSS Grid (§8e Layout)
|
|
Establishes one grid container per page. No absolute-positioned
|
|
layout containers — overlays use <dialog> or fixed slide-ins.
|
|
─────────────────────────────────────────────────────────────── */
|
|
|
|
/* ── Base body styles ── */
|
|
body {
|
|
background: var(--bg-page);
|
|
color: var(--text-primary);
|
|
font-family: var(--font-body);
|
|
margin: 0;
|
|
padding-top: env(safe-area-inset-top);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
|
|
/* ── App shell grid ── */
|
|
.app-shell {
|
|
display: grid;
|
|
grid-template-areas:
|
|
"header header"
|
|
"nav main"
|
|
"footer footer";
|
|
grid-template-columns: 260px 1fr;
|
|
grid-template-rows: auto 1fr auto;
|
|
min-height: 100dvh;
|
|
max-width: 1440px;
|
|
margin-inline: auto;
|
|
}
|
|
|
|
/* Named grid areas */
|
|
.app-shell > .app-header { grid-area: header; }
|
|
.app-shell > .app-nav { grid-area: nav; }
|
|
.app-shell > .app-main { grid-area: main; }
|
|
.app-shell > .app-footer { grid-area: footer; }
|
|
|
|
/* ── Full-width pages (no sidebar nav) ── */
|
|
.app-shell--full {
|
|
grid-template-areas:
|
|
"header"
|
|
"main"
|
|
"footer";
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
/* ── Live-view shell (3D canvas fills viewport) ──
|
|
Status bar = grid header (fixed height), scene = grid main.
|
|
Overlay panels float over the canvas with position:fixed;
|
|
they are NOT grid children. */
|
|
.app-shell--live {
|
|
display: grid;
|
|
grid-template-areas:
|
|
"header"
|
|
"main";
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: auto 1fr;
|
|
min-height: 100dvh;
|
|
max-width: none;
|
|
margin-inline: 0;
|
|
}
|
|
|
|
.app-shell--live > .app-header {
|
|
grid-area: header;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.app-shell--live > .app-main {
|
|
grid-area: main;
|
|
position: relative;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* ── Tablet: collapse sidebar nav ── */
|
|
@media (max-width: 1023px) {
|
|
.app-shell {
|
|
grid-template-areas:
|
|
"header"
|
|
"main"
|
|
"footer";
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.app-shell > .app-nav {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ── Mobile: single column + bottom nav ── */
|
|
@media (max-width: 639px) {
|
|
.app-shell,
|
|
.app-shell--full,
|
|
.app-shell--live {
|
|
grid-template-areas:
|
|
"header"
|
|
"main";
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.app-shell > .app-nav,
|
|
.app-shell > .app-footer {
|
|
display: none;
|
|
}
|
|
|
|
/* Bottom navigation for mobile */
|
|
.app-mobile-nav {
|
|
display: flex;
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: var(--slate-3);
|
|
border-top: 1px solid var(--border-default);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
z-index: 100;
|
|
}
|
|
|
|
.app-mobile-nav__list {
|
|
display: flex;
|
|
list-style: none;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.app-mobile-nav__item {
|
|
flex: 1;
|
|
text-align: center;
|
|
}
|
|
|
|
.app-mobile-nav__link {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--space-half);
|
|
padding: var(--space-2) 0;
|
|
color: var(--text-muted);
|
|
text-decoration: none;
|
|
font-size: var(--text-xs);
|
|
min-height: 44px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.app-mobile-nav__link--active {
|
|
color: var(--color-primary);
|
|
}
|
|
}
|
|
|
|
/* Desktop: hide mobile bottom nav */
|
|
@media (min-width: 640px) {
|
|
.app-mobile-nav {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ── Touch targets (all interactive elements) ── */
|
|
@media (max-width: 1023px) {
|
|
.app-shell button,
|
|
.app-shell--full button,
|
|
.app-shell--live button,
|
|
.app-shell a,
|
|
.app-shell--full a,
|
|
.app-shell--live a,
|
|
.app-shell input[type="checkbox"],
|
|
.app-shell--full input[type="checkbox"],
|
|
.app-shell--live input[type="checkbox"],
|
|
.app-shell select,
|
|
.app-shell--full select,
|
|
.app-shell--live select {
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
}
|
|
|
|
/* ── Shared header styling ── */
|
|
.app-header {
|
|
background: var(--slate-3);
|
|
border-bottom: 1px solid var(--border-default);
|
|
padding: 0 var(--space-6);
|
|
height: 56px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
z-index: 100;
|
|
}
|
|
|
|
.app-header__logo {
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--fw-heading);
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.app-header__links {
|
|
display: flex;
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.app-header__link {
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
font-size: var(--text-sm);
|
|
padding: var(--space-2) var(--space-3);
|
|
border-radius: var(--radius-control);
|
|
transition: background var(--transition-fast), color var(--transition-fast);
|
|
}
|
|
|
|
.app-header__link:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.app-header__link--active {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
.app-header__links {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ── Shared sidebar nav ── */
|
|
.app-nav {
|
|
background: var(--slate-2);
|
|
border-right: 1px solid var(--border-default);
|
|
padding: var(--space-4);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* ── Main content area ── */
|
|
.app-main {
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* ── Live-view status bar (grid header in app-shell--live) ── */
|
|
.live-status-bar {
|
|
background: var(--live-status-bg);
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 var(--space-4);
|
|
padding-top: max(0px, env(safe-area-inset-top));
|
|
gap: var(--space-6);
|
|
font-size: var(--text-sm);
|
|
color: var(--text-primary);
|
|
border-bottom: 1px solid var(--border-default);
|
|
flex-wrap: nowrap;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
white-space: nowrap;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
/* ── Live-view scene container (grid main in app-shell--live) ── */
|
|
.live-scene {
|
|
width: 100%;
|
|
height: 100%;
|
|
touch-action: none;
|
|
/* Mobile-specific touch handling improvements */
|
|
-webkit-touch-callout: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
/* ── Live-view overlay panels (float over canvas) ──
|
|
These use position:fixed intentionally — they are transient
|
|
overlays, NOT layout containers. The grid children are the
|
|
status bar (header) and the canvas (main). */
|
|
.live-panel {
|
|
background: var(--live-panel-bg);
|
|
border-radius: var(--radius-card);
|
|
z-index: 100;
|
|
overflow-y: auto;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.live-panel--left {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
left: var(--space-5);
|
|
width: 280px;
|
|
max-height: calc(100vh - 80px);
|
|
padding: var(--space-3);
|
|
}
|
|
|
|
.live-panel--right {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
right: var(--space-5);
|
|
width: 400px;
|
|
padding: var(--space-3);
|
|
}
|
|
|
|
.live-panel--presence {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
right: var(--space-5);
|
|
width: 240px;
|
|
max-height: calc(100vh - 80px);
|
|
padding: var(--space-3);
|
|
}
|
|
|
|
/* Legacy ID-based selectors (match live.html panel IDs) */
|
|
#node-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
left: var(--space-5);
|
|
width: 280px;
|
|
max-height: calc(100vh - 80px);
|
|
background: var(--live-node-bg);
|
|
border-radius: var(--radius-card);
|
|
padding: var(--space-3);
|
|
z-index: 100;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#chart-panel {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
right: var(--space-5);
|
|
width: 400px;
|
|
height: 260px;
|
|
background: var(--live-chart-bg);
|
|
border-radius: var(--radius-card);
|
|
padding: var(--space-3);
|
|
z-index: 100;
|
|
}
|
|
|
|
#presence-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
right: var(--space-5);
|
|
width: 300px;
|
|
background: var(--live-panel-bg);
|
|
border-radius: var(--radius-card);
|
|
padding: var(--space-3);
|
|
z-index: 100;
|
|
}
|
|
|
|
/* ── Tablet breakpoint for live panels ── */
|
|
@media (max-width: 1023px) {
|
|
.live-panel--left,
|
|
.live-panel--right,
|
|
.live-panel--presence,
|
|
#node-panel,
|
|
#presence-panel {
|
|
display: none;
|
|
}
|
|
|
|
#chart-panel {
|
|
width: calc(100% - 16px);
|
|
right: var(--space-2);
|
|
left: var(--space-2);
|
|
bottom: calc(8px + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
/* ── Mobile breakpoint for live panels ── */
|
|
@media (max-width: 639px) {
|
|
#chart-panel {
|
|
width: calc(100% - 16px);
|
|
right: var(--space-2);
|
|
left: var(--space-2);
|
|
bottom: var(--space-2);
|
|
height: 200px;
|
|
}
|
|
}
|
|
|
|
/* ── Mobile bottom nav safe-area on live page ── */
|
|
@media (max-width: 639px) {
|
|
.app-shell--live .live-status-bar {
|
|
height: auto;
|
|
min-height: 44px;
|
|
padding: var(--space-2) var(--space-3);
|
|
flex-wrap: wrap;
|
|
gap: var(--space-3);
|
|
}
|
|
}
|
|
|
|
/* ── Dialog-based modals (replaces fixed-position overlays) ── */
|
|
dialog.app-dialog {
|
|
background: var(--bg-card);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-modal);
|
|
padding: 0;
|
|
max-width: 560px;
|
|
width: 92%;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 8px 32px var(--shadow-xl);
|
|
}
|
|
|
|
dialog.app-dialog::backdrop {
|
|
background: var(--overlay-strong);
|
|
backdrop-filter: blur(2px);
|
|
}
|
|
|
|
/* ── Setup toolbar (floats over 3D canvas in setup page) ── */
|
|
.setup-toolbar {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
gap: var(--space-2);
|
|
background: var(--overlay-strong);
|
|
padding: var(--space-2) var(--space-4);
|
|
border-radius: var(--radius-card);
|
|
z-index: 100;
|
|
}
|
|
|
|
.setup-toolbar button {
|
|
background: var(--slate-5);
|
|
border: 1px solid var(--border-default);
|
|
color: var(--text-primary);
|
|
padding: var(--space-2) var(--space-4);
|
|
border-radius: var(--radius-control);
|
|
cursor: pointer;
|
|
font-size: var(--text-sm);
|
|
font-family: var(--font-body);
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
|
|
.setup-toolbar button:hover {
|
|
background: var(--slate-6);
|
|
}
|
|
|
|
.setup-toolbar button.active {
|
|
background: var(--blue-5);
|
|
border-color: var(--blue-8);
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.setup-toolbar {
|
|
bottom: calc(8px + env(safe-area-inset-bottom));
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
transform: none;
|
|
width: auto;
|
|
overflow-x: auto;
|
|
flex-wrap: nowrap;
|
|
}
|
|
|
|
.setup-toolbar button {
|
|
flex-shrink: 0;
|
|
padding: var(--space-2) var(--space-3);
|
|
font-size: var(--text-xs);
|
|
}
|
|
}
|
|
|
|
/* ── Mobile body padding for bottom nav ── */
|
|
@media (max-width: 639px) {
|
|
.has-mobile-nav {
|
|
padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
/* ── Onboarding wizard overlay ── */
|
|
#wizard-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
/* ── Diurnal learning banner ── */
|
|
#diurnal-banner {
|
|
position: fixed;
|
|
top: 45px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 150;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#diurnal-banner {
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
/* ── Anomaly learning banner ── */
|
|
#anomaly-learning-banner {
|
|
position: fixed;
|
|
top: 45px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 150;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#anomaly-learning-banner {
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
/* ── Security mode indicator ── */
|
|
#security-mode-indicator {
|
|
position: fixed;
|
|
top: 45px;
|
|
right: var(--space-5);
|
|
z-index: 150;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#security-mode-indicator {
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
right: var(--space-2);
|
|
}
|
|
}
|
|
|
|
/* ── Link health panel (floats over canvas) ── */
|
|
.link-health-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
right: var(--space-5);
|
|
z-index: 100;
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
.link-health-panel {
|
|
right: var(--space-2);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.link-health-panel {
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
max-height: 40vh;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
/* ── Replay control bar (shown during replay) ── */
|
|
.replay-control-bar {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 150;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.replay-control-bar {
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
transform: none;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
/* ── Replay tuning panel (floats over canvas) ── */
|
|
.replay-tuning-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
right: 340px;
|
|
width: 280px;
|
|
z-index: 100;
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
.replay-tuning-panel {
|
|
right: var(--space-2);
|
|
left: var(--space-2);
|
|
width: auto;
|
|
max-width: 340px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.replay-tuning-panel {
|
|
right: var(--space-2);
|
|
left: var(--space-2);
|
|
width: auto;
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
/* ── Fresnel zone debug tooltip (positioned by JS) ── */
|
|
.fresnel-tooltip {
|
|
position: fixed;
|
|
display: none;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ── Portal editor panel (floats over canvas) ── */
|
|
#portal-editor-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
left: 320px;
|
|
width: 240px;
|
|
z-index: 100;
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
#portal-editor-panel {
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
width: auto;
|
|
max-width: 300px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#portal-editor-panel {
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
width: auto;
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
/* ── Room editor panel (floats over canvas) ── */
|
|
#room-editor-panel {
|
|
position: fixed;
|
|
top: var(--space-16);
|
|
left: 320px;
|
|
width: 240px;
|
|
z-index: 100;
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
#room-editor-panel {
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
width: auto;
|
|
max-width: 300px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#room-editor-panel {
|
|
left: var(--space-2);
|
|
right: var(--space-2);
|
|
width: auto;
|
|
top: auto;
|
|
bottom: calc(60px + env(safe-area-inset-bottom));
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
/* ── GDOP legend (floats over canvas) ── */
|
|
#gdop-legend {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
left: 320px;
|
|
z-index: 100;
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 1023px) {
|
|
#gdop-legend {
|
|
left: var(--space-2);
|
|
bottom: calc(280px + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
#gdop-legend {
|
|
left: var(--space-2);
|
|
bottom: calc(220px + env(safe-area-inset-bottom));
|
|
}
|
|
}
|