/* Crafter profile: promo code and referral glass, adaptive to mobile and desktop. */
.crafter-referral-glass{position:relative;margin:20px 0;padding:22px;border:1px solid #d0ddec2d;border-radius:27px;background:radial-gradient(ellipse at 96% 0,#738eb12f,transparent 48%),linear-gradient(140deg,#ffffff12,#ffffff04 65%),#1a1e24;box-shadow:inset 0 1px #fff2,0 14px 42px #0004;backdrop-filter:blur(19px);-webkit-backdrop-filter:blur(19px)}
.crafter-referral-heading>span{font-size:10px;font-weight:850;letter-spacing:.16em;color:#a9bcd0}
.crafter-referral-heading h2{font-size:20px;margin:10px 0 7px;color:#f7f8fc}
.crafter-referral-heading p{font-size:12px;margin:0 0 19px;color:#9da9b6}
.crafter-referral-tiers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.crafter-referral-tier{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;padding:11px 2px;border:1px solid #ffffff20;border-radius:13px;background:#ffffff08}
.crafter-referral-tier small{font-size:10px;color:#8994a3;white-space:nowrap}
.crafter-referral-tier strong{font-size:16px;color:#e3e7eb}
.crafter-referral-tier.is-current{border-color:#9dceff9c;background:linear-gradient(135deg,#518bd03d,#617da536);box-shadow:inset 0 1px #ffffff32}
.crafter-referral-tier.is-current strong{color:#b6ddff}
.crafter-referral-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0}
.crafter-referral-stats>div{border:1px solid #ffffff16;border-radius:15px;padding:12px 9px;background:#12171f88}
.crafter-referral-stats small{font-size:11px;color:#929ba8}
.crafter-referral-stats strong{display:block;margin-top:7px;font-size:17px}
.crafter-referral-link{display:flex;align-items:center;gap:9px;border:1px solid #ffffff26;background:#0e141bc4;padding:7px 7px 7px 11px;border-radius:17px;min-width:0}
.crafter-referral-link>span{display:block;flex:1;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#bfcde0;font-size:12px}
.crafter-referral-link>button{flex:none;border-radius:12px;background:#334254;color:#f0f3f7;padding:10px 13px;font-size:12px;font-weight:750}
.crafter-referral-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}
.crafter-referral-actions button{min-height:47px;border-radius:16px;font-size:12px;font-weight:800;border:1px solid #ffffff23;background:#27323c}
.crafter-referral-actions button:first-child{background:linear-gradient(135deg,#2d8be9,#496eb7)}
.crafter-referral-earnings{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid #ffffff1d;padding-top:15px;font-size:12px;color:#949fac}
.crafter-referral-earnings strong{font-size:16px;color:#f1f5f8}
.crafter-referral-note{color:#7e8998;font-size:11px;line-height:1.5;margin:12px 0 0}
.profile-identity .crafter-profile-promo{flex:0 0 39px;width:39px;height:39px;display:grid;place-items:center;border-radius:12px;border:1px solid #ffffff30;background:#ffffff0e;color:#dfeafa;box-shadow:inset 0 1px #fff2}
.profile-identity .crafter-profile-promo svg{height:22px;width:22px}
.crafter-profile-desktop-promo{display:none}
.crafter-promo-modal{padding:20px 0 12px}
.crafter-promo-symbol{display:grid;place-items:center;width:65px;height:65px;margin:0 auto 22px;border:1px solid #8bafcc73;border-radius:19px;background:linear-gradient(140deg,#436f9a,#30384a);box-shadow:0 7px 35px #2b8aca37}
.crafter-promo-symbol svg{width:32px;height:32px}
.crafter-promo-form{display:flex;align-items:stretch;gap:7px;width:100%}
.crafter-promo-form input{min-width:0;flex:1;border-radius:15px;border:1px solid #4a515c;background:#13181f;color:#eef4fa;font-size:14px;font-weight:700;padding:0 13px;min-height:47px;outline:none}
.crafter-promo-form button{width:47px;flex:0 0 47px;display:grid;place-items:center;border-radius:13px;background:#188cff;border:1px solid #6cb7ff7a}
.crafter-promo-form.is-error input{border-color:#ff6373!important;box-shadow:0 0 0 1px #ff637355}
.crafter-promo-form.is-success input{border-color:#4dce86!important;box-shadow:0 0 0 1px #47ce8955}
.crafter-promo-feedback{font-size:12px;line-height:1.5;min-height:22px;margin:7px 4px 0;color:#969ea8}
.crafter-promo-form.is-success+.crafter-promo-feedback{color:#54d98b}
.crafter-promo-form.is-error+.crafter-promo-feedback{color:#ff6e7b}
.promo-result{margin-top:12px;padding:12px;border:1px solid #ffffff24;border-radius:14px;background:#151b21;font-size:12px}
.promo-result button{margin-left:8px;padding:7px 12px}
.promo-result[hidden]{display:none}
@media(max-width:420px){.crafter-referral-glass{padding:16px}.crafter-referral-link>button{padding:10px 8px}.crafter-referral-tiers{gap:4px}.crafter-referral-tier strong{font-size:14px}.crafter-referral-tier small{font-size:9px}.crafter-referral-actions button{font-size:11px}}
@media(min-width:1024px){
  .profile-identity .crafter-profile-promo{display:none}
  .crafter-profile-desktop-promo{display:block;margin-top:18px;padding:16px 18px;border-radius:19px;border:1px solid #ffffff22;background:#111721a3}
  .crafter-profile-desktop-promo>span{display:block;margin-bottom:10px;font-size:11px;font-weight:800;letter-spacing:.12em;color:#a7b6c9}
  .crafter-profile-desktop-promo .crafter-promo-form{max-width:450px}
}

/* Promo form is a single inline control, not a separate full-width panel. */
@media(min-width:1024px){
  .portal-profile .profile-identity{display:flex;align-items:center;gap:12px;flex-wrap:nowrap}
  .portal-profile .crafter-profile-desktop-promo{display:flex!important;align-items:center;flex:0 1 392px;min-width:225px;margin:0 0 0 auto!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
  .portal-profile .crafter-profile-desktop-promo>span{display:none!important}
  .portal-profile .crafter-profile-desktop-promo .crafter-promo-form{width:100%;max-width:none;margin:0}
  .portal-profile .crafter-profile-desktop-promo .crafter-promo-form input{height:43px;min-height:43px;background:#141820;border:1px solid #414a56}
  .portal-profile .crafter-profile-desktop-promo .crafter-promo-form button{width:43px;flex-basis:43px;min-height:43px}
  .portal-profile .crafter-profile-desktop-promo .crafter-promo-feedback{position:absolute;margin:64px 0 0;color:#6dcaa0}
}
.crafter-promo-modal{padding:5px 0 8px}
.crafter-profile-promo:focus-visible{outline:2px solid #82c2ff;outline-offset:3px}

/* Compact, expandable referral summary; the user controls the detail view. */
.crafter-referral-glass{margin:12px 0!important;padding:0!important;border-radius:19px!important;overflow:hidden}
.crafter-referral-glass:not([open]){background:linear-gradient(120deg,#2837468a,#181d24)!important}
.crafter-referral-summary{list-style:none;display:flex;align-items:center;gap:13px;padding:14px 17px;cursor:pointer;min-height:67px}
.crafter-referral-summary::-webkit-details-marker{display:none}
.crafter-referral-summary-title{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.crafter-referral-summary-title small{font-size:9px;letter-spacing:.14em;color:#9cb4cd;font-weight:800}
.crafter-referral-summary-title strong{font-size:14px;color:#f5f7fa;white-space:nowrap}
.crafter-referral-summary-metrics{display:flex;flex-direction:column;align-items:flex-end;gap:4px;white-space:nowrap}
.crafter-referral-summary-metrics span{font-size:11px;color:#b7cde6}
.crafter-referral-summary-metrics strong{font-size:14px;color:#f1f5fa}
.crafter-referral-chevron{font-size:21px;line-height:1;color:#9fb1c3;transition:transform .17s}
.crafter-referral-glass[open] .crafter-referral-chevron{transform:rotate(180deg)}
.crafter-referral-content{padding:2px 17px 17px;border-top:1px solid #ffffff1b}
.crafter-referral-description{font-size:12px;line-height:1.5;margin:11px 0;color:#a6b1be}
.crafter-referral-content .crafter-referral-tiers{gap:5px}
.crafter-referral-content .crafter-referral-tier{padding:8px 2px}
.crafter-referral-content .crafter-referral-stats{margin:11px 0}
.crafter-referral-content .crafter-referral-stats>div{padding:10px}
.crafter-referral-content .crafter-referral-actions{margin:10px 0 0}
.crafter-referral-content .crafter-referral-actions button{min-height:42px}
@media(max-width:410px){.crafter-referral-summary{padding:12px 11px;gap:7px}.crafter-referral-summary-title strong{font-size:12px}.crafter-referral-summary-metrics strong{font-size:12px}.crafter-referral-content{padding:2px 12px 14px}}

/* ===== Referral card v2 ===== */
.rf-card{margin:14px 0;padding:20px;border-radius:26px;border:1px solid #ffffff1c;color:#f2f5fa;
  background:radial-gradient(120% 90% at 100% 0,#1689ff2e,transparent 55%),linear-gradient(150deg,#ffffff10,#ffffff03 60%),#1b1f27;
  box-shadow:0 14px 40px #0006,inset 0 1px 0 #ffffff26}
.rf-top{display:flex;align-items:center;justify-content:space-between;gap:14px}
.rf-title{min-width:0}.rf-title small{font-size:10px;letter-spacing:.16em;font-weight:800;color:#8fb6e0}
.rf-title h2{margin:7px 0 5px;font-size:21px;letter-spacing:-.4px}.rf-title p{margin:0;font-size:12px;line-height:1.45;color:#98a6b8}
.rf-badge{flex:none;width:68px;height:68px;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(#1689ff calc(var(--rf-pct)*1%),#ffffff1a 0);padding:4px}
.rf-badge span{width:100%;height:100%;border-radius:50%;background:#171b22;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rf-badge b{font-size:22px;line-height:1}.rf-badge small{font-size:9px;color:#8f9db0;margin-top:2px}
.rf-balance{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 14px;padding:14px 14px 14px 16px;
  border-radius:20px;background:#0d1219a8;border:1px solid #ffffff16}
.rf-balance small{display:block;font-size:11px;color:#8e9bae;margin-bottom:5px}
.rf-balance strong{font-size:24px;letter-spacing:-.5px}
.rf-balance button{flex:none;height:42px;padding:0 18px;border-radius:15px;font-weight:800;font-size:13px;color:#fff;
  background:linear-gradient(180deg,#4aa6ff,#1b7cf0);box-shadow:inset 0 1px 0 #ffffff55,0 6px 16px #1689ff4d}
.rf-progress-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#98a6b8;margin-bottom:8px}
.rf-progress-head b{color:#cfe6ff}
.rf-bar{height:8px;border-radius:8px;background:#ffffff14;overflow:hidden}
.rf-bar i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#1689ff,#7cc4ff);box-shadow:0 0 14px #1689ff99;transition:width .8s cubic-bezier(.2,.8,.2,1)}
.rf-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:14px 0}
.rf-step{display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 2px;border-radius:14px;background:#ffffff09;border:1px solid #ffffff14}
.rf-step b{font-size:15px;color:#cdd6e2}.rf-step small{font-size:9px;color:#7f8b9c}
.rf-step.is-done{background:#1689ff1c;border-color:#1689ff44}.rf-step.is-done b{color:#8cc8ff}
.rf-step.is-current{background:linear-gradient(160deg,#1689ff55,#1689ff22);border-color:#7cc4ffaa;box-shadow:0 0 18px #1689ff55,inset 0 1px 0 #ffffff44}
.rf-step.is-current b{color:#fff}
.rf-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}
.rf-stats>div{padding:12px 10px;border-radius:16px;background:#ffffff08;border:1px solid #ffffff12;min-width:0}
.rf-stats small{display:block;font-size:11px;color:#8e9bae}.rf-stats strong{display:block;margin-top:6px;font-size:18px}
.rf-link{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 14px;border-radius:17px;background:#0d1219c4;border:1px solid #ffffff1c;min-width:0}
.rf-link span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#b4c4d9}
.rf-link button{flex:none;height:38px;padding:0 14px;border-radius:12px;background:#ffffff14;border:1px solid #ffffff22;font-size:12px;font-weight:750;color:#eaf1fb}
.rf-invite{width:100%;height:50px;margin-top:10px;border-radius:18px;font-size:14px;font-weight:800;color:#fff;
  background:linear-gradient(180deg,#4aa6ff,#1b7cf0);box-shadow:inset 0 1px 0 #ffffff55,0 8px 22px #1689ff4d}
.rf-note{margin:12px 2px 0;font-size:11px;line-height:1.5;color:#778396}
@media(max-width:380px){.rf-card{padding:16px}.rf-balance strong{font-size:20px}.rf-title h2{font-size:18px}}
