/* Avatar frames are isolated inside the picture geometry. Legacy effects remain readable. */
.mp-photo-stack{position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:none;width:max-content;height:max-content;max-width:100%;vertical-align:middle;overflow:visible}
.mp-photo-stack>.avatar,.mp-photo-stack>.mp-demo-avatar{grid-area:1/1;position:relative;z-index:0}
.mp-overlay{position:absolute;inset:0;z-index:2;display:block;pointer-events:none!important;user-select:none!important;overflow:hidden;isolation:isolate;border-radius:var(--mp-radius,20px);transform:translate(var(--mp-x,0%),var(--mp-y,0%)) scale(var(--mp-scale,1));transform-origin:center;contain:layout style;max-width:100%;max-height:100%;will-change:auto}
.mp-overlay-frame{z-index:3}.mp-overlay-effect{z-index:4}
.mp-photo-stack>.mp-overlay{border-radius:var(--mp-radius,20px)}


.mp-photo-stack>.mp-shape-circle{border-radius:50%!important}.mp-photo-stack>.mp-shape-rounded{border-radius:20%!important}.mp-photo-stack>.mp-shape-square{border-radius:0!important}
.mp-overlay iframe{border:0;background:transparent!important;width:100%;height:100%;display:block;pointer-events:none!important;overflow:hidden;opacity:1}
/* Preserve the existing account photo editing target and the member dialog. */
.profile-avatar-edit .mp-photo-stack{pointer-events:none}
.profile-avatar-edit .avatar{pointer-events:none}
.member-profile-content>.mp-photo-stack{margin-top:-42px}
.member-profile-content>.mp-photo-stack .avatar.large{width:84px;height:84px;border:4px solid var(--surface,#172a22)}

.mp-page{display:grid;gap:20px;min-width:0;padding-bottom:30px}
.mp-page h1{margin:4px 0 5px}.mp-page h2{margin:4px 0 8px}.mp-page label{display:grid;gap:6px;font-size:13px;font-weight:650;min-width:0}
.mp-wallet{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:22px}
.mp-topup{display:grid;grid-template-columns:repeat(2,minmax(130px,1fr));gap:12px;max-width:570px;flex:1 1 340px;min-width:0}.mp-topup>button{align-self:end}.mp-topup details{grid-column:1/-1}
.mp-topup input,.mp-topup select{min-width:0;width:100%}.mp-qr{display:block;max-width:200px;max-height:220px;object-fit:contain;border-radius:10px;margin-top:10px}
.mp-section{min-width:0}.mp-section>.spread{gap:14px;flex-wrap:wrap}.mp-filters select{min-width:140px}
.mp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:16px}
.mp-card{display:grid;gap:14px;padding:12px;overflow:hidden;content-visibility:auto;contain-intrinsic-size:345px}
.mp-card-info{padding:4px;display:grid;gap:12px;min-width:0}.mp-card-info>.spread{flex-wrap:wrap;gap:10px}.mp-card-info .tag{font-size:10px}
.mp-card-preview{min-width:0}.mp-price{font-size:14px}.mp-live-profile{position:relative;width:100%;min-width:0;border-radius:16px;border:1px solid #50765955;overflow:hidden;background:linear-gradient(120deg,#172f23,#0c1a16)}
.mp-preview-cover{height:65px;background:radial-gradient(circle at 80% 20%,#50976f70,transparent 70%),linear-gradient(135deg,#2b513a,#0c2218)}
.mp-preview-body{display:flex;align-items:flex-end;gap:12px;min-width:0;padding:0 14px 3px;margin-top:-27px;position:relative}
.mp-preview-body>div{padding-bottom:4px;min-width:0;overflow:hidden}.mp-preview-body strong{font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}.mp-preview-body p{margin:2px 0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-live-profile>.tiny{padding:0 14px 12px;margin:8px 0 0;font-size:10px}
.mp-demo-avatar{width:68px;height:68px;display:grid;place-items:center;border-radius:21px;background:#8bd39c;color:#0d271d;font-weight:850;font-size:22px;border:4px solid #10281c}
.mp-manager-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,0.9fr);gap:16px;align-items:start}
.mp-editor{display:grid;gap:15px;min-width:0}.mp-editor>.grid,.mp-calibration>.grid{gap:12px}.mp-editor .mp-html-input{font-family:ui-monospace,monospace;font-size:12px;line-height:1.5;resize:vertical;width:100%;min-width:0}
.mp-calibration{border:1px solid #627d6a66;border-radius:12px;padding:12px}.mp-calibration legend{padding:0 8px;font-weight:750}
.mp-live-preview-slot{max-width:400px;min-height:0}.mp-live-preview-slot>h4{margin:0 0 8px}.mp-admin-list{display:grid;gap:12px;max-height:780px;overflow-y:auto}
.mp-admin-entry,.mp-request{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #51745850;border-radius:13px;min-width:0}
.mp-admin-entry>div:first-child{min-width:0;flex:1}.mp-admin-entry .mp-live-profile{max-width:240px;margin-bottom:10px}.mp-admin-actions{display:flex;flex-wrap:wrap;gap:8px;align-self:center;justify-content:flex-end}.mp-request strong{overflow-wrap:anywhere}.mp-request{flex-wrap:wrap}.mp-requests{display:grid;gap:9px}
@media(max-width:890px){.mp-manager-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:540px){.mp-topup{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%}.mp-topup label:nth-child(3){grid-column:1/-1}.mp-admin-entry{align-items:flex-start;flex-direction:column}.mp-admin-actions{justify-content:flex-start}.mp-editor>.grid,.mp-calibration>.grid{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.mp-overlay iframe{transform:none!important}}

.mp-card[hidden]{display:none!important}

.mp-filters{display:flex;flex-wrap:wrap;gap:10px}.mp-filters select{max-width:190px}.mp-admin-entry{content-visibility:auto;contain-intrinsic-size:210px}

/* User-selected frame geometry. AUTO copies the real photo border radius. */
.mp-photo-stack:has(.mp-overlay.mp-shape-circle)>.avatar,.mp-photo-stack:has(.mp-overlay.mp-shape-circle)>.mp-demo-avatar{border-radius:50%!important}
.mp-photo-stack:has(.mp-overlay.mp-shape-rounded)>.avatar,.mp-photo-stack:has(.mp-overlay.mp-shape-rounded)>.mp-demo-avatar{border-radius:21%!important}
.mp-photo-stack:has(.mp-overlay.mp-shape-square)>.avatar,.mp-photo-stack:has(.mp-overlay.mp-shape-square)>.mp-demo-avatar{border-radius:0!important}
.mp-photo-stack:has(.mp-overlay.mp-shape-custom)>.avatar,.mp-photo-stack:has(.mp-overlay.mp-shape-custom)>.mp-demo-avatar{border-radius:var(--mp-custom-radius,18%)!important}
.mp-photo-stack>.mp-shape-custom{border-radius:var(--mp-corner,18%)!important}
.mp-preview-cover{position:relative;overflow:hidden}
.mp-preview-cover>img{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0}
.mp-coin{display:inline-grid;vertical-align:middle;place-items:center;width:1.48em;height:1.48em;border-radius:50%;margin-right:.32em;background:radial-gradient(circle at 29% 24%,#fff9c3,#ffde6a 38%,#d88c24 75%,#82501a);border:2px solid #f7d77d;color:#7a430c;box-shadow:inset 1px 1px 3px #fff9, inset -2px -3px 4px #8b430b99, 0 3px 1px #6f441c,0 6px 9px #0006;text-shadow:0 1px 0 #fff6;font-size:.89em;font-weight:900;flex:none}
.mp-coin>span{line-height:1}
.mp-wallet h2{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.mp-wallet h2 .mp-coin{font-size:18px}
.mp-price{display:inline-flex;align-items:center;gap:3px}
.mp-topup label,.mp-editor label{min-width:0}

/* v2.5: Fixed-size avatar geometry keeps sandbox iframes out of document flow. */
.mp-photo-stack{box-sizing:border-box!important;display:inline-block!important;position:relative!important;vertical-align:middle!important;width:var(--mp-size,43px)!important;height:var(--mp-size,43px)!important;min-width:var(--mp-size,43px);min-height:var(--mp-size,43px);max-width:none!important;max-height:none!important;flex:none!important;overflow:visible!important;isolation:isolate}
.mp-photo-stack:has(>.avatar.large),.mp-photo-stack:has(>.member-avatar-trigger .avatar.large){--mp-size:68px}
.member-profile-content>.mp-photo-stack{--mp-size:84px;margin-top:-40px;margin-bottom:12px;display:block!important}
.member-profile-content>.mp-photo-stack+.member-profile-title{clear:both;position:relative;margin:12px 0 8px}
.mp-live-profile .mp-photo-stack{--mp-size:68px;align-self:center;z-index:1}
.mp-preview-body{align-items:center;gap:12px;margin-top:-23px;padding:0 12px 6px;min-height:82px}
.mp-preview-body>.mp-photo-stack{flex:0 0 68px!important;overflow:visible}
.mp-preview-body>.mp-preview-text{min-width:0;flex:1;overflow:hidden;padding-top:25px;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
.mp-preview-body>.mp-preview-text strong,.mp-preview-body>.mp-preview-text p{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mp-photo-stack>.avatar,.mp-photo-stack>.member-avatar-trigger{width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;display:grid;place-content:center;position:absolute;inset:0;z-index:1}
.mp-photo-stack>.member-avatar-trigger>.avatar{width:100%!important;height:100%!important}
.mp-photo-stack .avatar>img{object-fit:cover;position:absolute;inset:0;width:100%;height:100%}
.mp-photo-stack:has(.mp-overlay)>.avatar,.mp-photo-stack:has(.mp-overlay)>.member-avatar-trigger{transform:scale(.82);transform-origin:center}
.mp-photo-stack:has(.mp-overlay)>.member-avatar-trigger>.avatar{transform:none}
.mp-photo-stack>.mp-overlay{position:absolute!important;top:0!important;left:0!important;width:100%!important;height:100%!important;inset:0!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;display:block;z-index:5!important;overflow:hidden!important;transform:none!important;background:transparent!important;pointer-events:none!important}
.mp-photo-stack>.mp-overlay iframe{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;border:0;overflow:hidden;pointer-events:none!important;background:transparent!important;transform:translate(var(--mp-x,0%),var(--mp-y,0%)) scale(var(--mp-scale,1));transform-origin:center}
.mp-photo-stack>.mp-overlay-effect{z-index:4;mask-image:radial-gradient(circle,transparent 0 34%,black 50%);-webkit-mask-image:radial-gradient(circle,transparent 0 34%,black 50%)}
.mp-photo-stack>.mp-overlay-frame{z-index:5!important;mask-image:radial-gradient(circle,transparent 0 31%,black 48%,black 73%,transparent 86%);-webkit-mask-image:radial-gradient(circle,transparent 0 31%,black 48%,black 73%,transparent 86%)}
.mp-photo-stack.mp-user-shape-circle>.avatar,.mp-photo-stack.mp-user-shape-circle .member-avatar-trigger>.avatar{border-radius:50%!important}
.mp-photo-stack.mp-user-shape-square>.avatar,.mp-photo-stack.mp-user-shape-square .member-avatar-trigger>.avatar{border-radius:0!important}
.mp-photo-stack.mp-user-shape-rounded>.avatar,.mp-photo-stack.mp-user-shape-rounded .member-avatar-trigger>.avatar{border-radius:21%!important}
.mp-photo-stack.mp-user-shape-circle>.mp-overlay{border-radius:50%!important}
.mp-photo-stack.mp-user-shape-square>.mp-overlay{border-radius:0!important}
.mp-photo-stack.mp-user-shape-rounded>.mp-overlay{border-radius:21%!important}
.mp-photo-stack.mp-user-shape-circle .avatar-photo,.mp-photo-stack.mp-user-shape-square .avatar-photo,.mp-photo-stack.mp-user-shape-rounded .avatar-photo{border-radius:inherit}
.chat-message>.mp-photo-stack,.lb-ai-message>.mp-photo-stack{--mp-size:34px;align-self:flex-start}
.status-post>.mp-photo-stack{--mp-size:43px;align-self:flex-start}
.conversation-item .mp-photo-stack{--mp-size:38px}
.lb-chat-workspace .conversation-item .mp-photo-stack{--mp-size:43px}
.online-member-row .mp-photo-stack{--mp-size:43px}
.member-profile-card{overflow-x:hidden!important}
.member-profile-content{min-width:0!important;overflow-wrap:normal!important}
.member-profile-content h2{max-width:100%;overflow-wrap:break-word}
.mp-wallet-tools{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
.mp-wallet-tools form{display:grid;gap:10px;align-content:start;min-width:0}
.mp-wallet-tools input,.mp-wallet-tools select{width:100%;min-width:0}
.mp-upi-pay-info{grid-column:1/-1;min-width:0;padding:12px;border:1px solid #7ebd8c55;border-radius:14px;background:#0b261d88}
.mp-upi-pay-info[hidden]{display:none!important}
.mp-upi-pay-info img{background:#fff;padding:7px;max-width:215px;width:100%;height:auto;object-fit:contain}
@media(max-width:480px){.member-profile-content>.mp-photo-stack{--mp-size:84px}.mp-preview-body{gap:10px;padding-inline:8px}}

/* The dashboard profile button is also a public avatar surface. */
.top-profile .top-avatar-pfp{width:100%!important;height:100%!important;min-width:0;border-radius:inherit;display:block}
.top-profile .mp-photo-stack{--mp-size:42px;display:block!important}
.top-profile .mp-photo-stack>.avatar{border-radius:inherit!important;box-shadow:none}
.member-avatar-trigger .mp-photo-stack{overflow:visible}
.mp-preview-text{padding-bottom:0!important}
/* Explicit modal size wins over generic .large preview sizing. */
.member-profile-content>.mp-photo-stack:has(>.avatar.large){--mp-size:84px}
/* Shape customization also works before a purchased frame is equipped. */
.avatar.mp-user-shape-circle{border-radius:50%!important}
.avatar.mp-user-shape-rounded{border-radius:21%!important}
.avatar.mp-user-shape-square{border-radius:0!important}
.member-avatar-trigger>.mp-photo-stack{pointer-events:none}


/* v2.6: Discord-style split between avatar frames and full-card effects. */
.mp-profile-effect-stage{position:absolute!important;inset:0!important;display:block;overflow:hidden;contain:paint;isolation:isolate;pointer-events:none!important;z-index:1;border-radius:inherit}
.mp-profile-effect-stage>.mp-overlay{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important;pointer-events:none!important;border-radius:0!important;mask-image:none!important;-webkit-mask-image:none!important;overflow:hidden!important}
.mp-profile-effect-stage .mp-overlay iframe{position:absolute!important;inset:0!important;display:block;width:100%!important;height:100%!important;border:0!important;background:transparent!important;pointer-events:none!important;overflow:hidden!important;color-scheme:dark!important}
.member-profile-card{isolation:isolate;background:#0b2119!important;color-scheme:dark!important}
.member-profile-card>.member-profile-cover{position:relative;z-index:0}
.member-profile-card>.member-profile-content{position:relative;z-index:2;isolation:isolate}
.member-profile-card>.member-profile-close{z-index:5}
.member-profile-card>.mp-profile-effect-stage{z-index:1}
.mp-live-profile{isolation:isolate;color-scheme:dark!important}
.mp-live-profile>.mp-profile-effect-stage{z-index:1}
.mp-live-profile>.mp-preview-cover{z-index:0}
.mp-live-profile>.mp-preview-body,.mp-live-profile>.tiny{position:relative;z-index:2}
.mp-account-profile-card{position:relative;overflow:hidden;isolation:isolate;color-scheme:dark!important}
.mp-account-profile-card>.mp-profile-effect-stage{z-index:1}
.mp-account-profile-content{position:relative;z-index:2;min-width:0}
/* Card overlays may be vibrant, but controls remain fully clickable. */
.mp-account-profile-card form,.member-profile-content button,.mp-preview-body{pointer-events:auto}
/* Never create an opaque white square while the iframe initializes. */
.mp-overlay iframe{background-color:transparent!important;color-scheme:dark!important}
/* Fixed-size, frame-independent navbar avatar: no collapsed flex/grid line. */
.topbar .top-right>.top-profile{box-sizing:border-box!important;display:flex!important;align-items:stretch!important;justify-content:stretch!important;aspect-ratio:1!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;flex:0 0 44px!important;flex-shrink:0!important;padding:0!important;overflow:hidden!important;line-height:1!important}
.topbar .top-profile .top-avatar-pfp{box-sizing:border-box!important;position:relative!important;display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;overflow:hidden!important;border-radius:inherit!important;flex:1 1 100%!important;align-self:stretch!important;contain:layout paint}
.topbar .top-profile .top-avatar-pfp>.avatar-photo{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;display:block!important;object-fit:cover!important;border-radius:inherit!important;z-index:2!important}
.topbar .top-profile .top-avatar-pfp>.top-avatar-fallback{position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;font-size:12px!important;font-weight:800!important;line-height:1!important;z-index:0!important;color:#10251a}
.topbar .top-profile .top-avatar-pfp>.avatar-photo[hidden]{display:none!important}
.topbar .top-profile>.mp-photo-stack{--mp-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;display:block!important;align-self:center}
.topbar .top-profile .mp-photo-stack>.avatar{inset:0!important;width:100%!important;height:100%!important}
@media(max-width:560px){.topbar .top-right>.top-profile{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;flex-basis:42px!important}}

/* Keep the full-account effect in front of the cover, behind readable controls. */
.mp-account-profile-content{position:static;z-index:auto}
.mp-account-profile-card>.mp-profile-effect-stage{z-index:2}
.mp-account-profile-content>:not(.profile-cover){position:relative;z-index:3}


/* Stable overlay paint box: calibration moves the iframe's contents, not the
   wrapper. This clips large frames to the real avatar and protects adjacent
   Marketplace names. The frame always paints above the underlying photo. */
.mp-photo-stack{overflow:visible!important;background:transparent!important}
.mp-photo-stack>.avatar,.mp-photo-stack>.member-avatar-trigger{z-index:1!important}
.mp-photo-stack>.mp-overlay.mp-overlay-frame{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  z-index:5!important;overflow:hidden!important;transform:none!important;
  max-width:100%!important;max-height:100%!important;
  background:transparent!important;pointer-events:none!important;
  border-radius:var(--mp-radius,20px);
}
.mp-photo-stack>.mp-overlay.mp-overlay-frame>iframe{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  background:transparent!important;background-color:transparent!important;border:0!important;
  transform:translate(var(--mp-x,0%),var(--mp-y,0%)) scale(var(--mp-scale,1));
  transform-origin:center;pointer-events:none!important;
}
.mp-preview-body{isolation:isolate;min-width:0}
.mp-preview-body>.mp-photo-stack{width:68px!important;max-width:68px!important;min-width:68px!important;overflow:hidden!important;z-index:1}
.mp-preview-body>.mp-preview-text{position:relative;z-index:2;flex:1 1 0;min-width:0;overflow:hidden}
.mp-fixed-type{display:flex;align-items:center;min-height:42px;padding:9px 12px;border:1px solid rgba(134,218,165,.28);border-radius:12px;color:#d2f6dc;background:rgba(122,213,151,.08)}
/* Header icon needs one immutable square whether it has no photo, a loaded
   photo, a failed photo, or an additional frame wrapper inserted by JS. */
.topbar .top-right{min-width:0;flex-shrink:0}
.topbar .top-right>.top-profile{position:relative!important;flex-shrink:0!important;overflow:hidden!important;contain:layout paint;isolation:isolate;border-radius:16px!important}
.topbar .top-profile>.mp-photo-stack{
  --mp-size:42px!important;position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;overflow:hidden!important;
}
.topbar .top-profile .top-avatar-pfp{
  box-sizing:border-box!important;position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;display:block!important;
  overflow:hidden!important;flex:none!important;transform:none!important;
  border-radius:inherit!important;aspect-ratio:1!important;
}
.topbar .top-profile .top-avatar-pfp>.top-avatar-fallback{
  display:grid!important;place-items:center!important;width:100%!important;height:100%!important;
  color:#d9ffe3!important;background:linear-gradient(140deg,#315b44,#112a1e);
  font-weight:800!important;line-height:1!important;white-space:nowrap;
}
.topbar .top-profile .top-avatar-pfp>.avatar-photo{object-fit:cover!important;z-index:2!important}
.topbar .top-profile .top-avatar-pfp>.avatar-photo[hidden]{display:none!important}
.topbar .top-profile>.mp-photo-stack>.mp-overlay{border-radius:inherit!important}

/* Phase 2: one deterministic paint order for owner and other-member avatars.
   Never mask uploaded frame art out of the foreground. */
.mp-photo-stack{isolation:isolate!important}
.mp-photo-stack>.avatar,.mp-photo-stack>.member-avatar-trigger{
  position:absolute!important;inset:0!important;z-index:1!important;
}
.mp-photo-stack>.mp-demo-avatar{position:relative;z-index:1!important}
.mp-photo-stack>.mp-overlay.mp-overlay-frame{
  position:absolute!important;inset:0!important;z-index:30!important;
  width:100%!important;height:100%!important;
  -webkit-mask-image:none!important;mask-image:none!important;
  background:transparent!important;pointer-events:none!important;
}
.mp-photo-stack>.mp-overlay.mp-overlay-frame>iframe{position:absolute!important;inset:0!important;z-index:1!important;pointer-events:none!important;background:transparent!important}
/* An equipped frame is the outermost edge of a profile picture. The default
   green avatar edge must not box the artwork in: framed pictures use the same
   dark edge as the Account profile picture and keep only the dark separation
   ring (the navbar avatar keeps its own photo-only styling). */
:not(.topbar) .mp-photo-stack:has(> .mp-overlay-frame) .avatar{
  border-color:#163124!important;
  box-shadow:0 0 0 2px rgba(6,18,13,.9)!important;
}
:not(.topbar) .mp-photo-stack:has(> .mp-overlay-frame) .member-avatar-trigger{
  box-shadow:none!important;
}
/* Navbar: the picture follows the rounded shape of its button, and its own
   pale green edge is replaced by the dark edge used everywhere else. */
.topbar .top-profile>.mp-photo-stack{border-radius:inherit!important}
.topbar .top-profile>.mp-photo-stack>.avatar{
  border-radius:inherit!important;
  border-color:#163124!important;
  box-shadow:none!important;
}
/* A small red visual control with a generous invisible tap target. Its position
   belongs to the fixed dialog shell, not the scrolling profile content. */
.member-profile-card{position:relative;overflow:visible!important;isolation:isolate;display:block}
.member-profile-card>.member-profile-scroll{
  position:relative;z-index:2;overflow-y:auto;overflow-x:hidden;
  max-height:min(92dvh,780px);min-height:0;border-radius:inherit;
  overscroll-behavior:contain;scrollbar-gutter:stable;
}
.member-profile-card>.member-profile-close{
  position:absolute!important;z-index:100!important;top:12px!important;right:12px!important;
  display:grid!important;place-items:center!important;box-sizing:border-box!important;
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  padding:8px!important;border:1px solid rgba(255,117,117,.7)!important;border-radius:11px!important;
  color:#ff7777!important;background:rgba(60,13,19,.94)!important;
  box-shadow:0 3px 16px #0009!important;backdrop-filter:blur(10px);
}
.member-profile-close::before{content:"";position:absolute;inset:-4px}
.member-profile-close .icon{width:17px!important;height:17px!important;stroke:currentColor!important}
.member-profile-close:hover{color:#fff1f1!important;background:#ac293a!important}
.member-profile-close:focus-visible{outline:3px solid #ff9ca4!important;outline-offset:3px}
.member-profile-card>.mp-profile-effect-stage{z-index:1}
/* The account header fallback is precisely centered, even when a frame is
   injected later or the account has no profile picture. */
.topbar .top-right>.top-profile{display:grid!important;place-items:center!important}
.topbar .top-profile .top-avatar-pfp{
  position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;
  width:100%!important;height:100%!important;margin:0!important;padding:0!important;
}
.topbar .top-profile .top-avatar-pfp>.top-avatar-fallback{
  position:absolute!important;inset:0!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;width:100%!important;height:100%!important;
  padding:0!important;margin:0!important;transform:none!important;
  font-size:14px!important;letter-spacing:0!important;line-height:1!important;text-align:center!important;
}
.topbar .top-profile>.mp-photo-stack{position:absolute!important;inset:0!important;margin:0!important}
.topbar .top-profile .mp-photo-stack>.top-avatar-pfp{transform:none!important}
@media(max-width:480px){.member-profile-card>.member-profile-scroll{max-height:90dvh}}

/* Phase 3: separate frame store, owned library, and dedicated coin wallet. */
.mp-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:5px;border:1px solid #7cb78f42;border-radius:16px;background:#12271caa}
.mp-tabs a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--text,#eaf8ed);font-size:13px;font-weight:730;padding:9px 15px;border-radius:11px;transition:background .18s,color .18s;min-height:39px}
.mp-tabs a:hover{background:#2c573d}.mp-tabs a.active,.mp-tabs a[aria-current="page"]{background:#346e4f;color:#fff;box-shadow:0 2px 14px #0002}
.mp-market-summary{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}
.mp-market-summary h2{display:flex;align-items:center;gap:8px;font-size:clamp(19px,2.3vw,28px)}
.mp-section-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.mp-section-top h2{margin-bottom:3px}.mp-result-count{border:1px solid #7cb78f55;border-radius:999px;padding:7px 13px;font-size:12px;color:#d6f4de;white-space:nowrap}
.mp-frame-filters{display:grid;grid-template-columns:minmax(180px,1.55fr) repeat(3,minmax(110px,1fr));gap:12px;padding:14px;margin-bottom:16px;align-items:end}
.mp-frame-filters:has(>label:nth-child(3):last-child){grid-template-columns:minmax(180px,1.55fr) repeat(2,minmax(110px,1fr))}
.mp-frame-filters label{display:grid;gap:6px;min-width:0;font-size:12px}.mp-frame-filters .input{width:100%;min-width:0}
.mp-card[hidden]{display:none!important}.mp-card .mp-card-info>.spread:last-child{align-items:center}
.mp-coin-summary h2{font-size:clamp(24px,3vw,35px)}
.mp-coin-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.mp-coin-panel{display:grid;gap:12px;min-width:0}.mp-coin-panel form{display:grid;gap:12px;grid-template-columns:1fr;min-width:0}.mp-coin-panel .mp-topup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:none}
.mp-coin-panel .mp-topup button,.mp-coin-panel .mp-topup [data-market-upi-reference]{grid-column:1/-1}
.mp-coin-panel .mp-topup label{min-width:0}.mp-coin-panel input,.mp-coin-panel select{width:100%}
.mp-pending-status{margin:0;color:#f8d28a}.mp-history{display:grid;gap:8px}.mp-history-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 0;border-bottom:1px solid #71998030}.mp-history-row:last-child{border-bottom:0}
.mp-account-frame-links{display:flex;flex-wrap:wrap;gap:9px}
@media(max-width:1000px){.mp-frame-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.mp-coin-tools{grid-template-columns:minmax(0,1fr)}.mp-frame-filters,.mp-frame-filters:has(>label:nth-child(3):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}.mp-frame-filters label:first-child{grid-column:1/-1}.mp-tabs a{flex:1 1 auto;padding:9px 10px}.mp-coin-panel .mp-topup{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:350px){.mp-frame-filters,.mp-frame-filters:has(>label:nth-child(3):last-child){grid-template-columns:1fr}.mp-coin-panel .mp-topup{grid-template-columns:1fr}.mp-coin-panel .mp-topup button,.mp-coin-panel .mp-topup [data-market-upi-reference]{grid-column:auto}}
@media(prefers-reduced-motion:reduce){.mp-tabs a{transition:none}}

/* ============================================================================
   Marketplace store refresh: comparable frame previews, tag browsing chips
   and clearer catalog cards. The existing layout is preserved; only the
   preview emphasis, the collection chips and the card details are new.
   ============================================================================ */
.mp-section-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mp-preview-toggle{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid #7cb78f42;border-radius:999px;background:#12271caa}
.mp-preview-toggle .mp-toggle-btn{appearance:none;border:0;background:transparent;color:#cde9d8;font:inherit;font-size:12px;font-weight:720;padding:7px 13px;border-radius:999px;cursor:pointer;min-height:32px;transition:background .16s,color .16s}
.mp-preview-toggle .mp-toggle-btn:hover{background:#2c573d;color:#fff}
.mp-preview-toggle .mp-toggle-btn.is-active{background:#346e4f;color:#fff;box-shadow:0 2px 10px #0003}
.mp-preview-toggle .mp-toggle-btn:focus-visible{outline:3px solid #9fe0b4;outline-offset:2px}

/* Focused frame stage: the frame itself is the hero, so several frames can
   actually be compared. The complete profile card stays available on demand. */
.mp-frame-stage{display:grid;place-items:center;gap:9px;padding:16px 12px 12px;border-radius:14px;border:1px solid #50765955;background:radial-gradient(circle at 50% 18%,#20412f,#0d1f18 72%);min-height:150px}
.mp-frame-art{display:block;--mp-size:124px}
.mp-card-preview .mp-frame-art .mp-photo-stack{--mp-size:124px!important;width:124px!important;height:124px!important}
.mp-card-preview .mp-frame-art .mp-demo-avatar{width:100%!important;height:100%!important;font-size:34px}
.mp-frame-caption{font-size:11px;letter-spacing:.02em;opacity:.85;text-align:center}
.mp-profile-preview{margin-top:10px}
.mp-frames-page[data-mp-preview="focus"] .mp-profile-preview{display:none}
.mp-frames-page[data-mp-preview="profile"] .mp-frame-stage{display:none}
.mp-frames-page[data-mp-preview="profile"] .mp-profile-preview{margin-top:0}
.mp-card-preview{position:relative}

/* Tag and collection chips */
.mp-tag-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 16px;padding:2px}
.mp-tag-chip{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:999px;border:1px solid #7cb78f42;background:#12271caa;color:#d6f4de;font:inherit;font-size:12px;font-weight:700;cursor:pointer;min-height:36px;transition:background .16s,border-color .16s,color .16s}
.mp-tag-chip:hover{background:#2c573d;color:#fff}
.mp-tag-chip.is-active{background:#346e4f;border-color:#7ecfa0;color:#fff}
.mp-tag-chip:focus-visible{outline:3px solid #9fe0b4;outline-offset:2px}
.mp-tag-count{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:#0c1f16aa;color:#bfe9cd;font-size:11px;font-weight:750}
.mp-tag-chip.is-active .mp-tag-count{background:#0d2b1e;color:#e8fff1}
.mp-card .mp-tag-list{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.mp-tag-pill{appearance:none;border:1px solid #7cb78f38;background:#0f241b;color:#bfe0cb;font:inherit;font-size:11px;font-weight:650;padding:4px 9px;border-radius:999px;cursor:pointer;min-height:26px}
.mp-tag-pill:hover{background:#2c573d;color:#fff}
.mp-tag-pill:focus-visible{outline:3px solid #9fe0b4;outline-offset:2px}
.mp-tag-more{font-size:11px;color:var(--muted,#9dc4ac)}

/* Card details */
.mp-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.mp-meta-category{font-size:12px;color:var(--muted,#9dc4ac);text-transform:capitalize}
.mp-badges{display:flex;flex-wrap:wrap;gap:5px}
.mp-badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:750;letter-spacing:.02em;border:1px solid #7cb78f45;background:#16301f;color:#cdeeda;white-space:nowrap}
.mp-badge-popular{border-color:#ffd47966;background:#3b2c07;color:#ffdf9c}
.mp-badge-limited{border-color:#e6a6ff66;background:#2f1440;color:#f0c8ff}
.mp-badge-new{border-color:#7fd4ff66;background:#0d2b3a;color:#c4ecff}
.mp-badge-free{border-color:#9df0a866;background:#123324;color:#c9f7d5}
.mp-badge-premium{border-color:#ffd47966;background:#3b2c07;color:#ffdf9c}
.mp-badge-staff-pick{border-color:#ffb4b466;background:#3a1414;color:#ffd0d0}
.mp-badge-owned{border-color:#8fe0a266;background:#10301d;color:#bdf3cf}
.mp-badge-equipped{border-color:#8fb8ff66;background:#11243f;color:#cfe0ff}
.mp-card:hover{border-color:#7ecfa088;box-shadow:0 10px 26px #0004;transform:translateY(-1px)}
.mp-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.mp-card:focus-within{border-color:#9fe0b4}

/* Variant switcher for all-in-one bundles */
.mp-variant-switch{display:grid;gap:7px;margin-top:11px}
.mp-variant-label{font-size:11px;letter-spacing:.03em;text-transform:uppercase}
.mp-variant-list{display:flex;flex-wrap:wrap;gap:6px}
.mp-variant-btn{appearance:none;border:1px solid #7cb78f42;background:#12271caa;color:#d6f4de;font:inherit;font-size:12px;font-weight:700;padding:7px 11px;border-radius:10px;cursor:pointer;min-height:32px}
.mp-variant-btn:hover{background:#2c573d;color:#fff}
.mp-variant-btn.is-active{background:#346e4f;border-color:#8fe0a4;color:#fff}
.mp-variant-btn:focus-visible{outline:3px solid #9fe0b4;outline-offset:2px}

/* Filters */
.mp-clear-filters{align-self:center}
.mp-clear-filters[hidden]{display:none!important}
.mp-empty-catalog{grid-column:1/-1;text-align:center;padding:26px 18px}
.mp-filter-empty{text-align:center}

/* Admin editor: curated collections */
.mp-collections{border:1px solid #627d6a66;border-radius:12px;padding:12px;display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}
.mp-collections legend{padding:0 8px;font-weight:750}
.mp-collections>p{margin:0;flex:1 1 100%}
.mp-collections .mp-collection-check{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:650;min-height:32px;cursor:pointer}
.mp-collections .mp-collection-check input{accent-color:#5fbf85;width:16px;height:16px}
.mp-variant-input{font-family:ui-monospace,monospace;font-size:12px;line-height:1.5;resize:vertical;width:100%;min-width:0}

@media(max-width:760px){.mp-section-tools{width:100%;justify-content:space-between}.mp-card-preview .mp-frame-art .mp-photo-stack{--mp-size:104px!important;width:104px!important;height:104px!important}}
@media(max-width:560px){.mp-tag-bar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:6px;-webkit-overflow-scrolling:touch}.mp-tag-chip{flex:none}}
@media(prefers-reduced-motion:reduce){.mp-card,.mp-tag-chip,.mp-toggle-btn,.mp-variant-btn{transition:none}.mp-card:hover{transform:none}}

/* Navbar avatar: allow equipped frame artwork to sit above the photo,
   without changing the photo crop or the existing button dimensions. */
.topbar .top-right > .top-profile {
  overflow:visible!important;
  contain:layout!important;
}
.topbar .top-profile > .mp-photo-stack {overflow:visible!important}
.topbar .top-profile > .mp-photo-stack > .mp-overlay-frame {
  overflow:visible!important;
  border-radius:0!important;
}
.topbar .top-profile .mp-photo-stack:has(> .mp-overlay-frame) > .top-avatar-pfp {
  transform:scale(.82)!important;
  transform-origin:center!important;
}
/* The width of plan badges must not collapse the mobile page title.
   Plan information remains available in the Account and Pricing screens. */
@media (max-width:560px) {
  .topbar .top-right > .upgrade,
  .topbar .top-right > .tag {display:none!important}
  .topbar {grid-template-columns:44px minmax(0,1fr) auto!important}
  .topbar .heading {min-width:0!important;word-break:normal!important;white-space:nowrap!important}
}
