* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  background: #f4f5f7;
  color: #1f2937;
}

.app {
  height: 100%;
  height: 100dvh;
  display: flex;
  padding: 16px;
}

.chat {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  align-self: flex-start;
  max-width: min(92%, 520px);
  background: #fff4e8;
  color: #3f3a36;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: #1f2937;
  color: #fff;
}

.composer { padding: 8px 16px 16px; }

.hello {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid #f97316;
  background: #fff;
  color: #f97316;
  font: 600 15px/1.2 Manrope, system-ui, sans-serif;
  cursor: pointer;
}

.hello:hover { background: #fff7ed; }

.composer form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  padding: 0 16px;
  font: 16px/1.3 Manrope, system-ui, sans-serif;
  color: #111827;
  outline: none;
}

.composer input::placeholder { color: #9ca3af; }

.send {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  background: #f97316;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.send:hover { background: #ea580c; }
.send svg { width: 20px; height: 20px; }

.captcha {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(55, 55, 55, 0.46);
}

.captcha.visible { display: flex; }

.captcha-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 28px 26px 26px;
  text-align: center;
}

.captcha-card h2 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1f2937;
}

.captcha .slider {
  position: relative;
  height: 56px;
  border-radius: 999px;
  background: #f3f4f6;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.captcha .slider-label {
  position: absolute;
  inset: 0 12px 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
}

.captcha .slider-label.hidden { opacity: 0; }

.captcha .slider-handle {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 4px #d9f5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 1;
}

.captcha .slider-handle:active { cursor: grabbing; }
.captcha .slider-handle svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .app { padding: 0; }
  .chat { border-radius: 0; box-shadow: none; }
  .captcha-card h2 { font-size: 18px; }
}
