[hidden] { display: none !important; }

/* The conversation owns the viewport: messages scroll, the composer never covers them. */
.app-shell,
.chat-view {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.chat-scroll {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 24px;
}

.messages {
  margin-bottom: 24px;
}

.composer-wrap {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  padding: 12px 20px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 16%);
}

@media (max-width: 760px) {
  .composer-wrap { padding-inline: 10px; }
  .chat-scroll { scrollbar-gutter: auto; }
}

.conversation-item .job-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(242, 106, 27, .5);
  animation: job-pulse 1.5s infinite;
}
.conversation-item.unread .job-dot { background: var(--success); }
.alex-busy .model-button span { color: var(--accent); }

@keyframes job-pulse {
  70% { box-shadow: 0 0 0 7px rgba(242, 106, 27, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 106, 27, 0); }
}

.creation-card button {
  align-self: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
}

.creation-card p {
  margin: 7px 0 0;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.4;
}
.creation-actions { display: flex; align-items: center; gap: 7px; }

#creation-preview { margin-top: 20px; }
#creation-preview video {
  display: block;
  width: min(100%, 820px);
  max-height: 70vh;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
}

.artifact-section { margin-bottom: 28px; }
.artifact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.artifact-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #111113; }
.artifact-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #050506; }
.artifact-card > div { padding: 12px; }
.artifact-card p { min-height: 34px; margin: 6px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.45; }
@media (max-width: 760px) { .artifact-grid { grid-template-columns: 1fr; } }

.round-button.recording {
  border-color: var(--danger);
  background: #f0717822;
  color: var(--danger);
  animation: recording-pulse 1.2s ease-in-out infinite;
}

@keyframes recording-pulse {
  50% { box-shadow: 0 0 0 6px #f0717818; }
}
