/* Portal profile storage polish: stronger hierarchy, clearer actions, cleaner spacing. */
body.social-portal-page #portal-profile .pp-storage {
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--social-border, #2f3336);
    background: var(--card-bg, #16181c);
    box-shadow: none;
}

body.social-portal-page #portal-profile .pp-feature {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

body.social-portal-page #portal-profile .pp-feature-alt {
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.10);
}

body.social-portal-page #portal-profile .pp-feature-val {
    background: none;
    color: #f3f7fb;
    letter-spacing: -0.04em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

body.social-portal-page #portal-profile .pp-feature-key {
    color: #8fa1b0;
}

body.social-portal-page #portal-profile .pp-storage-head {
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

body.social-portal-page #portal-profile .pp-storage-title {
    font-size: 19px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #f2f7fd;
}

body.social-portal-page #portal-profile .pp-storage-actions .save-btn {
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--social-border, #2f3336);
    background: rgba(255, 255, 255, 0.03);
    color: #d7dde4;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.social-portal-page #portal-profile .pp-storage-count {
    min-width: 24px;
    height: 22px;
    color: #dce8f3;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--social-border, #2f3336);
}

body.social-portal-page #portal-profile .pp-storage-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border-radius: 13px;
    background: var(--bg, #000);
    border: 1px solid var(--social-border, #2f3336);
    margin-bottom: 12px;
}

body.social-portal-page #portal-profile .pp-storage-tab {
    min-height: 40px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted, #71767b);
    letter-spacing: 0.01em;
    transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

body.social-portal-page #portal-profile .pp-storage-tab:hover {
    color: var(--text, #e7e9ea);
    background: rgba(255, 255, 255, 0.04);
}

body.social-portal-page #portal-profile .pp-storage-tab.active {
    color: var(--bg, #000);
    background: var(--text, #e7e9ea);
    box-shadow: none;
}

body.social-portal-page #portal-profile .pp-storage-list {
    gap: 9px;
    max-height: min(540px, 64dvh);
    padding-right: 4px;
}

body.social-portal-page #portal-profile .pp-storage-list::-webkit-scrollbar {
    width: 9px;
}

body.social-portal-page #portal-profile .pp-storage-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(176, 193, 209, 0.35);
    border: 2px solid transparent;
    background-clip: padding-box;
}

body.social-portal-page #portal-profile .pp-storage-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main qty"
        "main delete";
    column-gap: 10px;
    row-gap: 8px;
    padding: 12px 12px;
    border-radius: 12px;
    background: var(--card-bg, #16181c);
    border: 1px solid var(--social-border, #2f3336);
    box-shadow: none;
    position: relative;
}

body.social-portal-page #portal-profile .pp-storage-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

body.social-portal-page #portal-profile .pp-storage-name {
    font-size: 15px;
    line-height: 1.2;
    color: #f0f6fd;
}

body.social-portal-page #portal-profile .pp-storage-meta {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #95a4b4;
}

body.social-portal-page #portal-profile .pp-storage-next-claim {
    margin-bottom: 6px !important;
    border-color: rgba(149, 219, 255, 0.68) !important;
    background: rgba(18, 92, 122, 0.34) !important;
    color: #d3f3ff !important;
}

body.social-portal-page #portal-profile .pp-storage-qty {
    grid-area: qty;
    justify-self: end;
    align-self: start;
    font-size: 12px;
    font-weight: 900;
    color: #e8f1fa;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--social-border, #2f3336);
}

body.social-portal-page #portal-profile .pp-storage-delete {
    grid-area: delete;
    justify-self: end;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 9px;
    border: 1px solid rgba(244, 36, 62, 0.30);
    background: rgba(244, 36, 62, 0.08);
    color: #f4c4ce;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.social-portal-page #portal-profile .pp-storage-delete:hover {
    color: #fff;
    border-color: #ff6a82;
    background: rgba(244, 36, 62, 0.22);
}

body.social-portal-page #portal-profile .pp-storage-main {
    grid-area: main;
    min-width: 0;
}

body.social-portal-page #portal-profile .pp-top-ticker {
    width: 100%;
    overflow: hidden;
}

body.social-portal-page #portal-profile .pp-top-ticker-rail {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: linear-gradient(90deg, rgba(6, 18, 34, 0.96) 0%, rgba(9, 34, 58, 0.96) 55%, rgba(7, 22, 40, 0.96) 100%);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(3, 34, 67, 0.45);
}

body.social-portal-page #portal-profile .pp-top-ticker-rail::before,
body.social-portal-page #portal-profile .pp-top-ticker-rail::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 56px;
    z-index: 2;
    pointer-events: none;
}

body.social-portal-page #portal-profile .pp-top-ticker-rail::before {
    left: 0;
    background: linear-gradient(90deg, rgba(5, 48, 95, 0.98) 0%, rgba(5, 48, 95, 0) 100%);
}

body.social-portal-page #portal-profile .pp-top-ticker-rail::after {
    right: 0;
    background: linear-gradient(270deg, rgba(5, 48, 95, 0.98) 0%, rgba(5, 48, 95, 0) 100%);
}

body.social-portal-page #portal-profile .pp-top-ticker-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 0;
    padding: 8px 0;
    min-width: 0;
    color: rgba(236, 248, 255, 0.96);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.15;
    text-shadow: 0 1px 0 rgba(3, 21, 42, 0.7);
    animation: ppTickerMove 44s linear infinite;
    will-change: transform;
}

body.social-portal-page #portal-profile .pp-top-ticker-segment {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    padding: 0 18px;
}

body.social-portal-page #portal-profile .pp-top-ticker-line {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

body.social-portal-page #portal-profile .pp-top-ticker-k {
    color: rgba(151, 219, 255, 0.97);
    font-weight: 900;
}

body.social-portal-page #portal-profile .pp-top-ticker-v {
    color: rgba(255, 255, 255, 0.98);
    font-weight: 800;
}

body.social-portal-page #portal-profile .pp-top-ticker-sep {
    color: rgba(170, 224, 255, 0.82);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

body.social-portal-page #portal-profile .pp-feature-clickable {
    appearance: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.14s ease, transform 0.14s ease;
    border-radius: 10px;
    padding: 0;
}

body.social-portal-page #portal-profile .pp-feature-clickable:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.social-portal-page #portal-profile .pp-feature-clickable:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 169, 255, 0.24);
}

body.social-portal-page #portal-profile .pp-feature-clickable:active {
    transform: translateY(1px);
}

@keyframes ppTickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 860px) {
    body.social-portal-page #portal-profile .pp-top-ticker-track {
        font-size: 11px;
        padding: 9px 0;
    }

    body.social-portal-page #portal-profile .pp-top-ticker-segment {
        gap: 10px;
        padding: 0 12px;
    }

    body.social-portal-page #portal-profile .pp-top-ticker-line {
        gap: 8px;
        letter-spacing: 0.04em;
    }

    body.social-portal-page #portal-profile .pp-storage-title {
        font-size: 18px;
    }

    body.social-portal-page #portal-profile .pp-storage-tab {
        min-height: 38px;
        font-size: 12px;
    }

    body.social-portal-page #portal-profile .pp-storage-name {
        font-size: 14px;
    }
}

@media (max-width: 720px) {
    body.social-portal-page #portal-profile .pp-storage {
        padding: 12px;
        border-radius: 16px;
    }

    body.social-portal-page #portal-profile .pp-storage-item {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 8px;
    }

    body.social-portal-page #portal-profile .pp-storage-delete {
        grid-column: auto;
        width: auto;
    }
}

@media (max-width: 480px) {
    body.social-portal-page #portal-profile .pp-storage-head {
        flex-wrap: wrap;
        gap: 10px;
    }

    body.social-portal-page #portal-profile .pp-storage-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.social-portal-page #portal-profile .pp-storage-tabs {
        gap: 5px;
        padding: 5px;
        border-radius: 14px;
    }

    body.social-portal-page #portal-profile .pp-storage-tab {
        min-height: 42px;
        font-size: 14px;
    }
}

/* NO_TEXT_SELECT_STORAGE: kill blue text highlight on hold/drag */
body.social-portal-page #portal-profile .pp-storage-item,
body.social-portal-page #portal-profile .pp-storage-item * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}
body.social-portal-page #portal-profile .pp-storage-item *::selection {
    background: transparent !important;
}

/* HOLD_FLASH_KILL_V2 */
body.social-portal-page #portal-profile .pp-storage-item,
body.social-portal-page #portal-profile .pp-storage-item * {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}
body.social-portal-page #portal-profile .pp-storage-item.storage-press-pending {
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
}
