/* =============================================================================
   «Die Heuboden-Eule» – the website chat as a small piece of the brand.
   Idea: the owl lives at the forest edge. Closed, she sits in a gold-ringed medal.
   Opened, she flies up and lands on the card; its header is the forest of the
   Heuboden logo – golden hour by day, moon and fireflies in the evening.
   Uses the site tokens from main.css. All motion is optional (reduced motion).
   ============================================================================= */
.hb-chat {
  --hbc-gold: var(--color-gold, #b7985b);
  --hbc-gold-dark: var(--color-gold-dark, #a08448);
  --hbc-gold-light: var(--color-gold-light, #d4b97a);
  --hbc-gold-soft: var(--color-gold-muted, #e8d9bc);
  --hbc-ink: var(--color-text, #1a1612);
  --hbc-soft: var(--color-text-light, #5c5247);
  --hbc-muted: var(--color-text-muted, #8a7f74);
  --hbc-line: var(--color-border, #e2d9d0);
  --hbc-cream: var(--color-bg, #f9f6f2);
  --hbc-ease: cubic-bezier(.22, .8, .22, 1);

  /* header scene – day (golden hour) */
  --sky-bg: linear-gradient(180deg, #fdfbf7 0%, #f7f0e3 52%, #ecdfc4 100%);
  --sky-ink: #1a1612;
  --sky-ink-soft: #6b5d4d;
  --sky-title: #1a1612;
  --sky-btn: rgba(26, 22, 18, .08);
  --orb-bg: radial-gradient(circle at 42% 38%, #fffef8 0%, #fcefcd 52%, #f0d9a2 100%);
  --orb-glow: 0 0 0 12px rgba(240, 217, 162, .22), 0 0 64px 20px rgba(214, 178, 100, .34);
  --tree-back: #e6d7b6;
  --tree-mid: #d2bb8c;
  --tree-front: #b5975e;
  --stars: 0;
  --fly: rgba(183, 152, 91, .95);
  --fly-glow: rgba(183, 152, 91, .4);

  font-family: var(--font-serif, 'Roboto', -apple-system, 'Segoe UI', sans-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--hbc-ink);
}
/* header scene – evening and night */
.hb-chat[data-sky="night"] {
  --sky-bg: radial-gradient(130% 95% at 50% 0%, #3d3024 0%, #241c15 55%, #15110d 100%);
  --sky-ink: #f3ead9;
  --sky-ink-soft: rgba(243, 234, 217, .74);
  --sky-title: #e8d29c;
  --sky-btn: rgba(243, 234, 217, .12);
  --orb-bg: radial-gradient(circle at 40% 35%, #fffbf1 0%, #f2e4bd 50%, #dbc387 100%);
  --orb-glow: 0 0 0 12px rgba(219, 195, 135, .09), 0 0 72px 22px rgba(219, 195, 135, .3);
  --tree-back: #3c3024;
  --tree-mid: #2b2219;
  --tree-front: #17120e;
  --stars: 1;
  --fly: #f8e6ad;
  --fly-glow: rgba(248, 230, 173, .85);
}
.hb-chat[hidden] { display: none; }

/* =============================================================================
   The owl (artwork + light sweep + eyelids)
   ============================================================================= */
.hb-owl { position: absolute; display: block; }
.hb-owl > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 7px 9px rgba(26, 22, 18, .32));
}
.hb-owl__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: var(--owl) center / contain no-repeat;
  mask: var(--owl) center / contain no-repeat;
  background: linear-gradient(112deg, rgba(255, 248, 226, 0) 41%, rgba(255, 248, 226, .88) 50%, rgba(255, 248, 226, 0) 59%) no-repeat;
  background-size: 280% 100%;
  background-position: 140% 0;
  animation: hb-owl-shine 9s ease-in-out infinite;
}
@keyframes hb-owl-shine {
  0%, 66% { background-position: 140% 0; }
  84%, 100% { background-position: -40% 0; }
}
.hb-owl__lids { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hb-owl__lid { transform-box: fill-box; transform-origin: 50% 50%; transform: scaleY(0); }
.hb-owl.is-blink .hb-owl__lid { animation: hb-owl-blink .36s ease-in-out; }
@keyframes hb-owl-blink {
  0% { transform: scaleY(0); }
  38%, 58% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

/* =============================================================================
   Closed: the medal
   ============================================================================= */
.hb-chat__fab {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 9000;
  width: 104px;
  height: 104px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hb-chat__fab:focus-visible { outline: 2px solid var(--hbc-gold-light); outline-offset: 6px; }

.hb-chat__medal {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #40342a 0%, #221b15 46%, #15110d 100%);
  box-shadow: 0 14px 34px rgba(26, 22, 18, .45), 0 2px 6px rgba(26, 22, 18, .3), inset 0 0 0 1px rgba(212, 185, 122, .55);
  transition: transform .45s var(--hbc-ease), opacity .3s ease, box-shadow .3s ease;
}
/* inner ring: polished gold, the light travels around it */
.hb-chat__medal::before {
  content: '';
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8c6e37, #f6e7bb 12%, #b7985b 27%, #6f5628 46%, #dcc48d 62%, #f6e7bb 74%, #9a7c42 88%, #8c6e37);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: hb-spin 9s linear infinite;
}
/* a quiet ring of light that leaves the medal now and then */
.hb-chat__medal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 185, 122, .7);
  opacity: 0;
  animation: hb-ping 7s ease-out 2.5s infinite;
}
@keyframes hb-spin { to { transform: rotate(360deg); } }
@keyframes hb-ping {
  0% { transform: scale(1); opacity: .65; }
  22%, 100% { transform: scale(1.42); opacity: 0; }
}
.hb-chat__medal-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: hb-spin 30s linear infinite;
}
.hb-chat__medal-text text {
  fill: var(--hbc-gold-light);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}
.hb-owl--fab {
  left: 50%;
  bottom: 2px;
  width: 124px;
  height: 124px;
  margin-left: -62px;
  transform-origin: 50% 88%;
  transition: transform .5s var(--hbc-ease), opacity .2s ease;
  animation: hb-owl-float 5.5s ease-in-out infinite;
}
@keyframes hb-owl-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
.hb-chat__fab:hover .hb-chat__medal,
.hb-chat__fab:focus-visible .hb-chat__medal { box-shadow: 0 18px 40px rgba(26, 22, 18, .5), 0 0 0 6px rgba(212, 185, 122, .16), inset 0 0 0 1px rgba(246, 231, 187, .9); }
.hb-chat__fab:hover .hb-owl--fab,
.hb-chat__fab:focus-visible .hb-owl--fab { transform: translateY(-4px) rotate(-5deg) scale(1.04); }
.hb-chat__fab:active .hb-owl--fab { transform: translateY(0) scale(.98); }

/* the invitation that slides out from behind the medal */
.hb-chat__fab-label {
  position: absolute;
  right: 62px;
  top: 50%;
  z-index: -1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 11px 58px 11px 22px;
  border: 1px solid var(--hbc-gold-soft);
  border-radius: 34px 0 0 34px;
  background: var(--hbc-cream);
  box-shadow: 0 10px 28px rgba(26, 22, 18, .22);
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  transform: translate(26px, -50%);
  pointer-events: none;
  transition: opacity .35s ease, transform .55s var(--hbc-ease);
}
.hb-chat__fab-label strong { font-size: .8rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--hbc-ink); }
.hb-chat__fab-label em { font-size: .78rem; font-weight: 300; color: var(--hbc-soft); }
.hb-chat.is-hint .hb-chat__fab-label,
.hb-chat__fab:hover .hb-chat__fab-label,
.hb-chat__fab:focus-visible .hb-chat__fab-label { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }

.hb-chat.is-open .hb-chat__fab { pointer-events: none; }
.hb-chat.is-open .hb-chat__medal::before,
.hb-chat.is-open .hb-chat__medal::after,
.hb-chat.is-open .hb-chat__medal-text,
.hb-chat.is-open .hb-owl--fab,
.hb-chat.is-open .hb-owl--fab .hb-owl__shine { animation-play-state: paused; }
.hb-chat.is-open .hb-chat__medal { transform: scale(.45); opacity: 0; }
.hb-chat.is-open .hb-owl--fab,
.hb-chat.is-open .hb-chat__fab-label { opacity: 0; }

/* =============================================================================
   Open: the card
   ============================================================================= */
.hb-chat__panel {
  --head-h: 190px;
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  width: 404px;
  max-width: calc(100vw - 32px);
  height: min(690px, calc(100vh - 104px));
  height: min(690px, calc(100dvh - 104px));
  border-radius: 22px;
  background: var(--hbc-cream);
  box-shadow: 0 34px 90px rgba(26, 22, 18, .42), 0 6px 18px rgba(26, 22, 18, .18), 0 0 0 1px rgba(183, 152, 91, .4);
  animation: hb-panel-in .62s var(--hbc-ease);
}
.hb-chat__panel[hidden] { display: none; }
.hb-chat__panel.is-closing { animation: hb-panel-out .28s ease-in forwards; pointer-events: none; }
/* the card opens out of the medal */
@keyframes hb-panel-in {
  from { opacity: .4; clip-path: circle(0% at calc(100% - 52px) calc(100% - 52px)); }
  to { opacity: 1; clip-path: circle(160% at calc(100% - 52px) calc(100% - 52px)); }
}
@keyframes hb-panel-out {
  from { opacity: 1; clip-path: circle(160% at calc(100% - 52px) calc(100% - 52px)); }
  to { opacity: 0; clip-path: circle(0% at calc(100% - 52px) calc(100% - 52px)); }
}

/* ---- Header: the forest edge ---- */
.hb-chat__head {
  position: relative;
  z-index: 2;
  flex: none;
  height: var(--head-h);
  color: var(--sky-ink);
  transition: height .55s var(--hbc-ease);
}
.hb-chat__panel.is-compact { --head-h: 76px; }
.hb-chat__head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(183, 152, 91, 0), #b7985b 18%, #f3e2b5 50%, #b7985b 82%, rgba(183, 152, 91, 0));
}
.hb-chat__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: var(--sky-bg);
}
.hb-chat__stars {
  position: absolute;
  inset: 0;
  opacity: var(--stars);
  background:
    radial-gradient(1.3px 1.3px at 8% 18%, #fff6dc 55%, transparent 60%),
    radial-gradient(1px 1px at 17% 42%, #f3e2b5 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 24% 12%, #fff6dc 55%, transparent 60%),
    radial-gradient(1px 1px at 31% 30%, #f3e2b5 55%, transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 14%, #fff6dc 55%, transparent 60%),
    radial-gradient(1px 1px at 74% 36%, #f3e2b5 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 83% 22%, #fff6dc 55%, transparent 60%),
    radial-gradient(1px 1px at 91% 44%, #f3e2b5 55%, transparent 60%),
    radial-gradient(1.1px 1.1px at 95% 10%, #fff6dc 55%, transparent 60%),
    radial-gradient(1px 1px at 4% 52%, #f3e2b5 55%, transparent 60%);
  animation: hb-twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes hb-twinkle {
  from { opacity: calc(var(--stars) * .45); }
  to { opacity: var(--stars); }
}
/* sun by day, moon in the evening – the owl sits in front of it */
.hb-chat__orb {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  border-radius: 50%;
  background: var(--orb-bg);
  box-shadow: var(--orb-glow);
  translate: calc(var(--px, 0) * 7px) 0;
  transition: transform .55s var(--hbc-ease), translate .4s ease-out;
  animation: hb-orb-rise 1s var(--hbc-ease) .1s backwards;
}
.hb-chat__panel.is-compact .hb-chat__orb { transform: translate(-148px, -27px) scale(.52); }
@keyframes hb-orb-rise { from { transform: translateY(54px) scale(.86); opacity: 0; } }
.hb-chat__trees {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 660px;
  height: 76px;
  margin-left: -330px;
  max-width: none;
  transition: transform .55s var(--hbc-ease), translate .4s ease-out;
  animation: hb-trees-rise .9s var(--hbc-ease) backwards;
}
.hb-chat__trees--back { fill: var(--tree-back); translate: calc(var(--px, 0) * -5px) 0; animation-delay: .05s; }
.hb-chat__trees--mid { fill: var(--tree-mid); translate: calc(var(--px, 0) * -10px) 0; animation-delay: .14s; }
.hb-chat__trees--front { fill: var(--tree-front); translate: calc(var(--px, 0) * -17px) 0; animation-delay: .23s; }
.hb-chat__panel.is-compact .hb-chat__trees { transform: translateY(30px); }
@keyframes hb-trees-rise { from { transform: translateY(46px); opacity: 0; } }
.hb-chat__flies { position: absolute; inset: 0; }
.hb-chat__fly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--fly);
  box-shadow: 0 0 7px 2px var(--fly-glow);
  opacity: 0;
  animation: hb-fly var(--d, 9s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes hb-fly {
  0% { opacity: 0; transform: translate(0, 0); }
  18% { opacity: .95; }
  50% { opacity: .3; transform: translate(var(--dx, 10px), var(--dy, -8px)); }
  72% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(var(--dx, 10px) * 1.7), calc(var(--dy, -8px) * 2.1)); }
}

/* the owl on the card: perched on the upper edge, in front of sun or moon */
.hb-owl--head {
  left: 50%;
  top: -52px;
  width: 128px;
  height: 128px;
  margin-left: -64px;
  transform-origin: 50% 92%;
  transition: left .55s var(--hbc-ease), top .55s var(--hbc-ease), width .55s var(--hbc-ease), height .55s var(--hbc-ease), margin .55s var(--hbc-ease);
  animation: hb-owl-float 6.5s ease-in-out infinite;
}
.hb-chat__panel.is-compact .hb-owl--head { left: 12px; top: -24px; width: 84px; height: 84px; margin-left: 0; }
.hb-owl--head.is-landed { animation: hb-owl-land .5s var(--hbc-ease); }
@keyframes hb-owl-land {
  0% { transform: translateY(-7px) scale(1.04, .96); }
  55% { transform: translateY(1px) scale(.97, 1.04); }
  100% { transform: none; }
}

.hb-chat__title,
.hb-chat__subtitle {
  position: absolute;
  left: 50%;
  margin: 0;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: left .55s var(--hbc-ease), top .55s var(--hbc-ease), transform .55s var(--hbc-ease), font-size .55s var(--hbc-ease), letter-spacing .55s var(--hbc-ease);
}
.hb-chat__title {
  top: 127px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sky-title);
  animation: hb-title-in .9s var(--hbc-ease) .42s backwards;
}
.hb-chat__subtitle {
  top: 151px;
  font-size: .84rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: var(--sky-ink-soft);
  animation: hb-fade-in .8s ease .62s backwards;
}
.hb-chat__panel.is-compact .hb-chat__title { left: 108px; top: 18px; font-size: .84rem; letter-spacing: .15em; transform: none; }
.hb-chat__panel.is-compact .hb-chat__subtitle { left: 108px; top: 41px; font-size: .78rem; transform: none; }
@keyframes hb-title-in { from { opacity: 0; letter-spacing: .5em; } }
@keyframes hb-fade-in { from { opacity: 0; } }

.hb-chat__tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 2px; animation: hb-fade-in .6s ease .5s backwards; }
.hb-chat__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sky-ink-soft);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .3s var(--hbc-ease);
}
.hb-chat__icon:hover { background: var(--sky-btn); color: var(--sky-ink); }
.hb-chat__icon[data-chat-reset]:hover { transform: rotate(-90deg); }
.hb-chat__icon:focus-visible,
.hb-chat__send:focus-visible,
.hb-chat__topic:focus-visible,
.hb-chat__card-send:focus-visible { outline: 2px solid var(--hbc-gold-dark); outline-offset: 2px; }

/* ---- Body: fine paper ---- */
.hb-chat__body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 22px 22px;
  background-color: var(--hbc-cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .2 .12 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hb-chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--hbc-gold-soft) transparent;
  padding: 18px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}
.hb-chat__log > * { flex: none; animation: hb-msg-in .45s var(--hbc-ease) backwards; }
@keyframes hb-msg-in { from { opacity: 0; transform: translateY(10px); } }

.hb-chat__row-a { display: flex; align-items: flex-end; gap: 9px; max-width: 94%; }
.hb-chat__avatar {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  margin-bottom: 1px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #40342a, #17120e 70%);
  box-shadow: 0 0 0 1px rgba(183, 152, 91, .75), 0 3px 8px rgba(26, 22, 18, .2);
}
.hb-chat__avatar img { position: absolute; left: 50%; bottom: 0; width: 36px; height: 36px; max-width: none; margin-left: -18px; object-fit: contain; }
.hb-chat__msg { max-width: 84%; padding: 11px 15px; overflow-wrap: anywhere; }
.hb-chat__row-a .hb-chat__msg { max-width: none; min-width: 0; }
.hb-chat__msg--assistant {
  align-self: flex-start;
  border: 1px solid #ece2d3;
  border-radius: 18px 18px 18px 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(26, 22, 18, .05);
}
.hb-chat__msg--user {
  align-self: flex-end;
  border: 1px solid rgba(183, 152, 91, .45);
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(140deg, #2e251c 0%, #1a1612 70%);
  color: #f9f3e7;
  box-shadow: 0 6px 16px rgba(26, 22, 18, .16);
}
.hb-chat__msg a { color: var(--hbc-gold-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hb-chat__msg--user a { color: var(--hbc-gold-light); }
/* an answer is written word by word */
.hb-chat__w { display: inline-block; animation: hb-word-in .42s ease backwards; }
@keyframes hb-word-in { from { opacity: 0; transform: translateY(5px); filter: blur(3px); } }

.hb-chat__typing { display: inline-flex; align-items: center; gap: 6px; padding: 13px 16px; color: var(--hbc-muted); font-size: .82rem; font-style: italic; }
.hb-chat__typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hbc-gold);
  box-shadow: 0 0 6px 1px rgba(183, 152, 91, .6);
  animation: hb-dot 1.4s ease-in-out infinite;
}
.hb-chat__typing i:nth-child(2) { animation-delay: .18s; }
.hb-chat__typing i:nth-child(3) { animation-delay: .36s; margin-right: 4px; }
@keyframes hb-dot {
  0%, 70%, 100% { opacity: .3; transform: translateY(0) scale(.85); }
  35% { opacity: 1; transform: translateY(-4px) scale(1.15); }
}

/* ---- The menu of topics ---- */
.hb-chat__menu { display: flex; flex-direction: column; gap: 5px; margin: 2px 0 0 39px; }
.hb-chat__menu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 3px;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hbc-gold-dark);
}
.hb-chat__menu-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hbc-gold-soft), rgba(232, 217, 188, 0)); }
.hb-chat__topic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 12px;
  overflow: hidden;
  border: 1px solid #eadfcd;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--hbc-ink);
  font: inherit;
  font-size: .9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .25s ease, box-shadow .25s ease, transform .35s var(--hbc-ease);
  animation: hb-msg-in .5s var(--hbc-ease) calc(var(--i, 0) * 70ms + 120ms) backwards;
}
.hb-chat__topic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(240, 232, 214, .95), rgba(240, 232, 214, 0) 85%);
  transform: translateX(-101%);
  transition: transform .5s var(--hbc-ease);
}
.hb-chat__topic > * { position: relative; }
.hb-chat__topic svg { flex: none; width: 20px; height: 20px; color: var(--hbc-gold-dark); }
.hb-chat__topic span { flex: 1; }
.hb-chat__topic .hb-chat__topic-go { flex: none; width: 15px; height: 15px; color: var(--hbc-gold); opacity: .55; transition: transform .35s var(--hbc-ease), opacity .25s ease; }
.hb-chat__topic:hover { border-color: var(--hbc-gold); box-shadow: 0 6px 16px rgba(26, 22, 18, .08); transform: translateX(2px); }
.hb-chat__topic:hover::before { transform: none; }
.hb-chat__topic:hover .hb-chat__topic-go { transform: translateX(3px); opacity: 1; }

/* ---- Input ---- */
.hb-chat__form { display: flex; align-items: flex-end; gap: 9px; padding: 10px 14px 8px; }
.hb-chat__input {
  flex: 1;
  min-height: 46px;
  max-height: 120px;
  padding: 12px 17px;
  border: 1px solid #e6dac6;
  border-radius: 23px;
  background: #fff;
  color: var(--hbc-ink);
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  line-height: 1.35;
  resize: none;
  box-shadow: 0 2px 10px rgba(26, 22, 18, .04);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hb-chat__input::placeholder { color: #a79b8d; font-style: italic; font-weight: 300; }
.hb-chat__input:focus { outline: none; border-color: var(--hbc-gold); box-shadow: 0 0 0 4px rgba(183, 152, 91, .16), 0 2px 10px rgba(26, 22, 18, .04); }
.hb-chat__send {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #e3cb93 0%, #b7985b 48%, #94783f 100%);
  color: #1a1612;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(160, 132, 72, .4), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .3s var(--hbc-ease), box-shadow .3s ease;
}
.hb-chat__send::after,
.hb-chat__card-send::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-120%);
}
.hb-chat__send:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 9px 20px rgba(160, 132, 72, .5), inset 0 1px 0 rgba(255, 255, 255, .45); }
.hb-chat__send:hover::after,
.hb-chat__card-send:hover::after { transform: translateX(120%); transition: transform .7s ease; }
.hb-chat__send:disabled { opacity: .55; cursor: default; transform: none; }
.hb-chat__send svg { position: relative; }

.hb-chat__note { margin: 0; padding: 0 16px 11px; color: var(--hbc-muted); font-size: .7rem; line-height: 1.4; letter-spacing: .02em; text-align: center; }
.hb-chat__note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Inquiry: a small card to fill in ---- */
.hb-chat__card {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px 18px;
  border: 1px solid var(--hbc-gold-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 22, 18, .08);
}
.hb-chat__card::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(183, 152, 91, .35); border-radius: 12px; pointer-events: none; }
.hb-chat__card > * { position: relative; }
.hb-chat__card-title { margin: 0 0 2px; font-size: .8rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-align: center; color: var(--hbc-gold-dark); }
.hb-chat__field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hb-chat__field > span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hbc-muted); }
.hb-chat__field input,
.hb-chat__field select,
.hb-chat__field textarea {
  width: 100%;
  min-width: 0;
  padding: 6px 0 7px;
  border: 0;
  border-bottom: 1px solid #dccfb9;
  border-radius: 0;
  background: transparent;
  color: var(--hbc-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.hb-chat__field textarea { resize: vertical; line-height: 1.45; }
.hb-chat__field input:focus,
.hb-chat__field select:focus,
.hb-chat__field textarea:focus { outline: none; border-bottom-color: var(--hbc-gold-dark); box-shadow: 0 1px 0 var(--hbc-gold-dark); }
.hb-chat__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hb-chat__consent { display: flex; gap: 9px; align-items: flex-start; font-size: .76rem; line-height: 1.4; color: var(--hbc-soft); }
.hb-chat__consent input { flex: none; width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--hbc-gold-dark); }
.hb-chat__card-send {
  position: relative;
  padding: 13px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(140deg, #e3cb93 0%, #b7985b 48%, #94783f 100%);
  color: #1a1612;
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(160, 132, 72, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.hb-chat__card-send:disabled { opacity: .6; cursor: default; }
.hb-chat__card-status { margin: 0; font-size: .82rem; color: var(--color-error, #c0392b); }
.hb-chat__card-status:empty { display: none; }
/* sent: a gold seal */
.hb-chat__seal { align-self: center; width: 62px; height: 62px; margin: 4px 0 -2px; }
.hb-chat__seal circle { fill: none; stroke: var(--hbc-gold); stroke-width: 1.5; stroke-dasharray: 176; stroke-dashoffset: 176; animation: hb-draw .8s var(--hbc-ease) .1s forwards; }
.hb-chat__seal circle + circle { stroke: var(--hbc-gold-soft); stroke-width: 1; stroke-dasharray: 151; stroke-dashoffset: 151; animation-delay: .25s; }
.hb-chat__seal path { fill: none; stroke: var(--hbc-gold-dark); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; animation: hb-draw .5s ease .75s forwards; }
@keyframes hb-draw { to { stroke-dashoffset: 0; } }

/* the owl on her way between medal and card */
.hb-chat__flyer {
  position: fixed;
  z-index: 9002;
  max-width: none;
  pointer-events: none;
  filter: drop-shadow(0 16px 18px rgba(26, 22, 18, .35));
  will-change: transform;
}

/* =============================================================================
   Phone: the medal gets smaller, the card becomes a sheet
   ============================================================================= */
@media (max-width: 599px) {
  .hb-chat__fab { right: 14px; bottom: 14px; width: 68px; height: 68px; }
  .hb-chat__medal::before { inset: 5px; }
  .hb-chat__medal-text,
  .hb-chat__fab-label { display: none; }
  .hb-owl--fab { width: 88px; height: 88px; margin-left: -44px; bottom: 0; }
  .hb-chat__panel {
    --head-h: 176px;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    height: min(86vh, 700px);
    height: min(86dvh, 700px);
    border-radius: 22px 22px 0 0;
    animation-name: hb-sheet-in;
  }
  .hb-chat__panel.is-closing { animation-name: hb-sheet-out; }
  .hb-chat__body { border-radius: 0; }
  .hb-owl--head { top: -50px; width: 118px; height: 118px; margin-left: -59px; }
  .hb-chat__orb { top: 6px; width: 104px; height: 104px; margin-left: -52px; }
  .hb-chat__title { top: 116px; }
  .hb-chat__subtitle { top: 139px; }
  .hb-chat__panel.is-compact .hb-chat__orb { transform: translate(calc(54px - 50vw), -22px) scale(.56); }
}
@keyframes hb-sheet-in { from { opacity: 0; transform: translateY(60px); } }
@keyframes hb-sheet-out { to { opacity: 0; transform: translateY(60px); } }

/* =============================================================================
   Quiet mode
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  .hb-chat *,
  .hb-chat *::before,
  .hb-chat *::after { animation: none !important; transition: none !important; }
  .hb-owl__shine { display: none; }
  .hb-chat__fly { opacity: .7; }
  .hb-chat__seal circle,
  .hb-chat__seal path { stroke-dashoffset: 0; }
}
@media print {
  .hb-chat { display: none; }
}
