* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--nebula-color-bg);
  color: var(--nebula-color-text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Flat background: no blur layers ─── */
#nebula-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.nebula-layer.gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(79, 216, 255, 0.06), transparent 38%),
    radial-gradient(circle at 85% 80%, rgba(157, 79, 224, 0.07), transparent 38%),
    linear-gradient(165deg, #050810 0%, #070a14 40%, #0a0d1c 70%, #0d0a1e 100%);
}

.nebula-layer.starfield {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(79, 216, 255, 0.4) 0.5px, transparent 1px);
  background-size: 200px 200px, 300px 300px;
  background-position: 0 0, 140px 110px;
  opacity: 0.18;
}

/* fog and vignette layers: hidden for Zero-Blur Policy */
.nebula-layer.fog,
.nebula-layer.vignette {
  display: none;
}

/* ─── No shell depth blur ─── */
.shell-chrome,
.shell-depth-blur {
  display: none;
}

/* ─── Root layout: sidebar + main ─── */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

/* ─── Guide sidebar mount ─── */
.guide-mount {
  flex-shrink: 0;
  height: 100%;
}

/* ─── Main content area ─── */
.app-main-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

.placeholder-view .placeholder-body {
  margin: var(--nebula-spacing-lg);
  max-width: 720px;
}

.placeholder-copy {
  margin: var(--nebula-spacing-md) 0 var(--nebula-spacing-lg);
  color: var(--nebula-color-muted);
  line-height: 1.5;
}

.placeholder-back {
  min-height: 52px;
  padding: 0 var(--nebula-spacing-lg);
  border: none;
  border-radius: var(--nebula-radius-pill);
  background: var(--nebula-color-panel-alt);
  color: var(--nebula-color-text);
  font-weight: 600;
  cursor: pointer;
}

.app-shell {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* ─── View transitions ─── */
.view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(24px);
}

.view.view-entered {
  opacity: 1;
  transform: translateX(0);
  transition:
    transform var(--nebula-duration-slow) var(--nebula-ease-console),
    opacity var(--nebula-duration-nav) var(--nebula-ease-standard);
}

/* ─── Shared shell elements ─── */
.shell-topbar {
  display: flex;
  flex-direction: column;
  padding: 14px var(--nebula-spacing-xl);
  border-bottom: 1px solid var(--nebula-color-border);
  flex-shrink: 0;
}

.shell-brand {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  color: var(--nebula-color-text);
}

.shell-time {
  letter-spacing: 0.05em;
  font-size: 16px;
  font-weight: 600;
  color: var(--nebula-color-muted);
}

.shell-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--nebula-radius-pill);
  border: 2px solid rgba(79, 216, 255, 0.3);
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.8), rgba(75, 81, 155, 0.7));
}

.shell-topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.shell-accent-line {
  display: none;
}

.shell-status {
  display: inline-flex;
  align-items: center;
  gap: var(--nebula-spacing-md);
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-title {
  margin: 0;
  font-size: var(--nebula-type-display);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.muted {
  color: var(--nebula-color-muted);
}

/* ─── Footer hints bar ─── */
.app-footer {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 var(--nebula-spacing-xl) var(--nebula-spacing-sm);
  border-top: 1px solid var(--nebula-color-border);
  display: flex;
  align-items: center;
}

.hint-row {
  display: flex;
  align-items: center;
  gap: var(--nebula-spacing-lg);
  color: var(--nebula-color-muted);
}

.hint {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}

/* ─── Background animations ─── */
@keyframes starfieldShift {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-140px, -110px, 0); }
}

.nebula-layer.starfield {
  animation: starfieldShift 60s linear infinite;
}
