.account-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-profile {
  position: relative;
  min-width: 0;
  max-width: min(390px, calc(100vw - 92px));
  border-color: rgba(232, 179, 79, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 179, 79, 0.13), transparent 38%), rgba(16, 12, 24, 0.78);
  color: var(--cream);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.16s ease, background 0.16s ease;
}

.account-profile-progress-dot {
  position: absolute;
  z-index: 2;
  top: -6px;
  left: -6px;
  width: 12px;
  height: 12px;
  border: 2px solid #17111f;
  border-radius: 50%;
  background: #df4d54;
  box-shadow: 0 0 0 2px rgba(223, 77, 84, 0.2), 0 0 10px rgba(223, 77, 84, 0.72);
  pointer-events: none;
}

.profile-unlock-notifications {
  position: fixed;
  z-index: 180;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 40px));
  pointer-events: none;
}

.profile-unlock-toast {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(232, 179, 79, 0.66);
  border-left: 4px solid var(--gold);
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(43, 31, 61, 0.98), rgba(14, 10, 23, 0.98));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(232, 179, 79, 0.16);
  opacity: 0;
  transform: translateY(calc(100% + 28px));
  transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.profile-unlock-toast.is-visible { opacity: 1; transform: translateY(0); }
.profile-unlock-toast.is-leaving { opacity: 0; transform: translateY(16px); }
.profile-unlock-mark { display: grid; place-items: center; width: 48px; height: 48px; }
.profile-unlock-mark .profile-badge-svg { width: 46px; height: 46px; }
.profile-unlock-title-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(232, 179, 79, 0.78); border-radius: 50%; color: var(--gold); font: 700 18px "Cinzel", serif; }
.profile-unlock-copy { min-width: 0; }
.profile-unlock-kind { display: block; color: var(--mana); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.profile-unlock-name { display: block; margin-top: 3px; overflow: hidden; color: var(--cream); font: 700 15px "Cinzel", serif; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 660px) {
  .profile-unlock-notifications { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; }
  .profile-unlock-toast { grid-template-columns: 42px minmax(0, 1fr); gap: 9px; padding: 8px 10px 8px 8px; }
  .profile-unlock-mark { width: 42px; height: 42px; }
  .profile-unlock-mark .profile-badge-svg { width: 40px; height: 40px; }
  .profile-unlock-title-mark { width: 36px; height: 36px; font-size: 16px; }
  .profile-unlock-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-unlock-toast { transition-duration: 0.01ms; }
}

.account-profile:hover,
.account-profile:focus-visible {
  border-color: rgba(232, 179, 79, 0.68);
  background: linear-gradient(135deg, rgba(232, 179, 79, 0.19), transparent 42%), rgba(20, 15, 30, 0.9);
  outline: none;
}

.account-profile:active { transform: translateY(1px); }

.account-avatar,
.account-avatar-fallback {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(232, 179, 79, 0.45);
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(232, 179, 79, 0.08);
}

.account-avatar { object-fit: cover; }

.account-avatar-fallback,
.profile-page-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: radial-gradient(circle at 35% 24%, rgba(79, 195, 232, 0.28), rgba(38, 32, 56, 0.9));
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.account-avatar-fallback { font-size: 16px; }

.account-avatar-fallback.hidden,
.profile-page-avatar-fallback.hidden { display: none !important; }

.account-chip-main { display: grid; min-width: 0; text-align: left; }

.account-name {
  max-width: 150px;
  overflow: hidden;
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.account-chip-label {
  margin-top: 2px;
  color: var(--cream-dim);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.account-gold {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-left: 1px solid rgba(232, 179, 79, 0.2);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.player-search-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(232, 179, 79, 0.3);
  border-radius: 6px;
  color: var(--gold);
  cursor: pointer;
}

.player-search-button:hover,
.player-search-button:focus-visible {
  border-color: rgba(232, 179, 79, 0.68);
  background: rgba(28, 21, 38, 0.92);
  outline: none;
}

.player-search-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.profile-screen {
  overflow: auto;
  background:
    linear-gradient(120deg, rgba(14, 64, 76, 0.31), transparent 42%),
    linear-gradient(180deg, #0e1421 0%, #080a12 58%, #120d19 100%);
}

.profile-page-shell {
  width: min(1240px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 38px) clamp(16px, 4vw, 48px) calc(38px + var(--safe-bottom));
}

.profile-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-bottom: 8px;
}

.player-search-form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 42px;
  gap: 8px;
}

.player-search-input {
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(232, 179, 79, 0.25);
  border-radius: 6px;
  background: rgba(3, 2, 7, 0.42);
  color: var(--cream);
  font: 600 13px "Inter", sans-serif;
  padding: 0 12px;
}

.player-search-input:focus { border-color: var(--mana); outline: none; }

.player-search-button {
  width: 42px;
  height: 42px;
  background: rgba(79, 195, 232, 0.12);
  color: var(--mana);
}

.player-search-button:disabled { cursor: wait; opacity: 0.62; }

.profile-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 28px;
  padding-top: clamp(22px, 4vw, 46px);
}

.profile-overview { grid-column: 1; }

.profile-progression {
  grid-column: 2;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid rgba(232, 179, 79, 0.18);
}

@media (min-width: 941px) {
  .profile-progression {
    display: flex;
    flex-direction: column;
    height: min(720px, calc(100vh - 140px));
    height: min(720px, calc(100dvh - 140px));
    min-height: 420px;
  }

  .profile-tab-panel:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 179, 79, 0.58) rgba(255, 255, 255, 0.04);
  }

  .profile-tab-panel:not(.hidden)::-webkit-scrollbar { width: 8px; }
  .profile-tab-panel:not(.hidden)::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
  .profile-tab-panel:not(.hidden)::-webkit-scrollbar-thumb {
    border: 2px solid rgba(11, 9, 19, 0.86);
    border-radius: 8px;
    background: rgba(232, 179, 79, 0.58);
  }
}

.profile-search-control { position: relative; width: min(330px, 100%); }

.profile-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: min(420px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(232, 179, 79, 0.28);
  border-radius: 7px;
  background: rgba(12, 9, 18, 0.97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.46);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.profile-avatar-frame {
  display: grid;
  place-items: center;
  width: clamp(94px, 11vw, 128px);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 179, 79, 0.58);
  border-radius: 8px;
  background: radial-gradient(circle at 30% 18%, rgba(79, 195, 232, 0.3), transparent 40%), rgba(12, 9, 18, 0.8);
  box-shadow: inset 0 0 24px rgba(79, 195, 232, 0.08), 0 14px 34px rgba(0, 0, 0, 0.46);
}

.profile-page-avatar {
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 5px;
  object-fit: cover;
}

.profile-page-avatar-fallback { font-size: clamp(30px, 5vw, 48px); }
.profile-identity { min-width: 0; }

.profile-name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-name-row h1 { min-width: 0; }
.profile-edit-name-button {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(232, 179, 79, 0.35);
  border-radius: 50%;
  background: rgba(232, 179, 79, 0.07);
  color: var(--gold);
  cursor: pointer;
  font: 700 18px/1 "Inter", sans-serif;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.profile-edit-name-button:hover,
.profile-edit-name-button:focus-visible { border-color: var(--gold); background: rgba(232, 179, 79, 0.17); outline: none; transform: translateY(-1px); }
.profile-edit-name-button svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.profile-display-name-form {
  margin: 10px 0 12px;
}

.profile-display-name-form label,
.profile-display-name-form p {
  display: block;
  margin: 0 0 5px;
  color: var(--cream-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.profile-display-name-form div { display: flex; gap: 6px; }
.profile-display-name-form input {
  width: min(230px, 100%);
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(232, 179, 79, 0.3);
  border-radius: 5px;
  background: rgba(3, 2, 7, 0.42);
  color: var(--cream);
  font: 600 13px "Inter", sans-serif;
  padding: 0 9px;
}
.profile-display-name-form input:focus { border-color: var(--mana); outline: none; }
.profile-display-name-form button {
  min-width: 54px;
  border: 1px solid rgba(79, 195, 232, 0.48);
  border-radius: 5px;
  background: rgba(79, 195, 232, 0.12);
  color: var(--mana);
  cursor: pointer;
  font: 700 11px "Inter", sans-serif;
}
.profile-display-name-form p { margin-top: 5px; color: rgba(235, 226, 205, 0.58); font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; }

.profile-display-name-modal { z-index: 150; }
.profile-display-name-modal-card {
  position: relative;
  width: min(92vw, 440px);
  padding: 30px;
  border-color: rgba(232, 179, 79, 0.58);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(232, 179, 79, 0.08);
  text-align: left;
}
.profile-display-name-modal-card h2 { margin: 2px 0 20px; font-size: 23px; }
.profile-display-name-kicker { margin: 0; color: var(--mana); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.profile-display-name-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--cream-dim); cursor: pointer; font-size: 24px; line-height: 1; }
.profile-display-name-close:hover,
.profile-display-name-close:focus-visible { color: var(--cream); outline: none; }
.profile-display-name-modal-card .profile-display-name-form { margin: 0; }
.profile-display-name-modal-card .profile-display-name-form label { margin-bottom: 7px; }
.profile-display-name-modal-card .profile-display-name-form input { width: 100%; height: 42px; border-radius: 6px; font-size: 15px; }
.profile-display-name-modal-card .profile-display-name-form p { margin: 8px 0 18px; font-size: 11px; line-height: 1.45; }
.profile-display-name-actions { display: grid !important; grid-template-columns: 1fr 1.35fr; gap: 8px; }
.profile-display-name-actions .btn { min-height: 40px; padding: 9px 12px; font-size: 12px; }

@media (max-width: 440px) {
  .profile-display-name-modal-card { width: min(94vw, 440px); padding: 25px 20px 20px; }
  .profile-display-name-actions { grid-template-columns: 1fr; }
}

.profile-kicker {
  margin: 0 0 6px;
  color: var(--mana);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.profile-identity h1,
.profile-section-heading h2 {
  margin: 0;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.profile-identity h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.profile-title-badge {
  display: inline-flex;
  margin: 12px 0 0;
  padding: 5px 9px;
  border: 1px solid rgba(79, 195, 232, 0.34);
  border-radius: 4px;
  background: rgba(79, 195, 232, 0.1);
  color: var(--mana);
  font-size: 12px;
  font-weight: 700;
}

.profile-rank-badge { display:inline-flex; align-items:center; gap:7px; margin-top:8px; padding:6px 10px; border:1px solid color-mix(in srgb, var(--rank-color) 55%, transparent); border-radius:999px; color:var(--rank-color); background:color-mix(in srgb, var(--rank-color) 12%, transparent); font-size:12px; }
.profile-rank-badge .profile-rank-icon { display:grid; flex:0 0 auto; place-items:center; width:24px; height:24px; font-size:22px; filter:drop-shadow(0 0 8px var(--rank-color)); }
.profile-rank-badge .rank-icon-svg { display:block; width:1em; height:1em; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
.profile-rank-badge small { color:var(--text-muted); }

.profile-equipped-badges { display: flex; gap: 5px; margin-top: 10px; }
.profile-equipped-badge { display: grid; place-items: center; width: 34px; height: 34px; }
.profile-equipped-badge .profile-badge-svg { width: 34px; height: 34px; }

.profile-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.profile-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(232, 179, 79, 0.26);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.profile-stat-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  box-sizing: border-box;
  gap: 2px;
  margin-top: 26px;
  padding: 3px;
  border: 1px solid rgba(232, 179, 79, 0.22);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.profile-stat-mode {
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cream-dim);
  cursor: pointer;
  font: 700 11px "Inter", sans-serif;
  white-space: nowrap;
}

.profile-stat-mode:hover,
.profile-stat-mode:focus-visible { color: var(--cream); outline: none; }
.profile-stat-mode.is-active { background: rgba(232, 179, 79, 0.16); color: var(--gold); }

.profile-stat-card {
  min-width: 0;
  min-height: 102px;
  padding: 13px;
  border-top: 1px solid rgba(232, 179, 79, 0.26);
  background: rgba(255, 255, 255, 0.035);
}

.profile-stat-label,
.profile-stat-note {
  display: block;
  color: var(--cream-dim);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.profile-stat-value {
  display: block;
  margin: 9px 0 7px;
  color: var(--cream);
  font-family: "Cinzel", serif;
  font-size: 27px;
  line-height: 1;
}

.profile-stat-note { font-size: 10px; font-weight: 400; text-transform: none; }

.profile-overview-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 22px;
}

.profile-return,
.profile-own {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px 0 10px;
  border-radius: 6px;
  cursor: pointer;
  font: 700 12px "Inter", sans-serif;
}

.profile-return {
  border: 1px solid rgba(232, 179, 79, 0.36);
  background: rgba(232, 179, 79, 0.08);
  color: var(--gold);
}

.profile-return:hover,
.profile-return:focus-visible {
  border-color: var(--gold);
  background: rgba(232, 179, 79, 0.15);
  outline: none;
}

.profile-return svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.profile-own {
  border: 1px solid rgba(79, 195, 232, 0.4);
  background: rgba(79, 195, 232, 0.1);
  color: var(--mana);
}

.profile-own:hover,
.profile-own:focus-visible { border-color: var(--mana); background: rgba(79, 195, 232, 0.17); outline: none; }

.profile-own svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-section-heading h2 { font-size: 23px; }

.profile-unlock-summary {
  padding-top: 6px;
  color: var(--cream-dim);
  font-size: 11px;
  text-align: right;
}

.profile-tabs {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  border-bottom: 1px solid rgba(232, 179, 79, 0.18);
}

.profile-tab {
  min-height: 38px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--cream-dim);
  cursor: pointer;
  font: 700 12px "Inter", sans-serif;
}

.profile-tab:hover,
.profile-tab:focus-visible { color: var(--cream); outline: none; }
.profile-tab.is-active { border-bottom-color: var(--gold); color: var(--gold); }
.profile-tab-panel { padding-top: 16px; }

.profile-achievements,
.profile-titles { display: grid; gap: 10px; }

.profile-collection-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid rgba(232, 179, 79, 0.18);
}

.profile-card-list-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(232, 179, 79, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(38, 32, 56, 0.82), rgba(18, 14, 24, 0.92)),
    radial-gradient(circle at 50% 0%, rgba(232, 179, 79, 0.1), transparent 48%);
  box-shadow: var(--shadow);
}

.profile-card-list {
  display: grid;
  gap: 6px;
  max-height: min(58vh, 620px);
  overflow-y: auto;
  padding-right: 3px;
}

.profile-card-row {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto 18px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(8, 6, 15, 0.78), rgba(38, 32, 56, 0.68));
  color: var(--cream);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-card-row:hover,
.profile-card-row:focus-visible { border-color: var(--gold); filter: brightness(1.08); outline: none; }
.profile-card-row.rarity-common { border-color: rgba(168, 159, 192, 0.52); border-left-color: #b7afc8; }
.profile-card-row.rarity-rare { border-color: rgba(79, 195, 232, 0.46); border-left-color: var(--mana); box-shadow: inset 3px 0 10px rgba(79, 195, 232, 0.12); }
.profile-card-row.rarity-legendary { border-color: rgba(232, 179, 79, 0.58); border-left-color: var(--gold); box-shadow: inset 3px 0 10px rgba(232, 179, 79, 0.14); }
.profile-card-row.rarity-mythic { border-color: rgba(214, 58, 42, 0.62); border-left-color: var(--mythic); box-shadow: inset 3px 0 10px rgba(214, 58, 42, 0.16); animation: none; }
.profile-card-row.rarity-souvenir { border-color: rgba(255, 229, 146, 0.66); border-left-color: var(--souvenir); box-shadow: inset 3px 0 12px rgba(247, 215, 123, 0.2); animation: none; }
.profile-card-row.rarity-legendary::before,
.profile-card-row.rarity-mythic::before,
.profile-card-row.rarity-souvenir::before { content: none; }
.profile-card-cost { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--mana), var(--mana-dim)); color: #061217; font: 700 13px "Cinzel", serif; }
.profile-card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.profile-card-meta { color: var(--cream-dim); font-size: 11px; white-space: nowrap; }
.profile-card-count { color: var(--gold); font-size: 12px; white-space: nowrap; }
.profile-card-open { color: var(--cream-dim); font-size: 16px; line-height: 1; }
.profile-card-list-empty { min-height: 50px; display: grid; place-items: center; padding: 10px; border: 1px dashed rgba(232, 179, 79, 0.25); border-radius: 5px; color: var(--cream-dim); font-size: 12px; }

.profile-progress-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  min-width: 0;
  min-height: 78px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.028);
}

.profile-title-card { grid-template-columns: minmax(0, 1fr) auto; }
.profile-title-card .profile-progress-count { color: var(--gold); }

.profile-progress-card.is-unlocked { border-color: rgba(79, 195, 232, 0.28); background: rgba(79, 195, 232, 0.06); }
.profile-progress-card.is-selected { border-color: rgba(232, 179, 79, 0.6); background: rgba(232, 179, 79, 0.09); }

.profile-progress-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.profile-progress-card > div { min-width: 0; padding-top: 4px; }

.profile-badge-svg { width: 48px; height: 48px; color: #6e6878; filter: grayscale(1) brightness(0.72); opacity: 0.7; }
.profile-badge-svg.is-unlocked { color: var(--badge-main); filter: drop-shadow(0 0 8px var(--badge-main)); opacity: 1; }
.badge-outer { fill: rgba(8, 7, 14, 0.92); stroke: currentColor; stroke-width: 2.1; }
.badge-inner { fill: rgba(255, 255, 255, 0.035); stroke: var(--badge-accent); stroke-width: 1; }
.badge-ring, .badge-rays, .badge-art { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.25; }
.badge-rays { stroke: var(--badge-accent); stroke-width: 1.25; opacity: 0.82; }
.badge-gem { fill: var(--badge-accent); stroke: currentColor; stroke-width: 1; }
.profile-progress-card.is-locked .badge-inner,
.profile-progress-card.is-locked .badge-rays,
.profile-progress-card.is-locked .badge-gem { stroke: currentColor; fill: currentColor; opacity: 0.25; }
.profile-progress-card strong { display: block; color: var(--cream); font-size: 13px; }
.profile-progress-card p { margin: 4px 0 0; color: var(--cream-dim); font-size: 11px; line-height: 1.35; }

.profile-progress-count {
  display: block;
  margin-top: 6px;
  color: var(--mana);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-title-select {
  min-width: 68px;
  min-height: 32px;
  border: 1px solid rgba(232, 179, 79, 0.38);
  border-radius: 4px;
  background: rgba(232, 179, 79, 0.1);
  color: var(--gold);
  cursor: pointer;
  font: 700 11px "Inter", sans-serif;
}

.profile-badge-select {
  min-width: 88px;
  min-height: 32px;
  border: 1px solid rgba(79, 195, 232, 0.38);
  border-radius: 4px;
  background: rgba(79, 195, 232, 0.1);
  color: var(--mana);
  cursor: pointer;
  font: 700 10px "Inter", sans-serif;
}
.profile-badge-select:hover, .profile-badge-select:focus-visible { border-color: var(--mana); outline: none; }

.profile-title-select:hover,
.profile-title-select:focus-visible { border-color: var(--gold); outline: none; }
.profile-title-select:disabled { cursor: default; opacity: 0.58; }

.profile-panel-note,
.player-search-status { margin: 0; color: var(--cream-dim); font-size: 12px; line-height: 1.45; }
.profile-panel-note { margin-bottom: 14px; }
.player-search-status { margin-top: 12px; }

.player-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 254px;
  overflow: auto;
}

.player-result {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--cream);
  cursor: pointer;
  text-align: left;
}

.player-result:hover,
.player-result:focus-visible { border-color: rgba(232, 179, 79, 0.5); background: rgba(232, 179, 79, 0.08); outline: none; }

.player-result-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(232, 179, 79, 0.32);
  border-radius: 5px;
  background: rgba(12, 9, 18, 0.74);
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-weight: 700;
  object-fit: cover;
}

.player-result-copy { min-width: 0; }
.player-result-copy strong,
.player-result-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-result-copy strong { font-size: 13px; }
.player-result-copy span { margin-top: 3px; color: var(--cream-dim); font-size: 11px; }
.player-result-record { color: var(--mana); font-size: 11px; font-weight: 700; white-space: nowrap; }

@media (max-width: 940px) {
  .profile-page-layout { grid-template-columns: 1fr; }
  .profile-overview,
  .profile-progression { grid-column: auto; grid-row: auto; }
  .profile-progression { padding: 24px 0 0; border-top: 1px solid rgba(232, 179, 79, 0.18); border-left: 0; }
}

@media (max-width: 660px) {
  .profile-page-shell { padding-inline: 16px; }
  .profile-page-header { justify-content: flex-start; }
  .profile-search-control,
  .player-search-form { width: 100%; }
  .player-search-form { grid-template-columns: minmax(0, 1fr) 42px; }
  .profile-search-popover { right: auto; left: 0; width: 100%; }
  .profile-hero { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
  .profile-avatar-frame { width: 76px; }
  .profile-page-avatar-fallback { font-size: 30px; }
  .profile-identity h1 { font-size: 32px; }
  .profile-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat-modes { width: 100%; }
  .profile-stat-mode { flex: 1; padding-inline: 6px; }
  .profile-stat-card { min-height: 82px; }
  .profile-stat-card:last-child { grid-column: span 2; }
  .profile-progress-card:not(.profile-title-card) { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .profile-collection-section { margin-top: 24px; padding-top: 22px; }
  .profile-card-list-panel { padding: 10px; }
  .profile-card-list { max-height: 42dvh; }
  .profile-card-row { min-height: 36px; grid-template-columns: 26px minmax(0, 1fr) auto 16px; gap: 6px; }
  .profile-card-cost { width: 22px; height: 22px; font-size: 11px; }
  .profile-card-meta { display: none; }
  .profile-badge-select { grid-column: 2; width: 100%; }
  .profile-title-select { grid-column: 2; width: 100%; }
  .profile-unlock-summary { max-width: 128px; }
  .profile-overview-actions { margin-top: 16px; }
  .profile-return,
  .profile-own { flex: 1; justify-content: center; }
}

@media (max-width: 420px) {
  .account-name { max-width: 86px; }
  .account-gold,
  .account-chip-label { display: none; }
  .account-profile { max-width: calc(100vw - 20px); padding: 5px; }
  .account-profile-progress-dot { top: -5px; left: -5px; width: 11px; height: 11px; }
  .account-avatar,
  .account-avatar-fallback { width: 30px; height: 30px; }
  .profile-section-heading { gap: 10px; }
  .profile-section-heading h2 { font-size: 20px; }
  .profile-tab { font-size: 11px; }
  .player-result { grid-template-columns: 38px minmax(0, 1fr); }
  .player-result-record { display: none; }
}

/* ============================================================
   DUELIST PROFILE — Arcana game identity screen
   ============================================================ */

#screen-profile.screen-transition-in {
  animation: profile-screen-enter 380ms cubic-bezier(.2,.75,.25,1) both;
}

#screen-profile.screen-transition-out {
  animation: profile-screen-leave 150ms ease-in both;
  pointer-events: none;
}

@keyframes profile-screen-enter {
  from { opacity: 0; transform: translateY(14px) scale(.994); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes profile-screen-leave {
  to { opacity: 0; transform: translateY(9px) scale(.996); filter: blur(3px); }
}

#screen-profile.profile-screen {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(3,5,12,.74), rgba(4,5,12,.96) 42%, #05060d),
    linear-gradient(90deg, rgba(4,6,15,.93), rgba(7,8,18,.73) 58%, rgba(5,6,14,.62)),
    url("../art/menu-arcane-sanctuary.webp?v=4") 68% top / cover fixed no-repeat;
  background-color: #050711;
  scrollbar-color: rgba(135,184,214,.5) rgba(5,6,13,.5);
}

#screen-profile.profile-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 68%);
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

#screen-profile .profile-page-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, 100%);
  padding:
    max(20px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(38px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
}

#screen-profile .profile-page-header {
  min-height: 50px;
  padding: 0;
}

#screen-profile .player-search-form {
  grid-template-columns: minmax(190px, 290px) 40px;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(127,176,207,.2);
  border-radius: 3px;
  background: rgba(7,11,22,.78);
}

#screen-profile .player-search-input {
  height: 36px;
  border: 0;
  border-radius: 2px;
  background: rgba(4,8,17,.72);
  font-size: 11px;
}

#screen-profile .player-search-button {
  width: 40px;
  height: 36px;
  border-color: rgba(112,181,222,.3);
  border-radius: 2px;
  background: rgba(49,102,139,.25);
  color: #a9daf5;
}

#screen-profile .profile-search-popover {
  border-color: rgba(127,177,210,.3);
  border-radius: 3px;
  background: rgba(7,10,21,.98);
}

#screen-profile .profile-page-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, .92fr);
  gap: 16px;
  padding-top: 14px;
}

#screen-profile .profile-overview,
#screen-profile .profile-progression {
  min-width: 0;
  border: 1px solid rgba(171,151,116,.18);
  border-radius: 3px;
  background:
    radial-gradient(circle at 24% 0%, rgba(93,142,178,.12), transparent 42%),
    linear-gradient(145deg, rgba(19,22,37,.95), rgba(7,9,20,.97));
  box-shadow: 0 18px 42px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.035);
}

#screen-profile .profile-overview {
  padding: clamp(20px, 3vw, 34px);
}

#screen-profile .profile-progression {
  padding: clamp(18px, 2.4vw, 28px);
  border-left: 1px solid rgba(171,151,116,.18);
}

#screen-profile .profile-hero {
  position: relative;
  gap: clamp(18px, 2.6vw, 28px);
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(153,183,202,.14);
}

#screen-profile .profile-avatar-frame {
  position: relative;
  width: clamp(112px, 12vw, 148px);
  border-color: rgba(204,177,116,.54);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(101,72,137,.22), transparent 48%),
    rgba(6,9,19,.88);
  box-shadow: inset 0 0 30px rgba(112,172,209,.08), 0 16px 34px rgba(0,0,0,.48);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

#screen-profile .profile-avatar-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 2;
  border: 1px solid rgba(174,143,215,.24);
  pointer-events: none;
  clip-path: inherit;
}

#screen-profile .profile-page-avatar { border-radius: 1px; }
#screen-profile .profile-kicker {
  color: #8fbfdd;
  font-size: 9px;
  letter-spacing: .18em;
}

#screen-profile .profile-identity h1 {
  background: linear-gradient(180deg, #f0d995, #916a34);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 900;
  letter-spacing: -.035em;
  text-shadow: none;
  filter: drop-shadow(0 5px 16px rgba(0,0,0,.7));
}

#screen-profile .profile-identity {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 10px;
}

#screen-profile .profile-kicker { margin-bottom: -2px; }
#screen-profile .profile-name-row { align-items: center; gap: 12px; }
#screen-profile .profile-name-row h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#screen-profile .profile-identity-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#screen-profile .profile-edit-name-button {
  width: 30px;
  height: 30px;
  border-color: rgba(199,172,112,.35);
  border-radius: 3px;
  background: rgba(75,58,36,.2);
  color: #dcc17d;
}

#screen-profile .profile-title-badge {
  flex: 1 1 150px;
  min-width: 0;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-color: rgba(117,181,220,.34);
  border-radius: 2px;
  background: rgba(44,96,130,.16);
  color: #a9daf5;
  font: 700 10px "Cinzel", serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#screen-profile .profile-equipped-badges {
  margin-top: 0;
  min-height: 38px;
  align-items: center;
}

#screen-profile .profile-equipped-badge {
  width: 38px;
  height: 38px;
}
#screen-profile .profile-equipped-badge .profile-badge-svg { width: 38px; height: 38px; }

#screen-profile .profile-meta-pill {
  min-height: 27px;
  border-color: rgba(178,154,111,.2);
  border-radius: 2px;
  background: rgba(7,10,20,.5);
  color: rgba(232,226,215,.76);
  font-size: 10px;
}

#screen-profile .profile-rank-badge {
  flex: 0 0 auto;
  margin: 0;
  min-height: 30px;
  box-sizing: border-box;
  border-radius: 2px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--rank-color) 16%, transparent), rgba(7,10,20,.6));
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--rank-color) 10%, transparent), 0 4px 12px rgba(0,0,0,.22);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#screen-profile .profile-rank-badge .profile-rank-icon { width: 23px; height: 23px; font-size: 21px; }
#screen-profile .profile-rank-badge small { font-size: 9px; letter-spacing: 0; text-transform: none; }

#screen-profile .profile-stat-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  width: 100%;
  margin-top: 20px;
  padding: 4px;
  border-color: rgba(127,176,207,.2);
  border-radius: 3px;
  background: rgba(5,9,19,.68);
}

#screen-profile .profile-stat-mode {
  min-width: 0;
  border-radius: 2px;
  font-size: clamp(8px, 1.45vw, 9px);
  letter-spacing: .035em;
  text-transform: uppercase;
}

#screen-profile .profile-stat-mode.is-active {
  background: linear-gradient(180deg, rgba(67,126,165,.3), rgba(25,61,87,.24));
  box-shadow: inset 0 2px #78b8df;
  color: #b9e3fa;
}

#screen-profile .profile-stats-grid {
  gap: 6px;
  margin-top: 10px;
}

#screen-profile .profile-stat-card {
  position: relative;
  min-height: 96px;
  padding: 13px 11px;
  overflow: hidden;
  border: 1px solid rgba(135,176,201,.13);
  border-top-color: rgba(135,190,224,.3);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(25,31,47,.82), rgba(8,11,22,.8));
}

#screen-profile .profile-stat-card::after {
  content: "";
  position: absolute;
  right: -17px;
  bottom: -25px;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(134,188,220,.08);
  transform: rotate(45deg);
}

#screen-profile .profile-stat-label { color: #8dbbd7; font-size: 8px; letter-spacing: .08em; }
#screen-profile .profile-stat-value { color: #ece3d2; font-size: 25px; }
#screen-profile .profile-stat-note { color: rgba(215,222,225,.45); font-size: 9px; }

#screen-profile .profile-overview-actions { margin-top: 16px; }
#screen-profile .profile-return,
#screen-profile .profile-own {
  min-height: 38px;
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#screen-profile .profile-return {
  border-color: rgba(201,174,114,.34);
  background: linear-gradient(180deg, rgba(61,48,31,.36), rgba(20,17,19,.4));
  color: #dbc17e;
}
#screen-profile .profile-own {
  border-color: rgba(111,180,219,.36);
  background: rgba(48,102,138,.18);
  color: #a9daf5;
}

#screen-profile .profile-section-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(132,177,205,.13);
}

#screen-profile .profile-section-heading h2 {
  color: #e7d6aa;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: 20px;
}

#screen-profile .profile-unlock-summary {
  max-width: 150px;
  color: rgba(197,211,219,.54);
  font-size: 9px;
}

#screen-profile .profile-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid rgba(127,176,207,.17);
  border-radius: 3px;
  background: rgba(5,8,18,.62);
}

#screen-profile .profile-tab {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#screen-profile .profile-tab.is-active {
  border-color: rgba(130,190,226,.38);
  background: rgba(54,111,147,.22);
  color: #b5def5;
}

#screen-profile .profile-tab-panel { padding-top: 10px; }
#screen-profile .profile-achievements,
#screen-profile .profile-titles { gap: 7px; }

#screen-profile .profile-progress-card {
  min-height: 74px;
  padding: 9px;
  border-color: rgba(134,174,198,.12);
  border-radius: 2px;
  background: rgba(8,12,23,.58);
}

#screen-profile .profile-progress-card.is-unlocked {
  border-color: rgba(108,179,218,.26);
  background: linear-gradient(90deg, rgba(42,91,122,.18), rgba(9,13,24,.64));
}

#screen-profile .profile-progress-card.is-selected {
  border-color: rgba(208,180,116,.5);
  background: rgba(112,82,39,.12);
}

#screen-profile .profile-progress-card strong { color: #ece4d5; font-size: 12px; }
#screen-profile .profile-progress-card p { color: rgba(211,216,217,.5); font-size: 10px; }
#screen-profile .profile-progress-count { color: #93c9e8; font-size: 9px; }
#screen-profile .profile-title-select,
#screen-profile .profile-badge-select {
  min-height: 30px;
  border-radius: 2px;
  font-size: 9px;
}

#screen-profile .profile-collection-section {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgba(171,151,116,.17);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(18,21,35,.94), rgba(7,9,19,.97));
  box-shadow: 0 18px 42px rgba(0,0,0,.3);
}

#screen-profile .profile-card-list-panel {
  border-color: rgba(125,179,211,.2);
  border-radius: 2px;
  background: rgba(6,10,20,.68);
  box-shadow: none;
}

#screen-profile .profile-card-row {
  border-color: rgba(129,169,193,.13);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(5,9,19,.82), rgba(24,30,45,.68));
}

@media (max-width: 940px) {
  #screen-profile .profile-page-layout { grid-template-columns: 1fr; }
  #screen-profile .profile-progression {
    grid-column: auto;
    padding: 22px;
    border-top: 1px solid rgba(171,151,116,.18);
    border-left: 1px solid rgba(171,151,116,.18);
  }
}

@media (max-width: 660px) {
  #screen-profile.profile-screen { background-attachment: scroll; }
  #screen-profile .profile-page-shell {
    padding:
      max(12px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }
  #screen-profile .profile-page-header { min-height: 44px; }
  #screen-profile .profile-search-control { width: 100%; }
  #screen-profile .profile-overview { padding: 16px; }
  #screen-profile .profile-hero { grid-template-columns: 82px minmax(0,1fr); gap: 13px; padding-bottom: 16px; }
  #screen-profile .profile-avatar-frame { width: 82px; }
  #screen-profile .profile-identity h1 { font-size: clamp(24px, 8vw, 34px); }
  #screen-profile .profile-title-badge { font-size: 8px; }
  #screen-profile .profile-equipped-badges { min-height: 30px; }
  #screen-profile .profile-equipped-badge,
  #screen-profile .profile-equipped-badge .profile-badge-svg { width: 30px; height: 30px; }
  #screen-profile .profile-meta-row { margin-top: 8px; gap: 5px; }
  #screen-profile .profile-meta-pill { min-height: 23px; padding: 4px 7px; font-size: 8px; }
  #screen-profile .profile-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #screen-profile .profile-stat-card { min-height: 76px; }
  #screen-profile .profile-stat-card:last-child { grid-column: span 2; }
  #screen-profile .profile-progression { padding: 16px; }
  #screen-profile .profile-overview-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  #screen-profile .profile-overview-actions { grid-template-columns: 1fr; }
  #screen-profile .profile-progress-card:not(.profile-title-card) {
    grid-template-columns: 52px minmax(0,1fr);
    gap: 8px;
  }
  #screen-profile .profile-progress-mark,
  #screen-profile .profile-badge-svg { width: 42px; height: 42px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  #screen-profile .profile-page-header { min-height: 38px; }
  #screen-profile .profile-page-layout { grid-template-columns: minmax(0,1.05fr) minmax(330px,.95fr); padding-top: 8px; }
  #screen-profile .profile-overview { padding: 14px; }
  #screen-profile .profile-hero { grid-template-columns: 78px minmax(0,1fr); gap: 12px; padding-bottom: 10px; }
  #screen-profile .profile-avatar-frame { width: 78px; }
  #screen-profile .profile-identity h1 { font-size: 27px; }
  #screen-profile .profile-equipped-badges { display: none; }
  #screen-profile .profile-stat-modes { margin-top: 10px; }
  #screen-profile .profile-stat-card { min-height: 68px; padding: 8px; }
  #screen-profile .profile-progression { height: calc(100dvh - 78px); min-height: 0; padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-profile.screen-transition-in,
  #screen-profile.screen-transition-out { animation: none; }
}

/* ---------- MAIN MENU PROFILE ENTRY ---------- */
#screen-menu .account-widget {
  z-index: 24;
}

#screen-menu .account-profile {
  display: grid;
  grid-template-columns: 48px minmax(112px, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  width: min(330px, calc(100vw - 48px));
  max-width: none;
  min-height: 68px;
  padding: 8px 10px 8px 8px;
  overflow: visible;
  border: 1px solid rgba(225, 190, 112, .5);
  border-radius: 5px;
  background:
    linear-gradient(115deg, rgba(76, 55, 42, .32), transparent 34%),
    linear-gradient(180deg, rgba(22, 23, 39, .98), rgba(7, 9, 20, .98));
  box-shadow:
    0 13px 34px rgba(0, 0, 0, .52),
    inset 0 1px rgba(255, 255, 255, .08),
    inset 3px 0 rgba(209, 165, 81, .65);
  isolation: isolate;
  touch-action: manipulation;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

#screen-menu .account-profile::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 2px;
  pointer-events: none;
}

#screen-menu .account-profile:hover,
#screen-menu .account-profile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(244, 205, 115, .9);
  background:
    linear-gradient(115deg, rgba(112, 79, 45, .42), transparent 39%),
    linear-gradient(180deg, rgba(32, 31, 49, .99), rgba(9, 11, 24, .99));
  box-shadow:
    0 16px 38px rgba(0, 0, 0, .58),
    0 0 0 2px rgba(225, 182, 87, .1),
    0 0 24px rgba(222, 174, 76, .14),
    inset 3px 0 #e3b762;
  outline: none;
}

#screen-menu .account-profile:focus-visible {
  outline: 2px solid #f1cf82;
  outline-offset: 3px;
}

#screen-menu .account-profile:active {
  transform: translateY(1px) scale(.985);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5), inset 3px 0 #e3b762;
}

#screen-menu .account-avatar-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid rgba(229, 191, 105, .7);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(236, 198, 112, .2), rgba(54, 82, 111, .2));
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .5), 0 0 14px rgba(211, 170, 81, .1);
}

#screen-menu .account-avatar,
#screen-menu .account-avatar-fallback {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
}

#screen-menu .account-chip-main {
  gap: 2px;
}

#screen-menu .account-chip-kicker {
  color: #8fbcd4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
}

#screen-menu .account-name {
  max-width: 148px;
  color: #f3ead9;
  font: 700 14px/1.15 "Cinzel", serif;
}

#screen-menu .account-chip-label {
  margin: 0;
  color: rgba(230, 224, 212, .58);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.15;
  text-transform: none;
}

#screen-menu .account-gold {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(218, 177, 83, .28);
  border-radius: 3px;
  background: rgba(157, 112, 38, .12);
  color: #e8c46e;
  font-size: 10px;
}

#screen-menu .account-profile-arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 30px;
  border-left: 1px solid rgba(228, 202, 146, .15);
  color: rgba(236, 215, 170, .76);
  transition: color .18s ease, transform .18s ease;
}

#screen-menu .account-profile-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#screen-menu .account-profile:hover .account-profile-arrow,
#screen-menu .account-profile:focus-visible .account-profile-arrow {
  color: #f3ce7b;
  transform: translateX(2px);
}

#screen-menu .account-profile-progress-dot {
  top: -5px;
  right: -5px;
  left: auto;
  width: 14px;
  height: 14px;
  border-color: #0a0c19;
}

@media (max-width: 760px) {
  #screen-menu .account-profile {
    grid-template-columns: 42px minmax(86px, 1fr) 22px;
    width: min(230px, calc(100vw - 86px));
    min-height: 56px;
    gap: 8px;
    padding: 6px 7px 6px 6px;
  }

  #screen-menu .account-avatar-frame {
    width: 42px;
    height: 42px;
  }

  #screen-menu .account-name {
    max-width: none;
    font-size: 12px;
  }

  #screen-menu .account-chip-kicker { font-size: 7px; }
  #screen-menu .account-chip-label { font-size: 8px; }
  #screen-menu .account-gold { display: none; }
  #screen-menu .account-profile-arrow { width: 22px; }
}

@media (max-width: 390px) {
  #screen-menu .account-profile {
    grid-template-columns: 38px minmax(72px, 1fr) 20px;
    width: min(196px, calc(100vw - 78px));
    min-height: 50px;
    gap: 6px;
  }

  #screen-menu .account-avatar-frame {
    width: 38px;
    height: 38px;
  }

  #screen-menu .account-chip-kicker { display: none; }
  #screen-menu .account-name { font-size: 11px; }
  #screen-menu .account-chip-label { font-size: 7px; }
}

@media (hover: none) and (pointer: coarse) {
  #screen-menu .account-profile:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-menu .account-profile,
  #screen-menu .account-profile-arrow { transition: none; }
}
