/* ============================================================
   Blindbox — Mobile First, PC Centered Container
   ============================================================ */

/* ── Root Variables ────────────────────────────────────────── */
:root {
    --bb-purple-light: #e8d5f5;
    --bb-purple: #b39ddb;
    --bb-purple-dark: #7e57c2;
    --bb-pink: #f48fb1;
    --bb-bg: #f3e5f5;
    --bb-white: #ffffff;
    --bb-text: #3a2060;
    --bb-text-light: #7b5ea7;
    --bb-shadow: 0 8px 32px rgba(126, 87, 194, .18);
    --bb-radius: 20px;
    --bb-btn-radius: 50px;
}

/* ── PC wrapper — centres the mobile view ──────────────────── */
body.page-template-page-blindbox,
body.page-template-page-blindbox-rules {
    background: #ede1f5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.bb-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: var(--bb-bg);
    position: relative;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

/* ── Hide the global header/footer on blindbox pages ────────── */
body.page-template-page-blindbox .header,
body.page-template-page-blindbox .header-height,
body.page-template-page-blindbox .footer,
body.page-template-page-blindbox .g-mzw-top1,
body.page-template-page-blindbox-rules .header,
body.page-template-page-blindbox-rules .header-height,
body.page-template-page-blindbox-rules .footer,
body.page-template-page-blindbox-rules .g-mzw-top1,
body.single-blindbox .header,
body.single-blindbox .header-height,
body.single-blindbox .footer,
body.single-blindbox .g-mzw-top1 {
    display: none !important;
}

/* ── Blindbox Topbar ─────────────────────────────────────────── */
.bb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    background: linear-gradient(135deg, #ce93d8 0%, #b39ddb 100%);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bb-topbar .bb-back {
    font-size: 22px;
    color: #fff;
    text-decoration: none;
    width: 32px;
}

.bb-topbar .bb-page-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.bb-topbar .bb-rules-btn {
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .25);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Hero Banner ─────────────────────────────────────────────── */
.bb-hero {
    background: linear-gradient(160deg, #ce93d8 0%, #9575cd 60%, #7e57c2 100%);
    padding: 28px 20px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='40'/%3E%3C/svg%3E") repeat;
    background-size: 80px;
}

.bb-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 4px;
    position: relative;
}

.bb-hero-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 20px;
    position: relative;
}

.bb-box-wrap {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .3));
    animation: bb-float 3s ease-in-out infinite;
}

.bb-box-wrap img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 24px;
}

.bb-box-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 24px;
    background: linear-gradient(135deg, #7e57c2, #ce93d8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

@keyframes bb-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ── Price & Batch Row ──────────────────────────────────────── */
.bb-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #f0e6fa;
}

.bb-price-label {
    font-size: 13px;
    color: var(--bb-text-light);
}

.bb-price-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--bb-purple-dark);
}

.bb-price-val span {
    font-size: 14px;
    font-weight: 400;
}

.bb-batch-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--bb-text-light);
    background: var(--bb-purple-light);
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: background .2s;
}

.bb-batch-btn:active {
    background: #d8b4f8;
}

/* ── Hero Strip (compact, horizontal) ───────────────────────────── */
.bb-hero-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #9575cd 0%, #ce93d8 100%);
    padding: 16px 20px;
    gap: 12px;
}

.bb-hero-text {
    flex: 1;
}

.bb-hero-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.bb-hero-price {
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
}

.bb-hero-price strong {
    font-size: 22px;
    color: #fff;
}

.bb-hero-cover {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 14px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .25));
    animation: bb-float 3s ease-in-out infinite;
}

/* ── Grid Label ──────────────────────────────────────────────────── */
.bb-grid-label {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--bb-text-light);
    padding: 16px 0 8px;
    letter-spacing: 1px;
}

.bb-grid-rules-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bb-purple-light);
    color: var(--bb-purple-dark);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    vertical-align: middle;
    margin-left: 2px;
    transition: background .2s;
}

.bb-grid-rules-link:hover {
    background: var(--bb-purple);
    color: #fff;
}

/* ── 9-Box Selection Grid ────────────────────────────────────────── */
.bb-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 16px 8px;
}

.bb-box-card {
    aspect-ratio: 1;
    perspective: 600px;
    cursor: pointer;
}

.bb-box-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .65s cubic-bezier(.4, 0, .2, 1);
    border-radius: 18px;
}

/* Selected: glow pulse */
.bb-box-card.selected .bb-box-card-inner {
    animation: bb-pulse-sel .7s ease infinite alternate;
}

@keyframes bb-pulse-sel {
    from {
        box-shadow: 0 0 0 3px var(--bb-purple-dark), 0 0 12px rgba(126, 87, 194, .4);
    }

    to {
        box-shadow: 0 0 0 3px #f06292, 0 0 28px rgba(240, 98, 146, .6);
    }
}

/* Flipped */
.bb-box-card.flipped .bb-box-card-inner {
    transform: rotateY(180deg);
}

/* Shared face */
.bb-box-card-front,
.bb-box-card-back {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Front */
.bb-box-card-front {
    background: linear-gradient(145deg, #e8d5f5, #ce93d8);
    box-shadow: 0 4px 14px rgba(126, 87, 194, .2);
}

.bb-box-card-front img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

.bb-box-icon {
    font-size: 40px;
}

.bb-box-num {
    position: absolute;
    bottom: 5px;
    right: 9px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .55);
}

/* Back */
.bb-box-card-back {
    background: linear-gradient(145deg, #fff, #f3e5f5);
    transform: rotateY(180deg);
    box-shadow: 0 4px 14px rgba(126, 87, 194, .2);
    padding: 8px;
    text-align: center;
}

.bb-box-card-back img {
    width: 70%;
    height: 60%;
    object-fit: contain;
    border-radius: 10px;
}

.bb-box-back-name {
    font-size: 10px;
    color: var(--bb-text);
    margin-top: 4px;
    font-weight: 700;
    line-height: 1.3;
}

.bb-box-back-placeholder {
    font-size: 36px;
    margin-bottom: 4px;
}

/* ── Ten Draw Button ─────────────────────────────────────────────── */
.bb-ten-wrap {
    padding: 12px 16px 16px;
}

.bb-btn-ten-full {
    width: 100%;
    padding: 15px 0;
    border-radius: var(--bb-btn-radius);
    border: 2px solid var(--bb-purple-dark);
    background: transparent;
    color: var(--bb-purple-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .2s;
}

.bb-btn-ten-full:active {
    background: var(--bb-purple-light);
}

.bb-ten-price {
    font-size: 13px;
    font-weight: 400;
    opacity: .7;
}



.bb-btn-ten {
    flex: 1;
    padding: 14px 0;
    border-radius: var(--bb-btn-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--bb-purple-dark);
    background: transparent;
    color: var(--bb-purple-dark);
    transition: all .2s;
}

.bb-btn-ten:active {
    background: var(--bb-purple-light);
}

.bb-btn-single {
    flex: 1.3;
    padding: 14px 0;
    border-radius: var(--bb-btn-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #ce93d8, #7e57c2);
    color: #fff;
    box-shadow: 0 4px 16px rgba(126, 87, 194, .35);
    transition: all .2s;
}

.bb-btn-single:active {
    transform: scale(0.97);
}

/* ── Guaranteed Section ─────────────────────────────────────── */
.bb-guaranteed {
    padding: 20px 20px 0;
}

.bb-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bb-text);
    margin-bottom: 14px;
}

.bb-section-title::before,
.bb-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--bb-purple));
}

.bb-section-title::after {
    background: linear-gradient(to left, transparent, var(--bb-purple));
}

/* ── Prize Grid ─────────────────────────────────────────────── */
.bb-prize-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 20px 24px;
}

.bb-prize-card {
    background: #fff;
    border-radius: 14px;
    padding: 10px 6px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(126, 87, 194, .08);
    transition: transform .2s;
}

.bb-prize-card:active {
    transform: scale(0.96);
}

.bb-prize-card .pc-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bb-purple-light);
    display: block;
}

.bb-prize-card .pc-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bb-purple-light), var(--bb-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.bb-prize-card .pc-name {
    font-size: 11px;
    color: var(--bb-text);
    margin-top: 6px;
    line-height: 1.4;
    word-break: break-all;
}

.bb-prize-card .pc-price {
    font-size: 11px;
    color: #e91e63;
    font-weight: 700;
    margin-top: 2px;
}

.bb-prize-card .pc-rarity {
    display: inline-block;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-top: 3px;
}

.pc-rarity.common {
    background: #e8f5e9;
    color: #388e3c;
}

.pc-rarity.rare {
    background: #e3f2fd;
    color: #1565c0;
}

.pc-rarity.hidden {
    background: #fff3e0;
    color: #e65100;
}

/* ── Confirm Modal ──────────────────────────────────────────── */
.bb-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(30, 20, 50, .55);
    z-index: 999;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.bb-modal-mask.active {
    display: flex;
    animation: bb-mask-in .25s ease;
}

@keyframes bb-mask-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.bb-modal {
    background: var(--bb-white);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 28px 28px 40px;
    text-align: center;
    animation: bb-modal-slide .3s cubic-bezier(.22, 1, .36, 1);
    position: relative;
}

@keyframes bb-modal-slide {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.bb-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3e5f5;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bb-purple-dark);
}

.bb-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--bb-text);
    margin-bottom: 20px;
}

.bb-modal-box-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.bb-modal-box-wrap img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 8px 20px rgba(126, 87, 194, .3));
}

.bb-modal-box-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    background: linear-gradient(135deg, #9575cd, #ce93d8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(126, 87, 194, .3);
}

.bb-modal-x10-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #212121;
    color: #ffd740;
    font-size: 18px;
    font-weight: 900;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.bb-modal-btns {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.bb-btn-cancel {
    flex: 1;
    padding: 14px 0;
    border-radius: var(--bb-btn-radius);
    border: 2px solid #e0d4f5;
    background: transparent;
    color: var(--bb-text-light);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ── Payment Bottom Sheet ───────────────────────────────────── */
.bb-pay-modal {
    padding-bottom: 32px;
}

.bb-pay-amount {
    font-size: 15px;
    color: var(--bb-text-light);
    margin-bottom: 20px;
    text-align: center;
}

.bb-pay-amount strong {
    font-size: 24px;
    font-weight: 800;
    color: #e91e63;
}

.bb-pay-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.bb-pay-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--bb-btn-radius);
    border: none;
    background: linear-gradient(135deg, #ce93d8, #7e57c2);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(126, 87, 194, .35);
    transition: transform .15s;
}

.bb-pay-btn:active {
    transform: scale(.97);
}

.bb-pay-cancel {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--bb-text-light);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

/* ── Order Confirmation / Address Bottom Sheet ──────────────── */
.bb-addr-modal {
    padding-bottom: 24px;
    max-height: 85vh;
    overflow-y: auto;
}

.bb-addr-prize {
    font-size: 14px;
    color: var(--bb-text);
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f6fb;
    border-radius: 8px;
    border: 1px solid #efeef4;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.bb-addr-section {
    margin-bottom: 24px;
    border-bottom: 1px dashed #efeef4;
    padding-bottom: 16px;
}

.bb-addr-section:last-of-type {
    border-bottom: none;
}

.bb-addr-sec-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bb-text);
    margin-bottom: 12px;
    text-align: left;
}

.bb-addr-list {
    display: flex;
    flex-direction: column;
}

.bb-addr-selection-result {
    background: #fff;
    border: 1px solid #efeef4;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.bb-addr-selection-result .result-content {
    flex: 1;
    text-align: left;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.bb-addr-selection-result .result-arrow {
    color: #bbb;
    font-weight: bold;
    margin-left: 12px;
}

.bb-btn-new {
    width: 100%;
    padding: 12px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 16px;
}

.bb-submodal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f6fb;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bb-submodal.active {
    transform: translateX(0);
}

.bb-submodal-header {
    height: 50px;
    min-height: 50px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #efeef4;
}

.bb-submodal-back {
    position: absolute;
    left: 16px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.bb-submodal-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.bb-submodal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.bb-addr-item {
    padding: 16px;
    background: #fff;
    border: 1px solid #efeef4;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.bb-addr-item.selected {
    border-color: #ff4d4f;
    background: #fff5f5;
}

.bb-addr-item-content {
    flex: 1;
    text-align: left;
}

.bb-addr-item-arrow {
    color: #ccc;
    font-size: 16px;
    margin-left: 12px;
    font-family: monospace;
}

.bb-addr-item.selected .bb-addr-item-arrow {
    color: #ff4d4f;
}

.bb-addr-item-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--bb-text);
}

.bb-addr-item-desc {
    font-size: 13px;
    color: var(--bb-text-light);
    line-height: 1.4;
}

.bb-addr-new-toggle {
    text-align: center;
    color: #7e57c2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 0;
    margin-bottom: 8px;
}

.bb-addr-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bb-addr-row {
    display: flex;
    gap: 10px;
}

.bb-addr-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.bb-addr-input:focus {
    border-color: #7e57c2;
}

.bb-btn-confirm {
    flex: 1.5;
    padding: 14px 0;
    border-radius: var(--bb-btn-radius);
    border: none;
    background: linear-gradient(135deg, #f06292, #e91e63);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(233, 30, 99, .35);
}

/* ── Result / Reveal Screen ─────────────────────────────────── */
.bb-result-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #9575cd 0%, #7e57c2 100%);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.bb-result-screen.active {
    display: flex;
}

.bb-hearts {
    width: 100%;
    text-align: center;
    font-size: 18px;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 20px;
    animation: bb-hearts-pulse 2s infinite;
}

@keyframes bb-hearts-pulse {

    0%,
    100% {
        opacity: .6;
    }

    50% {
        opacity: 1;
    }
}

.bb-result-card {
    background: #fff;
    border-radius: 28px;
    padding: 28px 24px 24px;
    text-align: center;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: bb-card-in .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes bb-card-in {
    from {
        transform: scale(.5) rotate(-10deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.bb-result-card .rc-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--bb-purple-light);
    display: block;
    margin: 0 auto 16px;
}

.bb-result-card .rc-img-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bb-purple), #ce93d8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 14px;
}

.bb-result-label {
    font-size: 14px;
    color: var(--bb-text-light);
    margin-bottom: 4px;
}

.bb-result-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--bb-text);
    margin-bottom: 6px;
}

.bb-result-rarity {
    display: inline-block;
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.bb-result-rarity.common {
    background: #e8f5e9;
    color: #388e3c;
}

.bb-result-rarity.rare {
    background: #e3f2fd;
    color: #1565c0;
}

.bb-result-rarity.hidden {
    background: #fff3e0;
    color: #e65100;
}

/* ten-result grid */
.bb-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 16px;
}

.bb-result-mini {
    background: rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 8px 4px;
    text-align: center;
}

.bb-result-mini img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255, 255, 255, .2);
}

.bb-result-mini .rm-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.bb-result-mini .rm-name {
    font-size: 10px;
    color: #fff;
    margin-top: 4px;
    line-height: 1.3;
}

.bb-result-pay-btn {
    display: block;
    width: 100%;
    padding: 15px 0;
    border-radius: var(--bb-btn-radius);
    background: linear-gradient(135deg, #f06292, #e91e63);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(233, 30, 99, .4);
    margin-top: 20px;
}

.bb-result-back {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
    cursor: pointer;
    text-decoration: underline;
}

/* ── Loading Spinner ─────────────────────────────────────────── */
.bb-loading {
    position: fixed;
    inset: 0;
    background: rgba(50, 20, 80, .6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}

.bb-loading.active {
    display: flex;
}

.bb-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bb-spin .8s linear infinite;
}

@keyframes bb-spin {
    to {
        transform: rotate(360deg);
    }
}

.bb-loading p {
    color: #fff;
    font-size: 14px;
}

/* ── Rules Page ─────────────────────────────────────────────── */
.bb-rules-body {
    padding: 20px;
}

.bb-rules-heading {
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: var(--bb-text);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.bb-rules-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px;
    font-size: 14px;
    line-height: 2;
    color: #555;
    white-space: pre-wrap;
    box-shadow: 0 2px 10px rgba(126, 87, 194, .08);
}

/* ── Responsive — keep max-width on mid screens ─────────────── */
@media (min-width: 481px) {
    .bb-modal {
        border-radius: 24px;
    }

    .bb-modal-mask {
        align-items: center;
    }
}