#app { min-height: 100dvh; }

/* ---------- Splash (boot / resolving) ---------- */
.splash {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}
.splash p { max-width: 34ch; margin: 0; }
.splash__mark {
  padding-left: 0.35em; /* optical centering for letter-spacing */
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: var(--text);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- Bare layout (status, and later sign-in screens) ---------- */
.bare {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 2.5rem;
}
.bare__header,
.bare__main {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}
.bare__header { margin-bottom: 1.5rem; }
.bare__main { flex: 1; }

/* ---------- App shell (authenticated workspace) ---------- */
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.shell__sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  background: rgba(13, 11, 23, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
}
.shell__body { min-width: 0; display: flex; flex-direction: column; }
.shell__topbar { display: none; }
.shell__backdrop { display: none; }
.shell__main {
  width: 100%;
  max-width: 1100px;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem;
}

@media (max-width: 859px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .shell__sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(84vw, 300px);
    padding-top: max(1.25rem, env(safe-area-inset-top));
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .is-nav-open .shell__sidebar {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }

  .shell__topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--topbar-h);
    padding: 0.5rem 1rem;
    padding-top: max(0.5rem, env(safe-area-inset-top));
    background: rgba(7, 6, 13, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .shell__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.6);
  }
}
