/* Kavvi chat home, all at once (chathome-20261014) - see kv-chathome-20261014.js. Prefix kvch. */

/* Until the home is finished it is laid out but not shown (so it can be measured), and the Free layer's
   greeting and question count wait with it. Then everything fades in together, once. */
html.kvch-wait .intent-home,
html.kvch-wait .kvfl-hello,
html.kvch-wait .kvfl-count,
html.kvch-wait .kvfl-wall { opacity: 0 !important; transition: none !important; animation: none !important; }
html.kvch-in .intent-home { animation: kvch-in .32s ease-out both; }
@keyframes kvch-in { from { opacity: 0; } to { opacity: 1; } }

/* Anything that still arrives after that (a slow connection) appears below the composer with a short fade,
   instead of popping. */
.kv-app-shell .intent-home .intent-home__panel,
.kv-app-shell .intent-home .intent-home__cards > *,
.kv-app-shell .intent-home .kv-today-slot > * { animation: kvch-in .3s ease-out both; }

/* Phones: the home starts at the top and grows downward. It was centred (chat-polish's
   `.kv-app-shell.os-nav-mode .intent-home { justify-content: center }`), so every card that loaded moved the
   greeting and the composer up. The settled position is unchanged (64 px under the navbar). */
@media (max-width: 760px) {
  .kv-app-shell.os-nav-mode .intent-home { justify-content: flex-start; }
  /* The chat area's top fade (`.chat-canvas:after`, ~100 px of page colour) is for messages scrolling away; on the
     home it lay over the greeting and washed it out. Here it is only a thin edge. */
  .kv-app-shell .reconstructed-chat .chat-canvas:has(.intent-home)::after { height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html.kvch-in .intent-home,
  .kv-app-shell .intent-home .intent-home__panel,
  .kv-app-shell .intent-home .intent-home__cards > *,
  .kv-app-shell .intent-home .kv-today-slot > * { animation: none; }
}
