
    .breadcrumb {
        display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
        padding: 14px 16px 0; font-size: 12.5px; font-weight: 600; color: var(--muted);
    }
    .breadcrumb a { color: var(--muted); }
    .breadcrumb a:hover { color: var(--primary); }
    .breadcrumb .sep { color: #cbd5e1; }
    .breadcrumb .current { color: var(--text); }

    /* ---- Game hero ---- */
    .game-hero {
        position: relative; overflow: hidden;
        margin: 12px 16px 0; padding: 14px; border-radius: 16px;
        display: flex; align-items: center; gap: 13px;
        background: #fff; border: 1px solid var(--line);
        box-shadow: 0 4px 14px rgba(29,41,61,.06);
    }
    .game-hero .g-thumb {
        width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
        background: #eef1f5; border: 1px solid var(--line);
    }
    .game-hero .g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .game-hero .g-fallback {
        width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
        font-size: 20px; font-weight: 700; color: #fff;
        background: linear-gradient(135deg,var(--primary),var(--primary2));
    }
    .game-hero .g-info { min-width: 0; flex: 1; }
    .game-hero h1 { font-size: 17.5px; font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: -.2px; }
    /* Mobile: plain spacing, no dot separators — the strip has to wrap at phone
       widths, and gaps wrap cleanly where dangling separators would not. */
    .g-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 13px; margin-top: 5px; }
    .g-badge {
        display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
        font-size: 11px; font-weight: 600; color: var(--muted);
    }
    .g-badge .ic { color: var(--primary); }

    .game-desc {
        margin: 12px 16px 0; padding: 12px 14px;
        background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary);
        border-radius: 12px; font-size: 12.5px; line-height: 1.7; color: var(--muted); font-weight: 500;
    }

    /* ---- Buy layout ---- */
    .buy-wrap { padding: 0 16px; }
    .buy-grid { display: block; }

    .step {
        background: #fff; border: 1px solid var(--line); border-radius: 16px;
        padding: 16px; margin-top: 14px;
        box-shadow: 0 2px 10px rgba(29,41,61,.05);
    }
    .step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
    .step-num {
        width: 26px; height: 26px; flex-shrink: 0; border-radius: 9px;
        display: flex; align-items: center; justify-content: center;
        font-size: 12.5px; font-weight: 700; color: #fff;
        background: linear-gradient(135deg,var(--primary),var(--primary2));
        box-shadow: 0 4px 10px rgba(0,64,240,.3);
    }
    .step-head h4 { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }

    /* Account fields */
    .field { margin-bottom: 13px; }
    .field:last-child { margin-bottom: 0; }
    .field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
    .field label .req { color: #fb2c36; }
    .field input {
        width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit; font-weight: 500;
        color: var(--text); background: #fff;
        border: 1.5px solid var(--line); border-radius: 12px; outline: none;
        transition: border-color .15s, box-shadow .15s;
    }
    .field input::placeholder { color: #a5b0c0; font-weight: 500; }
    .field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,64,240,.12); }
    .field input.invalid, .field input.input-error {
        border-color: #fb2c36 !important;
        background-color: #fef2f2 !important;
        box-shadow: 0 0 0 3px rgba(251,44,54,.15) !important;
        animation: shakeInput 0.35s ease-in-out;
    }
    @keyframes shakeInput {
        0%, 100% { transform: translateX(0); }
        20%, 60% { transform: translateX(-5px); }
        40%, 80% { transform: translateX(5px); }
    }
    .field .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; font-weight: 500; }
    .no-fields {
        display: flex; align-items: flex-start; gap: 10px;
        padding: 12px 14px; border-radius: 12px; background: #f1f5f9;
        font-size: 12.5px; line-height: 1.6; color: var(--muted); font-weight: 500;
    }
    .no-fields .ic { color: var(--primary); flex-shrink: 0; margin-top: 1px; }

    /* ID check — runs automatically once the account fields are filled */
    .id-check:has(.check-result.show) { margin-top: 13px; }
    .check-result {
        display: none; padding: 11px 13px; border-radius: 11px;
        font-size: 12.5px; font-weight: 600; line-height: 1.6; border: 1.5px solid;
    }
    .check-result.show { display: block; }
    .check-result.ok   { color: #00794a; background: rgba(0,150,80,.07);  border-color: rgba(0,150,80,.3); }
    .check-result.bad  { color: #c81e2b; background: rgba(251,44,54,.05); border-color: rgba(251,44,54,.28); }
    .check-result.info { color: var(--muted); background: #f1f5f9; border-color: var(--line); }
    .check-result .cr-name { font-weight: 800; color: var(--text); }

    /* Denomination filter */
    .denom-filter {
        display: flex; align-items: center; gap: 9px; margin-bottom: 13px;
        background: #f1f5f9; border: 1.5px solid transparent; border-radius: 12px; padding: 9px 13px;
        transition: .15s;
    }
    .denom-filter:focus-within { background: #fff; border-color: var(--primary); }
    .denom-filter .ic { color: var(--muted); flex-shrink: 0; }
    .denom-filter input {
        border: none; outline: none; background: transparent; flex: 1; min-width: 0;
        font-size: 13.5px; font-weight: 500; font-family: inherit; color: var(--text);
    }

    /* Denomination grid */
    .denoms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .denom {
        position: relative; text-align: left; cursor: pointer;
        padding: 12px 13px; border-radius: 13px;
        background: #fff; border: 1.5px solid var(--line);
        font-family: inherit; color: var(--text);
        transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
    }
    .denom:hover { border-color: var(--primary2); }
    .denom:active { transform: scale(.98); }
    .denom.selected { border-color: var(--primary); background: rgba(0,64,240,.045); box-shadow: 0 6px 16px rgba(0,64,240,.14); }
    .denom .d-name {
        font-size: 13.5px; font-weight: 700; line-height: 1.3; padding-right: 20px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .denom .d-price { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 7px; }
    .denom .d-check {
        position: absolute; top: 9px; right: 9px;
        width: 17px; height: 17px; border-radius: 50%;
        border: 1.5px solid var(--line); background: #fff;
        display: flex; align-items: center; justify-content: center; transition: .15s;
    }
    .denom .d-check::after {
        content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s;
    }
    .denom.selected .d-check { border-color: var(--primary); background: var(--primary); }
    .denom.selected .d-check::after { transform: scale(1); }
    .denom-empty { padding: 26px; text-align: center; font-size: 13px; color: var(--muted); font-weight: 500; }

    /* Payment methods */
    .pays { display: flex; flex-direction: column; gap: 9px; }
    .pay {
        display: flex; align-items: center; gap: 12px; cursor: pointer;
        padding: 12px 13px; border-radius: 13px; background: #fff;
        border: 1.5px solid var(--line); transition: border-color .15s, background .15s;
    }
    .pay:hover { border-color: var(--primary2); }
    .pay.selected { border-color: var(--primary); background: rgba(0,64,240,.045); }
    .pay input { position: absolute; opacity: 0; pointer-events: none; }
    .pay .p-ico {
        width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
        display: flex; align-items: center; justify-content: center;
        color: var(--primary); background: rgba(0,64,240,.1);
    }
    /* Brand logo chip: square, and larger than the icon tile so the wordmark
       stays legible. The artwork supplies its own background. */
    .pay .p-ico.has-img {
        width: 52px; height: 52px; background: none; overflow: hidden;
        border: 1px solid var(--line);
    }
    .pay .p-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .pay .p-text { min-width: 0; }
    .pay .p-name { display: block; font-size: 13.5px; font-weight: 700; }
    .pay .p-note { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
    .pay .p-dot {
        margin-left: auto; width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0;
        border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; transition: .15s;
    }
    .pay .p-dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
    .pay.selected .p-dot { border-color: var(--primary); background: var(--primary); }
    .pay.selected .p-dot::after { transform: scale(1); }

    /* Order summary */
    .summary { margin-top: 14px; }
    .summary-card {
        background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px;
        box-shadow: 0 2px 10px rgba(29,41,61,.05);
    }
    .summary-card h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 13px; letter-spacing: -.2px; }
    .sum-row {
        display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
        font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 7px 0;
    }
    .sum-row .v { font-weight: 700; color: var(--text); text-align: right; word-break: break-word; }
    .sum-row .v.empty { color: #a5b0c0; font-weight: 500; }
    .sum-total {
        display: flex; align-items: center; justify-content: space-between;
        margin-top: 11px; padding-top: 13px; border-top: 1px dashed var(--line);
    }
    .sum-total .t-label { font-size: 13px; font-weight: 700; }
    .sum-total .t-value { font-size: 21px; font-weight: 800; color: var(--primary); letter-spacing: -.4px; }
    .btn-buy {
        width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 13px; cursor: pointer;
        font-family: inherit; font-size: 14.5px; font-weight: 700; color: #fff;
        background: linear-gradient(135deg,var(--primary),var(--primary2));
        box-shadow: 0 8px 20px rgba(0,64,240,.3);
        display: flex; align-items: center; justify-content: center;
        transition: transform .15s, box-shadow .15s, filter .15s;
    }
    .btn-buy:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,64,240,.36); }
    .btn-buy:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; }
    .sum-note {
        margin-top: 11px; font-size: 11px; line-height: 1.6; color: var(--muted);
        font-weight: 500; text-align: center;
    }

    /* The KHQR widget injects `body { font-family: Inter; background: #f4f4f4 }`
       into the head at runtime, which lands after this stylesheet and would win
       on equal specificity. `html body` outranks it whatever the source order. */
    html body {
        font-family: 'Oxanium', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background: var(--bg);
    }

    /* Payment result panel (filled by the KHQR completion callback) */
    .pay-result { margin-top: 13px; padding: 14px; border-radius: 13px; display: none; border: 1.5px solid; }
    .pay-result.open { display: block; }
    .pay-result.ok   { background: rgba(0,150,80,.07);  border-color: rgba(0,150,80,.35); }
    .pay-result.fail { background: rgba(251,44,54,.05); border-color: rgba(251,44,54,.3); }
    .pay-result.info { background: #f1f5f9; border-color: var(--line); }
    .pay-result h5 { font-size: 13px; font-weight: 700; margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
    .pay-result.ok h5 { color: #00794a; }
    .pay-result.fail h5 { color: #c81e2b; }
    .pay-result.info h5 { color: var(--text); margin-bottom: 0; }
    .pay-result.info ul:empty { display: none; }
    .pay-result ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
    .pay-result li { font-size: 12.5px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
    .pay-result li b { color: var(--text); font-weight: 700; text-align: right; word-break: break-all; }
    .pay-result .pr-note { margin-top: 11px; font-size: 11.5px; line-height: 1.6; color: var(--muted); font-weight: 600; }

    /* ---- Invoice (shown once KHQR reports the payment as paid) ---- */
    .invoice-overlay {
        position: fixed; inset: 0; z-index: 9998; display: none;
        align-items: center; justify-content: center; padding: 20px;
        background: rgba(14,19,27,.62);
        backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    }
    .invoice-overlay.open { display: flex; }
    .invoice {
        width: min(460px, 100%); max-height: 92vh; overflow-y: auto;
        background: #fff; border-radius: 18px; padding: 22px;
        box-shadow: 0 30px 70px rgba(6,10,16,.45);
        animation: invIn .25s cubic-bezier(.4,0,.2,1);
    }
    @keyframes invIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
    @media (prefers-reduced-motion: reduce) { .invoice { animation: none; } }

    .inv-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
    .inv-head img { height: 38px; width: auto; max-width: 140px; object-fit: contain; }
    .inv-head .inv-id { margin-left: auto; text-align: right; }
    .inv-head .inv-title { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
    .inv-head .inv-no { font-size: 13px; font-weight: 700; margin-top: 2px; }

    .inv-paid {
        display: inline-flex; align-items: center; gap: 5px; margin-top: 14px;
        padding: 5px 11px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
        color: #00794a; background: rgba(0,150,80,.1); border: 1px solid rgba(0,150,80,.3);
    }

    .inv-sec { margin-top: 16px; }
    .inv-sec h6 {
        font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
        color: #94a3b8; margin-bottom: 8px;
    }
    .inv-row { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 12.5px; font-weight: 500; color: var(--muted); }
    .inv-row b { color: var(--text); font-weight: 700; text-align: right; word-break: break-all; }

    .inv-item {
        display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
        padding: 12px 13px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line);
    }
    .inv-item .ii-name { font-size: 13.5px; font-weight: 700; }
    .inv-item .ii-sub { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
    .inv-item .ii-price { font-size: 13.5px; font-weight: 700; white-space: nowrap; }

    .inv-total {
        display: flex; align-items: center; justify-content: space-between;
        margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
    }
    .inv-total span { font-size: 13px; font-weight: 700; }
    .inv-total b { font-size: 21px; font-weight: 800; color: var(--primary); letter-spacing: -.4px; }

    .inv-foot { margin-top: 14px; font-size: 11px; line-height: 1.7; color: var(--muted); font-weight: 500; text-align: center; }
    .inv-actions { display: flex; gap: 10px; margin-top: 18px; }
    .inv-actions button {
        flex: 1; padding: 12px; border-radius: 12px; cursor: pointer;
        font-family: inherit; font-size: 13.5px; font-weight: 700; border: none;
    }
    .inv-actions .inv-print { color: #fff; background: linear-gradient(135deg,var(--primary),var(--primary2)); }
    .inv-actions .inv-close { color: #334155; background: #f1f5f9; }
    .inv-actions .inv-close:hover { background: #e8edf3; }

    /* Print just the invoice sheet. It is moved to <body> on load so this works. */
    @media print {
        body > *:not(.invoice-overlay) { display: none !important; }
        .invoice-overlay { position: static; display: block !important; padding: 0; background: none; backdrop-filter: none; }
        .invoice { width: 100%; max-height: none; overflow: visible; box-shadow: none; border-radius: 0; padding: 0; animation: none; }
        .inv-actions { display: none !important; }
    }

    /* Sticky mobile buy bar */
    .buy-bar {
        position: fixed; left: 0; right: 0; bottom: 78px; z-index: 25;
        max-width: 480px; margin: 0 auto; padding: 10px 16px;
        display: flex; align-items: center; gap: 12px;
        background: rgba(255,255,255,.95);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--line);
        transform: translateY(140%); transition: transform .25s cubic-bezier(.4,0,.2,1);
    }
    .buy-bar.show { transform: translateY(0); }
    .buy-bar .bb-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
    .buy-bar .bb-total { font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: -.3px; }
    .buy-bar button {
        margin-left: auto; padding: 12px 24px; border: none; border-radius: 12px; cursor: pointer;
        font-family: inherit; font-size: 14px; font-weight: 700; color: #fff;
        background: linear-gradient(135deg,var(--primary),var(--primary2));
        box-shadow: 0 6px 16px rgba(0,64,240,.3);
    }

    /* Not-found state */
    .nf { text-align: center; padding: 54px 24px; }
    .nf .nf-ico { display: flex; justify-content: center; color: #cbd5e1; margin-bottom: 14px; }
    .nf h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
    .nf p { font-size: 13.5px; color: var(--muted); font-weight: 500; line-height: 1.7; }
    .nf a.nf-btn {
        display: inline-block; margin-top: 18px; padding: 12px 26px; border-radius: 12px;
        background: var(--primary); color: #fff; font-weight: 700; font-size: 13.5px;
    }

    /* ============ DESKTOP ============ */
    @media (min-width: 900px) {
        .breadcrumb { padding: 22px 0 0; font-size: 13.5px; max-width: 1140px; margin: 0 auto; }
        .breadcrumb-wrap { padding: 0 40px; }

        .game-hero { margin: 18px 0 0; padding: 18px 20px; gap: 18px; border-radius: 18px; }
        .game-hero .g-thumb { width: 88px; height: 88px; border-radius: 16px; }
        .game-hero .g-fallback { font-size: 26px; }
        .game-hero h1 { font-size: 24px; }
        /* Desktop fits on one line, so dot separators read well here. */
        .g-badges { gap: 4px 9px; margin-top: 7px; }
        .g-badge { font-size: 12.5px; gap: 6px; }
        .g-badge:not(:last-child)::after { content: '·'; margin-left: 9px; color: #cbd5e1; font-weight: 700; }
        .game-desc { margin: 16px 0 0; padding: 15px 18px; font-size: 13.5px; }

        .buy-wrap { padding: 0; }
        .buy-grid {
            display: grid; grid-template-columns: minmax(0,1fr) 340px;
            gap: 24px; align-items: start; margin-top: 6px;
        }
        .step { padding: 22px; margin-top: 18px; border-radius: 18px; }
        .step-head h4 { font-size: 16px; }
        .step-num { width: 29px; height: 29px; font-size: 13.5px; }

        .denoms { grid-template-columns: repeat(4, 1fr); gap: 12px; }
        .denom { padding: 14px; }
        .denom .d-name { font-size: 14px; }
        .denom .d-price { font-size: 15px; }

        .summary { margin-top: 18px; position: sticky; top: 96px; }
        .summary-card { padding: 20px; border-radius: 18px; }
        .buy-bar { display: none; }

        .more-games { margin-top: 40px; }
    }
/* =======================================================
   KONGMING STORE - EXTRA MODALS & CATEGORY TAB EXTENSIONS
   ======================================================= */

/* Category Tabs */
.cat-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 14px;
    margin-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid var(--line);
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
}
.cat-tab:hover {
    border-color: var(--primary2);
    color: var(--primary);
}
.cat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,64,240,.24);
}

/* Modal Backdrops */
.payment-modal-overlay, .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(14,19,27,.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.payment-modal-overlay.open, .modal-backdrop.open {
    display: flex;
}

/* KHQR Payment Modal */
.payment-modal, .modal-card {
    position: relative;
    width: min(440px, 100%);
    max-height: 94vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 24px 60px rgba(6,10,16,.4);
    animation: invIn .25s cubic-bezier(.4,0,.2,1);
}
.pm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all .15s ease;
}
.pm-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.pm-header {
    text-align: center;
    padding-bottom: 12px;
}
.khqr-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}
.pm-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.pm-header p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

/* Timer Bar */
.pm-timer-bar {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 10px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
.pm-timer-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.pm-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--primary), #ef4444);
    border-radius: 4px;
    transition: width 1s linear;
}

/* QR Code Container */
.pm-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}
.pm-qr-frame {
    position: relative;
    padding: 14px;
    background: #fff;
    border: 2px solid #e11d48;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(225,29,72,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 220px;
}
#khqrCodeContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    height: 210px;
}
#khqrCodeContainer canvas {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}
#khqrCodeContainer img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}
.pm-qr-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 14px;
    z-index: 10;
}
.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0,64,240,.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Amount Box */
.pm-amount-box {
    text-align: center;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
}
.pm-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.pm-amount {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin: 2px 0;
}
.pm-khr {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* Info Grid */
.pm-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
}
.pm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
}
.pm-info-row strong {
    color: var(--text);
}

/* Polling Status */
.pm-polling-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 0 0 rgba(2,132,199,.6);
    animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
    0% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(2,132,199,.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(2,132,199,0); }
    100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(2,132,199,0); }
}

/* Actions */
.pm-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.btn-primary-pay {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(225,29,72,0.3);
    transition: all .15s ease;
}
.btn-primary-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(225,29,72,0.45);
}
.pm-actions-sub {
    display: flex;
    gap: 10px;
}
.btn-secondary {
    flex: 1;
    padding: 11px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1.5px solid var(--line);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .15s ease;
}
.btn-secondary:hover {
    background: #e2e8f0;
}
.btn-ghost-cancel {
    padding: 11px 18px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-ghost-cancel:hover {
    color: #ef4444;
}

/* Track Modal */
.track-search-bar {
    display: flex;
    gap: 8px;
}
.track-search-bar input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
}
.track-search-bar input:focus {
    border-color: var(--primary);
}
.track-search-bar button {
    padding: 11px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.recent-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}
.recent-order-card {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.recent-order-card .ro-game {
    font-weight: 700;
    color: var(--text);
}
.recent-order-card .ro-id {
    color: var(--muted);
    font-size: 11px;
}
.recent-order-card .ro-amount {
    font-weight: 800;
    color: var(--primary);
}
.recent-order-card .ro-status {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
}
.ro-status.paid, .ro-status.completed, .ro-status.Success {
    background: rgba(0,150,80,.12);
    color: #00794a;
}
.ro-status.pending, .ro-status.Pending {
    background: rgba(234,179,8,.15);
    color: #b45309;
}

/* Modal Head */
.modal-head {
    margin-bottom: 16px;
    padding-right: 32px;
}
.modal-head h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.modal-head p {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 3px;
}

