.bb-account-page, .bb-account-drawer {
  --account-ink: #56375e;
  --account-muted: #745e78;
  --account-line: #e8d8ea;
  --account-paper: #fffdfb;
  --account-petal: #f5e5ef;
  --account-font: "DM Sans", sans-serif;
  color: var(--account-ink);
  font: 400 15px/1.55 var(--account-font);
}

.bb-account-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: linear-gradient(160deg, #f3e6f5 0%, #fcf3f1 68%, #edf2e8 100%);
}

.bb-account-page *, .bb-account-drawer * { box-sizing: border-box; }
.bb-account-page [hidden], .bb-account-drawer [hidden], .bb-profile-icon-hidden { display: none !important; }
.bb-account-page a, .bb-account-drawer a { color: inherit; }
.bb-account-page :focus-visible, .bb-account-drawer :focus-visible { outline: 2px solid #94669e; outline-offset: 4px; }

.bb-account-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 94px;
  padding: 8px clamp(16px, 4vw, 52px);
  background: #fffaf8;
  border-bottom: 1px solid var(--account-line);
}

.bb-account-back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.bb-account-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.bb-account-back svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.bb-account-brand img { display: block; width: 106px; height: 70px; object-fit: contain; }

.bb-account-main { width: min(100% - 32px, 458px); margin-inline: auto; padding-block: clamp(36px, 8vh, 90px) 46px; }
.bb-account-card {
  padding: clamp(25px, 7vw, 42px);
  border: 1px solid #fff;
  border-radius: 26px;
  background: var(--account-paper);
  box-shadow: 0 15px 65px #58366313;
}

.bb-account-card h1, .bb-account-drawer h2 { margin: 0; font: 500 38px/1.12 "Fredoka", sans-serif; letter-spacing: -.025em; }
.bb-account-card h1:focus { outline: none; }
.bb-account-subtitle { margin: 9px 0 24px; color: var(--account-muted); }

.bb-google-button, .bb-account-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  border: 1px solid var(--account-line);
  border-radius: 13px;
  background: #fff;
  color: var(--account-ink);
  font: 650 14px/1.4 var(--account-font);
  cursor: pointer;
  transition: background .16s ease;
}

.bb-google-button:hover { background: #f9f2fa; }
.bb-google-logo { width: 21px; height: 21px; flex: 0 0 auto; stroke: none; }
.bb-account-primary { margin-top: 20px; border-color: #714a7b; background: #714a7b; color: #fff; }
.bb-account-primary:hover { background: #603d69; }
.bb-account-page button:disabled, .bb-account-drawer button:disabled { cursor: wait; opacity: .62; }
.bb-account-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--account-muted); font-size: 12px; }
.bb-account-divider::before, .bb-account-divider::after { content: ""; flex: 1; height: 1px; background: var(--account-line); }
.bb-account-form label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 650; }
.bb-account-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #e2d3e6;
  border-radius: 11px;
  background: #fffcff;
  color: var(--account-ink);
  font: 400 16px/1.4 var(--account-font);
}
.bb-account-new { margin: 16px 0 0; color: var(--account-muted); font-size: 12px; }

.bb-account-feedback { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: #f4eaf5; color: #5d4164; font-size: 13px; }
.bb-account-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: var(--account-muted); font-size: 12px; }
.bb-account-legal button, .bb-account-quiet {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.bb-account-legal a, .bb-account-legal button, .bb-account-quiet { text-decoration: underline; text-underline-offset: 3px; }

.bb-account-drawer {
  width: min(400px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 22px 0 0 22px;
  background: var(--account-paper);
  box-shadow: -10px 0 60px #39223924;
}

.bb-account-drawer[open] { animation: bb-account-slide-in .24s cubic-bezier(.22,.75,.25,1); }
.bb-account-drawer::backdrop { background: #35233955; backdrop-filter: blur(3px); }
.bb-account-drawer-inner { min-height: 100%; padding: clamp(22px, 6vw, 32px); }
.bb-account-drawer-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.bb-account-drawer h2 { font-size: 33px; }
.bb-account-drawer [data-account-close] { flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--account-petal); }
.bb-account-drawer [data-account-close] svg { width: 20px; height: 20px; }
.bb-account-guest > p { margin: 0 0 18px; color: var(--account-muted); }
.bb-account-guest .bb-account-link { margin-top: 12px; }

.bb-account-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 16px;
  background: #f5eaf7;
  border-radius: 15px;
}

.bb-account-card .bb-account-identity { margin-top: 24px; }
.bb-account-identity strong, .bb-account-identity div > span { display: block; overflow-wrap: anywhere; }
.bb-account-identity div > span { color: var(--account-muted); font-size: 13px; }
.bb-account-avatar, .bb-profile-initial {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #e8ceec;
  color: #603b6d;
  font: 650 20px/1 "Fredoka", sans-serif;
}

.bb-profile-initial { width: 29px; height: 29px; font-size: 14px; }
.bb-profile-initial[hidden] { display: none; }
.bb-account-drawer nav { margin-top: 15px; }
.bb-account-link { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding-inline: 4px; border-bottom: 1px solid var(--account-line); font-size: 14px; font-weight: 650; text-decoration: none; }
.bb-account-link:hover, .bb-account-quiet:hover { color: #8a4c7d; }
.bb-account-quiet { display: inline-block; margin-top: 21px; padding-block: 5px; font-size: 13px; }

@keyframes bb-account-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (max-width: 520px) {
  .bb-account-top { min-height: 76px; }
  .bb-account-brand img { width: 88px; height: 59px; }
  .bb-account-back { max-width: 110px; font-size: 12px; line-height: 1.25; }
  .bb-account-drawer { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-account-drawer[open] { animation: none; }
  .bb-google-button, .bb-account-primary { transition: none; }
}
