/* Battle Pass readability overrides: loaded after the main stylesheets. */
#win-battlepass .checkin-scroll {
    max-height: 58vh;
}

#win-battlepass .checkin-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

#win-battlepass .checkin-cell,
html.layout-pc #win-battlepass .checkin-cell {
    box-sizing: border-box;
    height: 140px !important;
    min-height: 140px !important;
    padding: 34px 8px 8px !important;
    gap: 8px;
}

#win-battlepass .checkin-cell-day {
    min-width: 34px;
    height: 21px;
    font-size: 13px !important;
}

#win-battlepass .checkin-cell-reward,
html.layout-pc #win-battlepass .checkin-cell-reward {
    gap: 6px 8px;
    color: #e6f2ff;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#win-battlepass .checkin-reward-item {
    gap: 4px;
}

#win-battlepass .checkin-cell-reward .res-gfx-inline,
#win-battlepass .checkin-cell-reward .part-gfx-inline,
#win-battlepass .checkin-cell-reward .container-icon {
    display: inline-flex;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

#win-battlepass .checkin-cell-reward .res-gfx-inline svg,
#win-battlepass .checkin-cell-reward .part-gfx-inline svg {
    display: block;
    width: 28px;
    height: 28px;
}

#win-battlepass .checkin-cell-day,
#win-battlepass .checkin-cell-reward,
#win-battlepass .bp-ship-flip-hint,
#win-battlepass .bp-ship-bonus-heading,
#win-battlepass .bp-ship-bonus-type,
#win-battlepass .bp-ship-bonus-value {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

#win-battlepass .bp-ship-reward-image {
    height: 76px !important;
    flex-basis: 76px !important;
}

#win-battlepass .bp-ship-reward-image .ship-sprite-img,
#win-battlepass .bp-ship-reward-image canvas {
    width: auto !important;
    height: 72px !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#win-battlepass .bp-ship-flip-hint {
    font-size: 10px;
}

#win-battlepass .bp-ship-bonus-heading,
#win-battlepass .bp-ship-bonus-type {
    font-size: 10px;
}

#win-battlepass .bp-ship-bonus-value {
    font-size: 11px;
}

#win-battlepass .bp-final-day .checkin-cell-reward,
html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward {
    gap: 2px 4px;
    font-size: 10px !important;
    line-height: 1.1;
}

#win-battlepass .bp-final-day .checkin-reward-item,
html.layout-pc #win-battlepass .bp-final-day .checkin-reward-item {
    gap: 2px;
    font-size: 10px !important;
    line-height: 1.1;
}

#win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline,
#win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline,
#win-battlepass .bp-final-day .checkin-cell-reward .container-icon {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
}

#win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
#win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg {
    width: 16px;
    height: 16px;
}

#win-battlepass .checkin-title {
    font-size: 18px !important;
}

#win-battlepass .checkin-status {
    font-size: 13px !important;
    line-height: 1.45;
}

#win-battlepass .checkin-today,
#win-battlepass .checkin-choice-title,
#win-battlepass .checkin-choice-btn,
#win-battlepass .bp-paid-badge {
    font-size: 12px;
}

#win-battlepass .bp-buy-bar .btn {
    min-height: 48px;
    font-size: 14px;
}

@media (max-width: 850px) {
    #win-battlepass .checkin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    #win-battlepass .checkin-cell,
    html.layout-pc #win-battlepass .checkin-cell {
        height: 124px !important;
        min-height: 124px !important;
        padding: 30px 5px 7px !important;
        gap: 6px;
    }

    #win-battlepass .checkin-cell-day {
        min-width: 32px;
        height: 20px;
        font-size: 12px !important;
    }

    #win-battlepass .checkin-cell-reward,
    html.layout-pc #win-battlepass .checkin-cell-reward {
        gap: 4px 5px;
        font-size: 13px !important;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .checkin-cell-reward .container-icon {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .checkin-cell-reward .part-gfx-inline svg {
        width: 24px;
        height: 24px;
    }

    #win-battlepass .bp-ship-reward-image {
        height: 60px !important;
        flex-basis: 60px !important;
    }

    #win-battlepass .bp-ship-reward-image .ship-sprite-img,
    #win-battlepass .bp-ship-reward-image canvas {
        height: 56px !important;
    }

    #win-battlepass .bp-ship-flip-hint {
        font-size: 9px;
    }

    #win-battlepass .bp-ship-bonus-heading,
    #win-battlepass .bp-ship-bonus-type {
        font-size: 9px;
    }

    #win-battlepass .bp-ship-bonus-value {
        font-size: 10px;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward,
    html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward {
        font-size: 9px !important;
    }

    #win-battlepass .bp-final-day .checkin-reward-item,
    html.layout-pc #win-battlepass .bp-final-day .checkin-reward-item {
        font-size: 9px !important;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .container-icon {
        flex-basis: 15px;
        width: 15px;
        height: 15px;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg {
        width: 15px;
        height: 15px;
    }

    #win-battlepass .checkin-title {
        font-size: 16px !important;
    }

    #win-battlepass .checkin-status {
        font-size: 12px !important;
    }

    #win-battlepass .checkin-today,
    #win-battlepass .checkin-choice-title,
    #win-battlepass .checkin-choice-btn,
    #win-battlepass .bp-paid-badge {
        font-size: 11px;
    }

    #win-battlepass .bp-buy-bar .btn {
        font-size: 13px;
    }
}

/* High-visibility battle pass layout; keep this block last to override legacy card rules. */
#win-battlepass {
    box-sizing: border-box;
    width: min(100%, 1080px) !important;
    max-height: min(92vh, 900px) !important;
    padding: 18px 20px 20px !important;
}

#win-battlepass .checkin-scroll {
    max-height: min(68vh, 720px) !important;
}

#win-battlepass .checkin-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px;
}

#win-battlepass .checkin-cell,
html.layout-pc #win-battlepass .checkin-cell {
    height: 184px !important;
    min-height: 184px !important;
    padding: 38px 10px 10px !important;
    gap: 10px;
}

#win-battlepass .checkin-cell-day {
    min-width: 42px;
    height: 25px;
    font-size: 15px !important;
}

#win-battlepass .checkin-cell-reward,
html.layout-pc #win-battlepass .checkin-cell-reward {
    gap: 8px 10px;
    font-size: 17px !important;
    line-height: 1.25;
}

#win-battlepass .checkin-reward-item {
    gap: 5px;
}

#win-battlepass .checkin-cell-reward .res-gfx-inline,
#win-battlepass .checkin-cell-reward .part-gfx-inline,
#win-battlepass .checkin-cell-reward .container-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
}

#win-battlepass .checkin-cell-reward .res-gfx-inline svg,
#win-battlepass .checkin-cell-reward .part-gfx-inline svg,
html.layout-pc #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
html.layout-pc #win-battlepass .checkin-cell-reward .part-gfx-inline svg {
    width: 36px !important;
    height: 36px !important;
}

#win-battlepass .bp-ship-reward-image {
    height: 108px !important;
    flex-basis: 108px !important;
}

#win-battlepass .bp-ship-reward-image .ship-sprite-img,
#win-battlepass .bp-ship-reward-image canvas,
html.layout-pc #win-battlepass .bp-ship-reward-image .ship-sprite-img,
html.layout-pc #win-battlepass .bp-ship-reward-image canvas {
    width: auto !important;
    height: 100px !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#win-battlepass .bp-ship-flip-hint {
    font-size: 13px;
}

#win-battlepass .bp-ship-bonus-heading,
#win-battlepass .bp-ship-bonus-type {
    font-size: 13px;
}

#win-battlepass .bp-ship-bonus-value {
    font-size: 14px;
}

#win-battlepass .bp-final-day,
html.layout-pc #win-battlepass .bp-final-day {
    height: 250px !important;
    min-height: 250px !important;
    padding-top: 38px !important;
}

#win-battlepass .bp-final-day .checkin-cell-reward,
html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward {
    gap: 6px 8px;
    font-size: 14px !important;
    line-height: 1.2;
}

#win-battlepass .bp-final-day .checkin-reward-item,
html.layout-pc #win-battlepass .bp-final-day .checkin-reward-item {
    gap: 4px;
    font-size: 14px !important;
    line-height: 1.2;
    white-space: normal;
}

#win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline,
#win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline,
#win-battlepass .bp-final-day .checkin-cell-reward .container-icon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
}

#win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
#win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg,
html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg {
    width: 22px !important;
    height: 22px !important;
}

@media (max-width: 850px) {
    #win-battlepass .checkin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 9px;
    }

    #win-battlepass .checkin-cell,
    html.layout-pc #win-battlepass .checkin-cell {
        height: 154px !important;
        min-height: 154px !important;
        padding: 34px 7px 8px !important;
        gap: 8px;
    }

    #win-battlepass .checkin-cell-reward,
    html.layout-pc #win-battlepass .checkin-cell-reward {
        gap: 6px;
        font-size: 16px !important;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .checkin-cell-reward .container-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .checkin-cell-reward .part-gfx-inline svg,
    html.layout-pc #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
    html.layout-pc #win-battlepass .checkin-cell-reward .part-gfx-inline svg {
        width: 32px !important;
        height: 32px !important;
    }

    #win-battlepass .bp-ship-reward-image {
        height: 96px !important;
        flex-basis: 96px !important;
    }

    #win-battlepass .bp-ship-reward-image .ship-sprite-img,
    #win-battlepass .bp-ship-reward-image canvas,
    html.layout-pc #win-battlepass .bp-ship-reward-image .ship-sprite-img,
    html.layout-pc #win-battlepass .bp-ship-reward-image canvas {
        height: 88px !important;
    }

    #win-battlepass .bp-final-day,
    html.layout-pc #win-battlepass .bp-final-day {
        height: 236px !important;
        min-height: 236px !important;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward,
    html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward,
    #win-battlepass .bp-final-day .checkin-reward-item,
    html.layout-pc #win-battlepass .bp-final-day .checkin-reward-item {
        font-size: 13px !important;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .container-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg,
    html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
    html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 600px) {
    #win-battlepass {
        padding: 14px 12px 14px !important;
    }

    #win-battlepass .checkin-scroll {
        max-height: min(62vh, 580px) !important;
    }

    #win-battlepass .checkin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    #win-battlepass .checkin-cell,
    html.layout-pc #win-battlepass .checkin-cell {
        height: 148px !important;
        min-height: 148px !important;
        padding: 32px 7px 8px !important;
    }

    #win-battlepass .checkin-cell-day {
        min-width: 38px;
        height: 23px;
        font-size: 14px !important;
    }

    #win-battlepass .checkin-cell-reward,
    html.layout-pc #win-battlepass .checkin-cell-reward {
        gap: 5px;
        font-size: 15px !important;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .checkin-cell-reward .container-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .checkin-cell-reward .part-gfx-inline svg,
    html.layout-pc #win-battlepass .checkin-cell-reward .res-gfx-inline svg,
    html.layout-pc #win-battlepass .checkin-cell-reward .part-gfx-inline svg {
        width: 28px !important;
        height: 28px !important;
    }

    #win-battlepass .bp-ship-reward-image {
        height: 86px !important;
        flex-basis: 86px !important;
    }

    #win-battlepass .bp-ship-reward-image .ship-sprite-img,
    #win-battlepass .bp-ship-reward-image canvas,
    html.layout-pc #win-battlepass .bp-ship-reward-image .ship-sprite-img,
    html.layout-pc #win-battlepass .bp-ship-reward-image canvas {
        height: 78px !important;
    }

    #win-battlepass .bp-ship-flip-hint {
        font-size: 11px;
    }

    #win-battlepass .bp-ship-bonus-heading,
    #win-battlepass .bp-ship-bonus-type {
        font-size: 11px;
    }

    #win-battlepass .bp-ship-bonus-value {
        font-size: 12px;
    }

    #win-battlepass .bp-final-day,
    html.layout-pc #win-battlepass .bp-final-day {
        height: 260px !important;
        min-height: 260px !important;
        padding-top: 34px !important;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward,
    html.layout-pc #win-battlepass .bp-final-day .checkin-cell-reward,
    #win-battlepass .bp-final-day .checkin-reward-item,
    html.layout-pc #win-battlepass .bp-final-day .checkin-reward-item {
        font-size: 12px !important;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline,
    #win-battlepass .bp-final-day .checkin-cell-reward .container-icon {
        flex-basis: 18px;
        width: 18px;
        height: 18px;
    }

    #win-battlepass .bp-final-day .checkin-cell-reward .res-gfx-inline svg,
    #win-battlepass .bp-final-day .checkin-cell-reward .part-gfx-inline svg {
        width: 18px;
        height: 18px;
    }
}

/* The supplied Battle Pass illustration is the panel itself: retain its full frame,
   header and lower purchase strip, and fit content inside its original proportions. */
#win-battlepass {
    box-sizing: border-box;
    width: min(96vw, 1080px, calc(88dvh * 1.094245)) !important;
    height: min(calc(96vw / 1.094245), calc(1080px / 1.094245), 88dvh) !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: 1312 / 1199;
    padding: 11.5% 4% 13% !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(rgba(0, 2, 15, 0.12), rgba(0, 2, 15, 0.12)),
        url('../mines/bp.png') center / 100% 100% no-repeat !important;
    box-shadow: none !important;
}

#win-battlepass::before {
    display: none;
}

#win-battlepass > .checkin-header {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: block;
    margin: 0;
    pointer-events: none;
}

#win-battlepass .checkin-title {
    display: none;
}

#win-battlepass .bp-close-btn {
    position: absolute;
    z-index: 6;
    top: 2.8%;
    right: 1.5%;
    width: clamp(34px, 6%, 78px);
    height: clamp(36px, 7%, 86px);
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    pointer-events: auto;
}

#win-battlepass .bp-close-btn:focus-visible {
    outline: 2px solid #40eaff;
    outline-offset: -4px;
}

#win-battlepass > .checkin-status {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin: 0 0 8px;
    text-shadow: 0 1px 3px #000, 0 0 8px #000;
}

#win-battlepass .checkin-scroll {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    padding-right: 3px;
    overscroll-behavior: contain;
}

#win-battlepass .bp-buy-bar {
    position: absolute;
    z-index: 4;
    right: 8%;
    bottom: 1.8%;
    left: 8%;
    height: 8.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

#win-battlepass .bp-buy-bar .btn {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 8px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffe078;
    font-size: clamp(12px, 1.7vw, 18px);
    line-height: 1.15;
    text-shadow: 0 1px 3px #120900, 0 0 7px #120900;
}

#win-battlepass .bp-paid-badge {
    margin: 0;
    color: #fff0a4;
    font-size: clamp(11px, 1.5vw, 16px);
    text-align: center;
    text-shadow: 0 1px 3px #120900, 0 0 7px #120900;
}

#win-battlepass .bp-buy-bar {
    bottom: 1.2%;
    height: 12.5%;
}

@media (max-width: 600px) {
    #win-battlepass {
        width: min(96vw, calc(88dvh * 1.094245)) !important;
        height: min(calc(96vw / 1.094245), 88dvh) !important;
        padding: 11.5% 4% 13% !important;
    }

    /* The lock note and purchase prompt repeat the header and CTA while unpaid. */
    #win-battlepass:has(#btn-bp-buy:not(.hidden)) #bp-today,
    #win-battlepass:has(#btn-bp-buy:not(.hidden)) #bp-actions {
        display: none;
    }

    #win-battlepass .bp-buy-bar .btn {
        font-size: clamp(12px, 3.8vw, 17px);
    }
}

@media (max-width: 350px) {
    #win-battlepass .checkin-cell,
    html.layout-pc #win-battlepass .checkin-cell {
        height: 128px !important;
        min-height: 128px !important;
        padding: 30px 5px 6px !important;
    }
}
