.account-profile { position: relative; flex: 0 0 auto; }
#profile-trigger {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 2px;
  border-radius: 50%; border: 1px solid rgba(192,132,252,.65); cursor: pointer;
  background: linear-gradient(145deg,rgba(168,85,247,.35),rgba(34,211,238,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2),0 0 18px rgba(124,58,237,.15);
}
#profile-trigger:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.profile-avatar { position: relative; display: inline-grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #24163c; flex-shrink: 0; }
.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { font-family: Syne,sans-serif; font-weight: 800; color: #d8b4fe; }
.profile-menu {
  position: absolute; top: calc(100% + 10px); z-index: 1010; width: 240px; max-width: calc(100vw - 24px);
  padding: 8px; display: grid; gap: 4px; border: 1px solid rgba(168,85,247,.35); border-radius: 16px;
  background: linear-gradient(145deg,rgba(38,20,65,.98),rgba(16,12,31,.98));
  box-shadow: 0 16px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.profile-menu button { color: #e9d5ff; background: transparent; border: 0; border-radius: 10px; min-height: 44px; text-align: left; padding: 12px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.profile-menu button:hover, .profile-menu button:focus-visible { background: rgba(168,85,247,.18); outline: 1px solid rgba(168,85,247,.5); }
.profile-menu #account-logout { color: #f87171; border-top: 1px solid rgba(255,255,255,.08); }
.profile-menu #account-logout { min-height: 44px; }
.profile-menu #account-logout:hover, .profile-menu #account-logout:focus-visible { background: rgba(239,68,68,.13); outline-color: rgba(248,113,113,.5); }
.profile-wishlist-hint {
  position:absolute; top:calc(100% + 12px); z-index:1010;
  width:260px; max-width:calc(100vw - 24px); padding:14px;
  border:1px solid rgba(192,132,252,.6); border-radius:14px;
  background:linear-gradient(145deg,#281343,#130e25);
  box-shadow:0 12px 32px rgba(0,0,0,.4);
}
.profile-wishlist-hint::before {
  content:''; position:absolute; top:-6px; left:calc(var(--profile-pointer-x, 50%) - 6px);
  width:10px; height:10px; transform:rotate(45deg); background:#281343;
  border-left:1px solid rgba(192,132,252,.6); border-top:1px solid rgba(192,132,252,.6);
}
.profile-wishlist-hint button {
  display:block; width:100%; padding:0; border:0; background:none;
  color:#f3e8ff; font:500 13px/1.6 'DM Sans',sans-serif; text-align:left; cursor:pointer;
}
.profile-wishlist-hint button:focus-visible { outline:2px solid #c084fc; outline-offset:4px; border-radius:4px; }
.profile-page { padding: 44px 24px 80px; }
.profile-shell { max-width: 960px; margin: 0 auto; }
.profile-page h1 { display: block; font-size: clamp(30px,5vw,44px); text-align: left; opacity: 1; animation: none; line-height: 1.15; margin-bottom: 28px; }
.profile-panel { padding: 28px; background: linear-gradient(145deg,rgba(32,21,53,.65),rgba(12,14,26,.9)); border: 1px solid rgba(168,85,247,.2); border-radius: 20px; margin-bottom: 24px; }
.profile-panel h2 { font-size: 19px; margin-bottom: 12px; }
.profile-panel p { color: var(--gray); font-size: 14px; line-height: 1.6; }
.profile-summary { display: flex; align-items: center; gap: 24px; }
.profile-avatar-large { width: 100px; height: 100px; border: 1px solid rgba(192,132,252,.5); font-size: 36px; }
.profile-details { min-width: 0; flex: 1; display: grid; gap: 7px; overflow-wrap: anywhere; }
.profile-field-label { color: var(--gray); font-size: 12px; margin-top: 8px; }
.profile-id-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.profile-id-row code { font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 12px; margin-top: 20px; }
.avatar-choice { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px; color: var(--white); font: inherit; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.03); cursor: pointer; }
.avatar-choice:hover, .avatar-choice:focus-visible { background: rgba(124,58,237,.15); outline: 1px solid var(--violet2); }
.avatar-choice.selected { border-color: #c084fc; background: linear-gradient(145deg,rgba(124,58,237,.3),rgba(6,182,212,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.avatar-choice-portrait { position: relative; width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: rgba(124,58,237,.12); overflow: hidden; font-size: 28px; }
.avatar-choice img { position: absolute; inset: 0; width: 88px; height: 88px; object-fit: contain; border-radius: 50%; }
.avatar-choice strong { font-size: 12px; overflow-wrap: anywhere; }
.avatar-choice-state { color: #c4b5fd; font-size: 11px; margin-top: auto; }
.avatar-choice:disabled { opacity: .6; cursor: progress; }
.profile-search-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.profile-search-field { flex: 1 1 220px; display: grid; gap: 8px; font-size: 13px; }
.profile-status { color: #c4b5fd; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.settings-form { display: grid; gap: 24px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.settings-row select { width: auto; max-width: 100%; }
.settings-row input { width: 22px; height: 22px; accent-color: #a855f7; cursor: pointer; }
.settings-form > button { justify-self: start; min-height: 44px; }
.no-background-video .hero-video { visibility: hidden; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
}
@media (max-width: 600px) {
  .profile-page { padding: 28px 16px 60px; }
  .profile-panel { padding: 20px 16px; }
  .profile-summary { align-items: flex-start; flex-direction: column; gap: 16px; }
  .avatar-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-search-field { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-menu, .avatar-choice { transition: none; }
}
