/* The same dark glass, cold highlights and continuous surfaces across modules. */
body:not([data-route="home"]):not([data-route="workspace"]) .veil {
  background:radial-gradient(ellipse at 75% 0%,#b8c9f01c,transparent 45%),
    linear-gradient(150deg,#080809ee,#08080991 75%,#080809e0);
}
.page-head h1 { text-shadow:0 0 34px #deedff20; }
.page-head .primary,.spatial-actions .primary {
  border-radius:999px;
  background:linear-gradient(150deg,#fff,#cbd1e4);
  box-shadow:inset 0 1px 2px #fff,inset 0 -2px 4px #9da8c17a,0 6px 24px #d2dfff19;
}
.record,.program,.settings-section { border-color:#dce9ff35; }
.program.active { border-color:#d9ecff85; background:linear-gradient(155deg,#c1d8ff26,#b6c9ef13); }

html:has(body[data-workspace-board]) { overflow:hidden; scrollbar-gutter:auto; }
body[data-workspace-board] { overflow:hidden; overscroll-behavior:none; }
body[data-route="workspace"] .topbar { z-index:30; }
body[data-workspace-board] .statusbar { display:none; }
.spatial-workspace {
  position:fixed;
  inset:0;
  --workspace-top:92px;
  --workspace-side:clamp(12px,3vw,44px);
}
.spatial-workspace .board {
  position:absolute;
  inset:0;
  height:auto;
  min-height:0;
  border:0;
  border-radius:0;
  background:radial-gradient(ellipse at 48% 48%,#202537ad,transparent 64%),
    radial-gradient(ellipse at 83% 78%,#14192690,transparent 55%),#08090deb;
  box-shadow:none;
  -webkit-touch-callout:none;
  cursor:grab;
}
.spatial-workspace .board:active { cursor:grabbing; }
.spatial-workspace .board::before {
  background-image:radial-gradient(circle,#c4dbff43 .75px,transparent 1.25px),
    linear-gradient(90deg,#b0c7ff16 1px,transparent 1px),
    linear-gradient(#b0c7ff16 1px,transparent 1px);
  background-size:28px 28px,112px 112px,112px 112px;
  background-position:var(--grid-x,0px) var(--grid-y,0px);
  mask-image:radial-gradient(ellipse at center,#000 15%,#0008 68%,transparent 100%);
  opacity:.52;
}
#bubble-links {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}
.spatial-workspace .world { transition:none; }
.spatial-workspace .board-empty { gap:8px; color:#c2ccd9; }
.spatial-workspace .board-empty strong { font-size:1.22rem; color:#f3f6ff; }
.spatial-workspace .board-empty span { font-size:.9rem; }
.spatial-bubble {
  width:196px;
  height:128px;
  padding:16px 21px;
  border-radius:35px;
  color:#f1f6ff;
  text-align:left;
  align-items:flex-start;
  overflow:hidden;
  background:radial-gradient(ellipse at 15% -45%,#e9f3ff72,transparent 70%),
    linear-gradient(146deg,#2f394de6,#17202de9 60%,#364b62d9);
  box-shadow:inset 0 1px 1px #e7f5ff74,inset 0 -2px 6px #95bded29,
    0 0 18px #79aaff1a,0 12px 32px #0009;
  transition:border-color .22s,box-shadow .22s;
}
.spatial-bubble:hover,.spatial-bubble:focus-visible {
  background:radial-gradient(ellipse at 15% -45%,#f3f7ff8e,transparent 67%),
    linear-gradient(146deg,#384861f2,#182537fa 60%,#47647fea);
  box-shadow:inset 0 1px 2px #e7f5ff8a,0 0 22px #9ed4ff38,0 12px 32px #0008;
}
.spatial-bubble:active { transform:translate(-50%,-50%); }
.spatial-bubble b {
  width:100%;
  line-height:1.17;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.spatial-bubble small { color:#c0ccda; }
.spatial-bubble .symbol { line-height:1; color:#d9f0ff; text-shadow:0 0 14px #79c6ff; }
.link-active .spatial-bubble { cursor:crosshair; }
.spatial-bubble.link-source {
  border-color:#e0f5ff;
  box-shadow:inset 0 0 18px #9cd9ff50,0 0 0 4px #bce7ff32,0 0 42px #78bdff65;
}
.spatial-header,.spatial-footer {
  position:absolute;
  inset-inline:var(--workspace-side);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
}
.spatial-header { top:var(--workspace-top); }
.spatial-footer { bottom:max(14px,env(safe-area-inset-bottom)); align-items:flex-end; }
.spatial-location,.spatial-actions,.spatial-footer .board-controls {
  min-width:0;
  pointer-events:auto;
}
.spatial-location { max-width:52%; padding:12px 16px; border-radius:18px; }
.spatial-location h1 {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  margin:0;
  font-size:clamp(1rem,2.4vw,1.5rem);
  letter-spacing:-.03em;
  font-weight:630;
}
.spatial-location .breadcrumbs {
  margin:5px 0 0;
  padding:2px;
  gap:5px;
  overscroll-behavior:contain;
}
.spatial-location .breadcrumbs button {
  padding:5px 9px;
  line-height:1.15;
  font-size:.8rem;
}
.spatial-actions { display:flex; gap:5px; padding:4px; border-radius:28px; flex:none; }
.spatial-actions button { padding:8px 13px; }
.spatial-footer .board-controls { position:relative; inset:auto; gap:2px; flex:none; }
.spatial-footer .board-controls span { min-width:44px; }
.spatial-footer .board-controls button[aria-pressed="true"] { background:#b6d9ff36; }
.spatial-hint {
  max-width:290px;
  color:#d1dbea;
  font-size:.82rem;
  line-height:1.35;
  text-align:right;
  text-shadow:0 1px 5px #000;
}
@media(max-width:620px) {
  .spatial-location { max-width:48%; padding:10px 12px; }
  .spatial-actions button { padding-inline:9px; font-size:.83rem; }
  .spatial-footer { flex-wrap:wrap; gap:8px; }
  .spatial-hint { max-width:100%; text-align:left; flex-basis:100%; padding-inline:4px; }
}
