/* ── Landing page (new-user chat shell) ─────────────────────────
 *
 * A non-functional replica of the chat UI shown while the Flutter engine
 * loads. Rendered by a Preact mini-app (web/landing-app/) mounted on #landing.
 * Matches the Figma design: BHp4m9I7acgq4Uyx16vrDT node 8763:187309.
 */

/* ── Root overlay ──────────────────────────────────────────────── */

#landing {
  position: fixed;
  inset: 0;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.4s ease;
  overflow: hidden;
  --landing-bg: #ffffff;
  --landing-surface: #f9fafb;
  --landing-surface-elevated: #f9fafb;
  --landing-surface-container: #f3f4f6;
  --landing-border: #e7eaed;
  --landing-border-strong: #edeff2;
  --landing-text: #101214;
  --landing-text-muted: #9eaab9;
  --landing-text-secondary: rgba(16, 18, 20, 0.7);
  --landing-nav-hover: #f3f4f6;
  --landing-nav-active: #f3f4f6;
  --landing-nav-active-hover: #edeff2;
  --landing-hover: #f9fafb;
  --landing-active: #f3f4f6;
  --landing-avatar-bg: #f3f4f6;
  --landing-avatar-plain-bg: #ffffff;
  --landing-composer-shadow: rgba(7, 7, 8, 0.05);
  --landing-composer-focus-border: #d5d9de;
  --landing-composer-focus-shadow: rgba(7, 7, 8, 0.08);
  --landing-skeleton-base: #f3f4f6;
  --landing-skeleton-shine: #edeff2;
  --landing-icon-filter: none;
  --landing-accent: #02a181;
  background-color: var(--landing-bg);
  color: var(--landing-text);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "liga" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#landing[data-theme='dark'] {
  --landing-bg: #000000;
  --landing-surface: #1b1e21;
  --landing-surface-elevated: #1b1e21;
  --landing-surface-container: #282d32;
  --landing-border: #363c43;
  --landing-border-strong: #1b1e21;
  --landing-text: #ffffff;
  --landing-text-muted: #8695a7;
  --landing-text-secondary: rgba(255, 255, 255, 0.7);
  --landing-nav-hover: #282d32;
  --landing-nav-active: #282d32;
  --landing-nav-active-hover: #363c43;
  --landing-hover: #282d32;
  --landing-active: #282d32;
  --landing-avatar-bg: #282d32;
  --landing-avatar-plain-bg: #000000;
  --landing-composer-shadow: rgba(7, 7, 8, 0.25);
  --landing-composer-focus-border: #363c43;
  --landing-composer-focus-shadow: rgba(7, 7, 8, 0.35);
  --landing-skeleton-base: #282d32;
  --landing-skeleton-shine: #363c43;
  --landing-icon-filter: brightness(0) invert(1);
  --landing-accent: #02a181;
}

/* ── Shell layout ──────────────────────────────────────────────── */

.landing-shell {
  display: flex;
  height: 100%;
  width: 100%;
}

.landing-shell--resizing {
  cursor: col-resize;
}

.landing-shell--resizing .main-content {
  pointer-events: none;
}

/* ── Sidebar ───────────────────────────────────────────────────── */

.sidebar {
  position: relative;
  height: 100%;
  flex-shrink: 0;
  background-color: var(--landing-surface);
  border-right: 1px solid var(--landing-border);
  overflow: hidden;
}

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 2;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  border-radius: 1px;
  background-color: transparent;
  transition: background-color 0.15s ease;
}

.sidebar-resize-handle:hover::after,
.landing-shell--resizing .sidebar-resize-handle::after {
  background-color: #02a181;
}

.sidebar-sections {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 10px 16px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 90px;
  height: 24px;
  display: block;
  filter: var(--landing-icon-filter);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  flex: 1;
  min-height: 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  background-color: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.sidebar-nav-item:hover {
  background-color: var(--landing-nav-hover);
}

.sidebar-nav-item--active {
  background-color: var(--landing-nav-active);
}

.sidebar-nav-item--active:hover {
  background-color: var(--landing-nav-active-hover);
}

.sidebar-nav-item:focus-visible {
  outline: 2px solid #02a181;
  outline-offset: -2px;
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  filter: var(--landing-icon-filter);
}

.sidebar-nav-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 19px;
  letter-spacing: -0.24px;
  color: var(--landing-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: 0 16px 16px;
  flex-shrink: 0;
}

.sidebar-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: 40px;
  background-color: #02a181;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -0.07px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.sidebar-login-btn:hover {
  background-color: #019074;
}
.sidebar-login-btn:active {
  background-color: #017f66;
}

/* ── Main content area ─────────────────────────────────────────── */

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--landing-bg);
  overflow: hidden;
}

/* ── Header ────────────────────────────────────────────────────── */

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 8px 12px 8px 24px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.main-header-spacer {
  flex: 1;
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 40px;
  background-color: #02a181;
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
  line-height: 19px;
  letter-spacing: -0.24px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}
.header-login-btn:hover {
  background-color: #019074;
}
.header-login-btn:active {
  background-color: #017f66;
}

/* ── Center area ───────────────────────────────────────────────── */

.main-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 0 72px;
  min-height: 0;
}

.main-center--conversation {
  justify-content: flex-start;
  gap: 0;
}

.main-center--conversation .conversation-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-top: 24px;
  padding-bottom: 12px;
}

.main-center--conversation .composer-hints-area {
  flex-shrink: 0;
  width: 100%;
  max-width: 768px;
  padding-bottom: 24px;
}

.composer-hints-area--docked {
  animation: composerDockFade 0.4s ease-out forwards;
}

.composer--docked {
  animation: composerDockFade 0.4s ease-out forwards;
}

@keyframes composerDockFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.conversation-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 768px;
  width: 100%;
  padding: 8px 20px;
  box-sizing: border-box;
}

.conversation-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  justify-content: flex-start;
}

.conversation-status-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Expand into place so "Working on your request" slides down instead of jumping. */
.agent-action-slot {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-action-slot--visible {
  grid-template-rows: 1fr;
}

.agent-action-slot-inner {
  overflow: hidden;
  min-height: 0;
}

.agent-action-slot--visible .agent-action-row {
  animation: agentActionReveal 0.35s ease-out forwards;
}

@keyframes agentActionReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-action-slot {
    transition: none;
  }

  .agent-action-slot--visible .agent-action-row {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.sent-message-row {
  display: flex;
  justify-content: flex-end;
}

.sent-message-row--enter {
  animation: sentMessageEnter 0.3s ease-out forwards;
}

@keyframes sentMessageEnter {
  from {
    opacity: 0;
    transform: translateY(var(--sent-message-enter-offset, 120px));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sent-message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 24px;
  background-color: var(--landing-surface-container);
  color: var(--landing-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.073px;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-action-row,
.thinking-loader-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.agent-action-icon {
  display: block;
  flex-shrink: 0;
  filter: var(--landing-icon-filter);
}

.agent-action-label,
.thinking-loader-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: -0.035px;
}

.agent-action-label {
  color: var(--landing-text-muted);
}

.thinking-loader-label {
  color: var(--landing-accent);
}

.thinking-loader-lottie {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.thinking-loader-lottie svg {
  display: block;
  width: 100%;
  height: 100%;
}

.composer-box--disabled {
  opacity: 0.7;
}

.composer-input:disabled {
  cursor: default;
}

.login-continue-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.login-continue-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  animation: overlayFadeIn 0.35s ease forwards;
}

.login-continue-modal-backdrop--dismissible {
  cursor: pointer;
}

.login-continue-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border-radius: 24px;
  background-color: var(--landing-surface-elevated);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(80px);
  animation: loginModalEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginModalEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-continue-modal-logo {
  display: block;
  width: 90px;
  height: 24px;
  margin: 0 auto 20px;
  filter: var(--landing-icon-filter);
}

.login-continue-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.05px;
  color: var(--landing-text);
  text-align: center;
}

.login-continue-modal-description {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.035px;
  color: var(--landing-text-muted);
  text-align: center;
}

.login-continue-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 24px;
  padding: 10px 20px 10px 12px;
  border: none;
  border-radius: 40px;
  background-color: var(--landing-surface-container);
  color: var(--landing-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.073px;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.login-continue-google-button:hover {
  opacity: 0.92;
}

.login-continue-google-button:active {
  opacity: 0.84;
}

.login-continue-google-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.fade-in-fast {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.fade-in-delay-short {
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.greeting {
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: 0.106px;
  color: var(--landing-text);
  text-align: center;
  margin: 0;
  white-space: nowrap;
}

/* ── Composer + hints wrapper ──────────────────────────────────── */

.composer-hints-area {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 768px;
  width: 100%;
}

/* ── Composer ──────────────────────────────────────────────────── */

.composer-box {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--landing-border-strong);
  border-radius: 24px;
  background-color: var(--landing-surface-elevated);
  box-shadow: 0 4px 16px var(--landing-composer-shadow);
  overflow: hidden;
}

.composer-input {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 200px;
  margin: 0;
  padding: 16px 28px 10px 20px;
  border: none;
  background-color: transparent;
  color: var(--landing-text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.073px;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.composer-input::placeholder {
  color: var(--landing-text-muted);
}

.composer-input:focus {
  outline: none;
}

.composer-box:focus-within {
  border-color: var(--landing-composer-focus-border);
  box-shadow: 0 4px 16px var(--landing-composer-focus-shadow);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 10px 10px;
}

.composer-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 80px;
  background-color: var(--landing-surface-container);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease;
}

.composer-icon-btn:not(.composer-icon-btn--active) .composer-icon-btn-img {
  filter: var(--landing-icon-filter);
}

.composer-icon-btn--active {
  background-color: #02a181;
}

.composer-icon-btn--active:hover {
  background-color: #019074;
}

.composer-icon-btn--active:active {
  background-color: #017f66;
}

.composer-icon-btn--active .composer-icon-btn-img {
  filter: brightness(0) invert(1);
}

.composer-icon-btn--disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
}

.composer-icon-btn:focus-visible {
  outline: 2px solid #02a181;
  outline-offset: 2px;
}

.composer-icon-btn img,
.composer-icon-btn-img {
  display: block;
}

/* ── Hint list ─────────────────────────────────────────────────── */

.hint-list {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}

.hint-item-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-top: 1px solid var(--landing-border-strong);
}

.hint-item-row .hint-item {
  flex: 1;
  min-width: 0;
  border-top: none;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 8px;
  border: none;
  border-top: 1px solid var(--landing-border-strong);
  background-color: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.hint-item:hover {
  background-color: var(--landing-surface);
}

.hint-item:active {
  background-color: var(--landing-active);
}

.hint-item:focus-visible {
  outline: 2px solid #02a181;
  outline-offset: -2px;
}

.hint-avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0.5px solid var(--landing-border);
  background-color: var(--landing-avatar-bg);
  box-shadow: 0 2px 8px rgba(7, 7, 8, 0.06);
  overflow: hidden;
  box-sizing: border-box;
}

.hint-avatar--plain {
  background-color: var(--landing-avatar-plain-bg);
}

.hint-avatar--plain .hint-avatar-img {
  filter: var(--landing-icon-filter);
}

.hint-avatar--image {
  padding: 0;
}

.hint-avatar-img {
  display: block;
}

.hint-avatar--image .hint-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hint-avatar-emoji {
  font-size: 16px;
  line-height: 1;
}

.hint-trailing-btn {
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  padding: 12px 8px;
  border: none;
  background-color: transparent;
  color: var(--landing-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.hint-trailing-btn:hover {
  color: var(--landing-text-secondary);
  background-color: var(--landing-surface);
}

.hint-trailing-btn:focus-visible {
  outline: 2px solid #02a181;
  outline-offset: -2px;
}

.hint-item--skeleton {
  pointer-events: none;
  cursor: default;
}

.landing-shimmer,
.hint-avatar--skeleton,
.hint-label--skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--landing-skeleton-base) 25%,
    var(--landing-skeleton-shine) 50%,
    var(--landing-skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: hintSkeletonShimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

.landing-shell--shimmer {
  pointer-events: none;
  user-select: none;
}

.sidebar-nav-item--skeleton {
  pointer-events: none;
  cursor: default;
}

.landing-shimmer--logo {
  width: 90px;
  height: 24px;
  border-radius: 6px;
}

.landing-shimmer--nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
}

.landing-shimmer--nav-label {
  width: 96px;
  height: 14px;
  border-radius: 6px;
}

.landing-shimmer--sidebar-login {
  width: 100%;
  height: 36px;
  border-radius: 40px;
}

.landing-shimmer--header-login {
  width: 72px;
  height: 32px;
  border-radius: 40px;
}

.landing-shimmer--greeting {
  width: min(280px, 70vw);
  height: 28px;
  margin: 0 auto;
  border-radius: 8px;
}

.composer-box--skeleton {
  pointer-events: none;
  min-height: 98px;
}

.landing-shimmer--composer-input {
  width: 55%;
  height: 18px;
  margin: 20px 20px 12px;
  border-radius: 6px;
}

.landing-shimmer--composer-send {
  width: 36px;
  height: 36px;
  border-radius: 80px;
}

.hint-avatar--skeleton {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.hint-label--skeleton {
  flex: 1;
  height: 16px;
  max-width: 320px;
}

@keyframes hintSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hint-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.035px;
  color: var(--landing-text-secondary);
}

.hint-trailing {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--landing-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Loading overlay ───────────────────────────────────────────── */

.loading-overlay {
  position: fixed;
  inset: 0;
  /* Above .login-continue-modal (10002) so sign-in loading covers that dialog too. */
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.35);
  animation: overlayFadeIn 0.2s ease;
}

/* Body-mounted handoff loader: opaque landing backdrop (not the modal scrim). */
.loading-overlay--handoff {
  z-index: 10004;
  animation: handoffOverlayFadeIn 0.4s ease;
  --handoff-text: #101214;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "liga" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.loading-overlay--handoff[data-theme='dark'] {
  --handoff-text: #ffffff;
}

.handoff-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Same icon + shine sweep as the existing-user #splash boot screen. */
.handoff-icon-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 22px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(80px);
  animation: handoffContentEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes handoffContentEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.handoff-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
}

/* Same gradient as #splash; duplicated tile + translate keeps the loop seamless. */
.handoff-icon-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  pointer-events: none;
}

.handoff-icon-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 440%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  background-size: 50% 100%;
  background-repeat: repeat-x;
  animation: handoffIconShimmer 1.4s linear infinite;
  will-change: transform;
}

.loading-overlay--handoff[data-theme='dark'] .handoff-icon-shimmer::before {
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  background-size: 50% 100%;
  background-repeat: repeat-x;
}

.handoff-loader-label {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.073px;
  color: var(--handoff-text);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  animation:
    handoffLabelEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards,
    handoffLabelPulse 2.2s ease-in-out 0.75s infinite;
}

@keyframes handoffLabelEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes handoffLabelPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Belt-and-suspenders: never flash landing chrome through a loader gap. */
body.zapia-handoff-loader-active #landing .landing-shell {
  visibility: hidden;
}

.loading-overlay-spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinnerRotate 0.6s linear infinite;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes handoffOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes handoffIconShimmer {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

/* ── Fade-in animations for composer + hints ───────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(100px);
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-delay {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive: hide sidebar on smaller screens ───────────────── */

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-center {
    padding: 0 16px;
  }
  .greeting {
    font-size: 22px;
    line-height: 28px;
    white-space: normal;
  }
}
