.asst {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.asst-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 238, 220, .35);
  border-radius: 999px;
  padding: 13px 20px 13px 16px;
  background: linear-gradient(180deg, #b5614c 0%, #8a3b2a 100%);
  color: #fff6ea;
  font-size: 15px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(106, 42, 29, .35);
  transition: transform .15s ease, filter .15s ease;
}
.asst-fab:hover { filter: brightness(1.07); }
.asst-fab:active { transform: scale(.98); }
.asst-fab.is-open { background: linear-gradient(180deg, #7d3324 0%, #5f241a 100%); }

.asst-fab-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 246, 234, .18);
  font-size: 14px;
}

.asst-dot {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3c969;
  box-shadow: 0 0 0 3px rgba(138, 59, 42, .55);
}
.asst-dot.hidden { display: none; }

.asst-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(370px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(420px 220px at 100% 0%, #fbe3d4 0%, transparent 60%),
    linear-gradient(180deg, #fffaf2 0%, #f6e8d4 100%);
  border: 1px solid #e5cdab;
  box-shadow: 0 30px 70px rgba(60, 24, 16, .35);
  animation: asst-in .18s ease-out;
}
.asst-panel.hidden { display: none; }

@keyframes asst-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.asst-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(214, 184, 146, .55);
  background: rgba(255, 252, 246, .6);
}
.asst-kicker {
  margin: 0 0 2px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b8893c;
  font-weight: 700;
}
.asst-head h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  color: #6a2a1d;
}
.asst-close {
  border: 0;
  background: rgba(138, 59, 42, .08);
  color: #8a3b2a;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.asst-close:hover { background: rgba(138, 59, 42, .16); }

.asst-name {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(214, 184, 146, .45);
}
.asst-name.hidden { display: none; }
.asst-name label {
  display: block;
  font-size: 12px;
  color: #8a6a4c;
  margin-bottom: 6px;
}
.asst-name-row { display: flex; gap: 8px; }
.asst-name-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dfc6a2;
  background: #fffdf8;
  font: inherit;
  font-size: 14px;
  color: #3a2c20;
}
.asst-save {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: #8a3b2a;
  color: #fff6ea;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.asst-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.asst-messages {
  flex: 1;
  min-height: 160px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.asst-messages::-webkit-scrollbar { width: 6px; }
.asst-messages::-webkit-scrollbar-thumb {
  background: #d9bf98;
  border-radius: 999px;
}

.asst-hint {
  margin: auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  color: #a08a6e;
  padding: 18px 8px;
}

.asst-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 92%;
}
.asst-msg.from-guest { margin-left: auto; flex-direction: row-reverse; }

.asst-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f0dcc0 0%, #e3c9a6 100%);
  color: #7a4a33;
  font-family: Georgia, serif;
  font-size: 12px;
}

.asst-bubble {
  padding: 9px 12px;
  border-radius: 16px 16px 16px 5px;
  background: #fffaf1;
  border: 1px solid #eddcc2;
  box-shadow: 0 6px 14px rgba(106, 42, 29, .06);
}
.asst-msg.from-guest .asst-bubble {
  background: linear-gradient(180deg, #b5614c 0%, #8a3b2a 100%);
  border-color: #7d3324;
  border-radius: 16px 16px 5px 16px;
}

.asst-meta {
  display: block;
  font-size: 10px;
  color: #a48a6c;
  margin-bottom: 3px;
}
.asst-msg.from-guest .asst-meta {
  color: #f0d2b8;
  text-align: right;
}

.asst-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3f362c;
  white-space: pre-wrap;
  word-break: break-word;
}
.asst-msg.from-guest .asst-text { color: #fff6ea; }

.asst-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
}
.asst-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid #dfc6a2;
  background: #fffdf8;
  font: inherit;
  font-size: 14px;
  color: #3a2c20;
}
.asst-input:focus {
  outline: none;
  border-color: #b5614c;
  box-shadow: 0 0 0 3px rgba(181, 97, 76, .15);
}
.asst-send {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #b5614c 0%, #7d3324 100%);
  color: #fff6ea;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(106, 42, 29, .25);
}
.asst-send:hover { filter: brightness(1.08); }

.asst-note {
  margin: 8px 0 12px;
  text-align: center;
  font-size: 10.5px;
  color: #a08a6e;
}

@media (max-width: 560px) {
  .asst { right: 14px; bottom: 14px; }
  .asst-fab { padding: 12px 16px 12px 12px; font-size: 14px; }
  .asst-fab-label { display: none; }
  .asst-panel {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: 82px;
    width: auto;
    max-height: 72vh;
  }
}
