/* Yeux Feed — X/Twitter-style home timeline (dedicated stylesheet) */

/* SPA visibility: ID-level layout rules must NOT override inactive page hiding. */
#page-feed.page-content:not(.active),
#page-profile.page-content:not(.active) {
    display: none !important;
}

/* ── Page layout: centered column (active tab only) ── */
#page-feed.page-content.active {
    width: 100%;
    max-width: none;
    padding: 0 !important;
    background: #000;
    display: block;
}
body.theme-light #page-feed.page-content.active {
    background: #f0f3f5;
}

/* ── Account-style layout: fixed left nav + flexible main, anchored to left ── */
#page-feed .feed-layout {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    max-width: none;
    margin: 0;
    width: 100%;
    min-height: 100vh;
}

#page-feed .feed-shell.feed-shell--main {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border-left: 1px solid #2f3336;
    border-right: 1px solid #2f3336;
    background: #000;
    box-sizing: border-box;
}
body.theme-light #page-feed .feed-shell--main {
    background: #fff;
    border-left-color: #eff3f4;
    border-right-color: #eff3f4;
}

#page-feed .feed-rail {
    width: 350px;
    flex-shrink: 0;
    padding: 12px 0 48px 24px;
    display: none;
}
@media (min-width: 1100px) {
    #page-feed .feed-rail { display: block; }
}

#page-feed .feed-shell {
    width: 100%;
    max-width: min(960px, 100%);
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    border-left: 1px solid #2f3336;
    border-right: 1px solid #2f3336;
    background: #000;
    box-sizing: border-box;
}
body.theme-light #page-feed .feed-shell {
    background: #fff;
    border-left-color: #eff3f4;
    border-right-color: #eff3f4;
}

#page-feed .feed-wrap.feed-wrap--modern {
    min-height: 100vh;
    width: 100%;
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

/* ── Sticky page title (Twitter "Home") ── */
#page-feed .feed-page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #2f3336;
}
body.theme-light #page-feed .feed-page-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: #eff3f4;
}
#page-feed .feed-page-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-page-header h1 { color: #0f1419; }

/* ── Underline tabs ── */
#page-feed .feed-nav-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    background: #000;
    border-bottom: 1px solid #2f3336;
}
body.theme-light #page-feed .feed-nav-tabs {
    background: #fff;
    border-bottom-color: #eff3f4;
}
#page-feed .feed-nav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #71767b;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}
#page-feed .feed-nav-tab:hover {
    background: rgba(231, 233, 234, 0.08) !important;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-nav-tab:hover {
    background: rgba(15, 20, 25, 0.04) !important;
    color: #0f1419;
}
#page-feed .feed-nav-tab.active {
    color: #e7e9ea !important;
    background: transparent !important;
}
body.theme-light #page-feed .feed-nav-tab.active { color: #0f1419 !important; }
#page-feed .feed-nav-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: #1d9bf0;
}
body.theme-light #page-feed .feed-nav-tab.active::after { background: #1d9bf0; }

/* ── Timeline mode tabs (For you / Following / Bookmarks) ── */
#page-feed .feed-timeline-tabs {
    display: flex;
    border-bottom: 1px solid #2f3336;
    background: #000;
}
body.theme-light #page-feed .feed-timeline-tabs {
    background: #fff;
    border-bottom-color: #eff3f4;
}
#page-feed .feed-timeline-tab {
    flex: 1;
    padding: 14px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #71767b;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease, background 0.15s ease;
}
#page-feed .feed-timeline-tab:hover {
    background: rgba(231, 233, 234, 0.06);
    color: #e7e9ea;
}
#page-feed .feed-timeline-tab.active {
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-timeline-tab.active { color: #0f1419; }
#page-feed .feed-timeline-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 999px;
    background: #1d9bf0;
}

/* ── Twitter-style pill buttons ── */
#page-feed .feed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}
#page-feed .feed-btn:disabled { opacity: 0.5; cursor: default; }
#page-feed .feed-btn--tweet {
    padding: 8px 20px;
    min-width: 72px;
    background: #1d9bf0;
    color: #fff;
}
#page-feed .feed-btn--tweet:hover:not(:disabled) { filter: brightness(1.08); }
#page-feed .feed-btn--reply {
    padding: 7px 18px;
    min-width: 64px;
    background: #1d9bf0;
    color: #fff;
    font-size: 14px;
}
#page-feed .feed-btn--outline {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #1d9bf0;
    border: 1px solid #2f3336;
}
body.theme-light #page-feed .feed-btn--outline { border-color: #cfd9de; }
#page-feed .feed-btn--outline:hover:not(:disabled) {
    background: rgba(29, 155, 240, 0.08);
}
#page-feed .feed-btn--follow {
    padding: 7px 16px;
    background: #eff3f4;
    color: #0f1419;
    font-size: 14px;
}
body.theme-dark #page-feed .feed-btn--follow {
    background: #eff3f4;
    color: #0f1419;
}

/* ── Right rail ── */
#page-feed .feed-rail-search {
    position: sticky;
    top: 12px;
    z-index: 10;
    margin-bottom: 16px;
    padding: 0;
    border: none;
    background: transparent;
}
#page-feed .feed-rail .feed-search-input-wrap {
    border-radius: 999px;
    background: #202327;
    border: 1px solid transparent;
}
body.theme-light #page-feed .feed-rail .feed-search-input-wrap {
    background: #eff3f4;
}
#page-feed .feed-rail-card {
    background: #16181c;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}
body.theme-light #page-feed .feed-rail-card {
    background: #f7f9f9;
}
#page-feed .feed-rail-title {
    margin: 0;
    padding: 14px 16px 8px;
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-rail-title { color: #0f1419; }
#page-feed .feed-rail-loading {
    padding: 12px 16px 16px;
    color: #71767b;
    font-size: 14px;
}
#page-feed .feed-trend-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.12s ease;
}
#page-feed .feed-trend-item:hover { background: rgba(255, 255, 255, 0.04); }
body.theme-light #page-feed .feed-trend-item:hover { background: rgba(0, 0, 0, 0.04); }
#page-feed .feed-trend-cat {
    font-size: 12px;
    color: #71767b;
}
#page-feed .feed-trend-topic {
    font-size: 15px;
    font-weight: 700;
    color: #e7e9ea;
    margin: 2px 0;
}
body.theme-light #page-feed .feed-trend-topic { color: #0f1419; }
#page-feed .feed-trend-count {
    font-size: 12px;
    color: #71767b;
}
#page-feed .feed-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}
#page-feed .feed-suggest-info { flex: 1; min-width: 0; }
#page-feed .feed-suggest-name {
    font-weight: 700;
    font-size: 15px;
    color: #e7e9ea;
    cursor: pointer;
}
body.theme-light #page-feed .feed-suggest-name { color: #0f1419; }
#page-feed .feed-suggest-handle {
    font-size: 14px;
    color: #71767b;
}

/* ── Post category pill ── */
#page-feed .feed-cat-pill {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1d9bf0;
    background: rgba(29, 155, 240, 0.12);
}

/* ── Search ── */
#page-feed .feed-search-bar {
    padding: 12px 16px;
    border-bottom: 1px solid #2f3336;
    background: #000;
}
body.theme-light #page-feed .feed-search-bar {
    background: #fff;
    border-bottom-color: #eff3f4;
}
#page-feed .feed-search-input {
    background: #202327 !important;
    border-color: transparent !important;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-search-input {
    background: #eff3f4 !important;
    color: #0f1419;
}
#page-feed .feed-search-input:focus {
    border-color: #1d9bf0 !important;
    box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.25) !important;
}

/* ── Composer ── */
#page-feed .feed-composer {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #2f3336;
    background: #000;
    transition: background 0.2s ease;
}
body.theme-light #page-feed .feed-composer {
    background: #fff;
    border-bottom-color: #eff3f4;
}
#page-feed .feed-composer:focus-within {
    background: rgba(29, 155, 240, 0.04);
}
#page-feed .feed-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: linear-gradient(145deg, #1d9bf0 0%, #794bc4 100%) !important;
    box-shadow: 0 4px 14px rgba(29, 155, 240, 0.35);
}
#page-feed .feed-composer textarea {
    font-size: 20px !important;
    line-height: 1.4 !important;
    color: #e7e9ea !important;
    min-height: 56px !important;
}
body.theme-light #page-feed .feed-composer textarea { color: #0f1419 !important; }
#page-feed .feed-composer textarea::placeholder { color: #71767b !important; }

#page-feed .feed-composer-foot {
    border-top-color: #2f3336;
    margin-top: 8px;
    padding-top: 12px;
}
body.theme-light #page-feed .feed-composer-foot { border-top-color: #eff3f4; }

#page-feed .feed-composer-icon-btn {
    width: 38px;
    height: 38px;
    color: #1d9bf0 !important;
    font-size: 20px;
}
#page-feed .feed-composer-icon-btn:hover {
    background: rgba(29, 155, 240, 0.12) !important;
}

#page-feed .feed-composer-foot .header-btn,
#page-feed #feed-composer-submit,
#page-feed .feed-composer-foot .feed-btn--tweet {
    border-radius: 999px !important;
    padding: 9px 22px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    background: #1d9bf0 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    transition: filter 0.15s ease !important;
}
#page-feed .feed-composer-foot .header-btn:hover,
#page-feed #feed-composer-submit:hover,
#page-feed .feed-composer-foot .feed-btn--tweet:hover {
    filter: brightness(1.1) !important;
}

/* ── Feed cards ── */
#page-feed .feed-list { background: #000; }
body.theme-light #page-feed .feed-list { background: #fff; }

#page-feed .feed-card {
    padding: 12px 16px;
    border-bottom: 1px solid #2f3336;
    background: transparent;
    transition: background 0.12s ease;
}
body.theme-light #page-feed .feed-card { border-bottom-color: #eff3f4; }
#page-feed .feed-card::before { display: none; }
#page-feed .feed-card:hover {
    background: rgba(231, 233, 234, 0.04);
    box-shadow: none;
}
body.theme-light #page-feed .feed-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

#page-feed .feed-repost-banner {
    margin: 0 0 4px 56px;
    font-size: 13px;
    color: #71767b;
}
#page-feed .feed-repost-banner i { color: #00ba7c; }

#page-feed .feed-tweet-row { gap: 12px; }
#page-feed .feed-avatar.feed-clickable {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

#page-feed .feed-name {
    font-weight: 700;
    font-size: 15px;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-name { color: #0f1419; }
#page-feed .feed-handle,
#page-feed .feed-time { color: #71767b; font-size: 15px; }
#page-feed .feed-dot {
    width: 3px; height: 3px;
    background: #71767b;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

#page-feed .feed-tweet-text {
    font-size: 15px;
    line-height: 1.55;
    color: #e7e9ea;
    margin-top: 2px;
}
body.theme-light #page-feed .feed-tweet-text { color: #0f1419; }

#page-feed .feed-tweet-image {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid #2f3336;
    overflow: hidden;
}
body.theme-light #page-feed .feed-tweet-image { border-color: #cfd9de; }
#page-feed .feed-tweet-image img {
    transition: transform 0.35s ease;
}
#page-feed .feed-tweet-image:hover img { transform: scale(1.02); }

/* ── Action toolbar (Twitter colors) ── */
#page-feed .feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin-top: 10px;
    gap: 0;
}
#page-feed .feed-tb-btn {
    flex: 1;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: #71767b;
    border-radius: 999px;
}
#page-feed .feed-tb-btn i { font-size: 18px; }

#page-feed .feed-tb-btn.feed-tb-reply:hover {
    background: rgba(29, 155, 240, 0.12);
    color: #1d9bf0;
}
#page-feed .feed-tb-btn.feed-tb-repost:hover,
#page-feed .feed-tb-btn.feed-tb-repost.feed-tb-on {
    background: rgba(0, 186, 124, 0.12);
    color: #00ba7c;
}
#page-feed .feed-tb-btn.feed-tb-like:hover,
#page-feed .feed-tb-btn.feed-tb-like.feed-tb-on {
    background: rgba(249, 24, 128, 0.12);
    color: #f91880;
}
#page-feed .feed-tb-btn.feed-tb-del:hover {
    background: rgba(244, 33, 46, 0.12);
    color: #f4212e;
}

#page-feed .feed-tb-btn.feed-tb-bookmark:hover,
#page-feed .feed-tb-btn.feed-tb-bookmark.feed-tb-on {
    background: rgba(29, 155, 240, 0.12);
    color: #1d9bf0;
}

/* View count is informational only — not clickable */
#page-feed .feed-tb-views,
.feed-tb-views {
    cursor: default;
    pointer-events: none;
}
#page-feed .feed-tb-views:hover {
    background: transparent;
    color: #71767b;
}

/* ── Comments panel ── */
#page-feed .feed-comments {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #2f3336;
}
body.theme-light #page-feed .feed-comments { border-top-color: #eff3f4; }
#page-feed .feed-comment-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding: 0;
}
#page-feed .feed-comment-form .feed-avatar-sm { flex-shrink: 0; }
#page-feed .feed-comment-form textarea {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #202327;
    border: 1px solid transparent;
    color: #e7e9ea;
    font-size: 15px;
    resize: none;
    min-height: 42px;
}
body.theme-light #page-feed .feed-comment-form textarea {
    background: #eff3f4;
    color: #0f1419;
}
#page-feed .feed-comment-form .header-btn,
#page-feed .feed-comment-form .feed-btn--reply {
    flex-shrink: 0;
    background: #1d9bf0 !important;
    border-radius: 999px !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    color: #fff !important;
    border: none !important;
}

/* ── DM improvements ── */
#page-feed .feed-dm-convo-preview {
    font-size: 13px;
    color: #71767b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
#page-feed .feed-dm-chat-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #2f3336;
}
body.theme-light #page-feed .feed-dm-chat-form { border-top-color: #eff3f4; }
#page-feed .feed-dm-chat-form textarea {
    flex: 1;
    border-radius: 999px;
    padding: 10px 16px;
    background: #202327;
    border: none;
    color: #e7e9ea;
    resize: none;
    font-size: 15px;
}
body.theme-light #page-feed .feed-dm-chat-form textarea {
    background: #eff3f4;
    color: #0f1419;
}

/* legacy comment form override */
#page-feed .feed-comment-form textarea {
    border-radius: 999px;
    background: #202327;
    border-color: transparent;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-comment-form textarea {
    background: #eff3f4;
    color: #0f1419;
}
#page-feed .feed-comment-form .header-btn {
    background: #1d9bf0 !important;
    border-radius: 999px !important;
}

/* ── Empty + load more ── */
#page-feed .feed-empty {
    padding: 48px 24px;
    color: #71767b;
    border-bottom: 1px solid #2f3336;
}
#page-feed .feed-load-more-wrap {
    padding: 16px;
    border-bottom: 1px solid #2f3336;
}
#page-feed .feed-load-more-wrap .header-btn,
#page-feed .feed-load-more-wrap .feed-btn--outline {
    width: 100%;
    border-radius: 999px !important;
    background: transparent !important;
    color: #1d9bf0 !important;
    border: 1px solid #2f3336 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    padding: 12px 20px !important;
}
#page-feed .feed-load-more-wrap .header-btn:hover,
#page-feed .feed-load-more-wrap .feed-btn--outline:hover {
    background: rgba(29, 155, 240, 0.08) !important;
    filter: none !important;
}

@media (max-width: 1099px) {
    #page-feed .feed-layout { max-width: 600px; }
    #page-feed .feed-shell--main {
        border-left: none;
        border-right: none;
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    #page-feed .feed-shell {
        border-left: none;
        border-right: none;
        max-width: 100%;
        padding: 0;
    }
}
#page-feed .feed-dm-header {
    padding: 16px;
    border-bottom: 1px solid #2f3336;
    background: #000;
}
body.theme-light #page-feed .feed-dm-header {
    background: #fff;
    border-bottom-color: #eff3f4;
}
#page-feed .feed-dm-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
}
body.theme-light #page-feed .feed-dm-header h3 { color: #0f1419; }

@media (max-width: 700px) {
    #page-feed .feed-shell {
        border-left: none;
        border-right: none;
        max-width: 100%;
    }
}

/* ── Left nav (mirrors Settings → Account sidebar) ── */
.feed-left-rail {
    width: 250px;
    flex-shrink: 0;
    background-color: #0c0c0c;
    border-right: 1px solid #222;
    padding: 16px 8px;
    box-sizing: border-box;
    align-self: stretch;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: block;
}
body.theme-light .feed-left-rail {
    background-color: #f7f9f9;
    border-right-color: #eff3f4;
}
.feed-left-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.feed-left-nav-item {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #888;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    margin-bottom: 4px;
}
body.theme-light .feed-left-nav-item { color: #536471; }
.feed-left-nav-item i {
    width: 24px;
    min-width: 24px;
    font-size: 18px;
    margin-right: 14px;
    text-align: center;
}
.feed-left-nav-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}
body.theme-light .feed-left-nav-item:hover {
    color: #0f1419;
    background-color: rgba(0, 0, 0, 0.05);
}
.feed-left-nav-item.active {
    background-color: #1a1a1a;
    color: #fff;
}
body.theme-light .feed-left-nav-item.active {
    background-color: #e8eef2;
    color: #0f1419;
}
.feed-left-nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #1d9bf0;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.feed-nav-tabs--hidden,
.feed-timeline-tabs--hidden { display: none !important; }

/* ── Avatar images ── */
.feed-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 999px;
}

.feed-avatar-wrap.feed-avatar-sm,
img.feed-avatar-sm.feed-avatar-img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.feed-avatar-wrap.feed-avatar,
img.feed-avatar.feed-avatar-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.feed-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}

.feed-avatar .feed-avatar-img,
.feed-avatar-sm .feed-avatar-img { border-radius: 999px; }

#page-feed .feed-suggest-item .feed-avatar-sm,
#page-feed .feed-suggest-item .feed-avatar-wrap,
#page-feed .feed-suggest-item img.feed-avatar-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
}

/* ── Verified badges ── */
.yeux-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    font-size: 0.88em;
    line-height: 1;
    vertical-align: -0.08em;
}

.yeux-verified--admin { color: #f97316; }
.yeux-verified--premium { color: #7dd3fc; }

.feed-name .yeux-verified,
.feed-suggest-name .yeux-verified,
.profile-name .yeux-verified,
.blog-comment-user .yeux-verified {
    font-size: 0.82em;
}

/* ── Profile (Twitter/X layout) ── */
#page-profile.page-content.active {
    width: 100%;
    max-width: none;
    padding: 0 !important;
    background: #000;
    display: block;
}
body.theme-light #page-profile.page-content.active { background: #f0f3f5; }

#page-profile .feed-layout--with-left {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    max-width: none;
    margin: 0;
    width: 100%;
    min-height: 100vh;
}

#page-profile .feed-shell.feed-shell--main {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border-left: 1px solid #2f3336;
    border-right: 1px solid #2f3336;
    background: #000;
}
body.theme-light #page-profile .feed-shell--main {
    background: #fff;
    border-color: #eff3f4;
}

#page-profile .feed-wrap--profile-x {
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
    border-left: none;
    border-right: none;
    max-width: none;
}
body.theme-light #page-profile .feed-wrap--profile-x { background: #fff; }

#page-profile .profile-cover {
    height: 200px;
    width: 100%;
    background: #333639;
    flex-shrink: 0;
}
body.theme-light #page-profile .profile-cover { background: #cfd9de; }

#page-profile .profile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    min-height: 53px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
    margin-top: 0;
    border-bottom: none;
}
body.theme-light #page-profile .profile-topbar {
    background: rgba(255, 255, 255, 0.85);
}

#page-profile .profile-topbar-meta {
    flex: 1;
    min-width: 0;
}
#page-profile .profile-topbar-name {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.theme-light #page-profile .profile-topbar-name { color: #0f1419; }
#page-profile .profile-topbar-posts {
    display: block;
    font-size: 13px;
    color: #71767b;
    line-height: 1.3;
}

#page-profile .profile-body-x {
    padding: 0 16px 24px;
    position: relative;
    z-index: 5;
}

#page-profile .profile-avatar-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: -67px;
    margin-bottom: 12px;
    min-height: 36px;
}

#page-profile .profile-avatar-lg,
#page-profile #profile-avatar-slot.profile-avatar-lg {
    width: 134px !important;
    height: 134px !important;
    min-width: 134px;
    min-height: 134px;
    border-radius: 999px;
    border: 4px solid #000;
    background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 800;
    font-size: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}
body.theme-light #page-profile .profile-avatar-lg,
body.theme-light #page-profile #profile-avatar-slot.profile-avatar-lg {
    border-color: #fff;
}

#page-profile .profile-avatar-lg.profile-avatar--suspended,
#page-profile #profile-avatar-slot.profile-avatar--suspended {
    background: #536471;
    border-color: #000;
    font-size: 0 !important;
}
body.theme-light #page-profile .profile-avatar-lg.profile-avatar--suspended,
body.theme-light #page-profile #profile-avatar-slot.profile-avatar--suspended {
    background: #b9cad3;
    border-color: #fff;
}

#page-profile .profile-avatar-lg .feed-avatar-img,
#page-profile #profile-avatar-slot .feed-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}

#page-profile .profile-actions-slot {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-bottom: 4px;
}

#page-profile .profile-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 0 !important;
}

#page-profile .profile-btn-edit,
#page-profile .profile-btn-follow,
#page-profile .profile-btn-msg,
#page-profile .profile-btn-ban,
#page-profile .profile-btn-unban {
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid #536471;
    background: transparent;
    color: #e7e9ea;
    white-space: nowrap;
}
body.theme-light #page-profile .profile-btn-edit,
body.theme-light #page-profile .profile-btn-follow,
body.theme-light #page-profile .profile-btn-msg,
body.theme-light #page-profile .profile-btn-ban,
body.theme-light #page-profile .profile-btn-unban {
    color: #0f1419;
    border-color: #536471;
}
#page-profile .profile-btn-ban {
    min-width: 42px;
    padding: 8px 12px;
    color: #f4212e;
    border-color: rgba(244, 33, 46, 0.45);
}
#page-profile .profile-btn-ban:hover {
    background: rgba(244, 33, 46, 0.12);
}
#page-profile .profile-btn-unban {
    color: #00ba7c;
    border-color: rgba(0, 186, 124, 0.45);
}
#page-profile .profile-btn-unban:hover {
    background: rgba(0, 186, 124, 0.12);
}
#page-profile .profile-btn-edit { min-width: 120px; }
#page-profile .profile-btn-follow.following {
    background: #e7e9ea;
    color: #0f1419;
    border-color: #e7e9ea;
}

#page-profile .profile-info-block .profile-name {
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
    line-height: 1.2;
}
body.theme-light #page-profile .profile-info-block .profile-name { color: #0f1419; }
#page-profile .profile-info-block .profile-handle {
    color: #71767b;
    font-size: 15px;
    margin-top: 2px;
}
#page-profile .profile-info-block .profile-bio {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.4;
    color: #e7e9ea;
    white-space: pre-wrap;
    word-break: break-word;
}
body.theme-light #page-profile .profile-info-block .profile-bio { color: #0f1419; }
#page-profile .profile-info-block .profile-joined {
    margin-top: 12px;
    font-size: 15px;
    color: #71767b;
}
#page-profile .profile-info-block .profile-joined i { margin-right: 4px; }
#page-profile .profile-info-block .profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 12px;
    font-size: 14px;
    color: #71767b;
}
#page-profile .profile-info-block .profile-stats strong {
    color: #e7e9ea;
    font-weight: 700;
}
body.theme-light #page-profile .profile-info-block .profile-stats strong { color: #0f1419; }

#page-profile .profile-tabs {
    display: flex;
    border-bottom: 1px solid #2f3336;
    margin: 0 -16px;
    padding: 0 16px;
}
body.theme-light #page-profile .profile-tabs { border-bottom-color: #eff3f4; }
#page-profile .profile-tab {
    flex: 1;
    padding: 16px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #71767b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
#page-profile .profile-tab:hover { color: #e7e9ea; }
body.theme-light #page-profile .profile-tab:hover { color: #0f1419; }
#page-profile .profile-tab.active {
    color: #1d9bf0;
    border-bottom-color: #1d9bf0;
}

#page-profile .profile-suspended {
    text-align: center;
    padding: 48px 24px 64px;
}
#page-profile .profile-suspended h2 {
    font-size: 31px;
    font-weight: 800;
    color: #e7e9ea;
    margin: 0 0 8px;
}
body.theme-light #page-profile .profile-suspended h2 { color: #0f1419; }
#page-profile .profile-suspended p { color: #71767b; font-size: 15px; margin: 0; }
#page-profile .profile-suspended--active .profile-cover { background: #333639; }
#page-profile .profile-suspended--active .profile-tabs,
#page-profile .profile-suspended--active .profile-tab-content { display: none !important; }

#page-profile .profile-tab-content { min-height: 100px; }
#page-profile .profile-empty {
    padding: 32px 16px;
    text-align: center;
    color: #71767b;
    font-size: 15px;
}

.profile-edit-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.profile-edit-backdrop { position: absolute; inset: 0; background: rgba(91,112,131,0.4); }
.profile-edit-panel {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: #000;
    border-radius: 16px;
    border: 1px solid #2f3336;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}
body.theme-light .profile-edit-panel { background: #fff; border-color: #eff3f4; }
.profile-edit-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #2f3336;
}
.profile-edit-head h3 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; color: #e7e9ea; }
body.theme-light .profile-edit-head h3 { color: #0f1419; }
.profile-edit-close, .profile-edit-save {
    border: none;
    background: transparent;
    color: #e7e9ea;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
}
.profile-edit-save { color: #1d9bf0; font-weight: 700; font-size: 15px; }
.profile-edit-body { padding: 20px 16px; }
.profile-edit-avatar-label { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; cursor: pointer; }
.profile-edit-avatar-btn { color: #1d9bf0; font-weight: 600; font-size: 14px; }
.profile-edit-field span { display: block; font-size: 13px; color: #71767b; margin-bottom: 6px; }
.profile-edit-field textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #2f3336;
    background: #000;
    color: #e7e9ea;
    font-size: 15px;
    resize: vertical;
}
body.theme-light .profile-edit-field textarea { background: #fff; color: #0f1419; border-color: #cfd9de; }
.profile-edit-char { font-size: 12px; color: #71767b; margin-top: 4px; display: block; text-align: right; }

.profile-ban-target {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #e7e9ea;
}
body.theme-light .profile-ban-target { color: #0f1419; }
.profile-ban-select,
.profile-ban-datetime {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #2f3336;
    background: #000;
    color: #e7e9ea;
    font-size: 15px;
}
body.theme-light .profile-ban-select,
body.theme-light .profile-ban-datetime {
    background: #fff;
    color: #0f1419;
    border-color: #cfd9de;
}
.profile-ban-submit { color: #f4212e !important; }

/* ── Responsive: collapse left nav to top tabs, main fills full width ── */
@media (max-width: 999px) {
    .feed-left-rail { display: none; }
    .feed-nav-tabs--hidden { display: flex !important; }
    .feed-timeline-tabs--hidden { display: flex !important; }

    #page-feed .feed-shell.feed-shell--main,
    #page-profile .feed-shell.feed-shell--main {
        max-width: none;
        width: 100%;
        flex: 1 1 100%;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 600px) {
    /* Edge-to-edge content on phones */
    #page-feed .feed-page-header { padding: 12px 14px; }
    #page-feed .feed-page-header h1 { font-size: 19px; }

    .feed-nav-tabs--primary { padding: 8px 10px; gap: 6px; }
    .feed-nav-tab { padding: 9px 8px; font-size: 13px; }

    .feed-timeline-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .feed-timeline-tabs::-webkit-scrollbar { display: none; }
    .feed-timeline-tab { white-space: nowrap; }

    .feed-composer { padding: 12px 12px 10px; gap: 10px; }
    .feed-composer .feed-avatar { width: 40px; height: 40px; }

    #page-feed .feed-tweet-row,
    #page-feed .feed-card { padding-left: 12px; padding-right: 12px; }

    /* Profile: shorter cover + smaller avatar on phones */
    #page-profile .profile-cover { height: 130px; }
    #page-profile .profile-avatar-row { margin-top: -48px; }
    #page-profile .profile-avatar-lg,
    #page-profile #profile-avatar-slot.profile-avatar-lg {
        width: 88px !important;
        height: 88px !important;
        min-width: 88px;
        min-height: 88px;
        font-size: 34px !important;
        border-width: 3px;
    }
    #page-profile .profile-body-x { padding: 0 14px 24px; }
    #page-profile .profile-btn-edit,
    #page-profile .profile-btn-follow,
    #page-profile .profile-btn-msg,
    #page-profile .profile-btn-ban,
    #page-profile .profile-btn-unban { padding: 7px 14px; font-size: 14px; }

    .profile-edit-modal { padding: 0; }
    .profile-edit-panel { max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
}
