:root {
  --bordo: #6b1a25;
  --bordo-dark: #4a1219;
  --bordo-light: #8a2a36;
  --gold: #c9a84c;
  --gold-light: #e0c66e;
  --gold-dark: #a88a35;
  --white: #ffffff;
  --black: #0d0d0d;
  --black-soft: #1a1a1a;
  --gray-50: #f7f5f2;
  --gray-100: #ece8e1;
  --gray-200: #d9d3c8;
  --gray-400: #a89f8e;
  --gray-600: #6b6356;
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface-light: #252525;
  --text: #f5f1e8;
  --text-muted: #a89f8e;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(107, 26, 37, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
    var(--bg);
}

/* ── App shell ─────────────────────────────────────── */

.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 880px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

@media (min-width: 481px) {
  .app {
    height: calc(100% - 24px);
    max-height: 880px;
    border-radius: 20px;
    margin: 12px;
  }
}

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

.header {
  background: linear-gradient(135deg, var(--bordo-dark) 0%, var(--bordo) 50%, var(--bordo-light) 100%);
  padding: 16px 20px;
  position: relative;
  flex-shrink: 0;
  border-bottom: 2px solid var(--gold);
}

.header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.4);
  flex-shrink: 0;
}

.logo-wing {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--bordo-dark);
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Chat area ─────────────────────────────────────── */

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

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

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

.message {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: msg-in 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.bot-avatar {
  background: linear-gradient(135deg, var(--bordo), var(--bordo-light));
  color: var(--gold-light);
  border: 1.5px solid var(--gold-dark);
}

.user-avatar {
  background: var(--gray-200);
  color: var(--bordo-dark);
}

.bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.bot-bubble {
  background: var(--surface-light);
  color: var(--text);
  border-top-left-radius: 4px;
  border: 1px solid rgba(201, 168, 76, 0.15);
}

.user .bubble {
  background: linear-gradient(135deg, var(--bordo), var(--bordo-light));
  color: var(--white);
  border-top-right-radius: 4px;
}

.bubble h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.bubble p + p {
  margin-top: 8px;
}

.bubble ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.bubble li {
  margin-bottom: 3px;
}

.bubble .info-line {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Quick questions ───────────────────────────────── */

.quick-questions {
  display: flex;
  gap: 8px;
  padding: 8px 16px 10px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.quick-questions::-webkit-scrollbar {
  display: none;
}

.quick-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold-light);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.quick-btn:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--gold);
  color: var(--white);
}

.quick-btn:active {
  transform: scale(0.96);
}

/* ── Typing indicator ──────────────────────────────── */

.typing {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 16px 8px;
  animation: msg-in 250ms ease;
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-light);
  border: 1px solid rgba(201, 168, 76, 0.15);
  padding: 10px 16px;
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: bounce 1.3s infinite ease-in-out;
}
.typing .dot:nth-child(2) { animation-delay: 0.15s; }
.typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

.typing-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 6px;
}

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

.input-area {
  display: flex;
  gap: 10px;
  padding: 12px 16px 14px;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.text-input {
  flex: 1;
  background: var(--surface-light);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 24px;
  padding: 11px 18px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.text-input::placeholder {
  color: var(--gray-400);
}

.text-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.send-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bordo-dark);
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.3);
}

.send-btn:active {
  transform: scale(0.96);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn svg {
  flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────────── */

.footer {
  background: var(--black);
  padding: 10px 16px;
  text-align: center;
  flex-shrink: 0;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.footer p {
  font-size: 0.65rem;
  color: var(--gray-400);
  line-height: 1.4;
  letter-spacing: 0.2px;
}
