.ub-acct-pop {
  --ub-acct-text: #000;
  --ub-acct-muted: #404040;
  --ub-acct-border: #d9d9d9;
  --ub-acct-soft: #f0f0f0;
  --ub-acct-accent: #000000;
  --ub-acct-accent-hover: #333333;
  --ub-acct-radius: 24px;
  --ub-acct-radius-inner: 13px;
  position: fixed;
  top: var(--ub-acct-top, 120px);
  right: var(--ub-acct-right, 20px);
  z-index: 20;
  box-sizing: border-box;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - var(--ub-acct-top, 120px) - 16px);
  overflow: auto;
  padding: 16px;
  background: #fff;
  color: var(--ub-acct-text);
  border-radius: var(--ub-acct-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.14);
  font-family: var(--font-body--family, Inter, sans-serif);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  animation: ub-acct-pop-in 160ms ease-out;
}
.ub-acct-pop[hidden] { display: none; }
.ub-acct-pop:focus { outline: none; }
.ub-acct-pop :focus-visible { outline: 2px solid var(--ub-acct-text); outline-offset: 2px; }
.ub-acct-pop a { color: inherit; text-decoration: none; }

@keyframes ub-acct-pop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.ub-acct-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.ub-acct-pop__title {
  margin: 0;
  font-family: var(--font-heading--family, Inter, sans-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ub-acct-text);
}
.ub-acct-pop__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ub-acct-soft);
  color: var(--ub-acct-text);
  cursor: pointer;
  transition: background-color 120ms ease;
}
.ub-acct-pop__close:hover { background: #e4e4e4; }
.ub-acct-pop__close svg { width: 12px; height: 12px; }

.ub-acct-pop__card {
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--ub-acct-border);
  border-radius: var(--ub-acct-radius-inner);
  background: #fff;
}
.ub-acct-pop__card[hidden] { display: none; }
.ub-acct-pop__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 0 12px;
}
.ub-acct-pop__avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(165deg, #c4b9f8 0%, #ad9df3 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.ub-acct-pop__identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ub-acct-pop__name {
  font-size: 14px;
  line-height: 18px;
  text-transform: uppercase;
  color: var(--ub-acct-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ub-acct-pop__email {
  font-size: 12px;
  line-height: 18px;
  color: var(--ub-acct-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ub-acct-pop__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ub-acct-radius-inner);
  background: var(--ub-acct-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition: background-color 120ms ease;
}
.ub-acct-pop__primary:hover,
.ub-acct-pop__primary:focus-visible { background: var(--ub-acct-accent-hover); color: #fff; }
.ub-acct-pop a.ub-acct-pop__primary,
.ub-acct-pop a.ub-acct-pop__primary:link,
.ub-acct-pop a.ub-acct-pop__primary:visited,
.ub-acct-pop a.ub-acct-pop__primary:active,
.ub-acct-pop button.ub-acct-pop__primary { color: #fff; text-decoration: none; -webkit-text-fill-color: #fff; }
.ub-acct-pop__primary--signin { margin: 0 0 12px; }
.ub-acct-pop__primary--signin[hidden] { display: none; }

.ub-acct-pop__more {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--ub-acct-radius-inner);
  background: var(--ub-acct-soft);
  color: var(--ub-acct-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  transition: background-color 120ms ease;
}
.ub-acct-pop__more:hover { background: #e4e4e4; }

.ub-acct-pop__consent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 19px;
  font-size: 14px;
  line-height: 18px;
  color: var(--ub-acct-text);
  cursor: pointer;
}
.ub-acct-pop__consent input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: inline-grid;
  place-content: center;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--ub-acct-border);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.ub-acct-pop__consent input:checked {
  border-color: var(--ub-acct-text);
  background: var(--ub-acct-text);
}
.ub-acct-pop__consent input:checked::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -1px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}

.ub-acct-pop__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ub-acct-pop__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--ub-acct-border);
  border-radius: var(--ub-acct-radius-inner);
  background: #fff;
  color: var(--ub-acct-text);
  font-size: 14px;
  line-height: 1;
  transition: background-color 120ms ease;
}
.ub-acct-pop__link:hover { background: #f7f7f7; }
.ub-acct-pop__link svg { flex: none; width: 16px; height: 16px; }
.ub-acct-pop__link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ub-acct-pop__backdrop { display: none; }

@media screen and (max-width: 749px) {
  .ub-acct-pop {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--ub-acct-radius) var(--ub-acct-radius) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    animation: ub-acct-sheet-in 220ms ease-out;
  }
  .ub-acct-pop__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0, 0, 0, 0.4);
    animation: ub-acct-fade-in 220ms ease-out;
  }
  .ub-acct-pop__backdrop[hidden] { display: none; }
  html.ub-acct-pop-lock { overflow: hidden; }
}

@keyframes ub-acct-sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes ub-acct-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ub-acct-pop,
  .ub-acct-pop__backdrop { animation: none; }
}
