.persona-bot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 4000;
  font-family: 'Space Mono', monospace;
}

.persona-bot-toggle {
  --eye-x: 0px;
  --eye-y: 0px;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(185,134,46,.52);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, #fff2ca, var(--gold) 42%, #20150a 100%);
  box-shadow: 0 18px 44px rgba(43,34,18,.24), 0 0 42px rgba(185,134,46,.34);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.persona-bot-toggle .bot-face {
  width: 34px;
  height: 24px;
  border: 2px solid #1b1309;
  border-radius: 14px 14px 10px 10px;
  position: relative;
  display: block;
  background: rgba(255,253,248,.18);
}

.bot-eye {
  position: absolute;
  top: 8px;
  width: 5px;
  height: 5px;
  background: #1b1309;
  border-radius: 50%;
  transform: translate(var(--eye-x), var(--eye-y));
  transition: transform .08s linear;
}

.bot-eye-left { left: 8px; }
.bot-eye-right { right: 8px; }

.persona-bot-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(43,34,18,.3), 0 0 54px rgba(185,134,46,.46);
}

.persona-bot-panel {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 130px));
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(185,134,46,.28);
  border-radius: 26px;
  background: rgba(255,253,248,.94);
  box-shadow: 0 30px 90px rgba(43,34,18,.22);
  backdrop-filter: blur(18px);
}

.persona-bot.open .persona-bot-panel {
  display: grid;
}

.persona-bot-header {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(185,134,46,.14);
}

.persona-bot-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}

.persona-bot-header p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: .56rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.persona-bot-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(185,134,46,.2);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
}

.persona-bot-messages {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.persona-bot-message {
  width: fit-content;
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: .78rem;
}

.persona-bot-message.bot {
  background: #f1eadc;
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

.persona-bot-message.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
  border-bottom-right-radius: 6px;
}

.persona-bot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.persona-bot-chip {
  border: 1px solid rgba(185,134,46,.2);
  border-radius: 999px;
  background: rgba(185,134,46,.08);
  color: var(--gold-dark);
  padding: 8px 10px;
  font-size: .55rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.persona-bot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(185,134,46,.14);
}

.persona-bot-form input {
  min-height: 44px;
  border: 1px solid rgba(185,134,46,.18);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  font-size: .85rem;
  cursor: text;
}

.persona-bot-form input:focus {
  border-color: var(--gold);
}

.persona-bot-form button {
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .6rem;
  letter-spacing: .14em;
  cursor: pointer;
}

.persona-bot button {
  touch-action: manipulation;
}

@media (max-width: 720px) {
  .persona-bot {
    right: 16px;
    bottom: 16px;
  }

  .persona-bot-toggle {
    width: 62px;
    height: 62px;
  }
}
