/* MATE — invitations & récompenses cosmétiques */
.mate-referral-dialog{width:min(640px,calc(100vw - 28px));max-width:none;max-height:82dvh;padding:20px;border:1px solid rgba(133,202,255,.32);border-radius:20px;background:linear-gradient(180deg,rgba(12,28,47,.98),rgba(8,20,35,.98));box-shadow:0 22px 64px #000a;color:#eef7ff;overflow:auto;animation:mateReferralIn .25s cubic-bezier(.2,.8,.2,1)}
.mate-referral-dialog::backdrop{background:#020713c9;backdrop-filter:blur(7px);animation:mateReferralBackdrop .2s ease}
@keyframes mateReferralIn{from{opacity:0;transform:translateY(8px) scale(.982)}to{opacity:1;transform:none}}
@keyframes mateReferralBackdrop{from{opacity:0}to{opacity:1}}
.mate-referral-close{position:absolute;right:12px;top:10px;width:34px;height:34px;padding:0;display:grid;place-items:center;border:1px solid #ffffff28;border-radius:50%;background:#ffffff08;color:#dbeeff;font-size:22px;line-height:1}
.mate-referral-close:hover{background:#ffffff13}
.mate-referral-head{text-align:center;padding:3px 32px 0}.mate-referral-head h2{margin:4px 0 6px;font-size:27px}.mate-referral-head p{max-width:520px;margin:0 auto;color:#b9cada;font-size:12px;line-height:1.5}
.mate-referral-more{margin:11px auto 0;padding:7px 12px;border:1px solid rgba(119,201,255,.32);border-radius:999px;background:rgba(73,153,214,.1);color:#dff2ff;font-size:11px}.mate-referral-more span{display:inline-block;margin-left:3px}
.mate-referral-progress{display:grid;grid-template-columns:auto 1fr;gap:2px 9px;align-items:end;margin:14px 0 0;padding:10px 12px;border:1px solid rgba(133,202,255,.14);border-radius:12px;background:#ffffff05}.mate-referral-progress b{font-size:17px;color:#c9f8ff}.mate-referral-progress span{font-size:11px;color:#9fb4c7}.mate-referral-progress i{grid-column:1/-1;height:4px;border-radius:999px;background:#ffffff0f;overflow:hidden}.mate-referral-progress em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#64d9f3,#9e8bff)}
.mate-referral-details{margin-top:10px;overflow:hidden;opacity:0;transform:translateY(-4px);transition:opacity .17s ease,transform .17s ease}.mate-referral-details.is-open{opacity:1;transform:none}
.mate-referral-roadmap{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.mate-referral-roadmap span{display:grid;gap:2px;padding:7px 4px;border:1px solid rgba(133,202,255,.12);border-radius:10px;background:#ffffff03;text-align:center}.mate-referral-roadmap span.done{border-color:rgba(102,219,188,.3);background:rgba(63,177,147,.08)}.mate-referral-roadmap b{font-size:13px}.mate-referral-roadmap small{font-size:8px;line-height:1.2;color:#96aabd}
.mate-referral-cosmetics{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:8px}.mate-referral-cosmetic{position:relative;display:grid;justify-items:center;gap:4px;padding:8px 4px;border:1px solid rgba(133,202,255,.12);border-radius:11px;background:#ffffff03;text-align:center}.mate-referral-cosmetic small{font-size:8px;line-height:1.15;color:#a9bac9}.mate-referral-cosmetic>b{position:absolute;right:5px;top:4px;font-size:9px;color:#9db2c5}.mate-referral-cosmetic.locked{opacity:.72}.mate-referral-cosmetic.unlocked{border-color:rgba(104,213,184,.25)}
.mate-referral-rule{margin:8px 0 0;padding:9px 11px;border:1px solid rgba(133,202,255,.12);border-radius:10px;background:rgba(90,151,206,.06);color:#aebfd0;font-size:10px;line-height:1.45}.mate-referral-rule b,.mate-referral-rule strong{color:#e8f5ff}.mate-referral-rule span{color:#91a9bd}
.mate-referral-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:11px}.mate-referral-copy input{min-width:0;margin:0;background:#071421;border-color:#ffffff20;font-size:11px}.mate-referral-copy .primary{white-space:nowrap;padding:8px 12px}.mate-referral-status{min-height:16px;margin:5px 0 0;text-align:center;color:#9fd8ff;font-size:10px}.mate-referral-loading{text-align:center;padding:28px;color:#aebfd0}
.mate-founder-note{margin:8px 0 0;padding:7px 10px;border:1px solid rgba(168,156,255,.22);border-radius:10px;background:linear-gradient(90deg,rgba(72,165,211,.07),rgba(129,96,207,.09));color:#dcecff;font-size:10px;text-align:center}

/* Titres et visibilité publique */
.mate-referral-title{display:block;width:max-content;max-width:100%;margin:4px 0 0;padding:3px 8px;border:1px solid rgba(130,198,245,.22);border-radius:999px;background:rgba(75,145,202,.09);color:#cdeaff;font-size:10px;font-weight:700;letter-spacing:.02em}.mate-referral-title.is-founder{border-color:rgba(174,162,255,.48);background:linear-gradient(90deg,rgba(83,185,222,.12),rgba(136,105,220,.15));color:#eef7ff;box-shadow:0 0 12px rgba(126,113,226,.16)}
.card-info>.mate-referral-title{margin-bottom:6px}.match-person>.mate-referral-title,.chat-head .mate-referral-title{font-size:9px;margin-top:4px}
.mate-referral-discover-avatar{float:left;margin:0 9px 3px 0}.mate-referral-discover-avatar .avatar{width:42px;height:42px}
.mate-referral-detail-identity{display:flex;align-items:center;gap:9px;margin:8px 0 12px;padding:7px 10px;width:max-content;max-width:100%;border:1px solid rgba(133,202,255,.14);border-radius:12px;background:rgba(15,35,54,.58)}.mate-referral-detail-identity .avatar{width:42px;height:42px}.mate-referral-detail-identity b{font-size:12px;color:#dcefff}

/* Personnalisation profil : compacte */
.mate-referral-customize{overflow:visible}.mate-referral-profile-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 11px;border:1px solid rgba(133,202,255,.12);border-radius:12px;background:rgba(255,255,255,.02)}.mate-referral-profile-head b{font-size:12px}.mate-referral-profile-head small{display:block;margin-top:2px;font-size:10px;color:#91a8bb}
.mate-referral-title-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px}.mate-referral-title-row>b,.mate-effect-head>b{font-size:11px}.mate-referral-choice{display:flex;flex-wrap:wrap;gap:6px}.mate-referral-choice button{padding:6px 9px;border:1px solid rgba(133,202,255,.16);border-radius:999px;background:#ffffff05;color:#c7d7e6;font-size:10px}.mate-referral-choice button[aria-pressed=true]{border-color:rgba(116,216,245,.55);background:rgba(87,178,218,.13);color:#f0fbff}.mate-referral-choice button:disabled{opacity:.42;cursor:not-allowed}.mate-referral-choice button[data-referral-title="founder"]{border-color:rgba(174,162,255,.36);background:linear-gradient(90deg,rgba(75,177,217,.07),rgba(132,100,218,.11))}
.mate-effect-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.mate-effect-head small{font-size:9px;color:#8ea5b8}
.mate-effect-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.mate-effect-choice{min-width:0;padding:7px 4px;border:1px solid rgba(133,202,255,.12);border-radius:11px;background:#ffffff03;color:#c9d7e3;display:grid;justify-items:center;gap:3px;text-align:center}.mate-effect-choice .mate-referral-preview>.avatar{width:42px;height:42px}.mate-effect-choice>span{font-size:9px;line-height:1.15}.mate-effect-choice>small{font-size:8px;color:#8299ac}.mate-effect-choice.unlocked[aria-pressed=true]{border-color:rgba(102,219,188,.5);background:rgba(63,177,147,.09)}.mate-effect-choice.can-unlock{border-color:rgba(222,184,102,.34);background:rgba(222,184,102,.06)}.mate-effect-choice.locked{opacity:.42;cursor:not-allowed}
.mate-referral-live-preview{display:flex;align-items:center;gap:10px;padding:9px 11px;border:1px solid rgba(133,202,255,.13);border-radius:12px;background:linear-gradient(90deg,rgba(42,91,128,.10),rgba(86,67,142,.07))}.mate-referral-live-preview>span{font-size:9px;color:#8fa6ba;text-transform:uppercase;letter-spacing:.11em}.mate-referral-live-preview .avatar{width:48px;height:48px}.mate-referral-live-preview>b{font-size:11px}.mate-referral-live-preview .mate-unlock-effect{margin-left:auto;padding:7px 10px;font-size:9px}.mate-referral-save-status{min-height:16px;margin:0;color:#9fd8ff;font-size:10px}

@media(max-width:700px){.mate-referral-dialog{width:min(94vw,600px);padding:16px;max-height:86dvh}.mate-referral-head{padding:3px 22px 0}.mate-referral-head h2{font-size:24px}.mate-referral-roadmap{grid-template-columns:repeat(3,1fr)}.mate-referral-cosmetics{grid-template-columns:repeat(5,minmax(58px,1fr));overflow-x:auto;padding-bottom:3px}.mate-referral-copy{grid-template-columns:1fr}.mate-referral-title-row{grid-template-columns:1fr}.mate-effect-grid{grid-template-columns:repeat(3,1fr)}.mate-referral-profile-head{align-items:flex-start;flex-direction:column}.mate-referral-live-preview{flex-wrap:wrap}.mate-referral-live-preview .mate-unlock-effect{margin-left:0}}

.mate-referral-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.mate-referral-reset{font-size:10px!important;padding:6px 9px!important;color:#aebfce!important;border-color:rgba(151,203,238,.14)!important;background:rgba(255,255,255,.025)!important}.mate-referral-reset:hover{color:#edf7ff!important;border-color:rgba(151,203,238,.3)!important;background:rgba(255,255,255,.06)!important}



/* Original reward artwork. Sizes follow the avatar, never stretch the images. */
.mate-referral-avatar{--mate-face:42px;position:relative;display:inline-grid;place-items:center;isolation:isolate;vertical-align:middle;flex-shrink:0;box-sizing:content-box;padding:12px 18px;overflow:visible}
.mate-referral-avatar>.avatar{position:relative;z-index:2;width:var(--mate-face);height:var(--mate-face);flex-shrink:0;margin:0}
.mate-referral-preview{--mate-face:48px}
.mate-cosmetic-art{position:absolute;display:block;pointer-events:none;user-select:none;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3}
.mate-cosmetic-art>img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;border:0;border-radius:0;box-shadow:none;background:none;pointer-events:none}
.mate-cosmetic-runes{width:calc(var(--mate-face)*1.55);height:calc(var(--mate-face)*1.44);transform:translate(-50%,-67%)}
.mate-cosmetic-wings{width:calc(var(--mate-face)*1.95);height:calc(var(--mate-face)*1.95);z-index:1}
.mate-cosmetic-crest{width:calc(var(--mate-face)*1.52);height:calc(var(--mate-face)*1.52)}
.mate-cosmetic-wisps{width:calc(var(--mate-face)*1.65);height:calc(var(--mate-face)*1.65)}
.mate-cosmetic-companion{left:calc(50% + var(--mate-face)*.20);top:calc(50% - var(--mate-face)*.64);width:calc(var(--mate-face)*.72);height:calc(var(--mate-face)*.68);transform:none;animation:mateRewardHover 3.6s ease-in-out infinite;z-index:4}
@keyframes mateRewardHover{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-3px) rotate(2deg)}}
.mate-referral-discover-avatar .mate-referral-avatar,.mate-referral-detail-identity .mate-referral-avatar{--mate-face:42px}
.mate-referral-live-preview .mate-referral-avatar{--mate-face:48px;margin:8px 2px}
.mate-effect-choice .mate-referral-preview,.mate-referral-cosmetic .mate-referral-preview{--mate-face:44px;box-sizing:border-box;width:100%;height:94px;padding:0;margin:0}
.mate-effect-choice .mate-referral-preview>.avatar,.mate-referral-cosmetic .mate-referral-preview>.avatar{width:var(--mate-face);height:var(--mate-face)}
.mate-referral-cosmetics{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;overflow:visible}
.mate-referral-cosmetic{min-width:0;padding:4px 4px 12px;gap:5px}
.mate-referral-cosmetic small{font-size:11px;line-height:1.35}
.mate-referral-cosmetic.locked{opacity:1}
.mate-referral-cosmetic>b{top:8px;right:8px}
.mate-effect-grid{gap:8px}
.mate-effect-choice{padding:4px 5px 12px;gap:6px;transition:background .18s ease,border-color .18s ease}
.mate-effect-choice>span{font-size:11px;line-height:1.35}
.mate-effect-choice>small{font-size:10px}
.mate-effect-choice.locked{opacity:1;background:rgba(255,255,255,.015)}
.mate-effect-choice.locked>small{color:#a8b8c9}
.mate-effect-choice:not(:disabled):hover{background:rgba(129,201,245,.11);border-color:rgba(149,222,255,.45)}
.mate-effect-choice:focus-visible{outline:2px solid #9edcff;outline-offset:3px}
.mate-referral-dialog .mate-referral-details[hidden]{display:none!important}
@media(max-width:700px){.mate-referral-cosmetics{grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}.mate-effect-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:380px){.mate-effect-grid,.mate-referral-cosmetics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.mate-cosmetic-companion,.mate-referral-dialog,.mate-referral-dialog::backdrop{animation:none}}

/* Découvrir utilise exactement la même construction que l'aperçu du profil. */
.mate-referral-discover-avatar{float:left;margin:0 10px 4px 0;overflow:visible}
.mate-referral-discover-avatar .mate-referral-preview{--mate-face:48px;margin:0;padding:8px 14px;box-sizing:content-box}
.mate-referral-discover-avatar .mate-referral-preview>.avatar{width:var(--mate-face);height:var(--mate-face)}
