/* Birdie mascot: moods, floating helper, rate quiz, confetti. */
.db-bird { display: inline-block; position: relative; line-height: 0; }
.db-bird .db-bird-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.db-bird .db-bird-wing { transform-box: view-box; transform-origin: 28px 47px; }
.db-bird .db-bird-swish { opacity: 0; transition: opacity .2s; }
.db-bird.is-wave .db-bird-swish, .db-bird.is-work .db-bird-swish, .db-bird.is-party .db-bird-swish { opacity: 1; }

.db-bird.is-idle .db-bird-svg { animation: dbb-bob 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
.db-bird.is-idle .db-bird-wing { transform: rotate(38deg); }
.db-bird.is-wave .db-bird-wing { animation: dbb-wave 1.6s ease-in-out infinite; }
.db-bird.is-wave .db-bird-svg { animation: dbb-bob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.db-bird.is-peek .db-bird-svg { animation: dbb-peek 2.6s ease-in-out infinite; transform-origin: 50% 85%; }
.db-bird.is-peek .db-bird-wing { transform: rotate(38deg); }
.db-bird.is-type .db-bird-wing { animation: dbb-flap .32s ease-in-out infinite; }
.db-bird.is-type .db-bird-svg { animation: dbb-bob 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
.db-bird.is-work .db-bird-wing { animation: dbb-flap .16s linear infinite; }
.db-bird.is-party .db-bird-svg { animation: dbb-jump .9s cubic-bezier(.3,1.6,.5,1) 2; transform-origin: 50% 90%; }
.db-bird.is-party .db-bird-wing { animation: dbb-wave .5s ease-in-out infinite; }

@keyframes dbb-bob { 50% { transform: translateY(-4%) rotate(-2deg); } }
@keyframes dbb-wave { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-24deg); } }
@keyframes dbb-flap { 50% { transform: rotate(14deg); } }
@keyframes dbb-peek { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-9deg); } 60% { transform: rotate(5deg); } }
@keyframes dbb-jump { 0%, 100% { transform: translateY(0) scale(1); } 20% { transform: translateY(4%) scale(1.06, .92); } 50% { transform: translateY(-22%) rotate(-6deg); } }

/* Confetti burst */
.db-confetti { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.db-confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; animation: dbb-confetti 1.2s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes dbb-confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); opacity: 0; }
}

/* Birdie inside the signup card */
.dbs-birdie { display: flex; align-items: center; gap: .65rem; margin: -.1rem 0 -.2rem; }
.dbs-birdie .db-bird { flex: none; width: 3.1rem; height: 3.1rem; }
.dbs-say {
  position: relative;
  padding: .45rem .75rem;
  border-radius: .9rem;
  background: var(--brand-accent, #f9e2e1);
  font-size: .86rem;
  line-height: 1.25;
  color: var(--dbs-ink, #17120f);
}
.dbs-say::before {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  width: 12px; height: 12px;
  margin-top: -6px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}

/* Floating helper */
.dbf {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  font-family: var(--font-secondary, system-ui, sans-serif);
  color: #17120f;
}
.dbf.dodge-panel { right: auto; left: 18px; flex-direction: row-reverse; }
.dbf-bird {
  pointer-events: auto;
  width: 74px;
  height: 74px;
  padding: 6px 8px 8px 4px;
  border-radius: 50%;
  border: 2px solid #17120f;
  background: #fdf8f5;
  box-shadow: 0 5px 0 #17120f;
  cursor: pointer;
  transform: translateY(140%) scale(.6);
  transition: transform .5s cubic-bezier(.3,1.6,.5,1), box-shadow .2s;
}
.dbf.on .dbf-bird { transform: none; }
.dbf-bird:hover { box-shadow: 0 7px 0 #17120f; }
.dbf-bird:active { transform: translateY(3px); box-shadow: 0 2px 0 #17120f; }
.dbf-bird:focus-visible, .dbf-btn:focus-visible, .dbf-x:focus-visible { outline: 2px solid #ff5400; outline-offset: 3px; }
.dbf-bubble {
  position: relative;
  width: min(270px, calc(100vw - 120px));
  margin-bottom: 22px;
  padding: 14px 16px 14px;
  border: 2px solid #17120f;
  border-radius: 18px 18px 6px 18px;
  background: #fdf8f5;
  box-shadow: 0 5px 0 #17120f;
  opacity: 0;
  transform: translateY(10px) scale(.92);
  transform-origin: 100% 100%;
  transition: opacity .25s, transform .35s cubic-bezier(.3,1.5,.5,1);
}
.dbf.dodge-panel .dbf-bubble { border-radius: 18px 18px 18px 6px; transform-origin: 0 100%; }
.dbf.on.talking .dbf-bubble { opacity: 1; transform: none; pointer-events: auto; }
.dbf-line { margin: 0 18px 0 0; font-size: 15px; line-height: 1.3; font-weight: 500; }
.dbf-actions { display: none; flex-direction: column; gap: 6px; margin-top: 10px; }
.dbf.show-menu .dbf-actions { display: flex; }
.dbf-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #17120f;
  background: #fff;
  color: #17120f;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.dbf-btn.dbf-primary { background: #17120f; color: #fdf8f5; }
.dbf-btn:hover { background: #ff5400; color: #fff; border-color: #17120f; }
.dbf-x {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 0;
  background: #f3e7e1;
  color: #17120f;
  display: grid;
  place-items: center;
  cursor: pointer;
}
@media (max-width: 640px) {
  .dbf { right: 12px; bottom: 12px; }
  .dbf.dodge-panel { left: 12px; }
  .dbf-bird { width: 60px; height: 60px; }
  .dbf-bubble { margin-bottom: 16px; padding: 12px 14px; }
  .dbf-line { font-size: 14px; }
}

/* Rate quiz */
.dbq {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: #17120f;
  font-family: var(--font-secondary, system-ui, sans-serif);
}
.dbq::backdrop { background: #17120fb3; }
.dbq-card {
  position: relative;
  padding: 26px 26px 24px;
  border: 2px solid #17120f;
  border-radius: 26px;
  background: #fdf8f5;
  box-shadow: 0 8px 0 #17120f;
  animation: dbq-pop .45s cubic-bezier(.3,1.5,.5,1);
}
@keyframes dbq-pop { from { opacity: 0; transform: translateY(24px) scale(.94) rotate(1.5deg); } }
.dbq-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: #f3e7e1;
  color: #17120f;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.dbq-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.dbq-body.is-in > * { animation: dbq-in .4s cubic-bezier(.22,.7,.29,1) both; }
.dbq-body.is-in > *:nth-child(2) { animation-delay: .04s; }
.dbq-body.is-in > *:nth-child(3) { animation-delay: .08s; }
.dbq-body.is-in > *:nth-child(4) { animation-delay: .12s; }
.dbq-body.is-in > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes dbq-in { from { opacity: 0; transform: translateY(10px); } }
.dbq-bird { width: 72px; height: 72px; margin: -6px 0 -4px; }
.dbq-say {
  margin: 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f9e2e1;
  font-size: 15px;
  line-height: 1.3;
}
.dbq-dots { display: flex; gap: 6px; margin-top: 4px; }
.dbq-dots i { width: 8px; height: 8px; border-radius: 99px; background: #ead7cf; transition: width .25s, background .25s; }
.dbq-dots i.on { width: 22px; background: #ff5400; }
.dbq-dots i.done { background: #17120f; }
.dbq-title {
  margin: 0;
  font-family: var(--font-primary-dark, var(--font-primary));
  font-weight: 400;
  font-size: 2.1rem;
  line-height: .95;
  text-transform: uppercase;
}
.dbq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dbq-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid #ead7cf;
  background: #fff;
  color: #17120f;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
}
.dbq-chip:hover { border-color: #17120f; }
.dbq-chip:active { transform: scale(.96); }
.dbq-chip[aria-pressed="true"] { background: #17120f; border-color: #17120f; color: #fdf8f5; }
.dbq-back { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 14px; color: #6b4f45; cursor: pointer; }
.dbq-kicker { margin: 4px 0 0; font-size: clamp(11px, 3.3vw, 13px); white-space: nowrap; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #85402e; }
.dbq-range {
  margin: 0;
  font-family: var(--font-primary, sans-serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.dbq-per { margin: -4px 0 0; font-size: 15px; color: #6b4f45; }
.dbq-fine { margin: 0; font-size: 12.5px; line-height: 1.4; color: #6b4f45; }
.dbq-go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: 6px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  border: 0;
  background: #17120f;
  color: #fdf8f5;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.dbq-arrow { width: 40px; height: 40px; border-radius: 50%; background: #ff5400; color: #17120f; display: grid; place-items: center; transition: transform .3s cubic-bezier(.22,.7,.29,1); }
.dbq-go:hover .dbq-arrow { transform: rotate(45deg); }
.dbq :focus-visible { outline: 2px solid #ff5400; outline-offset: 3px; }

/* Quiz entry in the paid strip */
.dbq-entry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: .4rem;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 2px solid #17120f;
  background: #fdf8f5;
  box-shadow: 0 4px 0 #17120f;
  color: #17120f;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.dbq-entry b { font-weight: 500; color: var(--brand-primary, #ff5400); }
.dbq-entry:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 0 #17120f; }
.dbq-entry-bird { width: 40px; height: 40px; }

@media (prefers-reduced-motion: reduce) {
  .db-bird .db-bird-svg, .db-bird .db-bird-wing, .dbq-card, .dbq-body.is-in > *, .db-confetti i { animation: none !important; }
  .dbf-bird, .dbf-bubble { transition: none; }
}
.dbf-line { text-wrap: balance; }
.dbf-bubble { max-width: min(340px, calc(100vw - 110px)); width: min(340px, calc(100vw - 110px)); }

@media (max-width: 767px) { .dbf-bubble { display: none !important; } }

/* Phones: tucked while scrolling down (homepage.js), unless Birdie is talking. */
.dbf { transition: transform .35s cubic-bezier(.22,.7,.29,1), opacity .25s ease; }
html.dbf-tuck .dbf:not(.talking) { transform: translateY(140%); opacity: 0; }
