/* ShadowSeek Mobile Web Premium — native-app parity at ≤820px (CSS-first, desktop-safe). */

:root {
    --ss-mweb-bg: #02040a;
    --ss-mweb-surface: #0c1018;
    --ss-mweb-surface-soft: #141a24;
    --ss-mweb-border: rgba(30, 40, 54, 0.92);
    --ss-mweb-text: #ffffff;
    --ss-mweb-muted: rgba(206, 210, 218, 0.94);
    --ss-mweb-primary: #00ff9f;
    --ss-mweb-accent: #ff4ad4;
    --ss-mweb-accent-soft: #63d5ff;
    --ss-mweb-pink: #ff00ff;
    --ss-mweb-cyan: #34e8ff;
    --ss-mweb-touch: 44px;
    --ss-mweb-tab-h: 56px;
    --ss-mweb-caption: 0.72rem;
    --ss-mweb-label: 0.8rem;
    --ss-mweb-body: 0.94rem;
    --ss-mweb-title: 1.2rem;
}

@media (max-width: 820px) {
    /* Shell: full-bleed, no desktop sidebar */
    body.ss-shell-body .su-shell {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.ss-shell-body .su-sidebar,
    body.ss-shell-body .su-quick-nav,
    body.ss-shell-body .su-offer-rail {
        display: none !important;
    }

    body.ss-shell-body .su-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.ss-shell-body .su-content-grid,
    body.ss-shell-body .su-content-main {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Streamlined dock: one horizontal swipe row (see mobile_cyber_nav.css). */
    body.ss-shell-body .ss-mobile-bottom-nav--streamlined .ss-mobile-bottom-nav__shell {
        display: flex !important;
        overflow-x: auto !important;
        touch-action: pan-x !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--streamlined .ss-mobile-bottom-nav__rail {
        display: none !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native {
        display: flex !important;
        align-items: stretch !important;
        justify-content: space-between !important;
        gap: 4px !important;
        width: 100% !important;
        min-height: var(--ss-mweb-tab-h) !important;
        padding: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 6px !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-item {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        min-height: var(--ss-mweb-touch) !important;
        padding: 5px 2px 6px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        border-radius: 12px !important;
        border: 1px solid transparent !important;
        background: transparent !important;
        color: var(--ss-mweb-muted) !important;
        font-size: var(--ss-mweb-caption) !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em;
        box-shadow: none !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-icon {
        display: block !important;
        font-size: 1.12rem !important;
        line-height: 1 !important;
        width: 24px;
        height: 24px;
        text-align: center;
        filter: none;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-icon--live {
        color: #ff3d6a;
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-icon--match {
        color: var(--ss-mweb-accent);
        text-shadow: 0 0 10px rgba(255, 74, 212, 0.35);
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-item.is-active,
    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-item[aria-current="page"] {
        color: var(--ss-mweb-text) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-color: rgba(0, 255, 159, 0.22) !important;
        box-shadow: 0 0 14px rgba(0, 255, 159, 0.12) !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-item.is-active .ss-mobile-bottom-nav__dock-icon,
    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__dock--native .ss-mobile-bottom-nav__dock-item[aria-current="page"] .ss-mobile-bottom-nav__dock-icon {
        color: var(--ss-mweb-text);
        text-shadow: 0 0 12px rgba(0, 255, 159, 0.28);
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__item--create {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 4px 2px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__create-logo {
        display: grid;
        place-items: center;
        width: 42px;
        height: 28px;
        border-radius: 8px;
        border: 2px solid var(--ss-mweb-text);
        background: var(--ss-mweb-primary);
        overflow: hidden;
        box-shadow:
            0 0 16px rgba(0, 255, 159, 0.35),
            0 0 12px rgba(255, 0, 255, 0.18);
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__create-logo img {
        display: block;
        width: 18px;
        height: 18px;
        object-fit: contain;
    }

    body.ss-shell-body .ss-mobile-bottom-nav--social-dock .ss-mobile-bottom-nav__item--create .su-bottom-nav__plus {
        display: none !important;
    }

    body.ss-shell-body .su-bottom-nav.ss-mobile-bottom-nav.ss-mobile-bottom-nav--social-dock {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        padding: 4px 8px calc(6px + env(safe-area-inset-bottom)) !important;
        background:
            linear-gradient(180deg, rgba(2, 4, 10, 0.72), rgba(2, 4, 10, 0.98)) !important;
        border-top: 1px solid rgba(30, 40, 54, 0.88) !important;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55) !important;
    }

    /* Feed: immersive reel, minimal shell chrome */
    body.ss-shell-body.ss-feed-body .su-topbar {
        display: none !important;
    }

    body.ss-shell-body.ss-feed-body .su-content {
        padding: 0 !important;
        padding-bottom: calc(var(--ss-mweb-tab-h) + env(safe-area-inset-bottom)) !important;
    }

    body.ss-feed-body .feed-ad-panel {
        display: none !important;
    }

    body.ss-feed-body .feed-sponsored-rail--mobile {
        display: block !important;
        flex: 0 0 auto;
        width: 100%;
        padding: 8px 10px 0;
        border-bottom: 1px solid rgba(118, 182, 255, 0.14);
        background:
            linear-gradient(180deg, rgba(6, 10, 20, 0.92), rgba(6, 10, 20, 0.55));
    }

    body.ss-feed-body .feed-topbar {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08) 72%, transparent) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    body.ss-feed-body .feed-switch__btn {
        min-height: var(--ss-mweb-touch);
        font-size: var(--ss-mweb-label);
        font-weight: 800;
        letter-spacing: 0.02em;
        border-color: rgba(0, 255, 159, 0.38) !important;
    }

    body.ss-feed-body .feed-switch__btn.is-active,
    body.ss-feed-body .feed-switch__btn[aria-selected="true"] {
        border-color: rgba(255, 0, 255, 0.52) !important;
        box-shadow: 0 0 16px rgba(255, 0, 255, 0.22);
    }

    body.ss-feed-body .feed-meta,
    body.ss-feed-body .feed-caption {
        font-size: var(--ss-mweb-body);
        line-height: 1.35;
    }

    body.ss-feed-body .feed-user__name {
        font-size: var(--ss-mweb-title);
        font-weight: 850;
    }

    /* ShadowMatch: compact stage, premium neon frame */
    body.shadow-match-body .su-content {
        padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    }

    body.shadow-match-body .shadow-match-header h1 {
        text-shadow:
            0 0 14px rgba(255, 72, 208, 0.4),
            0 0 22px rgba(0, 229, 255, 0.24);
    }

    body.shadow-match-body .shadow-match-stack {
        border-radius: 18px;
        box-shadow:
            0 0 0 1px rgba(0, 229, 255, 0.22),
            0 0 28px rgba(255, 42, 184, 0.18),
            0 18px 42px rgba(0, 0, 0, 0.55);
    }

    body.shadow-match-body .shadow-match-actions button,
    body.shadow-match-body .shadow-match-actions a {
        min-width: var(--ss-mweb-touch);
        min-height: var(--ss-mweb-touch);
    }

    /* Profile: edge-to-edge premium cards */
    body.profile-page-body .su-content {
        padding-inline: 8px !important;
        padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    }

    body.profile-page-body .creator-shell.my-profile-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    body.profile-page-body .my-profile-header.neon-card {
        border-radius: 18px;
        border-color: rgba(0, 255, 159, 0.24);
        box-shadow:
            0 0 24px rgba(255, 0, 255, 0.1),
            0 12px 32px rgba(0, 0, 0, 0.45);
    }

    body.profile-page-body .profile-tab-btn,
    body.profile-page-body .creator-actions__btn {
        min-height: var(--ss-mweb-touch);
        font-size: var(--ss-mweb-label);
        font-weight: 800;
    }

    body.profile-page-body .member-reel-grid {
        gap: 8px;
    }

    /* Upload / Create studio hub */
    body.ss-shell-body.upload-body .su-content {
        padding-inline: 10px !important;
        padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    }

    body.upload-body .upload-mobile-hub-header__close,
    body.upload-body .upload-mobile-hub-header__live {
        min-width: var(--ss-mweb-touch);
        min-height: var(--ss-mweb-touch);
    }

    body.upload-body .upload-mobile-hub-header__title {
        font-size: var(--ss-mweb-title);
        font-weight: 900;
        letter-spacing: 0.02em;
    }

    /* Live discover (shell pages, not live_mobile standalone) */
    body.ss-shell-body.ss-live-body .su-content,
    body.ss-shell-body.ss-live-feed-page .su-content {
        padding-inline: 10px !important;
        padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    }

    body.ss-live-body .ss-live-app,
    body.ss-live-feed-page .ss-live-feed__card {
        border-radius: 16px;
    }

    body.ss-live-feed-page .ss-live-feed__category-chip {
        min-height: var(--ss-mweb-touch);
        font-size: var(--ss-mweb-label);
        font-weight: 800;
    }

    /* Topbar compact on non-feed pages */
    body.ss-shell-body:not(.ss-feed-body) .su-topbar {
        padding: 8px 10px 10px;
    }

    body.ss-shell-body:not(.ss-feed-body) .su-search input {
        min-height: var(--ss-mweb-touch);
        font-size: var(--ss-mweb-body);
    }
}

/* Standalone mobile live (live_mobile.html) */
@media (max-width: 820px) {
    body.ss-mobile-live-body .ss-mobile-btn {
        min-height: var(--ss-mweb-touch);
        font-size: var(--ss-mweb-label);
        font-weight: 850;
        letter-spacing: 0.02em;
    }

    body.ss-mobile-live-body .ss-mobile-top-chip {
        min-height: 38px;
        border-color: rgba(0, 255, 159, 0.32);
    }

    body.ss-mobile-live-body .ss-mobile-action-rail button {
        min-width: var(--ss-mweb-touch);
        min-height: var(--ss-mweb-touch);
    }

    body.ss-mobile-live-body .ss-mobile-live-info strong {
        font-size: var(--ss-mweb-title);
        text-shadow: 0 0 14px rgba(255, 0, 255, 0.35);
    }
}
