:root {
  --bg: #e9e9dd;
  --surface: #dfdfd3;
  --surface-2: #d8d8cc;
  --border: #ccccc0;
  --border-light: #d4d4c8;
  --text: #212120;
  --text-muted: #888;
  --text-mid: #555;
  --accent: #eadc21;
  --accent-subtle: rgba(234, 220, 33, 0.07);
  --yellow: #eadc21;
  --radius: 8px;
  --col: 640px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Gate ─────────────────────────────────────────── */

#gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-brand {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.gate-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.gate-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  text-align: center;
  line-height: 1.7;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 300px;
  padding: 0 1.5rem;
}

.gate-input {
  width: 100%;
  background: #fff;
  border: 0.5px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  outline: none;
  text-align: center;
  letter-spacing: 0.15em;
  transition: border-color 0.2s;
}

.gate-input:focus { border-color: var(--accent); }
.gate-input.error { border-color: #c0392b; animation: shake 0.35s ease; }

.gate-error { font-size: 0.75rem; color: #c0392b; min-height: 1em; text-align: center; }
.gate-hint  { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.05em; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-8px); }
  75%       { transform: translateX(8px); }
}

/* ── Chat shell ───────────────────────────────────── */

#chat {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#chat.visible { opacity: 1; visibility: visible; }

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

.chat-header {
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 2rem;
  height: 48px;
  flex-shrink: 0;
  background: var(--bg);
}

.header-inner {
  width: 100%;
  max-width: var(--col);
  display: flex;
  align-items: stretch;
}

.header-left {
  background: var(--yellow);
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0 1rem;
  color: var(--text);
  white-space: nowrap;
  flex: 1;
}

.header-name {
  font-size: 14pt;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-chatfolio {
  font-size: 14pt;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: stretch;
}

/* ── Text-button (header actions) ─────────────────── */

.text-button {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 11pt;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  width: 130px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-button .text {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1;
  transition: top 0.2s ease-in-out;
  z-index: 7;
}

.text-button .text p {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1;
  margin: 0;
}

.text-button .rect2 {
  position: absolute;
  top: 0; left: 50%;
  width: 100%; height: 100%;
  opacity: 0;
  background-color: var(--yellow);
  transform: translate(-50%, 0);
  transition: opacity 0.2s ease;
  z-index: 6;
}

.text-button:hover .text        { top: -100%; }
.text-button:hover .rect2       { opacity: 1; }
.text-button:not(:hover) .rect2 { opacity: 0; }

.btn-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

#mailBtn .btn-icon { width: 16px; height: 16px; }

/* separator between header buttons */
.header-right .text-button + .text-button {
  border-left: 0.5px solid var(--border);
}

/* ── Messages ─────────────────────────────────────── */

.messages {
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 2.5rem max(1rem, calc((100% - var(--col)) / 2));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 48px);
  mask-image: linear-gradient(to bottom, transparent 0, black 48px);
}

.messages.centered { justify-content: center; }

.messages::-webkit-scrollbar        { width: 2px; }
.messages::-webkit-scrollbar-track  { background: transparent; }
.messages::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 2px; }

/* All messages constrained to column */
.message {
  width: 100%;
  max-width: var(--col);
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero section ─────────────────────────────────── */

.hero-section {
  display: flex;
  align-items: stretch;
  gap: calc(3.25rem - 10px);
  width: 100%;
  max-width: var(--col);
  height: 165px;
  padding-bottom: 0;
}

.hero-photo {
  width: 165px;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.hero-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}

/* Intro card — variant headline above first Brixx message */
.message.intro-card {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-mid);
  font-style: italic;
  padding-bottom: 1.75rem;
  margin-bottom: 0.25rem;
}

.message.intro-card::before { content: '\201C\00a0'; }
.message.intro-card::after  { content: '\00a0\201D'; }

/* User message — right-aligned within column */
.message.user {
  display: flex;
  justify-content: flex-end;
}

.message.user > span {
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: 14px 14px 3px 14px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  max-width: 75%;
}

/* Assistant message — left-aligned within column */
.message.assistant {}

.message-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.message-content {
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--text);
}

.message-content p            { margin-bottom: 0.85rem; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong       { color: var(--text); font-weight: 600; }
.message-content em           { color: var(--text-mid); font-style: italic; }

.message-content a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(33,33,32,0.3);
  transition: border-color 0.15s;
}
.message-content a:hover { border-color: var(--text); }

/* WhatsApp number — destacado como CTA */
.message-content .whatsapp-link {
  color: #25d366;
  border-bottom-color: rgba(37, 211, 102, 0.35);
  font-weight: 500;
}
.message-content .whatsapp-link:hover { border-bottom-color: #25d366; }

/* Blockquote — quote-block do Expofacic */
.message-content blockquote {
  padding: 0.85rem 1.1rem;
  margin: 1rem 0;
  background: var(--yellow);
  border-radius: 6px;
  font-style: italic;
  line-height: 1.75;
}

.message-content blockquote p { margin-bottom: 0; }

/* Divider */
.message-content hr {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 1.25rem 0;
}

/* Inline code */
.message-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  background: var(--surface);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  color: var(--text-mid);
  border: 0.5px solid var(--border);
}

/* ── Link do Behance ──────────────────────────────── */

.option-chip {
  display: flex;
  text-decoration: none;
  margin-top: 0.75rem;
  align-items: flex-start;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  text-align: left;
  width: 100%;
}

.option-chip:hover {
  border-color: transparent;
  background: #fff;
}

.option-chip + .option-chip { margin-top: 0.6rem; }

/* ── Streaming cursor ─────────────────────────────── */

.cursor {
  display: inline-block;
  width: 1.5px;
  height: 0.85em;
  background: #fff;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.75s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Input area ───────────────────────────────────── */

.chat-input-area {
  padding: 0 2rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
}

.chat-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding: 0 2rem;
  background: var(--bg);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 0.7rem;
  line-height: 1.4;
  transition: color 0.15s;
}

.footer-link:hover { color: var(--text); text-decoration: underline; }
.footer-sep { color: var(--text-muted); opacity: 0.45; font-size: 0.7rem; }

.chat-input-inner {
  position: relative;
  width: 100%;
  max-width: var(--col);
}

.chat-input {
  width: 100%;
  background: #fff;
  border: 0.5px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.85rem 3.5rem 0.85rem 1.25rem;
  border-radius: 28px;
  outline: none;
  resize: none;
  height: 100px;
  line-height: 1.6;
  transition: border-color 0.2s;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.chat-input:focus        { border-color: #bbb; }
.chat-input::placeholder { color: var(--text-muted); }

.send-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: opacity 0.15s, transform 0.1s;
}

.send-btn img { width: 100%; height: 100%; display: block; }

.send-btn:hover:not(:disabled)  { opacity: 0.75; }
.send-btn:active:not(:disabled) { transform: scale(0.92); }
.send-btn:disabled              { opacity: 0.25; cursor: not-allowed; }

/* ── Project images ───────────────────────────────── */

.message-content img {
  max-width: 100%;
  width: 100%;
  display: block;
  border-radius: var(--radius);
  margin: 0.75rem 0;
  border: 0.5px solid var(--border);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── Video embeds ─────────────────────────────────── */

.video-wrap {
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0.5px solid var(--border);
}

.video-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ── Contact modal ────────────────────────────────── */

#contact-overlay, #cv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 32, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Ao fechar, a visibilidade só cai no fim do fade; ao abrir, entra logo —
     senão o campo ainda está invisível quando lhe damos foco e não pega. */
  transition: opacity 0.3s ease, visibility 0s ease 0.3s;
}

#contact-overlay.visible, #cv-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s ease 0s;
}

.contact-wrap {
  position: relative;
  max-width: 560px;
  width: 100%;
  animation: cardIn 0.35s cubic-bezier(0.34, 1.26, 0.64, 1) both;
}

.contact-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.contact-close:hover  { background: #d4c91a; }
.contact-close:active { transform: scale(0.92); }

.contact-card {
  background: #f5f5ee;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.contact-header {
  background: var(--yellow);
  padding: 1.75rem 2rem 1.5rem;
}

.contact-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.contact-title em { font-style: italic; font-weight: 300; }

/* ── Privacy policy modal (reutiliza contact-wrap/card/header) ── */

#privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 32, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#privacy-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.privacy-body {
  padding: 1.5rem 2rem 2rem;
  max-height: 62vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.privacy-body p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
}

.privacy-body strong { font-weight: 700; }

.contact-form {
  padding: 1.75rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-field label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-field input,
.contact-field textarea {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  width: 100%;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--text-muted); }

.contact-field input:focus,
.contact-field textarea:focus { border-color: #aaa; }

.contact-field input.error,
.contact-field textarea.error { border-color: #c0392b; }

.contact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
}

.contact-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}

.contact-status.success { color: #27ae60; }
.contact-status.error   { color: #c0392b; }

.contact-submit {
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}

.contact-submit:hover:not(:disabled)  { opacity: 0.8; }
.contact-submit:active:not(:disabled) { transform: scale(0.97); }
.contact-submit:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 680px) {
  .contact-row   { grid-template-columns: 1fr; }
  .contact-header { padding: 1.25rem 1.5rem 1.25rem; }
  .contact-form  { padding: 1.25rem 1.5rem 1.5rem; }
  .contact-title { font-size: 1.3rem; }
  .contact-footer { flex-direction: column; align-items: flex-start; }
  .contact-submit { width: 100%; text-align: center; }
}

/* ── Lightbox ─────────────────────────────────────── */

.message-content img { cursor: zoom-in; }

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 32, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: safe center;
  z-index: 300;
  padding: 2rem 1.5rem 4rem;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

#lightbox.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#lightbox img {
  width: 90vw;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: lightboxIn 0.25s cubic-bezier(0.34, 1.26, 0.64, 1) both;
  cursor: grab;
  flex-shrink: 0;
  transition: width 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

#lightbox img.panning {
  cursor: grabbing;
  transition: none; /* sem lag durante o arrasto */
}

.lightbox-zoom {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 301;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#lightbox.visible ~ .lightbox-zoom,
.lightbox-zoom.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-zoom-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.1s, background 0.15s;
  flex-shrink: 0;
}

.lightbox-zoom-btn:hover  { background: #f0f0f0; }
.lightbox-zoom-btn:active { transform: scale(0.92); }

.lightbox-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: #000;
  border: none;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  transition: transform 0.1s, background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.lightbox-close-btn:hover  { background: #d4c91a; }
.lightbox-close-btn:active { transform: scale(0.92); }

.lightbox-zoom-btn svg {
  width: 20px;
  height: 20px;
}

@keyframes lightboxIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Welcome overlay ─────────────────────────────── */

#welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 32, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#welcome-overlay.visible { opacity: 1; visibility: visible; }
#welcome-overlay.hiding  { opacity: 0; visibility: hidden; }

.welcome-wrap {
  position: relative;
  max-width: 780px;
  width: 100%;
  animation: cardIn 0.4s cubic-bezier(0.34, 1.26, 0.64, 1) both;
}

.welcome-card {
  background: #f5f5ee;
  border-radius: 20px;
  display: flex;
  gap: 0;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

@keyframes cardIn {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.welcome-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  line-height: 1;
}

.welcome-close:hover  { background: #d4c91a; }
.welcome-close:active { transform: scale(0.92); }

.welcome-left {
  width: 220px;
  flex-shrink: 0;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #eaeae0;
}

.welcome-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

.welcome-name {
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  color: var(--text);
}

.welcome-titles {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.8;
}

.welcome-right {
  flex: 1;
  padding: 2.5rem 2rem 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  justify-content: center;
}

.welcome-greeting {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
}

.welcome-greeting strong {
  font-size: 1.2rem;
  font-weight: 700;
}

.welcome-right p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text);
}

.welcome-tip {
  font-size: 0.78rem !important;
  color: #000 !important;
  font-weight: 700 !important;
  background: var(--accent);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
  white-space: nowrap;
}

/* ── Safe area (notch / home bar iOS) ────────────── */

.chat-footer { padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }

/* ── Mobile ───────────────────────────────────────── */

/* ── Hamburger button ─────────────────────────────── */

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 100%;
  background: #fff;
  border: none;
  cursor: pointer;
  padding: 0;
  border-left: 0.5px solid var(--border);
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile dropdown menu ─────────────────────────── */

.mobile-menu {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  background: #fff;
  border: 0.5px solid var(--border);
  border-top: none;
  z-index: 200;
  flex-direction: column;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: var(--font);
  font-size: 11pt;
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border);
}

.mobile-menu-item:last-child { border-bottom: none; }
.mobile-menu-item:active { background: var(--yellow); }

/* ── Mobile media query ───────────────────────────── */

@media (max-width: 680px) {
  /* Evitar zoom no input ao focar */
  .chat-input { font-size: 16px; }

  .messages         { padding: 1.5rem 1rem; }
  .chat-input-area  { padding: 0 1rem; margin-bottom: 0.6rem; }
  .chat-footer      { padding-left: 1rem; padding-right: 1rem; }
  .chat-header      { padding: 0 1rem; position: relative; }
  .header-left      { font-size: 0.62rem; }
  .hero-section     { height: 110px; }
  .hero-photo       { width: 110px; }

  /* Esconder botões normais, mostrar hamburger */
  .text-button      { display: none; }
  .hamburger-btn    { display: flex; }

  .welcome-card     { flex-direction: column; max-height: 90dvh; overflow-y: auto; }
  .welcome-left     { width: 100%; flex-direction: column; padding: 1.75rem 1.5rem 1.25rem; gap: 0.6rem; align-items: center; }
  .welcome-photo    { width: 96px; height: 96px; flex-shrink: 0; }
  .welcome-name, .welcome-titles { text-align: center; }
  .welcome-right    { padding: 1.25rem 1.5rem 2rem; justify-content: flex-start; }
  .welcome-close    { top: 10px; right: 10px; }
}

/* ── Mensagem do Ricardo ao vivo (destacada) ──────── */

.message.ricardo .message-label { color: #b8a800; }

.message.ricardo .message-content {
  background: var(--yellow);
  padding: 0.7rem 1rem;
  border-radius: 3px 14px 14px 14px;
  display: inline-block;
  max-width: 85%;
}
