/* Retro Rewind Ranked Pass — Patch 2.9 client presentation. */
:root {
    --rewind-paper: #f2ead8;
    --rewind-paper-shadow: #d8ccb2;
    --rewind-ink: #11151a;
    --rewind-magenta: #d51f79;
    --rewind-cyan: #00a7b7;
    --rewind-yellow: #e4b829;
    --rewind-line: rgba(17, 21, 26, 0.3);
    --rewind-display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    --rewind-copy: 'Exo 2', sans-serif;
}

#ranked-pass-widget {
    border: 1px solid rgba(242, 234, 216, 0.9);
    border-radius: 0;
    clip-path: polygon(0 3px, 16% 0, 33% 4px, 58% 0, 79% 3px, 100% 1px, 99% 96%, 73% 100%, 46% 97%, 20% 100%, 0 97%);
    background-color: var(--rewind-ink);
    background-image: url('../Loading Screen/Retro Rewind Dasha.jpg');
    background-position: 66% 24%;
    background-size: cover;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72), inset 0 -5px 0 var(--rewind-magenta);
    isolation: isolate;
}

#ranked-pass-widget::before {
    content: none;
    display: none;
}

#ranked-pass-widget::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 7px;
    display: block;
    background: var(--rewind-cyan);
    clip-path: polygon(0 30%, 8% 0, 18% 54%, 33% 8%, 48% 60%, 64% 3%, 78% 48%, 91% 0, 100% 36%, 100% 100%, 0 100%);
}

#ranked-pass-widget:hover {
    border-color: #fff;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(213, 31, 121, 0.62), inset 0 -5px 0 var(--rewind-cyan);
}

#ranked-pass-widget .battle-pass-widget-inner { z-index: 2; align-items: flex-start; }

#ranked-pass-widget .rp-widget-kicker {
    display: inline-block;
    margin: 0 0 auto;
    padding: 4px 8px;
    background: var(--rewind-yellow);
    color: var(--rewind-ink);
    font: 800 0.64rem/1 var(--rewind-copy);
    letter-spacing: 0.11em;
    text-transform: uppercase;
    transform: rotate(-1deg);
}

#ranked-pass-widget .bp-bottom-title,
#ranked-pass-widget .bp-bottom-progress-info {
    color: #fff;
    font-family: var(--rewind-display);
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px #000;
}

#ranked-pass-widget .bp-bottom-title {
    justify-content: flex-start;
    font-size: 0.88rem;
    white-space: nowrap;
}
#ranked-pass-widget .bp-bottom-progress-section { width: 100%; }
#ranked-pass-widget .bp-bottom-progress-bar { border-radius: 0; background: rgba(255, 255, 255, 0.24); }
#ranked-pass-widget .bp-bottom-progress-fill { border-radius: 0; background: var(--rewind-cyan); box-shadow: 0 0 12px rgba(0, 167, 183, 0.9); }

#rp-modal.bp-modal {
    background: rgba(5, 7, 9, 0.9);
    backdrop-filter: blur(10px) saturate(0.7);
    -webkit-backdrop-filter: blur(10px) saturate(0.7);
}

#rp-modal.bp-modal.active { align-items: center; justify-content: center; }

#rp-modal .bp-modal-container {
    width: calc(100% - 34px);
    max-width: 1900px;
    height: 970px;
    max-height: calc(100% - 34px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 0;
    clip-path: polygon(0 5px, 12% 0, 27% 4px, 44% 0, 61% 5px, 79% 1px, 100% 4px, 99.8% 96%, 88% 100%, 68% 97%, 49% 100%, 27% 97%, 0 99%);
    background-color: var(--rewind-paper);
    color: var(--rewind-ink);
    box-shadow: 0 42px 110px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(17, 21, 26, 0.42);
    isolation: isolate;
}

#rp-modal .bp-modal-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.24;
    background-image: url('../Loading Screen/Retro Rewind Birdie.png');
    background-position: 105% 44%;
    background-size: 47% auto;
    background-repeat: no-repeat;
    filter: grayscale(1) contrast(1.2);
}

#rp-modal .bp-modal-header,
#rp-modal .bp-modal-progress-header,
#rp-modal .bp-modal-body,
#rp-modal .rp-modal-footer { position: relative; z-index: 2; }

#rp-modal .bp-modal-header {
    flex: 0 0 250px;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 18px;
    padding: 30px 44px 26px;
    border: 0;
    background-color: #e9dec5;
    background-image: url('../Loading Screen/Retro Rewind Dasha.jpg');
    background-position: 70% 27%;
    background-size: cover;
    overflow: hidden;
}

#rp-modal .bp-modal-header::before {
    content: '';
    position: absolute;
    inset: 0 30% 0 0;
    z-index: 0;
    background: rgba(242, 234, 216, 0.93);
    transform: skewX(-7deg) translateX(-4%);
}

#rp-modal .bp-modal-header::after {
    content: '';
    position: absolute;
    left: -1%;
    right: -1%;
    bottom: -3px;
    height: 20px;
    background: var(--rewind-ink);
    clip-path: polygon(0 30%, 9% 4%, 18% 42%, 30% 5%, 42% 38%, 55% 3%, 68% 44%, 81% 6%, 92% 35%, 100% 10%, 100% 100%, 0 100%);
}

#rp-modal .rp-cassette-mark {
    position: relative;
    z-index: 2;
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: grid;
    place-items: center;
    margin-top: 14px;
    border: 3px solid var(--rewind-ink);
    background: var(--rewind-cyan);
    color: var(--rewind-ink);
    font-size: 1.5rem;
    transform: rotate(-3deg);
    box-shadow: 7px 7px 0 var(--rewind-magenta);
}

#rp-modal .bp-modal-title-section { position: relative; z-index: 2; max-width: 780px; gap: 6px; }

#rp-modal .bp-modal-title {
    display: block;
    margin: 0;
    color: var(--rewind-ink);
    font: 900 clamp(3.1rem, 5vw, 6.2rem)/0.86 var(--rewind-display);
    letter-spacing: -0.05em;
    text-transform: uppercase;
    transform: skewX(-4deg);
}

#rp-modal .rp-title-overline {
    display: block;
    margin: 0 0 10px 4px;
    color: var(--rewind-magenta);
    font: 800 0.82rem/1 var(--rewind-copy);
    letter-spacing: 0.44em;
}

#rp-modal .bp-modal-subtitle {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 10px;
    background: rgba(242, 234, 216, 0.88);
    color: var(--rewind-ink);
    font: 800 0.9rem/1.3 var(--rewind-copy);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#rp-modal .bp-modal-close {
    position: relative;
    z-index: 3;
    width: 52px;
    height: 52px;
    margin: -14px -14px 0 auto;
    border: 2px solid #fff;
    border-radius: 0;
    background: var(--rewind-ink);
    color: #fff;
    font: 800 1.35rem/1 var(--rewind-copy);
    box-shadow: 6px 6px 0 var(--rewind-magenta);
}

#rp-modal .bp-modal-close:hover { background: var(--rewind-magenta); transform: rotate(2deg); }

#rp-modal .bp-modal-progress-header {
    flex: 0 0 104px;
    display: grid;
    grid-template-columns: 96px minmax(280px, 1fr) minmax(170px, 230px);
    align-items: center;
    gap: 18px;
    margin: -10px 28px 0;
    padding: 12px 22px;
    border: 0;
    background: var(--rewind-ink);
    color: #fff;
    clip-path: polygon(0 7%, 12% 0, 31% 5%, 49% 0, 72% 6%, 100% 2%, 99% 94%, 76% 100%, 55% 95%, 29% 100%, 1% 93%);
}

#rp-modal .bp-modal-progress-header::before,
#rp-modal .bp-modal-progress-header::after { display: none; }

#rp-modal .rp-progress-badge {
    display: grid;
    place-items: center;
    min-height: 58px;
    border: 2px solid var(--rewind-yellow);
    color: var(--rewind-yellow);
    font: 900 0.88rem/1 var(--rewind-copy);
    letter-spacing: 0.17em;
    transform: rotate(-1deg);
}

#rp-modal .bp-modal-progress-info { width: 100%; }
#rp-modal .bp-modal-progress-label { color: #fff; font: 800 0.72rem/1 var(--rewind-copy); letter-spacing: 0.15em; text-transform: uppercase; }
#rp-modal .bp-modal-progress-value { color: rgba(255, 255, 255, 0.74); font: 700 0.72rem/1 var(--rewind-copy); }
#rp-modal .bp-modal-progress-bar { height: 10px; margin-top: 12px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 0; background: rgba(255, 255, 255, 0.15); }
#rp-modal .bp-modal-progress-fill { border-radius: 0; background: var(--rewind-cyan); box-shadow: 0 0 13px rgba(0, 167, 183, 0.72); }

#rp-modal .bp-claim-all-btn {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 0;
    background: var(--rewind-magenta);
    color: #fff;
    font: 900 0.77rem/1 var(--rewind-copy);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 5px 5px 0 var(--rewind-yellow);
}

#rp-modal .bp-claim-all-btn:disabled { opacity: 0.42; box-shadow: none; }
#rp-modal .bp-claim-all-btn:hover:not(:disabled) { background: #b91565; transform: translateY(-1px); }
#rp-modal .bp-claim-all-section { border: 0; padding: 0; }

#rp-modal .bp-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: stretch;
    gap: 10px;
    margin: 16px 28px 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

#rp-modal .rp-rail-button {
    align-self: center;
    width: 42px;
    height: 92px;
    border: 2px solid var(--rewind-ink);
    border-radius: 0;
    background: var(--rewind-paper);
    color: var(--rewind-ink);
    font-size: 1.1rem;
    box-shadow: 4px 4px 0 var(--rewind-cyan);
}

#rp-modal .rp-rail-button:hover { background: var(--rewind-magenta); color: #fff; }
#rp-modal .rp-rail-button:last-child { box-shadow: -4px 4px 0 var(--rewind-cyan); }

#rp-modal .rp-reward-rail-viewport {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--rewind-magenta) rgba(17, 21, 26, 0.16);
}

#rp-modal .bp-rewards-track {
    position: relative;
    min-width: max-content;
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 15px;
    padding: 10px 8px 20px;
}

#rp-modal .bp-rewards-track::before { display: none; }

#rp-modal .bp-reward-item {
    width: 190px;
    min-width: 190px;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--rewind-ink);
    border-radius: 0;
    background: rgba(242, 234, 216, 0.9);
    box-shadow: 7px 7px 0 rgba(17, 21, 26, 0.18);
    clip-path: polygon(0 2px, 16% 0, 33% 3px, 56% 0, 76% 3px, 100% 1px, 99% 98%, 70% 100%, 47% 98%, 20% 100%, 0 98%);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

#rp-modal .bp-reward-item:nth-child(3n + 2) { transform: translateY(7px) rotate(0.35deg); }
#rp-modal .bp-reward-item:nth-child(3n) { transform: translateY(2px) rotate(-0.3deg); }
#rp-modal .bp-reward-item:hover { transform: translateY(-4px) rotate(-0.35deg); box-shadow: 9px 11px 0 rgba(213, 31, 121, 0.25); }
#rp-modal .bp-reward-item:has(.bp-reward-node.available) { box-shadow: 0 0 0 3px var(--rewind-magenta), 8px 10px 0 rgba(0, 167, 183, 0.34); }
#rp-modal .bp-reward-item:has(.bp-reward-node.claimed) { opacity: 0.72; }

#rp-modal .bp-reward-node {
    position: relative;
    width: 100%;
    height: 210px;
    min-height: 210px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--rewind-line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

#rp-modal .bp-reward-node::before {
    display: none;
}

#rp-modal .bp-reward-node.locked { opacity: 0.68; filter: grayscale(0.5); }
#rp-modal .bp-reward-node.available { animation: rewind-available 1.9s ease-in-out infinite; }
#rp-modal .bp-reward-node.claimed { background: rgba(0, 167, 183, 0.16); }

#rp-modal .bp-reward-image { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.16)); }
#rp-modal .bp-reward-node > div[style*="display: grid"] { position: relative; z-index: 1; }
#rp-modal .bp-reward-currency { position: relative; z-index: 1; color: var(--rewind-ink); font: 900 1.4rem/1.05 var(--rewind-copy); }
#rp-modal .bp-reward-currency i { color: var(--rewind-magenta); font-size: 2.5rem; }

#rp-modal .bp-reward-free-badge {
    top: 8px;
    left: -2px;
    right: auto;
    z-index: 5;
    padding: 5px 9px;
    border-radius: 0;
    background: var(--rewind-yellow);
    color: var(--rewind-ink);
    font: 900 0.59rem/1 var(--rewind-copy);
    letter-spacing: 0.13em;
    transform: rotate(-2deg);
    box-shadow: 3px 3px 0 rgba(17, 21, 26, 0.85);
}

#rp-modal .bp-reward-info { position: static; min-height: 70px; display: flex; flex-direction: column; justify-content: flex-start; gap: 5px; padding: 0 2px; background: transparent; text-align: left; }
#rp-modal .bp-reward-tier { color: var(--rewind-magenta); font: 900 0.63rem/1 var(--rewind-copy); letter-spacing: 0.11em; text-transform: uppercase; }
#rp-modal .bp-reward-name { min-height: 38px; color: var(--rewind-ink); font: 800 0.78rem/1.2 var(--rewind-copy); text-transform: uppercase; white-space: normal; overflow: visible; }

#rp-modal .rp-modal-footer {
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 28px 18px;
    padding: 0 16px;
    border: 2px solid var(--rewind-ink);
    background: rgba(242, 234, 216, 0.94);
    color: rgba(17, 21, 26, 0.88);
    font: 800 0.69rem/1 var(--rewind-copy);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes rewind-available {
    0%, 100% { box-shadow: inset 0 0 0 2px rgba(213, 31, 121, 0.3); }
    50% { box-shadow: inset 0 0 0 5px rgba(0, 167, 183, 0.45); }
}

@media (max-height: 820px) {
    #rp-modal .bp-modal-container { height: calc(100% - 28px); max-height: none; }
    #rp-modal .bp-modal-header { flex-basis: 186px; padding-top: 22px; }
    #rp-modal .bp-modal-title { font-size: 3.9rem; }
    #rp-modal .bp-reward-node { height: 155px; min-height: 155px; }
}

@media (max-width: 760px) {
    #rp-modal .bp-modal-container { width: calc(100% - 18px); height: calc(100% - 18px); max-height: none; }
    #rp-modal .bp-modal-header { flex-basis: 150px; gap: 10px; padding: 22px 18px 16px; background-position: 72% 20%; }
    #rp-modal .bp-modal-header::before { right: 22%; }
    #rp-modal .rp-cassette-mark { display: none; }
    #rp-modal .bp-modal-title { font-size: 2.4rem; }
    #rp-modal .rp-title-overline { font-size: 0.62rem; letter-spacing: 0.3em; }
    #rp-modal .bp-modal-subtitle { max-width: 74%; font-size: 0.66rem; }
    #rp-modal .bp-modal-close { width: 42px; height: 42px; margin: -10px -8px 0 auto; }
    #rp-modal .bp-modal-progress-header { grid-template-columns: 60px minmax(0, 1fr) 110px; gap: 8px; margin-inline: 9px; padding-inline: 10px; }
    #rp-modal .bp-modal-body { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 6px; margin-inline: 9px; }
    #rp-modal .rp-rail-button { width: 32px; height: 72px; }
    #rp-modal .bp-reward-item { width: 158px; min-width: 158px; padding: 9px; }
    #rp-modal .bp-reward-node { height: 175px; min-height: 175px; }
    #rp-modal .rp-modal-footer { margin-inline: 9px; font-size: 0.57rem; }
}

@media (prefers-reduced-motion: reduce) {
    #rp-modal .bp-reward-node.available { animation: none !important; }
    #rp-modal .rp-reward-rail-viewport { scroll-behavior: auto; }
}
