.profile-avatar {
  display: inline-grid; place-items: center; flex: none;
  width: var(--profile-avatar-size); height: var(--profile-avatar-size);
  border-radius: 50%; overflow: hidden; line-height: 0;
  --portrait-tint: #8ca6ed;
  background: radial-gradient(circle at 40% 25%, color-mix(in srgb, var(--portrait-tint) 43%, var(--bg-surface)), color-mix(in srgb, var(--portrait-tint) 17%, var(--bg-surface)));
}
.profile-avatar[data-character="fox"] { --portrait-tint: #e49975; }
.profile-avatar[data-character="maple"] { --portrait-tint: #91bb91; }
.profile-avatar[data-character="byte"] { --portrait-tint: #6abae9; }
.profile-avatar[data-character="puff"] { --portrait-tint: #eeb795; }
.profile-avatar[data-character="ink"] { --portrait-tint: #b399db; }
.profile-avatar-motion, .profile-avatar .profile-avatar-head {
  width: 100%; height: 100%; display: block;
}
.profile-avatar .profile-avatar-head {
  aspect-ratio: 1; object-fit: contain; border-radius: 0; user-select: none; -webkit-user-drag: none;
}
.profile-avatar-action {
  display: inline-grid; position: relative; place-items: center; flex: none;
  padding: 0; border: 0; border-radius: 50%; background: var(--bg-surface); cursor: pointer;
}
.profile-avatar-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-avatar-action .screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
@media (prefers-reduced-motion: no-preference) {
  .profile-avatar-head {
    transform-origin: 50% 49%;
    transform: translate(var(--profile-look-x, 0px), var(--profile-look-y, 0px))
      rotate(var(--profile-look-tilt, 0deg)) scaleX(var(--profile-look-width, 1));
  }
  [data-avatar-state="happy"] .profile-avatar-motion { animation: profile-avatar-cheer .48s ease-out; }
  [data-avatar-state="dizzy"] .profile-avatar-motion { animation: profile-avatar-wobble .74s ease-out; }
  @keyframes profile-avatar-cheer {
    30% { transform: translateY(-7%) rotate(-6deg) scale(1.08); }
    62% { transform: translateY(2%) scale(.98); }
  }
  @keyframes profile-avatar-wobble {
    16% { transform: rotate(-13deg) translateX(-5%); }
    37% { transform: rotate(11deg) translateX(4%); }
    57% { transform: rotate(-7deg) translateX(-3%); }
    78% { transform: rotate(4deg) translateX(1%); }
  }
}
.site-header .profile-nav-trigger {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-hairline); border-radius: 50%; background: var(--bg-surface);
}
.site-header .profile-nav-trigger:hover, .site-header .profile-nav-trigger:focus-visible { border-color: var(--accent); outline-offset: 3px; }
.user-menu-wrap::after { content: ""; position: absolute; inset: 100% 0 auto; height: 10px; }
.user-menu-wrap .profile-dropdown {
  width: 284px; padding: 6px; gap: 3px;
  border-radius: 17px; visibility: hidden;
  transition: opacity .18s ease, transform .22s var(--ease-out-expo), visibility .18s;
}
.user-menu-wrap:is(:hover, :focus-within) .profile-dropdown { visibility: visible; }
.profile-dropdown-cover {
  width: 100%; height: 76px; object-fit: cover;
  border-radius: 11px 11px 4px 4px;
}
.profile-dropdown-identity { display: grid; justify-items: start; gap: 2px; padding: 0 10px 9px; }
.profile-dropdown-identity > .profile-dropdown-avatar {
  margin-top: -24px; border: 3px solid var(--bg-surface); box-sizing: content-box;
}
.profile-dropdown-identity > strong {
  max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 16px; line-height: 1.5;
}
.profile-dropdown .profile-dropdown-credit {
  display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 2px 7px;
  margin-inline-start: -7px; color: var(--text-secondary);
}
.profile-dropdown-credit b { color: var(--text-primary); margin-inline-start: 4px; }
.profile-dropdown-nav { padding: 5px 1px 1px; border-top: 1px solid var(--border-hairline); }
.profile-dropdown-nav a { display: flex; min-height: 37px; align-items: center; gap: 9px; }
.profile-dropdown-nav a > svg { color: var(--text-secondary); flex: none; }
.profile-dropdown-nav a:hover > svg { color: var(--accent); }
.profile-dropdown-nav a.profile-dropdown-exit { margin-top: 4px; color: var(--danger, #b63d54); }
[data-theme="dark"] .profile-dropdown-nav a.profile-dropdown-exit { color: #fca8b5; }
.profile-banner {
  position: relative; isolation: isolate; overflow: hidden; min-height: clamp(185px, 17vw, 235px);
  background: #102342; color: #fff;
}
.profile-banner-cover {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.profile-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, #0a152de6, #0a152d29 93%), linear-gradient(0deg,#1018266b,transparent 64%);
}
.profile-banner .uc-avatar-wrap .profile-avatar { width: 100%; height: 100%; }
.profile-nav-label { display: inline-flex; align-items: center; gap: 10px; }
.profile-nav-label svg { flex: none; opacity: .8; }
.uc-sidebar, .uc-main { min-width: 0; }
.profile-settings-card { padding: clamp(15px, 3vw, 25px); }
.profile-preset-field { min-width: 0; border: 0; margin: 0 0 22px; }
.profile-preset-field legend { margin-bottom: 10px; color: var(--text-primary); font-size: 14px; font-weight: 700; }
.profile-avatar-choices, .profile-cover-choices { display: grid; gap: 8px; }
.profile-avatar-choices { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.profile-cover-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profile-preset-option { min-width: 0; position: relative; cursor: pointer; }
.profile-preset-option > input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.profile-preset-content {
  height: 100%; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 5px;
  padding: 8px 4px; border: 1px solid var(--border-hairline);
  border-radius: 11px; background: var(--bg-surface-subtle);
  color: var(--text-secondary); text-align: center; font-size: 12px;
}
.profile-cover-choices img { width: 100%; height: auto; aspect-ratio: 3.5; object-fit: cover; border-radius: 6px; }
.profile-cover-choices .profile-preset-content { padding: 5px 5px 7px; }
.profile-preset-option:hover .profile-preset-content, .profile-preset-option input:checked + .profile-preset-content {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.profile-preset-option input:checked + .profile-preset-content { box-shadow: inset 0 0 0 1px var(--accent); font-weight: 650; }
.profile-preset-option input:focus-visible + .profile-preset-content { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 920px) {
  .profile-avatar-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-cover-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .uc-layout { grid-template-columns: minmax(0, 1fr); }
  .uc-nav-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
}
@media (max-width: 540px) {
  .uc-nav-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .site-header .profile-nav-trigger { width: 36px; height: 36px; }
  .profile-banner { min-height: 166px; padding: 19px; }
}
@media (max-width: 768px), (hover: none) {
  .user-menu-wrap .profile-dropdown, .user-menu-wrap::after { display: none; }
}
