:root {
  --bg-deep: #0f1724;
  --bg-mid: #111b29;
  --bg-card: #1b2434;
  --bg-hover: #243145;
  --ink: #ffffff;
  --ink-soft: #a6b2c8;
  --dawn: #f1b987;
  --dawn-hot: #f4c18f;
  --dawn-deep: #dfa170;
  --mist: #91a8c4;
  --ok: #7ddba3;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(17, 27, 41, 0.62);
  --glass-soft: rgba(27, 36, 52, 0.45);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(241, 185, 135, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 70%, rgba(145, 168, 196, 0.18), transparent 50%),
    linear-gradient(180deg, var(--bg-mid), var(--bg-deep) 70%);
}

/* ============ Shell (sidebar + área de chat) ============ */

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  width: 272px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem;
  background: var(--glass-soft);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.2rem;
}

.sidebar-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: none;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--dawn-hot), var(--dawn) 45%, var(--mist));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  background: linear-gradient(120deg, var(--dawn), var(--mist));
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.sidebar-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(241, 185, 135, 0.25);
}

.sidebar-test-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.sidebar-test-btn:hover {
  border-color: var(--dawn);
  color: var(--ink);
  background: var(--bg-card);
}
.sidebar-test-btn.is-active {
  border-color: var(--dawn);
  color: var(--dawn-hot);
  background: var(--bg-card);
}

.test-mode-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  background: color-mix(in srgb, var(--dawn) 12%, var(--bg-deep));
  border-bottom: 1px solid color-mix(in srgb, var(--dawn) 25%, transparent);
  font-family: var(--font-body);
  font-size: 0.82rem;
}
.test-mode-label {
  color: var(--dawn);
  font-weight: 600;
  white-space: nowrap;
}
.test-mode-select {
  flex: 1;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--dawn) 35%, transparent);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.83rem;
  padding: 0.3rem 0.55rem;
  outline: none;
  cursor: pointer;
}
.test-mode-select:focus { border-color: var(--dawn); }
.test-mode-exit {
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
}

/* Painel lateral de teste — substitui lista de conversas no modo teste */
.sidebar-test-panel {
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  flex: 1;
  border-top: 1px solid var(--border);
}
.sidebar-test-panel-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dawn);
  font-weight: 600;
}
.sidebar-test-panel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.sidebar-test-panel-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Badge de persona no topo da área de chat */
.test-agent-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  background: color-mix(in srgb, var(--dawn) 9%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--dawn) 22%, transparent);
  font-size: 12px;
}
.test-agent-badge svg { color: var(--dawn); flex-shrink: 0; }
.test-agent-badge-label { color: var(--muted); }
.test-agent-badge-name { font-weight: 600; color: var(--ink); }

.sidebar-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search input::placeholder { color: var(--ink-soft); opacity: 0.75; }
.sidebar-search input:focus { border-color: var(--dawn); }

.conversation-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0 -0.4rem;
  padding: 0 0.4rem;
}

.conversation-group-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  opacity: 0.7;
  padding: 0.7rem 0.6rem 0.15rem;
}

.conversation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.conversation-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.conversation-item.is-active { background: var(--bg-hover); color: var(--ink); font-weight: 500; }

.conversation-item-delete {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.conversation-item:hover .conversation-item-delete { display: inline-flex; }
.conversation-item-delete:hover { color: #f4a7a7; background: rgba(244, 167, 167, 0.12); }

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Dias de teste restantes — sempre visível, acima do menu da conta. */
.sidebar-usage-badge {
  margin: 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--dawn);
  opacity: 0.9;
}

.sidebar-account { position: relative; }

.sidebar-account-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.sidebar-account-trigger:hover,
.sidebar-account-trigger[aria-expanded="true"] {
  background: var(--bg-hover);
  border-color: var(--line);
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--dawn-hot), var(--dawn) 55%, var(--mist));
}

.sidebar-user-text { min-width: 0; flex: 1; text-align: left; }

.sidebar-user-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-status {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sidebar-account-chevron {
  flex: none;
  color: var(--ink-soft);
  transition: transform 0.2s;
}

.sidebar-account-trigger[aria-expanded="true"] .sidebar-account-chevron {
  transform: rotate(180deg);
  color: var(--dawn);
}

.sidebar-account-menu {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}

.sidebar-account-menu.is-open { display: flex; }

.sidebar-account-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.sidebar-account-menu-item:hover {
  background: var(--bg-hover);
  color: var(--ink);
}

.sidebar-account-menu-item-danger { color: #f4a7a7; }
.sidebar-account-menu-item-danger:hover {
  background: rgba(244, 167, 167, 0.08);
  color: #f4a7a7;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(6, 10, 16, 0.6);
}

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  padding: calc(1rem + env(safe-area-inset-top)) 1.1rem calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* ============ Topo ============ */

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-soft);
  backdrop-filter: blur(12px);
}


.identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.avatar-hero {
  /* logo_aurora.png tem bastante glow/respiro construído na própria imagem —
     abaixo de ~56px o símbolo fica ilegível (mesma lição do .auth-logo). */
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: none;
}

.identity-text { min-width: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  margin-left: auto;
}

.brand-mark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--dawn-hot), var(--dawn) 45%, var(--mist));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(125, 219, 163, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.ghost-btn:hover {
  border-color: var(--dawn);
  color: var(--ink);
}

/* ============ Conversa ============ */

.dialogue {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
  padding: 0.25rem 0.15rem 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 239, 232, 0.18) transparent;
}

.dialogue::-webkit-scrollbar { width: 6px; }
.dialogue::-webkit-scrollbar-track { background: transparent; }
.dialogue::-webkit-scrollbar-thumb {
  background: rgba(242, 239, 232, 0.18);
  border-radius: 999px;
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  animation: rise 0.28s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.you { justify-content: flex-end; }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--dawn-hot), var(--dawn) 55%, var(--mist));
  margin-bottom: 1.3rem;
}

.bubble-group {
  max-width: 78%;
  display: flex;
  flex-direction: column;
}

.msg.you .bubble-group { align-items: flex-end; }

.bubble {
  padding: 0.7rem 1rem;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.msg.aurora .bubble {
  background: var(--glass);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.msg.you .bubble {
  background: linear-gradient(135deg, var(--dawn), var(--dawn-hot));
  color: var(--bg-deep);
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 18px rgba(241, 185, 135, 0.22);
}

.msg.you .bubble p { font-weight: 500; }

.bubble p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.is-streaming p::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: caret 1s steps(1) infinite;
  color: var(--dawn);
}

@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  padding: 0 0.35rem;
  flex-wrap: wrap;
}

.stamp {
  font-size: 0.68rem;
  color: var(--ink-soft);
  opacity: 0.75;
}

.resend-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.resend-btn:hover {
  border-color: var(--dawn);
  color: var(--ink);
  transform: rotate(-45deg);
}

/* ============ Boas-vindas / chips de assunto ============ */

.welcome {
  margin: auto;
  text-align: center;
  padding: 1.5rem 1rem;
  animation: rise 0.4s ease both;
}

.welcome-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 700;
  background: linear-gradient(120deg, var(--dawn-hot), var(--dawn) 45%, var(--mist));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-sub {
  margin: 0.5rem 0 1.2rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--glass-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.chip:hover {
  border-color: var(--dawn);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(241, 185, 135, 0.18);
}

.chip:active { transform: translateY(0); }

/* ============ Feedback ============ */

.feedback-area {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.feedback-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.feedback-btn:hover {
  border-color: var(--dawn);
  color: var(--ink);
}

.feedback-btn:active {
  transform: scale(0.94);
}

.feedback-ok {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.feedback-sugestao {
  color: var(--mist);
  font-style: italic;
}

.feedback-input {
  flex: 1;
  min-width: 8rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.25rem 0.1rem;
  outline: none;
}

.feedback-input::placeholder { color: var(--ink-soft); }
.feedback-input:focus { border-bottom-color: var(--dawn); }

.feedback-send {
  border: 0;
  background: linear-gradient(120deg, var(--dawn), var(--mist));
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

/* ============ Composer ============ */

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.4rem 0.35rem 1.05rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.composer:focus-within {
  border-color: rgba(241, 185, 135, 0.55);
  box-shadow: 0 0 0 3px rgba(241, 185, 135, 0.12);
}

.composer textarea {
  flex: 1;
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  padding: 0.55rem 0;
  min-height: 2.4rem;
  max-height: 160px;
}

.composer textarea::placeholder { color: var(--ink-soft); }

.composer button[type="submit"] {
  border: 0;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--dawn), var(--mist));
  color: var(--bg-deep);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}

.composer button[type="submit"]:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(241, 185, 135, 0.35);
}

.composer button[type="submit"]:active { transform: scale(0.96); }

.composer button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.hint {
  margin: 0;
  min-height: 1.1em;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

/* ============ Thinking phrases ============ */

.bubble.is-thinking p.thinking-text {
  color: var(--ink-soft);
  font-style: italic;
  animation: think-fade 2.8s ease-in-out infinite;
}

@keyframes think-fade {
  0%, 100% { opacity: 0.55; }
  45% { opacity: 1; }
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 1.2em;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dawn);
  opacity: 0.35;
  animation: dots 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dots {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* ============ Product cards (Search Intelligence) ============ */

.product-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.85rem;
  width: 100%;
}

.product-cards-header {
  margin: 0 0 -0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(210, 220, 230, 0.55);
}

.product-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.55);
  border-radius: 14px;
  align-items: start;
}

.product-card-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.product-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: #f2f5f8;
}

.product-card-brand,
.product-card-store {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(210, 220, 230, 0.7);
}

.product-card-price {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9fd0ff;
}

.product-card-price.is-unknown {
  color: rgba(210, 220, 230, 0.65);
  font-weight: 500;
}

.product-card-link {
  margin-top: 0.25rem;
  align-self: start;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7dffa8;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 255, 168, 0.35);
}

.product-card-link:hover {
  color: #b6ffd0;
}

.product-cards-note {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(210, 220, 230, 0.55);
}

/* ============ Music cards ============ */

.music-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.85rem;
  width: 100%;
}

.music-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.55);
  border-radius: 14px;
}

.music-card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.music-card-icon-spotify { color: #1db954; }
.music-card-icon-youtube { color: #ff4d4d; }

.music-card-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f2f5f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-card-link {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7dffa8;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 255, 168, 0.35);
  white-space: nowrap;
}

.music-card-link:hover {
  color: #b6ffd0;
}

/* ============ Reference chips (fontes de respostas gerais) ============ */

.reference-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  width: 100%;
}

.reference-chips-label {
  font-size: 0.72rem;
  color: rgba(210, 220, 230, 0.5);
  margin-right: 0.1rem;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(210, 220, 230, 0.85);
  background: rgba(8, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-decoration: none;
}

.reference-chip:hover {
  color: #9fd0ff;
  border-color: rgba(159, 208, 255, 0.4);
}

/* ============ Sidebar → drawer (tablet/mobile) ============ */

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    width: min(300px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop.is-open {
    display: block;
    animation: rise 0.2s ease both;
  }

  .menu-btn { display: inline-flex; }
}

@media (min-width: 861px) {
  .sidebar-backdrop { display: none !important; }
}

/* ============ Telas pequenas ============ */

@media (max-width: 480px) {
  .stage { padding-left: 0.75rem; padding-right: 0.75rem; }
  .bubble-group { max-width: 85%; }
  .ghost-btn { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
  .product-card { grid-template-columns: 56px 1fr; }
  .product-card-img { width: 56px; height: 56px; }
  .sidebar { width: min(280px, 88vw); }
}
