/* ---------- Login badges (elements added by custom.js) ---------- */
[id^="auth-"] { position: relative; }

.auth-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 40;
}

.auth-badge {
  position: relative;
  width: 20px;
  height: 20px;
  background: center / contain no-repeat;
  opacity: .45;
  filter: saturate(.6);
  transition: opacity .15s, filter .15s;
  cursor: help;
  pointer-events: auto;
}

/* Wake the badges up when the tile or a badge is hovered */
[id^="auth-"]:hover .auth-badge,
.auth-badge:hover { opacity: 1; filter: none; }

/* Tooltip, shown to the left of the hovered badge */
.auth-badge::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(15, 23, 42, .95);
  color: #e2e8f0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
  z-index: 1;
}
.auth-badge:hover::after { opacity: 1; }

/* ---------- Account badge (top-right, links to Pocket ID) ---------- */
#whoami {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255,255,255,.08);
  color: rgb(var(--color-200, 226 232 240));
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
#whoami:hover { background: rgba(255,255,255,.16); }
#whoami img { width: 22px; height: 22px; border-radius: 50%; }

/* Phones: avatar only, name hidden */
@media (max-width: 640px) {
  #whoami { padding: 3px; font-size: 0; gap: 0; top: 8px; right: 8px; }
  #whoami img { width: 28px; height: 28px; }
}