/* [profiles] The join screen's PROFILE block (client/profile.js; docs/PROFILES.md).
   The menu's type (client/style.css :root), a brighter, toy-like take: a
   chunky mint level badge, a thick glowing XP bar (the clearest thing in
   the block), stat chips, challenge cards with gold +XP pills and the next
   one up lit, a gold OPEN LOCKER, and the reset kept small and apart. */

.m-profile { --mint: #5dffc0; --mint-2: #22e39b; --gold: #ffd25a; --gold-2: #ffb21f; --sky: #4fd8ff;
  margin-top: 14px; padding: 16px 18px 12px; border: 2px solid rgba(93, 255, 192, 0.55); border-radius: 18px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(93, 255, 192, 0.22), transparent 60%),
    radial-gradient(90% 80% at 100% 0%, rgba(79, 216, 255, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(30, 52, 78, 0.92), rgba(20, 34, 58, 0.92));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.m-prof-top { display: flex; gap: 16px; align-items: center; }
.m-prof-badge { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #9dffd9, var(--mint) 45%, var(--mint-2)); color: #032417;
  box-shadow: 0 6px 0 #0f9e69, 0 10px 24px rgba(93, 255, 192, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.6); transform: rotate(-3deg); }
.m-prof-badge small { font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; opacity: 0.85; }
.m-prof-badge b { font-family: var(--font-display); font-size: 34px; line-height: 1; font-weight: 800; }
.m-prof-main { flex: 1 1 auto; min-width: 0; }
.m-prof-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.m-prof-head b { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.18em; color: var(--mint); }
.m-prof-who { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.m-prof-who small { font-family: var(--font-display); font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; color: #9fb0d2; }
.m-prof-who span { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-prof-who:has(span:empty) { display: none; }
.m-prof-xp { margin-top: 4px; font-size: 13px; color: #d9e6ff; }
.m-prof-xp b { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: #fff; }
.m-prof-barbox { position: relative; height: 16px; margin-top: 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.14); overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4); }
.m-prof-barbox i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 8px; transition: width 0.7s var(--ease);
  background: linear-gradient(90deg, var(--sky), var(--mint)); box-shadow: 0 0 14px rgba(93, 255, 192, 0.85), 0 0 4px rgba(79, 216, 255, 0.9);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%), linear-gradient(90deg, var(--sky), var(--mint)); }
.m-prof-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; padding: 0; }
.m-prof-stats li { font-size: 12.5px; color: #eef3ff; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.22); }
.m-prof-stats li b { color: #fff; font-family: var(--font-display); font-weight: 800; }
.m-prof-sub { margin-top: 14px; font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: #b9c8e6; }
.m-prof-challenges { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .m-prof-challenges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .m-profile { padding: 14px 12px 12px; }
  .m-prof-challenges { grid-template-columns: minmax(0, 1fr); }
  .m-prof-top { align-items: flex-start; gap: 12px; }
  .m-prof-badge { width: 60px; height: 60px; border-radius: 16px; }
  .m-prof-badge b { font-size: 26px; }
  .m-prof-badge small { font-size: 10px; }
  .m-prof-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .m-prof-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-prof-stats li { text-align: center; white-space: nowrap; }
  .m-prof-stats li:last-child:nth-child(odd) { grid-column: span 2; }
  .m-prof-confirm { padding: 14px; text-align: center; }
  .m-prof-confirm-row { flex-direction: column; align-items: stretch; }
  #menu .m-prof-confirm input, #menu .m-prof-confirm-go, #menu .m-prof-confirm-cancel { width: 100%; height: 40px; }
}
.m-prof-ch { position: relative; padding: 9px 8px 8px 10px; border-radius: 13px; background: rgba(255, 255, 255, 0.07); border: 2px solid rgba(255, 255, 255, 0.12); min-width: 0; }
.m-prof-ch-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.m-prof-ch-head b { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-prof-pill { flex: 0 0 auto; font-family: var(--font-display); font-weight: 800; font-size: 11.5px; padding: 2px 7px; border-radius: 999px;
  color: #2a0d3d; background: linear-gradient(180deg, #f2c6ff, #d68cff); box-shadow: 0 2px 0 #9a4fd0; }
.m-prof-ch small { display: block; margin-top: 3px; font-size: 12px; color: #d3def4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-prof-track { position: relative; height: 7px; margin-top: 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.17); overflow: hidden; }
.m-prof-track i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--sky), #8fe9ff); }
.m-prof-ch-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: #dbe5f8; white-space: nowrap; }
.m-prof-ch-foot span { min-width: 0; }
.m-prof-nexttag { position: absolute; top: -9px; left: 10px; font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 9.5px; letter-spacing: 0.14em;
  padding: 1px 7px; border-radius: 999px; color: #3a2600; background: var(--gold); box-shadow: 0 2px 0 #c98400; }
.m-prof-ch.next { border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 210, 90, 0.2), rgba(255, 210, 90, 0.07));
  box-shadow: 0 0 0 3px rgba(255, 210, 90, 0.18), 0 6px 18px rgba(255, 178, 31, 0.25); }
.m-prof-ch.next .m-prof-track i { background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 8px rgba(255, 210, 90, 0.8); }
.m-prof-ch.next .m-prof-ch-foot { color: var(--gold); flex-wrap: nowrap; }
.m-prof-ch.next .m-prof-ch-foot span { overflow: hidden; text-overflow: ellipsis; }
.m-prof-ch.done { border-color: rgba(93, 255, 192, 0.7); background: linear-gradient(180deg, rgba(93, 255, 192, 0.18), rgba(93, 255, 192, 0.06)); }
.m-prof-ch.done .m-prof-pill { color: #032417; background: linear-gradient(180deg, #b6ffe3, var(--mint)); box-shadow: 0 2px 0 #0f9e69; }
.m-prof-ch.done .m-prof-track i { background: var(--mint); }
.m-prof-ch.done .m-prof-ch-foot { color: var(--mint); }
.m-prof-locker { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px;
  border-radius: 12px; background: rgba(10, 16, 32, 0.6); border: 1.5px solid rgba(255, 210, 90, 0.6); }
.m-prof-locker span { color: #ffe6a3; font-size: 12.5px; font-weight: 600; }
#menu .m-prof-locker-btn { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.1em; padding: 8px 14px; border-radius: 11px; border: 0;
  color: #3a2600; background: linear-gradient(180deg, #ffe48f, var(--gold) 50%, var(--gold-2)); box-shadow: 0 3px 0 #c98400; cursor: pointer; }
#menu .m-prof-locker-btn small { display: block; font-size: 9px; letter-spacing: 0.14em; font-weight: 700; opacity: 0.75; }
#menu .m-prof-locker-btn:disabled { cursor: not-allowed; color: var(--gold); background: rgba(10, 16, 32, 0.65); border: 1.5px solid rgba(255, 210, 90, 0.75); box-shadow: none; }
#menu .m-prof-locker-btn:disabled small { color: #ffe6a3; opacity: 1; font-size: 10px; }
.m-prof-status { margin-top: 8px; font-size: 12.5px; color: #fff; }
.m-prof-status:empty { display: none; }
.m-prof-status[data-kind="warn"] { color: #ffc2cd; }
.m-prof-status[data-kind="ok"] { color: var(--mint); }
.m-prof-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 14px; }
.m-prof-note { color: #b8c6e2; font-size: 12px; line-height: 1.5; max-width: 68%; }
@media (max-width: 520px) { .m-prof-bottom { flex-direction: column; align-items: flex-start; gap: 10px; } .m-prof-note { max-width: none; } }
#menu .m-prof-reset { flex: 0 0 auto; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); cursor: pointer;
  color: #dbe5f8; border: 1px solid rgba(255, 255, 255, 0.24); }
#menu .m-prof-reset:hover { color: #ffb3c1; border-color: rgba(255, 77, 109, 0.6); }
.m-prof-confirm { margin: 14px 0 4px; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255, 77, 109, 0.5); background: rgba(10, 16, 32, 0.55); }
.m-prof-confirm label { display: block; font-size: 13px; line-height: 1.5; color: #e4ebfa; }
.m-prof-confirm label b { color: #ff8fa3; letter-spacing: 0.08em; }
.m-prof-confirm-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
#menu .m-prof-confirm input { box-sizing: border-box; width: 120px; height: 36px; padding: 0 12px; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; outline: none; }
#menu .m-prof-confirm input::placeholder { color: #6f7f9f; }
#menu .m-prof-confirm input:focus { border-color: rgba(255, 143, 163, 0.8); box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.18); }
#menu .m-prof-confirm-go, #menu .m-prof-confirm-cancel { box-sizing: border-box; height: 36px; padding: 0 16px; border-radius: 10px; font-family: var(--font-display); font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; cursor: pointer; }
#menu .m-prof-confirm-go { border: 0; color: #fff; background: linear-gradient(180deg, #ff6f88, #ff3f62); box-shadow: 0 3px 0 #b8243f; }
#menu .m-prof-confirm-go:disabled { color: rgba(255, 255, 255, 0.6); background: rgba(255, 77, 109, 0.28); box-shadow: none; cursor: not-allowed; }
#menu .m-prof-confirm-cancel { background: transparent; color: #dbe5f8; border: 1px solid rgba(255, 255, 255, 0.25); }

/* the jump near the top of the join screen: the level, then the block */
#menu .m-prof-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px 4px 6px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 0.06em; color: #e9fff5;
  background: rgba(93, 255, 192, 0.12); border: 1.5px solid rgba(93, 255, 192, 0.55); }
#menu .m-prof-jump[hidden] { display: none; }
#menu .m-prof-jump b { padding: 3px 9px; border-radius: 999px; color: #032417; background: linear-gradient(180deg, #9dffd9, #5dffc0); }
#menu .m-prof-jump:hover { background: rgba(93, 255, 192, 0.2); }
/* the phone reset dialog: the field and the buttons one width (after the confirm rules, so it wins) */
@media (max-width: 520px) { #menu .m-prof-confirm input, #menu .m-prof-confirm-go, #menu .m-prof-confirm-cancel { width: 100%; height: 40px; } }
