/* Portal profile - game combat-record style */

#portal-profile {
    color: var(--text, #e7e9ea);
    padding: 14px 14px 36px;
    --pp-inset: 16px;
    --pp-val-col: 60px;
    --pp-act-col: 16px;
    box-sizing: border-box;
    overflow-x: hidden;
}

#portal-profile,
#portal-profile * {
    box-sizing: border-box;
}

#portal-profile .pp-loading,
#portal-profile .pp-storage-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted, #71767b);
    font-size: 15px;
}

#portal-profile .pp-shell {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
    width: 100%;
}

/* ── Hero ── */
#portal-profile .pp-shell .pp-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px !important;
    border: 1px solid var(--social-border, #2f3336) !important;
    background:
        radial-gradient(ellipse 90% 70% at 100% 0%, rgba(29, 155, 240, 0.14), transparent 55%),
        linear-gradient(165deg, #1a1d22 0%, #101216 100%) !important;
    padding: 20px !important;
    isolation: isolate;
    box-shadow: none;
}

#portal-profile .pp-hero::after {
    content: '';
    position: absolute;
    right: -6%;
    top: 50%;
    transform: translateY(-50%);
    width: 52%;
    height: 120%;
    background: var(--pp-rank-bg, url('/assets/png/TedLOGO.png')) center / contain no-repeat;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

#portal-profile .pp-hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#portal-profile .pp-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    background: #0a0c10;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

#portal-profile .pp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 8px;
    box-sizing: border-box;
}

#portal-profile .pp-id {
    min-width: 0;
}

#portal-profile .pp-name {
    margin: 0;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    word-break: break-word;
}

#portal-profile .pp-sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #71767b);
}

#portal-profile .pp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ba7c;
    box-shadow: 0 0 8px rgba(0, 186, 124, 0.6);
    flex-shrink: 0;
}

/* Featured stats */
#portal-profile .pp-feature {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#portal-profile .pp-feature-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

#portal-profile .pp-feature-alt {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

#portal-profile .pp-feature-val {
    font-size: clamp(2.2rem, 10vw, 3.1rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff, #b9c4cc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#portal-profile .pp-feature-key {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted, #71767b);
}

/* ── Wallets ── */
#portal-profile .pp-wallets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--social-border, #2f3336);
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 14px;
    overflow: hidden;
}

#portal-profile .pp-wallet {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 14px var(--pp-inset);
    background: var(--card-bg, #16181c);
}

#portal-profile .pp-wallet img {
    display: block;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

#portal-profile .pp-wallet-val {
    justify-self: end;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

#portal-profile .pp-wallet-key {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, #71767b);
    text-align: right;
    white-space: nowrap;
}

/* ── Combat record ── */
#portal-profile .pp-records {
    border-radius: 18px;
    border: 1px solid var(--social-border, #2f3336);
    background: var(--card-bg, #16181c);
    padding: 6px var(--pp-inset);
}

#portal-profile .pp-rec-head {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted, #71767b);
    padding: 14px 0 8px;
}

#portal-profile .pp-rec-list {
    display: flex;
    flex-direction: column;
}

#portal-profile .pp-security-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 0 6px;
}

#portal-profile .pp-security-button {
    min-height: 48px;
    border: 1px solid rgba(29, 155, 240, 0.35);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.15) 0%, rgba(29, 155, 240, 0.08) 100%);
    color: var(--social-blue, #1d9bf0);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#portal-profile .pp-security-button:hover {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.25) 0%, rgba(29, 155, 240, 0.15) 100%);
    border-color: rgba(29, 155, 240, 0.55);
    box-shadow: 0 6px 20px rgba(29, 155, 240, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

#portal-profile .pp-security-button:active {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.32) 0%, rgba(29, 155, 240, 0.22) 100%);
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

#portal-profile .pp-row {
    display: grid;
    grid-template-columns: 1fr var(--pp-val-col) var(--pp-act-col);
    align-items: center;
    column-gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--social-border, #2f3336);
    background: transparent;
    border-left: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

#portal-profile .pp-row:hover:not(.pp-row-static) .pp-row-label,
#portal-profile .pp-row:active:not(.pp-row-static) .pp-row-label {
    color: var(--social-blue, #1d9bf0);
}

#portal-profile .pp-row-static {
    cursor: default;
}

#portal-profile .pp-row-label {
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #e7e9ea);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#portal-profile .pp-row-val {
    justify-self: end;
    width: 100%;
    text-align: right;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

#portal-profile .pp-row-go {
    justify-self: end;
    width: var(--pp-act-col);
    text-align: center;
    color: var(--text-muted, #71767b);
    font-size: 18px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.13s ease, color 0.13s ease;
}

#portal-profile .pp-row-static .pp-row-go {
    visibility: hidden;
    opacity: 0;
}

#portal-profile .pp-row:hover:not(.pp-row-static) .pp-row-go,
#portal-profile .pp-row:active:not(.pp-row-static) .pp-row-go {
    opacity: 1;
    color: var(--social-blue, #1d9bf0);
}

/* ── Storage ── */
#portal-profile .pp-storage {
    border-radius: 18px;
    border: 1px solid var(--social-border, #2f3336);
    background: var(--card-bg, #16181c);
    padding: 16px;
}

#portal-profile .pp-storage-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
}

#portal-profile .pp-storage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#portal-profile .pp-storage-actions .save-btn {
    min-height: 38px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid rgba(29, 155, 240, 0.3);
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.12) 0%, rgba(29, 155, 240, 0.05) 100%);
    color: var(--social-blue, #1d9bf0);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.08);
}

#portal-profile .pp-storage-actions .save-btn:hover {
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.2) 0%, rgba(29, 155, 240, 0.1) 100%);
    border-color: rgba(29, 155, 240, 0.5);
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.15);
    transform: translateY(-1px);
}

#portal-profile .pp-storage-actions .save-btn:active {
    box-shadow: 0 1px 4px rgba(29, 155, 240, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

#portal-profile .pp-storage-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#portal-profile .pp-storage-count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: var(--social-blue, #1d9bf0);
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.15) 0%, rgba(29, 155, 240, 0.08) 100%);
    border: 1px solid rgba(29, 155, 240, 0.25);
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 6px rgba(29, 155, 240, 0.1);
}

#portal-profile .pp-storage-count:empty {
    display: none;
}

#portal-profile .pp-storage-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 1px solid rgba(47, 51, 54, 0.8);
    margin-bottom: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

#portal-profile .pp-storage-tab {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted, #71767b);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

#portal-profile .pp-storage-tab:hover {
    color: var(--text, #e7e9ea);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

#portal-profile .pp-storage-tab.active {
    color: var(--bg, #000);
    background: linear-gradient(135deg, var(--text, #e7e9ea) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-weight: 900;
}

#portal-profile .pp-storage-list {
    display: grid;
    gap: 8px;
    max-height: min(440px, 52dvh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#portal-profile .pp-storage-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg, #000);
    border: 1px solid var(--social-border, #2f3336);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
}

#portal-profile .pp-storage-list {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

#portal-profile .pp-storage-list.is-reordering,
#portal-profile .pp-storage-list.is-press-pending,
#portal-profile .pp-storage-item.dragging,
#portal-profile .pp-storage-item.storage-press-pending {
    touch-action: none;
}

#portal-profile .pp-storage-list.is-reordering,
#portal-profile .pp-storage-list.is-press-pending {
    overflow: hidden !important;
    overscroll-behavior: none;
}

html.storage-drag-lock,
body.storage-drag-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

#portal-profile .pp-storage-item.dragging {
    opacity: 0.72;
    border-color: var(--social-blue, #1d9bf0);
    box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.18);
    cursor: grabbing;
}

#portal-profile .pp-storage-item.dragging .pp-storage-delete,
#portal-profile .pp-storage-item.dragging .pp-storage-qty,
#portal-profile .pp-storage-item.dragging .pp-storage-main {
    pointer-events: none;
}

#portal-profile .pp-storage-main {
    min-width: 0;
}

#portal-profile .pp-storage-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#portal-profile .pp-storage-meta {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #71767b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#portal-profile .pp-storage-qty {
    font-size: 13px;
    font-weight: 800;
    color: var(--text, #e7e9ea);
    font-variant-numeric: tabular-nums;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

#portal-profile .pp-storage-delete {
    min-height: 32px;
    padding: 6px 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted, #71767b);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

#portal-profile .pp-storage-delete:hover {
    color: #fff;
    background: #f4243e;
    border-color: #f4243e;
}

/* ── Leaderboard modal ── */
.pp-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.pp-modal-backdrop.is-open {
    display: flex;
}

.pp-modal {
    width: min(420px, 100%);
    max-height: min(80dvh, calc(100dvh - 24px));
    overflow-y: auto;
    background: var(--card-bg, #16181c);
    border: 1px solid var(--social-border, #2f3336);
    border-radius: 18px;
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-elevated, 0 8px 32px rgba(0, 0, 0, 0.65));
}

.pp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted, #71767b);
    font-size: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.pp-modal-close:hover {
    background: var(--social-hover, rgba(231, 233, 234, 0.04));
    color: var(--text, #e7e9ea);
}

.pp-modal-title {
    margin: 0 32px 16px 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pp-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--social-border, #2f3336);
    font-size: 14px;
}

.pp-lb-row:last-child {
    border-bottom: none;
}

.pp-lb-rank {
    width: 28px;
    text-align: center;
    font-weight: 900;
    color: var(--text-muted, #71767b);
    font-size: 13px;
    flex-shrink: 0;
}

.pp-lb-rank.gold { color: #ffd400; }
.pp-lb-rank.silver { color: #aab8c2; }
.pp-lb-rank.bronze { color: #cd7f32; }

.pp-lb-name {
    flex: 1;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-lb-val {
    color: var(--social-blue, #1d9bf0);
    font-weight: 900;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
    #portal-profile .pp-wallets {
        grid-template-columns: 1fr;
    }

    #portal-profile .pp-storage-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #portal-profile .pp-storage-delete {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    #portal-profile {
        padding: 10px 0 30px;
        --pp-inset: 12px;
        --pp-val-col: 54px;
    }

    #portal-profile .pp-shell .pp-hero,
    #portal-profile .pp-records,
    #portal-profile .pp-storage {
        border-radius: 16px;
    }

    #portal-profile .pp-shell .pp-hero {
        padding: 16px !important;
    }

    #portal-profile .pp-hero-top {
        gap: 12px;
    }

    #portal-profile .pp-avatar {
        width: 58px;
        height: 58px;
        border-radius: 15px;
    }

    #portal-profile .pp-name {
        font-size: clamp(1.25rem, 7vw, 1.55rem);
    }

    #portal-profile .pp-sub {
        font-size: 12px;
    }

    #portal-profile .pp-feature {
        margin-top: 16px;
        padding-top: 15px;
        gap: 0;
    }

    #portal-profile .pp-feature-alt {
        padding-left: 14px;
    }

    #portal-profile .pp-feature-val {
        font-size: clamp(2rem, 12vw, 2.55rem);
    }

    #portal-profile .pp-feature-key {
        font-size: 10px;
        letter-spacing: 0.12em;
    }

    #portal-profile .pp-wallet {
        grid-template-columns: 36px 1fr auto;
        padding: 12px var(--pp-inset);
        gap: 8px;
    }

    #portal-profile .pp-wallet img {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    #portal-profile .pp-wallet-val,
    #portal-profile .pp-row-val {
        font-size: 16px;
    }

    #portal-profile .pp-wallet-key {
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    #portal-profile .pp-storage {
        padding: 14px;
    }

    #portal-profile .pp-storage-tab {
        min-height: 36px;
        font-size: 12px;
    }

    #portal-profile .pp-storage-item {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 11px 12px;
    }

    #portal-profile .pp-storage-delete {
        grid-column: 1 / -1;
        justify-self: start;
    }
}




/* ── Kits button + modal (profile) ── */
#portal-profile .pp-hero-top {
    justify-content: space-between;
    gap: 12px;
}
#portal-profile .pp-hero-id-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
#portal-profile .pp-kits-btn {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.08), transparent 40%),
        linear-gradient(165deg, #1c1f26 0%, #0d0f13 100%);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.28),
        0 10px 24px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
#portal-profile .pp-kits-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(240, 215, 140, 0.5),
        0 14px 28px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(212, 175, 55, 0.12);
}
#portal-profile .pp-kits-btn:active { transform: translateY(0); }
#portal-profile .pp-kits-btn-face {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}
#portal-profile .pp-kits-btn-face svg {
    width: 28px;
    height: 28px;
    display: block;
}
#portal-profile .pp-kits-btn-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px #101216, 0 0 10px rgba(34, 197, 94, 0.7);
    display: none;
}
#portal-profile .pp-kits-btn.has-ready .pp-kits-btn-dot { display: block; }

.pp-kits-modal {
    width: min(400px, 100%);
    max-height: min(84dvh, 720px);
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.07);
    background: #0b0d11;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.72),
        0 0 0 1px rgba(212, 175, 55, 0.08);
}
.pp-kits-chrome {
    display: flex;
    flex-direction: column;
    max-height: min(84dvh, 720px);
}
.pp-kits-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(212,175,55,0.06), transparent);
}
.pp-kits-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f5f6f8;
}
.pp-kits-x {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: #8b98a5;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.pp-kits-x:hover {
    background: rgba(255,255,255,0.08);
    color: #e7e9ea;
}
.pp-kits-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.pp-kits-empty,
.pp-kits-loading {
    text-align: center;
    padding: 48px 16px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pp-kit-row {
    padding: 12px 12px 10px;
    border-radius: 14px;
    background: #11141a;
    border: 1px solid rgba(255,255,255,0.045);
    transition: border-color .12s ease, background .12s ease;
}
.pp-kit-row:hover {
    border-color: rgba(255,255,255,0.08);
    background: #13171e;
}
.pp-kit-row.is-ready {
    border-color: rgba(34, 197, 94, 0.28);
    background: linear-gradient(135deg, rgba(34,197,94,0.08), #11141a 55%);
}
.pp-kit-row.is-cooldown {
    border-color: rgba(251, 191, 36, 0.18);
}
.pp-kit-row.is-locked {
    opacity: 0.88;
}
.pp-kit-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.pp-kit-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f3f4f6;
    line-height: 1.25;
    min-width: 0;
}
.pp-kit-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.pp-kit-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: #9ca3af;
    white-space: nowrap;
}
.pp-kit-status.ready {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}
.pp-kit-status.cooldown {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
}
.pp-kit-status.locked {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}
.pp-kit-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    color: #111;
    background: linear-gradient(180deg, #f0d78c, #d4af37);
    border: 0;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}
.pp-kit-buy:hover {
    filter: brightness(1.06);
    color: #000;
}
.pp-kit-qc {
    margin-top: 7px;
    font-size: 12.5px;
    font-weight: 650;
    color: #c8d0d8;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.pp-kit-qc span {
    color: #6b7280;
    font-weight: 700;
}
.pp-kit-bottom {
    margin-top: 6px;
}
.pp-kit-uses {
    font-size: 11px;
    font-weight: 650;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
    #portal-profile .pp-kits-btn {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    #portal-profile .pp-kits-btn-face svg {
        width: 25px;
        height: 25px;
    }
    .pp-kits-modal {
        border-radius: 16px;
        width: min(100%, calc(100vw - 16px));
    }
    .pp-kit-title { white-space: normal; }
}



/* Portal kits - kit builder preview thumbs */
.pp-kit-main{display:flex;gap:12px;align-items:flex-start}
.pp-kit-copy{flex:1;min-width:0}
.pp-kit-thumb{
  flex:0 0 72px;width:72px;height:72px;border-radius:12px;border:1px solid rgba(0,229,255,.16);
  background:linear-gradient(180deg,#141b26,#0d1219);display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:1fr;
  gap:2px;padding:5px;overflow:hidden;cursor:pointer
}
.pp-kit-thumb img{width:100%;height:100%;object-fit:contain;image-rendering:auto}
.pp-kit-thumb-empty{display:flex;align-items:center;justify-content:center;color:#5d7390;font-weight:800;cursor:default}
.pp-kit-sub{margin-top:4px;font-size:11px;color:#7f93ad}
.pp-kit-sub code{font-size:10px;color:#9ec9ff;background:rgba(80,140,220,.12);padding:1px 6px;border-radius:6px}
.pp-kit-row.has-preview .pp-kit-title:hover{color:#7fdfff}
.pp-kit-preview-modal{width:min(520px,calc(100vw - 24px));max-height:min(90vh,860px)}
.pp-kit-preview-body{padding:12px 14px 16px;overflow:auto;max-height:min(78vh,720px)}
.pp-kit-preview-shot{display:flex;justify-content:center}
.pp-kit-preview-shot img{max-width:100%;border-radius:12px;border:1px solid rgba(0,229,255,.16);background:#0a0f15}
.pp-kit-item-list{display:grid;gap:8px}
.pp-kit-item-row{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);font-size:13px;color:#d5e2f2}
.pp-kit-item-row img{width:28px;height:28px;object-fit:contain}
