.bf-launcher,
.bf-panel {
  font-family: system-ui, sans-serif;
}

.bf-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2147483646;
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.bf-launcher img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bf-launcher[aria-expanded="true"] {
  display: none;
}

.bf-launcher.is-nudging {
  animation: bf-judder 0.42s linear 3;
}

@keyframes bf-judder {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  20% { transform: translate3d(-3px, 1px, 0) rotate(-3deg); }
  40% { transform: translate3d(3px, -2px, 0) rotate(3deg); }
  60% { transform: translate3d(-2px, 1px, 0) rotate(-2deg); }
  80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
}

.bf-nudge {
  position: fixed;
  right: 6.4rem;
  bottom: 2.15rem;
  z-index: 2147483646;
  max-width: 15.5rem;
  margin: 0;
  border: 0;
  border-radius: 1rem 1rem 0.3rem 1rem;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(135deg, #ffffff, #d7f1fb);
  color: #05384a;
  font-family: system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transform-origin: right bottom;
  animation: bf-speak 0.4s ease-out both;
}

.bf-nudge::after {
  content: "";
  position: absolute;
  right: -0.4rem;
  bottom: 0.7rem;
  border: 0.45rem solid transparent;
  border-left-color: #c9ebf8;
  border-bottom-color: #c9ebf8;
}

@keyframes bf-speak {
  from { opacity: 0; transform: translateX(12px) scale(0.86); }
  to { opacity: 1; transform: none; }
}

.bf-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483646;
  width: 25vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1a1a1a;
  border-left: 1px solid #e6e6e6;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.bf-panel.is-open { transform: translateX(0); }

.bf-panel.is-resizing { user-select: none; }

.bf-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.bf-resize:hover,
.bf-panel.is-resizing .bf-resize { background: rgba(0, 159, 227, 0.35); }

.bf-account {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 4.4rem;
  bottom: 0;
  overflow: auto;
  padding: 0.85rem;
  background: #f4f7f9;
}

.bf-account[hidden] { display: none; }

.bf-account [data-account-back] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0b4f73;
  box-shadow: 0 1px 2px rgba(11, 79, 115, 0.12);
  cursor: pointer;
}

.bf-account [data-account-back] svg { width: 1.1rem; height: 1.1rem; }

.bf-account [data-account-back]:hover { background: #e5f6fd; }

.bf-account-who {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0b4f73, #009fe3);
  color: #fff;
}

.bf-account-who strong { font-size: 1rem; }

.bf-account-who span { font-size: 0.8rem; opacity: 0.9; }

.bf-account section {
  margin-bottom: 0.65rem;
  padding: 0.7rem 0.75rem 0.45rem;
  border: 1px solid #e6eef2;
  border-radius: 0.85rem;
  background: #fff;
}

.bf-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.bf-account h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5c6b73;
}

.bf-account-head a {
  color: #0b4f73;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.bf-account article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid #eef3f6;
}

.bf-account article strong {
  font-size: 0.88rem;
  font-weight: 650;
}

.bf-account article p {
  grid-column: 1 / -1;
  margin: 0;
  color: #5c6b73;
  font-size: 0.78rem;
}

.bf-account article span {
  align-self: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.bf-account article span.is-on { color: #0b4f73; background: #e5f6fd; }

.bf-account article span.is-off { color: #5c6b73; background: #eef1f3; }

.bf-account-empty {
  margin: 0 0 0.4rem;
  color: #8a8a8a;
  font-size: 0.85rem;
}

.bf-account section > button {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid #eef3f6;
  padding: 0.6rem 0;
  background: transparent;
  color: #1a1a1a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.bf-account section > button:hover { color: #0b4f73; }

.bf-account-out {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.bf-account-out button {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #e0e6ea;
  border-radius: 999px;
  background: #fff;
  color: #0b4f73;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.bf-account-out button:hover { background: #f4f7f9; }

.bf-signup,
.bf-signup * { box-sizing: border-box; }

.bf-signup {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(5, 56, 74, 0.45);
}

.bf-signup[hidden] { display: none; }

.bf-signup-card {
  width: 100%;
  margin: 0;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(5, 56, 74, 0.28);
}

.bf-signup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bf-signup-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.bf-signup-head button {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #5c6b73;
}

.bf-signup-card > p {
  margin: 0.45rem 0 0.85rem;
  color: #5c6b73;
  font-size: 0.88rem;
  line-height: 1.4;
}

.bf-signup-card label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #05384a;
}

.bf-signup-card input {
  border: 1px solid #d5e3ea;
  border-radius: 0.6rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  color: #1a1a1a;
  background: #fff;
}

.bf-signup-card input:focus {
  outline: 2px solid #009fe3;
  outline-offset: 1px;
  border-color: #009fe3;
}

.bf-signup-error {
  margin: 0 0 0.65rem;
  color: #9b2335;
  font-size: 0.82rem;
}

.bf-signup-card button[type="submit"] {
  width: 100%;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: #0b4f73;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.bf-signup-card button[type="submit"]:hover { background: #05384a; }

.bf-signup-card > a {
  display: block;
  margin-top: 0.75rem;
  text-align: center;
  color: #0b4f73;
  font-size: 0.8rem;
  font-weight: 650;
}

.bf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e6e6e6;
}

.bf-header h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.bf-name button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: default;
}

.bf-name button.is-member {
  color: #0b4f73;
  cursor: pointer;
}

.bf-header h2 img {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #000;
  object-fit: cover;
  object-position: center;
}

.bf-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bf-auth[hidden] { display: none; }

.bf-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid #e8eef2;
  background: #f4fafd;
}

.bf-auth span {
  margin-right: auto;
  color: #5c6b73;
  font-size: 0.78rem;
  font-weight: 600;
}

.bf-auth a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bf-auth-secondary {
  color: #0b4f73;
  background: transparent;
}

.bf-auth-secondary:hover {
  background: rgba(0, 159, 227, 0.12);
}

.bf-auth-primary {
  color: #fff;
  background: #0b4f73;
}

.bf-auth-primary:hover {
  background: #05384a;
}

.bf-auth a:focus-visible {
  outline: 2px solid #009fe3;
  outline-offset: 2px;
}

.bf-header [data-new],
.bf-new {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.bf-new { margin-left: auto; }

.bf-header [data-close] {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.bf-thread {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
}

.bf-welcome {
  margin: 0.25rem 0 0;
  color: #7f7f7f;
  font-size: 0.92rem;
  line-height: 1.5;
}

.bf-welcome p { margin: 0; }

.bf-welcome p + p { margin-top: 0.85rem; }

.bf-welcome a {
  color: #7f7f7f;
  font-weight: 650;
}

.bf-welcome-mark {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  border-radius: 0.75rem;
}

.bf-msg {
  max-width: 95%;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  line-height: 1.45;
  font-size: 0.95rem;
}

.bf-msg p { margin: 0; }

.bf-msg p + p { margin-top: 0.9rem; }

.bf-msg a {
  background-image: linear-gradient(90deg, #ffffff, #009fe3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bf-msg.user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #0b4f73 0%, #009fe3 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(0, 110, 170, 0.18);
}

.bf-msg.assistant {
  color: #05384a;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(176, 222, 244, 0.92) 100%);
  border: 1px solid rgba(0, 159, 227, 0.28);
  box-shadow: 0 10px 24px rgba(0, 120, 180, 0.1);
}

.bf-msg.assistant a {
  background-image: none;
  color: #0678ad;
}

.bf-msg.user a {
  background-image: none;
  color: #fff;
}

.bf-rate {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.35rem;
}

.bf-rate button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.55;
}

.bf-rate button.is-on {
  opacity: 1;
}

.bf-set-images {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bf-set-images img {
  width: 100%;
  max-height: 11rem;
  object-fit: contain;
  background: #fafafa;
  border-radius: 0.75rem;
}

.bf-reviews {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bf-review {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem;
  border: 1px solid #e6e6e6;
  border-radius: 0.75rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.bf-review img {
  width: 4.5rem;
  height: 3.4rem;
  object-fit: contain;
  background: #fafafa;
  border-radius: 0.4rem;
  flex: 0 0 auto;
}

.bf-review span { font-size: 0.85rem; font-weight: 650; }

.bf-products {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 0.6rem 0.8rem 1.25rem;
}

.bf-products:empty { display: none; }

.bf-card {
  flex: 0 0 12.5rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border: 1px solid #e6e6e6;
  border-radius: 0.75rem;
  padding: 0.65rem 0.65rem 1rem;
  background: #fff;
}

.bf-card img {
  width: 100%;
  height: 5.5rem;
  object-fit: contain;
  background: #fafafa;
  border-radius: 0.4rem;
}

.bf-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.3;
}
.bf-card span { display: block; color: #5c5c5c; font-size: 0.75rem; margin: 0.2rem 0 0.45rem; }

.bf-card a {
  display: inline-block;
  background: linear-gradient(135deg, #ffffff, #009fe3);
  color: #05384a;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.bf-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #e6e6e6;
}

.bf-form input {
  position: relative;
  z-index: 1;
  flex: 1;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: #1a1a1a;
  background: #fff;
  pointer-events: auto;
  caret-color: #1a1a1a;
}

.bf-form button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #009fe3);
  color: #05384a;
  padding: 0 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.bf-ask {
  display: none;
  align-items: center;
  margin-right: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #009fe3);
  color: #05384a;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 720px) {
  .bf-panel { width: 100% !important; }
  .bf-resize { display: none; }
  .bf-launcher[aria-expanded="true"] {
    display: none;
  }
  body:has(.hamburger) .bf-launcher,
  body.bf-preview .bf-launcher { display: none; }
  body:has(.hamburger) .header-end { display: flex; align-items: center; }
  body:has(.hamburger) .bf-ask,
  body.bf-preview .bf-ask { display: inline-flex; }
  body:has(.hamburger) .bf-ask[aria-expanded="true"],
  body.bf-preview .bf-ask[aria-expanded="true"] { display: none; }
  body.bf-preview .bf-ask {
    position: fixed;
    top: 0.7rem;
    right: 3.4rem;
    z-index: 2147483646;
  }
}

@media (min-width: 721px) {
  .bf-products {
    gap: 0.25rem;
    padding: 0.25rem 0.35rem 0.5rem;
  }

  .bf-card {
    flex-basis: 5rem;
    border-radius: 0.45rem;
    padding: 0.26rem 0.26rem 0.4rem;
  }

  .bf-card img {
    height: 2.2rem;
    border-radius: 0.25rem;
  }

  .bf-card strong {
    margin-top: 0.15rem;
    font-size: 0.62rem;
  }

  .bf-card span {
    font-size: 0.55rem;
    margin: 0.08rem 0 0.15rem;
  }

  .bf-card a {
    padding: 0.1rem 0.28rem;
    font-size: 0.55rem;
  }
}
