.ralr-loyalty-section,
.ralr-progress-card,
.ralr-banner {
    box-sizing: border-box;
}

.ralr-loyalty-section {
    width: min(980px, calc(100% - 32px));
    margin: 22px auto;
    padding: clamp(16px, 2vw, 22px);
    color: #f8fafc;
    background: linear-gradient(145deg, #172435, #0d1520);
    border: 1px solid rgba(47, 118, 255, .65);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.ralr-section-intro {
    max-width: 720px;
    margin: 0 auto 12px;
    text-align: center;
}

.ralr-section-intro h2,
.ralr-progress-card h2,
.ralr-tier h3,
.ralr-history h3 {
    color: inherit;
    margin-top: 0;
}

.ralr-section-intro h2 {
    margin-bottom: 7px;
    font-size: clamp(24px, 2.6vw, 30px);
}

.ralr-section-intro p,
.ralr-progress-card p,
.ralr-tier p,
.ralr-fine-print {
    color: #d7e0ec;
}

.ralr-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #70a5ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ralr-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 10px;
}

.ralr-tier {
    position: relative;
    min-height: 102px;
    padding: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(112, 165, 255, .34);
    border: 1px solid color-mix(in srgb, var(--ralr-rank-color) 58%, transparent);
    border-radius: 14px;
}

.ralr-tier::after {
    content: "";
    position: absolute;
    inset: auto -40px -55px auto;
    width: 120px;
    height: 120px;
    background: var(--ralr-rank-color);
    border-radius: 50%;
    filter: blur(48px);
    opacity: .34;
}

.ralr-rank-emblem-shell {
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
    line-height: 0;
}

.ralr-rank-emblem {
    position: relative;
    display: grid;
    width: 62px;
    height: 30px;
    place-items: center;
    color: #08111f;
    background: var(--ralr-rank-color);
    border: 1px solid color-mix(in srgb, var(--ralr-rank-color) 75%, #fff);
    border-radius: 8px;
    box-shadow: 0 5px 16px color-mix(in srgb, var(--ralr-rank-color) 25%, transparent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.ralr-rank-emblem.ralr-has-logo {
    background: var(--ralr-rank-color);
    border: 0;
    border-radius: 0;
    -webkit-mask: var(--ralr-rank-logo) center / contain no-repeat;
    mask: var(--ralr-rank-logo) center / contain no-repeat;
}

.ralr-rank-emblem.ralr-has-logo span {
    display: none;
}

.ralr-rank-emblem-large {
    width: 82px;
    height: 40px;
    margin: 0;
    font-size: 18px;
}

.ralr-rank-crown {
    position: absolute;
    z-index: 2;
    top: -7px;
    right: -8px;
    color: #ffd34e;
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(255, 211, 78, .52));
}

.ralr-rank-emblem-shell[data-rank="royal-king"] .ralr-rank-emblem {
    filter: drop-shadow(0 5px 10px rgba(255, 211, 78, .38));
}

.ralr-tier h3 {
    margin-bottom: 3px;
    font-size: 18px;
    line-height: 1.15;
}

.ralr-tier p {
    margin: 4px 0;
    font-size: 13px;
}

.ralr-tier-reward {
    font-size: 12px;
    line-height: 1.35;
}

.ralr-tier strong {
    display: block;
    color: #fff;
}

.ralr-tier-grid-compact {
    margin-top: 12px;
}

.ralr-progress-card {
    margin: 10px 0;
    padding: 13px 16px;
    color: #f8fafc;
    background: #152234;
    border: 1px solid #2f76ff;
    border: 1px solid color-mix(in srgb, var(--ralr-rank-color) 64%, #2f76ff);
    border-radius: 15px;
}

.ralr-progress-head,
.ralr-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ralr-progress {
    width: 100%;
    height: 9px;
    margin: 7px 0 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
}

.ralr-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ralr-rank-color), #2f76ff);
    border-radius: inherit;
}

.ralr-history {
    margin-top: 20px;
}

.ralr-history li {
    margin: 8px 0;
}

.ralr-fine-print {
    margin: 10px auto 0;
    max-width: 860px;
    font-size: 12px;
    opacity: .78;
    text-align: center;
}

.ralr-banner {
    position: fixed;
    z-index: 99997;
    right: 18px;
    left: 18px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 13px;
    max-width: 920px;
    margin: auto;
    padding: 14px 18px;
    color: #fff;
    background: rgba(12, 23, 37, .97);
    border: 1px solid #2f76ff;
    border-radius: 13px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .35);
}

.ralr-banner-bottom { bottom: 18px; }
.ralr-banner-top { top: 46px; }
.ralr-banner[hidden] { display: none !important; }
.ralr-banner p { margin: 0; color: inherit; }
.ralr-banner-star { color: #facc15; font-size: 20px; }
.ralr-banner a { color: #fff; background: #2f76ff; border-radius: 8px; padding: 8px 13px; text-decoration: none; white-space: nowrap; }
.ralr-banner button { width: 34px; height: 34px; padding: 0; color: #dbeafe; background: transparent; border: 0; font-size: 25px; line-height: 1; cursor: pointer; }

.ralr-rtl { direction: rtl; text-align: right; }

@media (max-width: 640px) {
    .ralr-loyalty-section { width: calc(100% - 20px); margin: 18px auto; padding: 15px 11px; }
    .ralr-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ralr-tier { min-height: 100px; padding: 11px 9px; }
    .ralr-tier h3 { font-size: 17px; }
    .ralr-progress-card { padding: 12px; }
    .ralr-rank-emblem-large { width: 72px; height: 36px; }
    .ralr-banner { right: 9px; left: 9px; grid-template-columns: auto 1fr auto; padding: 12px; }
    .ralr-banner a { grid-column: 2; width: max-content; }
    .ralr-banner button { grid-column: 3; grid-row: 1; }
}
