/* A member's page (live/member.php) and the member card (membercard.js). Colours only from the site's variables (the achievement chips take the admin's badge colours through .sb-<key>). */
.mp-wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px 56px; }
.mp-card { position: relative; border: 1px solid var(--msg-border); border-radius: 18px; background: var(--msg-surface); overflow: hidden; }
.mp-header { position: relative; aspect-ratio: 3 / 1; background: linear-gradient(135deg, color-mix(in srgb, var(--msg-accent) 55%, var(--msg-bg)), var(--msg-bg) 75%); }
.mp-header > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 20px 0; min-height: 72px; }
.mp-avatar { flex: none; position: relative; width: 134px; height: 134px; margin-top: -79px; border-radius: 50%; padding: 4px; background: var(--msg-surface); display: grid; place-items: center; font-size: 48px; font-weight: 800; color: var(--msg-muted); }
.mp-avatar > img, .mp-avatar > span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--msg-surface-2); }
.mp-avatar.is-vip { background: conic-gradient(from 210deg, var(--msg-gold), var(--msg-accent), var(--msg-gold)); }
.mp-avatar.is-online::after { content: ""; position: absolute; right: 9px; bottom: 9px; width: 20px; height: 20px; border-radius: 50%; background: var(--msg-ok); border: 4px solid var(--msg-surface); pointer-events: none; }
.mp-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mp-body { padding: 10px 20px 22px; }
.mp-name { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-level .sb { height: 22px; padding: 0 8px; font-size: 12px; }
.mp-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; color: var(--msg-muted); font-size: 15px; }
.mp-status { display: inline-flex; align-items: center; gap: 6px; }
.mp-status.is-online { color: var(--msg-text); font-weight: 700; }
.mp-status.is-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--msg-ok); }
.mp-fact + .mp-fact::before, .mp-status + .mp-fact::before { content: "\00b7"; margin-right: 12px; }
.mp-about { margin: 14px 0 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.mp-about.is-empty { color: var(--msg-muted); }
.mp-about a { color: var(--msg-link); font-weight: 700; }
.mp-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--msg-muted); font-size: 15px; }
.mp-line b { color: var(--msg-text); }
.mp-since { display: inline-flex; align-items: center; gap: 6px; }
.mp-since svg { width: 16px; height: 16px; fill: currentColor; }
.mp-ach { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--msg-border); }
.mp-ach h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.mp-ach-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--msg-surface-2); color: var(--msg-muted); font-size: 12px; display: inline-grid; place-items: center; }
.mp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px 4px 4px; border-radius: 18px; border: 1px solid var(--msg-border); font-size: 14px; max-width: 100%; }
.mp-chip-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sb-bg, var(--msg-accent)); color: var(--sb-fg, var(--msg-on-accent)); }
.mp-chip-ic svg { width: 16px; height: 16px; fill: currentColor; }
.mp-chip-ic.mp-gold { --sb-bg: var(--msg-gold); --sb-fg: var(--msg-black); }
.mp-chip-ic.mp-silver { --sb-bg: var(--msg-silver); --sb-fg: var(--msg-black); }
.mp-chip-ic.mp-bronze { --sb-bg: var(--msg-bronze); --sb-fg: var(--msg-black); }
.mp-chip-t { min-width: 0; overflow-wrap: anywhere; }
.mp-chip-in { color: var(--msg-muted); }
.mp-chip a { color: var(--msg-link); font-weight: 700; text-decoration: none; }
.mp-chip a:hover { text-decoration: underline; }
.mp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mp-none { max-width: 480px; margin: 12vh auto; text-align: center; }

/* the owner's own page: the header and the picture are buttons (camera mark; "Change header" shows on hover, always on touch screens) */
.mp-pick { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; padding: 0; margin: 0; border-radius: inherit; background: color-mix(in srgb, var(--msg-black) 0%, transparent); color: var(--msg-white); font: inherit; font-weight: 700; cursor: pointer; transition: background .15s; }
.mp-pick-av { border-radius: 50%; }
.mp-pick-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--msg-black) 55%, transparent); opacity: 0; transition: opacity .15s; }
.mp-pick-ic svg { width: 22px; height: 22px; fill: currentColor; }
.mp-pick-t { padding: 6px 12px; border-radius: var(--btn-r, 18px); background: color-mix(in srgb, var(--msg-black) 55%, transparent); font-size: 15px; opacity: 0; transition: opacity .15s; }
.mp-pick:hover, .mp-pick:focus-visible { background: color-mix(in srgb, var(--msg-black) 30%, transparent); }
.mp-pick:hover > span, .mp-pick:focus-visible > span, .mp-header.is-plain .mp-pick > span { opacity: 1; }
.mp-pick:focus-visible { outline: 3px solid var(--msg-accent); outline-offset: -3px; }
@media (hover: none) { .mp-pick > span { opacity: 1; } .mp-pick-hd { align-items: flex-end; justify-content: flex-end; padding: 10px; } .mp-pick-hd .mp-pick-ic { display: none; } .mp-pick-av { align-items: flex-end; justify-content: flex-end; } .mp-pick-av .mp-pick-ic { width: 38px; height: 38px; } }
.is-busy > .mp-pick { pointer-events: none; background: color-mix(in srgb, var(--msg-black) 45%, transparent); }
.is-busy > .mp-pick::after { content: ""; position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--msg-white) 35%, transparent); border-top-color: var(--msg-white); animation: mp-spin .8s linear infinite; }
.is-busy > .mp-pick > span { opacity: 0; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* the adjuster (a modal dialog: above everything) */
.mpx { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--msg-border); border-radius: 16px; background: var(--msg-surface); color: var(--msg-text); overflow: auto; }
.mpx::backdrop { background: color-mix(in srgb, var(--msg-black) 70%, transparent); }
.mpx-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--msg-border); }
.mpx-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 800; }
.mpx-x { width: 44px; height: 44px; border: 0; border-radius: var(--btn-rc, 50%); background: none; color: var(--msg-text); font-size: 26px; line-height: 1; cursor: pointer; }
.mpx-x:hover { background: var(--msg-surface-2); }
.mpx-stage { padding: 16px; background: var(--msg-bg); display: grid; place-items: center; }
.mpx-frame { position: relative; width: 100%; aspect-ratio: 3 / 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: 2px solid var(--msg-accent); }
.mpx-frame:active { cursor: grabbing; }
.mpx-frame:focus-visible { outline-width: 3px; }
.mpx-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.mpx-avatar .mpx-frame { width: min(320px, 100%); aspect-ratio: 1; outline: 0; }
.mpx-avatar .mpx-frame::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px color-mix(in srgb, var(--msg-black) 55%, transparent); outline: 2px solid var(--msg-accent); pointer-events: none; }
.mpx-zoom { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; font-weight: 700; }
.mpx-zoom[hidden] { display: none; }
.mpx-zoom input { flex: 1; min-height: 44px; accent-color: var(--msg-accent); }
.mpx-hint { margin: 6px 16px 0; color: var(--msg-muted); font-size: 14px; }
.mpx-more { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px 16px; }

@media (max-width: 599px) {
  .mp-wrap { padding: 0 0 40px; }
  .mp-card { border-radius: 0; border-left: 0; border-right: 0; }
  .mp-top { padding: 10px 16px 0; min-height: 56px; }
  .mp-avatar { width: 96px; height: 96px; margin-top: -58px; font-size: 36px; }
  .mp-body { padding: 8px 16px 20px; }
  .mp-name { font-size: 22px; }
  .mp-actions .lv-btn { min-width: 44px; }
}

/* the small card that opens from a name in the room's user list */
.mbc-pop { position: fixed; z-index: 1450; width: min(300px, calc(100vw - 24px)); padding: 16px; border-radius: 14px; border: 1px solid var(--msg-border); background: var(--msg-surface); box-shadow: 0 12px 34px color-mix(in srgb, var(--msg-black) 55%, transparent); color: var(--msg-text); }
.mbc-pop[hidden] { display: none; }
.mbc-top { display: flex; align-items: center; gap: 12px; }
.mbc-ava { flex: none; position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--msg-surface-2); display: grid; place-items: center; font-size: 26px; font-weight: 700; padding: 0; border: 0; color: inherit; cursor: pointer; }
.mbc-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mbc-name { margin: 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.mbc-sub { margin: 2px 0 0; color: var(--msg-muted); font-size: 14px; }
.mbc-sub.is-online { color: var(--msg-text); font-weight: 600; }
.mbc-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mbc-row .lv-btn { flex: 1 1 auto; justify-content: center; }
.mbc-x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--msg-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.mbc-menu { margin-top: 10px; display: grid; gap: 6px; }
.mbc-menu[hidden] { display: none; }

@media (max-width: 599px) { .mbc-pop.is-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); } }
.mbc-x { z-index: 1; }

.mbc-on .lv-vlist .lv-u, .mbc-on .lv-chat-list .lv-row[data-role="member"] > .lv-u, .mbc-on .lv-chat-list .lv-row[data-role="mod"] > .lv-u { cursor: pointer; }

