/* TASK-105: compact invitation; existing behavior and scope stay unchanged. */
.demo-invitation {
  position: fixed;
  z-index: 35;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(232px, calc(100vw - 32px));
  color: #f5f3ee;
  font-family: var(--font-body);
}

.demo-invitation [hidden] { display: none !important; }
.demo-invitation[data-suspended="true"],
.contact-modal-open .demo-invitation,
.diagnostic-modal-open .demo-invitation {
  visibility: hidden;
  pointer-events: none;
}

.demo-invitation__card {
  position: relative;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - max(16px, env(safe-area-inset-bottom)) - 16px);
  overflow-y: auto;
  padding: 24px 12px 12px;
  border: 1px solid #3c3b49;
  border-radius: 12px;
  background: #1a1c22;
  box-shadow: 0 6px 20px #00000035;
  scrollbar-width: thin;
}

.demo-invitation__heading { display: flex; gap: 9px; align-items: center; }
.demo-invitation__smile {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eeeaff;
}
.demo-invitation__smile img { display: block; width: 32px; height: auto; }
.demo-invitation__speech {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #655d8d;
  border-radius: 5px;
  background: #262438;
}
.demo-invitation__speech::before {
  content: "";
  position: absolute;
  left: -6px;
  top: calc(50% - 5.5px);
  width: 11px;
  height: 11px;
  border-left: 1px solid #655d8d;
  border-bottom: 1px solid #655d8d;
  background: #262438;
  transform: rotate(45deg);
}
.demo-invitation__speech h2 {
  margin: 0;
  color: #f5f3ee;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.demo-invitation__copy { display: none; }
.demo-invitation__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #5b5ce2;
  border-radius: 8px;
  background: #5b5ce2;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.demo-invitation__cta:hover { background: #4b4cc7; }
.demo-invitation__minimize {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c4bfd9;
  font: 400 20px/1 Arial, sans-serif;
  cursor: pointer;
}
.demo-invitation__minimize:hover { background: #262438; }
.demo-invitation__minimize:focus-visible { outline-offset: -4px; }
.demo-invitation__launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 46px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid #3c3b49;
  border-radius: 24px;
  background: #1a1c22;
  box-shadow: 0 4px 16px #00000030;
  color: #f5f3ee;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.demo-invitation__launcher img {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 50%;
  background: #eeeaff;
  object-fit: contain;
}

@media (pointer: coarse) {
  .demo-invitation__minimize { width: 44px; height: 44px; }
  .demo-invitation__cta { min-height: 44px; font-size: 0.875rem; }
}
@media (max-width: 400px) {
  .demo-invitation { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: min(232px, calc(100vw - 24px)); }
}
@media print {
  .demo-invitation { display: none; }
}
