/* Full-screen app shell — no scrolling */
#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  /* Safe area insets for iPhone notch/home bar */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ── Header ─────────────────────────────────────────────── */
#header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(52px, calc(env(safe-area-inset-top) + 16px)) 24px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

/* ── Logo ───────────────────────────────────────────────── */
#logo {
  position: absolute;
  left: 32px;
  width: 66%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Start centered */
  top: 50%;
  transform: translateY(-50%);
  transition:
    top 0.8s var(--ease-smooth),
    transform 0.8s var(--ease-smooth);
  z-index: 5;
}

#logo.settled {
  top: max(52px, calc(env(safe-area-inset-top) + 16px));
  transform: translateY(0);
}

/* ── Chat scroll area ───────────────────────────────────── */
#chat-scroll {
  position: absolute;
  inset: 0;
  bottom: 80px; /* height of input bar */
  overflow-y: auto;
  padding: 110px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Hide until animation done */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#chat-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Input bar (pinned to bottom) ───────────────────────── */
#input-bar-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 20px max(24px, env(safe-area-inset-bottom));
  background: var(--color-bg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

#input-bar-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}
