/* Account dropdown. Mounted on body, outside the React catalog root. */

html body .wkum {
  width: 264px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  background: var(--nl-surface, #10151e);
  border: 1px solid var(--menu-border);
  border-radius: 7px;
  box-shadow: 0 8px 24px #0006;
  color: #e6e7ea;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  animation: wkum-in .12s ease-out;
  transform-origin: top right;
  --menu-accent: var(--nl-primary, #008dff);
  --menu-soft: var(--nl-soft, #d6ecff);
  --menu-border: var(--nl-border, #28384d);
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
}

html body .wkum-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 14px;
}

html body .wkum-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 5px;
  object-fit: cover;
  background: #1c1d24;
  border: 0;
}

html body .wkum-id {
  min-width: 0;
}

html body .wkum-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--nl-text, #f3f6ff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body .wkum-role {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
}

html body .wkum-tag {
  padding: 1px 6px;
  border: 1px solid #2c2e37;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #a1a3ad;
}

html body .wkum-tag--vip {
  border-color: rgba(233,185,73,.35);
  color: #e9b949;
}

html body .wkum-xp {
  padding: 0 8px 12px;
}

html body .wkum-xp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--nl-muted, #8995a9);
}

html body .wkum-xp-row b {
  color: #e6e7ea;
  font-weight: 600;
}

html body .wkum-num {
  font-variant-numeric: tabular-nums;
}

html body .wkum-bar {
  height: 3px;
  border-radius: 1px;
  background: var(--menu-border);
  overflow: hidden;
}

html body .wkum-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--menu-accent);
  transition: width .4s ease;
}

html body .wkum-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 8px 10px;
  border: 0;
  border-radius: 0;
  gap: 0;
  padding: 10px 0;
  border-top: 1px solid var(--menu-border);
  border-bottom: 1px solid var(--menu-border);
}

html body .wkum-stats > div {
  padding: 0 10px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

html body .wkum-stats > div + div {
  border-left: 1px solid var(--menu-border);
  padding-left: 12px;
}

html body .wkum-stats dt {
  font-size: 11px;
  color: var(--nl-muted, #8995a9);
}

html body .wkum-stats dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--nl-text, #f3f6ff);
  font-variant-numeric: tabular-nums;
}

html body .wkum-stats dd.is-inf {
  color: #e9b949;
}

html body .wkum-group {
  padding: 4px 0;
  border-top: 1px solid #1f2128;
  border-color: var(--menu-border);
}

html body .wkum-label {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--nl-muted, #8995a9);
  text-transform: none;
  letter-spacing: 0;
}

html body .wkum .wkum-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  padding: 9px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--nl-text, #dae3f0);
  font: inherit;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  min-height: 36px;
}

html body .wkum .wkum-item:hover {
  background: #ffffff08;
  color: var(--nl-text, #f3f6ff);
  outline: none;
}

html body .wkum .wkum-item:focus-visible {
  background: #ffffff08;
  color: var(--nl-text, #f3f6ff);
  outline: 2px solid var(--menu-accent);
  outline-offset: -2px;
}

html body .wkum .wkum-item .wkum-ico {
  color: var(--nl-muted, #8995a9);
  flex: none;
}

html body .wkum .wkum-item:hover .wkum-ico {
  color: #c9cad0;
}

html body .wkum .wkum-logout {
  color: var(--nl-muted, #8995a9);
}

html body .wkum .wkum-logout:hover {
  background: #b7313d22;
  color: #ffc4ca;
}

html body .wkum .wkum-logout:hover .wkum-ico {
  color: #f87171;
}

html body .wkum .wkum-verify {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 4px);
  margin: 0 2px 6px;
  padding: 8px 10px;
  border: 1px solid rgba(88,101,242,.35);
  border-radius: 8px;
  background: rgba(88,101,242,.1);
  color: #c7cbff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

html body .wkum .wkum-verify:hover {
  background: rgba(88,101,242,.16);
}

html body .wkum-verify-txt {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #eef0ff;
}

html body .wkum-verify-txt small {
  font-size: 11px;
  font-weight: 400;
  color: #9aa0d8;
}

html body .wkum svg {
  filter: none !important;
}

@keyframes wkum-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html body .wkum { animation: none; }
}
