#arman-note {
  --an-ink: #0c1458;
  --an-gold: #fddf06;
  --an-bg: #f4f1ea;
  --an-muted: #5c6170;
  --an-line: rgba(12, 20, 88, 0.14);
  --an-bot: #eef0f8;
  position: fixed;
  right: 1rem;
  bottom: calc(4.9rem + env(safe-area-inset-bottom));
  z-index: 40;
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}
@media (min-width: 900px) {
  #arman-note { bottom: 1.25rem; right: 1.25rem; }
}
.an-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: var(--an-ink);
  color: #fff;
  padding: 0.85rem 1.05rem;
  box-shadow: 0 10px 28px rgba(12, 20, 88, 0.28);
  cursor: pointer;
  font: 700 0.98rem/1.1 "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}
.an-launcher:hover { background: #16207a; }
.an-launcher-icon {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--an-gold);
  color: var(--an-ink);
  align-items: center;
  justify-content: center;
}
.an-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  width: min(22.5rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100dvh - 7.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: var(--an-ink);
  border: 1px solid var(--an-line);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(12, 20, 88, 0.22);
}
@media (max-width: 899px) {
  .an-panel {
    max-height: calc(100dvh - 9.5rem - env(safe-area-inset-bottom));
  }
}
.an-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--an-ink);
  color: #fff;
}
.an-head-main { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.an-avatar {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--an-gold);
  color: var(--an-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 0.72rem/1 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.02em;
}
.an-kicker {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.an-head h2 {
  margin: 0.12rem 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #fff;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-weight: 700;
}
.an-close {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.an-thread {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--an-bg);
  padding: 0.95rem 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.an-row { display: flex; }
.an-row-bot { justify-content: flex-start; }
.an-row-user { justify-content: flex-end; }
.an-bubble {
  max-width: 88%;
  padding: 0.72rem 0.85rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.an-bubble-bot {
  background: #fff;
  border: 1px solid var(--an-line);
  border-bottom-left-radius: 5px;
  color: var(--an-ink);
}
.an-bubble-user {
  background: var(--an-ink);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.an-bubble-success {
  background: #fff;
  border-color: rgba(12, 20, 88, 0.22);
  box-shadow: 0 0 0 2px rgba(253, 223, 6, 0.55);
}
.an-form { padding: 0.75rem 0.9rem 0.95rem; background: #fff; border-top: 1px solid var(--an-line); }
.an-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
}
.an-composer textarea,
.an-fields input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--an-line);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--an-ink);
  background: #fff;
}
.an-composer textarea {
  resize: none;
  min-height: 2.8rem;
  max-height: 7rem;
}
.an-fields { display: grid; gap: 0.3rem; }
.an-label {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.3rem;
}
.an-req, .an-opt { color: var(--an-muted); font-weight: 600; }
.an-turnstile { margin: 0.55rem 0 0.15rem; min-height: 1.5rem; }
.an-error {
  margin: 0.35rem 0 0;
  color: #8a1f1f;
  font-size: 0.9rem;
}
.an-next,
.an-submit {
  border: 0;
  border-radius: 999px;
  background: var(--an-gold);
  color: var(--an-ink);
  font: 700 0.95rem/1.1 inherit;
  padding: 0.78rem 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.an-next:hover,
.an-submit:hover { background: #ffe45a; }
.an-submit { width: 100%; margin-top: 0.45rem; }
.an-submit:disabled { opacity: 0.65; cursor: wait; }
.an-done-wrap { padding: 0 0.9rem 0.95rem; background: #fff; }
.an-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.an-step[hidden],
.an-row[hidden],
.an-error[hidden],
.an-panel[hidden],
.an-form[hidden],
.an-done-wrap[hidden] { display: none !important; }
@media (max-width: 420px) {
  .an-launcher-text { display: none; }
  .an-launcher { padding: 0.9rem; }
}

.an-thread.is-empty {
  display: none;
}
