.aura-help-root,
.aura-help-root * {
  box-sizing: border-box;
}

.aura-help-root {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147483400;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Arial, sans-serif;
}

.aura-help-launcher {
  position: relative;
  width: 74px;
  height: 52px;
  border: 1px solid rgba(191,143,50,.72);
  border-radius: 26px 26px 26px 18px;
  background: linear-gradient(
    135deg,
    #fffdf5 0%,
    #f7e7b6 35%,
    #ccefe9 68%,
    #fdf7e8 100%
  );
  background-size: 220% 220%;
  color: #123f5c;
  box-shadow:
    0 8px 28px rgba(15,60,79,.20),
    0 0 0 4px rgba(255,248,224,.16);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  animation:
    auraHelpDrift 7.5s ease-in-out infinite,
    auraHelpColor 12s ease-in-out infinite,
    auraHelpGlow 4.8s ease-in-out infinite;
}

.aura-help-launcher::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  background: #d8efe4;
  border-right: 1px solid rgba(191,143,50,.58);
  border-bottom: 1px solid rgba(191,143,50,.58);
  transform: rotate(32deg);
  border-radius: 2px 2px 5px 2px;
  z-index: -1;
}

.aura-help-launcher::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 32px;
  border: 1px solid rgba(213,166,70,.22);
  pointer-events: none;
  animation: auraHelpHalo 4.8s ease-in-out infinite;
}

@keyframes auraHelpDrift {
  0%   { transform: translate(0,0); }
  22%  { transform: translate(-3px,-6px); }
  48%  { transform: translate(2px,-10px); }
  72%  { transform: translate(-2px,-4px); }
  100% { transform: translate(0,0); }
}

@keyframes auraHelpColor {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes auraHelpGlow {
  0%,100% {
    box-shadow:
      0 8px 28px rgba(15,60,79,.18),
      0 0 0 3px rgba(255,248,224,.12);
  }
  50% {
    box-shadow:
      0 10px 34px rgba(39,137,145,.27),
      0 0 0 6px rgba(237,202,112,.14);
  }
}

@keyframes auraHelpHalo {
  0%,100% { opacity:.28; transform:scale(.97); }
  50% { opacity:.72; transform:scale(1.05); }
}

.aura-help-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 370px;
  max-width: calc(100vw - 24px);
  height: min(590px, calc(100vh - 110px));
  min-height: 420px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(194,148,67,.42);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 22px 60px rgba(17,45,66,.25);
}

.aura-help-panel.is-open {
  display: flex;
}

.aura-help-header {
  position: relative;
  padding: 16px 58px 14px 18px;
  border-bottom: 1px solid #eadfc9;
  background: linear-gradient(180deg,#fffdf8,#faf6ee);
}

.aura-help-brand {
  color: #9a6d2f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.aura-help-title {
  margin-top: 4px;
  color: #123f5c;
  font-size: 17px;
  font-weight: 700;
}

.aura-help-root button.aura-help-close {
  all: unset !important;
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(184,146,84,.42) !important;
  border-radius: 50% !important;
  background: #fffdf8 !important;
  color: #173f5b !important;
  font: 400 21px/1 Arial,sans-serif !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.aura-help-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fffdf8;
}

.aura-help-msg {
  max-width: 86%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.aura-help-msg.assistant {
  margin-right: auto;
  background: #f3eee4;
  color: #29495e;
}

.aura-help-msg.user {
  margin-left: auto;
  background: #173f5b;
  color: #fff;
}

.aura-help-form {
  width: 100%;
  padding: 12px;
  border-top: 1px solid #eadfc9;
  background: #fff;
}

.aura-help-row {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 74px !important;
  gap: 10px !important;
  width: 100% !important;
  align-items: stretch !important;
}

.aura-help-root .aura-help-form .aura-help-row > textarea.aura-help-input {
  all: unset !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 82px !important;
  min-height: 82px !important;
  max-height: 126px !important;
  padding: 11px 12px !important;
  border: 1px solid #d9cfbe !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #18324a !important;
  font: 400 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif !important;
  writing-mode: horizontal-tb !important;
  direction: ltr !important;
  white-space: pre-wrap !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  cursor: text !important;
}

.aura-help-root .aura-help-form .aura-help-row > textarea.aura-help-input:focus {
  border-color: #b98a43 !important;
  box-shadow: 0 0 0 2px rgba(185,138,67,.12) !important;
}

.aura-help-root .aura-help-form .aura-help-row > button.aura-help-send {
  all: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  height: 82px !important;
  min-height: 82px !important;
  border-radius: 10px !important;
  background: #173f5b !important;
  color: #fff !important;
  font: 700 13px/1 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.aura-help-root .aura-help-form .aura-help-row > button.aura-help-send:disabled {
  opacity: .55 !important;
  cursor: default !important;
}

.aura-help-note {
  margin-top: 7px;
  color: #8b9297;
  font-size: 10px;
  line-height: 1.45;
}

.aura-help-contact {
  margin: 6px 0 14px;
  padding: 12px;
  border: 1px solid #e6d9c4;
  border-radius: 12px;
  background: #fbf7ef;
}

.aura-help-contact-input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px solid #d9cfbe;
  border-radius: 10px;
  background: #fff;
  color: #18324a;
  font: inherit;
}

.aura-help-root button.aura-help-ticket-submit {
  all: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 44px !important;
  margin: 12px auto 0 !important;
  padding: 10px 20px !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg,#f7df9a,#e8b94f) !important;
  border: 1px solid rgba(188,132,34,.55) !important;
  color: #173f5b !important;
  font: 700 13px/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif !important;
  cursor: pointer !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}


.aura-help-root button.aura-help-ticket-submit:disabled {
  opacity: .58 !important;
  pointer-events: none !important;
  cursor: wait !important;
  filter: saturate(.7) !important;
}

.aura-help-contact.is-submitting .aura-help-contact-input {
  opacity: .72;
}

.aura-help-priority {
  margin-bottom: 5px;
  color: #9a5c25;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}

@media (max-width: 640px) {
  .aura-help-root {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .aura-help-panel {
    right: 0;
    bottom: 66px;
    width: calc(100vw - 24px);
    height: min(72vh,600px);
  }

  .aura-help-launcher {
    width: 70px;
    height: 50px;
  }

  .aura-help-row {
    grid-template-columns: minmax(0,1fr) 68px !important;
    gap: 8px !important;
  }

  .aura-help-root .aura-help-form .aura-help-row > button.aura-help-send {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aura-help-launcher,
  .aura-help-launcher::after {
    animation: none;
  }
}

/* ===== Help brand final polish ===== */
.aura-help-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  color: #8b621a !important;
}

.aura-help-brand.has-cn {
  font-size: 14px !important;
}

.aura-help-brand .brand-divider {
  letter-spacing: 0 !important;
  opacity: 0.85;
}

.aura-help-brand .brand-cn {
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #8b621a !important;
}

.aura-help-title {
  font-size: 18px !important;
  font-weight: 800 !important;
}
