#app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.boot-skeleton {
  width: 100%;
  height: 100%;
  background: var(--bg);
}

#toast-container {
  position: fixed;
  bottom: calc(var(--space-md) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  width: min(420px, calc(100vw - var(--space-lg)));
}

.toast {
  pointer-events: auto;
  background: var(--bg-elevated);
  color: var(--text);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  animation: slide-in-bottom 240ms ease-out;
  border-left: 3px solid var(--info);
}

.toast.toast--success { border-left-color: var(--success); }
.toast.toast--error { border-left-color: var(--danger); }
.toast.toast--warning { border-left-color: var(--warning); }
.toast.is-leaving {
  animation: slide-out-bottom 240ms ease-in forwards;
}

.error-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
  gap: var(--space-md);
  background: var(--bg);
  z-index: 100;
}

.error-screen__title {
  font-size: 1.4rem;
  font-weight: 700;
}

.error-screen__detail {
  color: var(--text-secondary);
  max-width: 480px;
}

.error-screen__action {
  margin-top: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.read-only-banner,
.offline-banner {
  position: fixed;
  top: var(--safe-top);
  left: 0;
  right: 0;
  background: rgba(245, 166, 35, 0.85);
  color: #1a0a00;
  padding: 6px var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  z-index: 60;
}
.offline-banner {
  background: rgba(229, 9, 20, 0.85);
  color: white;
}

.start-gate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.start-gate__btn {
  background: var(--accent);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: transform var(--t-fast);
}
.start-gate__btn:active { transform: scale(0.94); }
