:root {
  --bg-main: #e8e5e0;
  --bg-soft: #eeebe6;
  --bg-panel: #f7f5f1;
  --bg-chat: #f2efea;

  --accent-olive: #4e5e3a;
  --accent-olive-soft: #6b7a5e;
  --accent-dark: #1e1e1a;

  --bubble-user: #4e5e3a;
  --bubble-user-border: #445233;

  --button-main: #1e1e1a;
  --button-main-hover: #2a2a24;
  --button-text: #ffffff;

  --text-light: #44443c;
  --text-dark: #1e1e1a;
  --text-soft: rgba(30, 30, 26, 0.78);
  --text-muted: rgba(30, 30, 26, 0.58);

  --card-shadow: 0 18px 40px rgba(30, 30, 26, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at center top, rgba(107, 122, 94, 0.08), transparent 34%),
    linear-gradient(180deg, #efede8 0%, #e8e5e0 45%, #e5e2dc 100%);
  color: var(--text-dark);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* HERO */
#intro {
  padding: 16px 16px 0;
  background:
    radial-gradient(circle at center 18%, rgba(107, 122, 94, 0.08), transparent 30%),
    linear-gradient(180deg, #ece9e4 0%, #e8e5e0 100%);
}

.intro-wrap {
  width: min(94vw, 980px);
  margin: 0 auto;
}

.hero-banner {
  width: 100%;
  background: transparent;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 16px 38px rgba(30, 30, 26, 0.06);
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
}

/* BLOCO TEXTO */
#texto {
  min-height: auto;
  padding: 18px 16px 40px;
  background:
    radial-gradient(circle at center top, rgba(107, 122, 94, 0.06), transparent 22%),
    linear-gradient(180deg, #ebe8e3 0%, #e8e5e0 100%);
}

.texto-wrap {
  width: min(94vw, 760px);
  margin: 0 auto;
}

.contador {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(78, 94, 58, 0.12);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 18px;
  color: var(--accent-dark);
  backdrop-filter: blur(4px);
}

.contador-icon {
  font-size: 15px;
  opacity: 0.9;
  color: var(--accent-olive);
}

.container {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 245, 241, 0.96));
  border: 1px solid rgba(78, 94, 58, 0.10);
  border-radius: 22px;
  padding: 34px 38px 34px;
  box-shadow: var(--card-shadow);
}

.container h2 {
  text-align: center;
  margin: 0 0 22px;
  font-family: "Neue Montreal", Arial, sans-serif;
  font-size: 36px;
  letter-spacing: 5px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
}

.container h2::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin: 14px auto 0;
  background: rgba(78, 94, 58, 0.32);
}

.container p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-soft);
  margin: 0 0 22px;
}

.final {
  text-align: center;
  font-size: 22px;
  color: var(--accent-dark);
  margin-top: 24px !important;
}

.primary-btn {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 28px auto 18px;
  background: var(--button-main);
  color: var(--button-text);
  border: 1px solid rgba(30, 30, 26, 0.08);
  border-radius: 999px;
  padding: 15px 24px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow: 0 10px 24px rgba(30, 30, 26, 0.14);
}

.primary-btn:hover {
  background: var(--button-main-hover);
  transform: translateY(-1px);
}

.logo-bottom {
  display: none;
}

.logo-bottom img {
  display: none;
}

.diagnostic-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.diagnostic-footer strong {
  color: var(--accent-dark);
  font-weight: 700;
}

/* CHAT */
#chat-section {
  min-height: 100dvh;
  padding: 12px;
  background: linear-gradient(180deg, #ebe8e3 0%, #e8e5e0 100%);
}

.chat-shell {
  max-width: 760px;
  margin: 0 auto;
  min-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
}

#chat {
  flex: 1;
  padding: 12px 4px 420px;
  overflow-y: auto;
  scroll-padding-bottom: 420px;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 18px 0;
}

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

.avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(30, 30, 26, 0.10);
  margin-top: 2px;
}

.msg {
  max-width: min(78%, 520px);
  padding: 16px 18px;
  border-radius: 18px;
  line-height: 1.45;
  font-size: 18px;
  word-break: break-word;
  box-shadow: 0 8px 20px rgba(30, 30, 26, 0.07);
}

.bot {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid rgba(78, 94, 58, 0.10);
  border-top-left-radius: 8px;
}

.user {
  background: var(--bubble-user);
  color: #ffffff;
  border: 1px solid var(--bubble-user-border);
  border-top-right-radius: 8px;
}

#input-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: rgba(232, 229, 224, 0.98);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(78, 94, 58, 0.10);
  z-index: 20;
}

.input-shell {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-input-wrap {
  display: flex;
  gap: 10px;
}

.text-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(78, 94, 58, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-dark);
  border-radius: 16px;
  padding: 16px 16px;
  font-size: 17px;
  outline: none;
}

.text-input-wrap input::placeholder,
.outro-input::placeholder {
  color: rgba(30, 30, 26, 0.38);
}

.text-input-wrap input:focus,
.outro-input:focus {
  border-color: rgba(78, 94, 58, 0.38);
  box-shadow: 0 0 0 3px rgba(107, 122, 94, 0.10);
}

.send-btn {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  min-width: 120px;
  width: auto;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.option-btn,
.multi-btn,
.finalizar-btn {
  width: 100%;
}

.send-btn,
.option-btn,
.multi-btn,
.finalizar-btn {
  background: rgba(107, 122, 94, 0.18);
  color: var(--accent-dark);
  border: 1px solid rgba(78, 94, 58, 0.12);
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 52px;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  box-shadow: 0 6px 16px rgba(30, 30, 26, 0.05);
}

.option-btn:hover,
.multi-btn:hover,
.finalizar-btn:hover,
.send-btn:hover {
  background: rgba(107, 122, 94, 0.26);
  transform: translateY(-1px);
}

.option-btn.selected,
.multi-btn.selected {
  background: var(--accent-olive);
  color: #ffffff;
  border-color: var(--accent-olive);
}

.multi-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.finalizar-btn {
  min-width: 140px;
}

.helper-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 2px 0;
}

.outro-input-wrap {
  width: 100%;
  margin-top: 12px;
}

.outro-input {
  width: 100%;
  border: 1px solid rgba(78, 94, 58, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-dark);
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  outline: none;
}

.success-card {
  margin: 20px auto 10px;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(78, 94, 58, 0.10);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  color: var(--accent-dark);
}

/* MOBILE */
@media (max-width: 640px) {
  #intro {
    padding: 10px 10px 0;
  }

  .intro-wrap {
    width: 100%;
  }

  .hero-banner {
    border-radius: 18px;
  }

  .container {
    width: calc(100vw - 32px);
    max-width: 420px;
    margin: 0 auto;
    padding: 26px 20px 24px;
    border-radius: 18px;
    text-align: center;
  }

  .texto-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .container h2 {
    font-size: 28px;
    letter-spacing: 4px;
    text-align: center;
  }

  .container p {
    max-width: 300px;
    margin: 0 auto 14px;
    text-align: center;
    line-height: 1.6;
  }

  .final {
    margin-top: 20px !important;
    text-align: center;
  }

  .primary-btn {
    display: block;
    margin: 22px auto 18px;
    max-width: 230px;
  }

  .message-row {
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
  }

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

  .msg {
    max-width: calc(100% - 74px);
    font-size: 17px;
    padding: 14px 16px;
    line-height: 1.5;
  }

  .bot {
    margin-right: 12px;
  }

  .user {
    margin-left: 40px;
  }

  .avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .option-btn,
  .multi-btn,
  .finalizar-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 58px;
    padding: 16px 18px;
  }

  .multi-actions {
    flex-direction: column;
  }

  .text-input-wrap {
    flex-direction: column;
  }

  .text-input-wrap input {
    font-size: 16px;
    min-height: 56px;
  }

  .chat-shell {
    min-height: auto;
  }

  .send-btn {
    width: 100%;
    min-height: 56px;
  }

  #input-area {
    padding: 10px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    max-height: 48dvh;
    overflow-y: auto;
  }

  #chat {
    padding-bottom: 520px;
    scroll-padding-bottom: 520px;
  }
}