/* X mobile layout for the timeline and followed Char profile.
   Keep selectors inside #twitter-page so the phone's other apps retain their themes. */
#twitter-page {
    --twitter-x-bg: #ffffff;
    --twitter-x-text: #0f1419;
    --twitter-x-muted: #536471;
    --twitter-x-line: #eff3f4;
    --twitter-x-blue: #1d9bf0;
    --twitter-x-hover: rgba(15, 20, 25, .04);
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

#twitter-page .status-bar {
    background: var(--twitter-x-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .status-left,
#twitter-page .status-icon,
#twitter-page .status-icon-svg {
    color: var(--twitter-x-text) !important;
}

#twitter-page.active .twitter-app-header.books-header {
    min-height: 52px;
    margin: 0 !important;
    padding: 4px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .twitter-app-back.back-btn,
#twitter-page .twitter-refresh-btn,
#twitter-page .twitter-dm-page-settings-btn {
    width: 40px;
    height: 40px;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--twitter-x-text) !important;
    fill: currentColor !important;
}

#twitter-page .twitter-app-back.back-btn:active,
#twitter-page .twitter-refresh-btn:active,
#twitter-page .twitter-dm-page-settings-btn:active {
    background: var(--twitter-x-hover) !important;
}

#twitter-page .twitter-app-title {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    font-size: 20px;
    font-weight: 800;
    color: var(--twitter-x-text) !important;
    letter-spacing: -.025em;
}

#twitter-page .twitter-brand-mark {
    display: block;
    width: 25px;
    height: 25px;
}

#twitter-page.twitter-page--dm-settings-on .twitter-app-title {
    justify-content: flex-start;
    text-align: left;
}

#twitter-page.twitter-page--dm-settings-on #twitter-refresh-btn {
    display: none !important;
}

#twitter-page .twitter-app-main,
#twitter-page .twitter-view,
#twitter-page .twitter-feed-panels,
#twitter-page .twitter-body,
#twitter-page .twitter-feed-panel {
    background: var(--twitter-x-bg) !important;
}

#twitter-page .twitter-feed-tabs {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .twitter-feed-tab {
    min-width: 0;
    min-height: 49px;
    padding: 12px 4px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--twitter-x-muted) !important;
    font-size: 14px;
    font-weight: 600;
}

#twitter-page .twitter-feed-tab.active {
    color: var(--twitter-x-text) !important;
    font-weight: 800;
    background: transparent !important;
}

#twitter-page .twitter-feed-tab.active::after {
    left: 50%;
    right: auto;
    bottom: 0;
    width: 52px;
    height: 4px;
    border-radius: 999px;
    background: var(--twitter-x-blue) !important;
    transform: translateX(-50%);
}

#twitter-page .twitter-feed-tab:hover,
#twitter-page .twitter-feed-tab:active {
    background: var(--twitter-x-hover) !important;
}

#twitter-page .twitter-feed-panel,
#twitter-page .twitter-body .tweet-container {
    padding: 0 !important;
}

#twitter-page .twitter-body .tweet-container {
    max-width: none;
    margin: 0;
    background: var(--twitter-x-bg) !important;
}

#twitter-page #twitter-body-following .tweet,
#twitter-page #twitter-body-foryou .tweet,
#twitter-page #twitter-body-entertainment .tweet {
    width: 100%;
    margin: 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    color: var(--twitter-x-text) !important;
    transform: none !important;
}

#twitter-page #twitter-body-following .tweet:active,
#twitter-page #twitter-body-foryou .tweet:active,
#twitter-page #twitter-body-entertainment .tweet:active {
    background: var(--twitter-x-hover) !important;
    box-shadow: none !important;
}

#twitter-page .twitter-body .tweet-header,
#twitter-page .twitter-char-profile-overlay .tweet-header {
    margin-bottom: 4px;
    gap: 4px;
    line-height: 1.3;
}

#twitter-page .twitter-body .tweet-name,
#twitter-page .twitter-char-profile-overlay .tweet-name {
    color: var(--twitter-x-text) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
}

#twitter-page .twitter-body .tweet-handle,
#twitter-page .twitter-body .tweet-time,
#twitter-page .twitter-char-profile-overlay .tweet-handle,
#twitter-page .twitter-char-profile-overlay .tweet-time {
    color: var(--twitter-x-muted) !important;
    font-size: 14px !important;
}

#twitter-page .twitter-body .tweet-text,
#twitter-page .twitter-body .tweet-content,
#twitter-page .twitter-char-profile-overlay .tweet-text {
    color: var(--twitter-x-text) !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
}

#twitter-page .twitter-body .tweet:hover .tweet-text {
    text-decoration: none !important;
}

#twitter-page .twitter-body .tweet-avatar-wrap,
#twitter-page .twitter-char-profile-overlay .tweet-avatar-wrap {
    box-shadow: none !important;
}

#twitter-page .twitter-body .tweet-interactions,
#twitter-page .twitter-char-profile-overlay .tweet-interactions {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px !important;
    margin-top: 10px !important;
    color: var(--twitter-x-muted) !important;
}

#twitter-page .twitter-body .tweet-interactions > *,
#twitter-page .twitter-char-profile-overlay .tweet-interactions > * {
    min-width: 24px;
    min-height: 28px;
    border-radius: 50%;
}

#twitter-page .twitter-bottom-nav {
    min-height: 56px;
    margin: 0 !important;
    padding: 2px 8px calc(2px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))) !important;
    border: 0 !important;
    border-top: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .twitter-bottom-btn,
html[data-appearance="dark"] #twitter-page .twitter-bottom-btn {
    min-height: 48px;
    margin: 0;
    padding: 8px 4px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--twitter-x-muted) !important;
}

#twitter-page .twitter-bottom-btn.active,
html[data-appearance="dark"] #twitter-page .twitter-bottom-btn.active {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--twitter-x-text) !important;
}

#twitter-page .twitter-bottom-btn .twitter-bottom-icon {
    width: 26px;
    height: 26px;
}

#twitter-page .twitter-bottom-label {
    display: none;
}

#twitter-page .twitter-fab-compose {
    width: 55px !important;
    height: 55px !important;
    right: calc(18px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)));
    bottom: calc(76px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--twitter-x-blue) !important;
    box-shadow: 0 4px 14px rgba(29, 155, 240, .24) !important;
}

#twitter-page .twitter-fab-plus {
    transform: none;
}

#twitter-page .twitter-fab-plus svg {
    display: block;
}

/* Followed Char's profile: a flat, edge-to-edge X profile surface. */
#twitter-page .twitter-char-profile-overlay,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay {
    --tcp-km-bg: var(--twitter-x-bg);
    --tcp-km-text: var(--twitter-x-text);
    --tcp-km-text-soft: var(--twitter-x-muted);
    --tcp-km-surface: var(--twitter-x-bg);
    --tcp-km-surface-solid: var(--twitter-x-bg);
    --tcp-km-border: var(--twitter-x-line);
    --tcp-km-border-strong: var(--twitter-x-line);
    padding: 0 !important;
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text) !important;
}

/* Match the phone status bar's top padding + 20px icon row + 12px bottom padding. */
#twitter-page .twitter-char-profile-overlay.is-open {
    --twitter-x-status-slot: calc(max(12px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) + 32px);
    top: var(--twitter-x-status-slot);
    height: calc(100% - var(--twitter-x-status-slot)) !important;
    min-height: 0 !important;
}

html.lovemi-statusbar-hidden #twitter-page .twitter-char-profile-overlay.is-open {
    --twitter-x-status-slot: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-view {
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
}

#twitter-page .twitter-char-profile-topbar {
    display: flex;
    flex: 0 0 56px;
    align-items: center;
    gap: 18px;
    padding: 0 14px;
    border-bottom: 1px solid var(--twitter-x-line);
    background: var(--twitter-x-bg);
    color: var(--twitter-x-text);
    z-index: 4;
}

#twitter-page .twitter-char-profile-topbar .twitter-char-profile-banner-back {
    position: static;
    display: flex;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .twitter-char-profile-topbar-identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.24;
}

#twitter-page .twitter-char-profile-topbar-identity strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
    font-weight: 800;
}

#twitter-page .twitter-char-profile-topbar-identity span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--twitter-x-muted);
    font-size: 12px;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-scroll[data-tcp-scroll] {
    padding: 0 !important;
    background: var(--twitter-x-bg) !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-banner-wrap {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-banner.twitter-profile-banner {
    width: 100%;
    height: auto;
    min-height: 120px;
    aspect-ratio: 3 / 1;
    border-radius: 0 !important;
    background-color: #cfd9de;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: none !important;
}

#twitter-page .twitter-char-profile-banner::after {
    display: none;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-sheet {
    display: flow-root !important;
    margin: 0 !important;
    padding: 0 16px 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-avatar-row {
    align-items: flex-end;
    margin-top: -37px;
    margin-bottom: 10px;
    padding: 0;
}

#twitter-page .twitter-char-profile-avatar-wrap.twitter-profile-avatar-wrap {
    width: 80px;
    height: 80px;
    border: 4px solid var(--twitter-x-bg) !important;
    background: var(--twitter-x-muted) !important;
    color: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

#twitter-page .twitter-char-profile-actions-row {
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 1px;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 15px;
    border: 1px solid var(--twitter-x-line) !important;
    border-radius: 999px !important;
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 700 !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn--dm {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn[data-tcp-following="0"] {
    border-color: var(--twitter-x-text) !important;
    background: var(--twitter-x-text) !important;
    color: var(--twitter-x-bg) !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn.is-primary,
#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn.is-secondary {
    border-color: var(--twitter-x-line) !important;
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn[data-tcp-following="0"] {
    border-color: var(--twitter-x-text) !important;
    background: var(--twitter-x-text) !important;
    color: var(--twitter-x-bg) !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-name {
    font-size: 20px;
    font-weight: 800 !important;
    letter-spacing: -.02em;
    color: var(--twitter-x-text) !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-handle,
#twitter-page .twitter-char-profile-overlay .twitter-profile-joined {
    margin-top: 2px;
    color: var(--twitter-x-muted) !important;
    font-size: 14px;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-bio {
    margin-top: 12px;
    color: var(--twitter-x-text) !important;
    font-size: 15px;
    line-height: 1.4;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-bio-block {
    margin-top: 12px;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-bio-display {
    padding: 0 20px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-bio-display:hover,
#twitter-page .twitter-char-profile-overlay .twitter-char-profile-bio-display:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-bio.twitter-char-profile-bio {
    margin: 0;
    color: var(--twitter-x-text) !important;
    font-weight: 400;
    line-height: 1.4;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-stats {
    gap: 18px;
    margin-top: 12px;
    color: var(--twitter-x-muted) !important;
    font-size: 14px;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-stats span {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#twitter-page .twitter-char-profile-overlay .twitter-profile-stats strong {
    color: var(--twitter-x-text) !important;
    font-weight: 800 !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-tabs.twitter-profile-tabs {
    display: flex;
    width: calc(100% + 32px);
    margin: 17px -16px 0 !important;
    padding: 0;
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
}

#twitter-page .twitter-char-profile-tabs .twitter-profile-tab {
    min-height: 50px;
    padding: 10px 8px;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--twitter-x-muted) !important;
    font-size: 14px;
    font-weight: 600 !important;
}

#twitter-page .twitter-char-profile-tabs .twitter-profile-tab.active {
    background: transparent !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
    font-weight: 800 !important;
}

#twitter-page .twitter-char-profile-tabs .twitter-profile-tab.active::after {
    display: block !important;
    bottom: 0;
    width: 44px;
    height: 4px;
    background: var(--twitter-x-blue) !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-tab-panels {
    width: calc(100% + 32px);
    margin: 0 -16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-panel.active {
    padding: 0 !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-panel {
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-tweet-container {
    display: block;
    padding: 0 !important;
}

#twitter-page .twitter-char-profile-overlay .twitter-char-profile-tweet-container > .tweet {
    width: 100%;
    margin: 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
    color: var(--twitter-x-text) !important;
}

#twitter-page .twitter-char-profile-panel .twitter-profile-empty {
    margin: 0;
    padding: 48px 26px;
    border: 0;
    border-radius: 0;
    background: var(--twitter-x-bg);
    color: var(--twitter-x-muted) !important;
}

html[data-appearance="dark"] #twitter-page {
    --twitter-x-bg: #000000;
    --twitter-x-text: #e7e9ea;
    --twitter-x-muted: #71767b;
    --twitter-x-line: #2f3336;
    --twitter-x-hover: rgba(231, 233, 234, .08);
}

html[data-appearance="dark"] #twitter-page.active .twitter-app-header.books-header,
html[data-appearance="dark"] #twitter-page .twitter-feed-tabs {
    border-color: var(--twitter-x-line) !important;
    background: var(--twitter-x-bg) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] #twitter-page .twitter-app-back.back-btn,
html[data-appearance="dark"] #twitter-page .twitter-refresh-btn,
html[data-appearance="dark"] #twitter-page .twitter-dm-page-settings-btn {
    border: 0 !important;
    background: transparent !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] #twitter-page .twitter-fab-compose {
    border: 0 !important;
    background: var(--twitter-x-blue) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(29, 155, 240, .24) !important;
}

html[data-appearance="dark"] #twitter-page .twitter-body .tweet-container,
html[data-appearance="dark"] #twitter-page #twitter-body-following .tweet,
html[data-appearance="dark"] #twitter-page #twitter-body-foryou .tweet,
html[data-appearance="dark"] #twitter-page #twitter-body-entertainment .tweet,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-char-profile-tweet-container > .tweet {
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] #twitter-page #twitter-body-following .tweet,
html[data-appearance="dark"] #twitter-page #twitter-body-foryou .tweet,
html[data-appearance="dark"] #twitter-page #twitter-body-entertainment .tweet,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-char-profile-tweet-container > .tweet {
    border: 0 !important;
    border-bottom: 1px solid var(--twitter-x-line) !important;
    border-radius: 0 !important;
}

html[data-appearance="dark"] #twitter-page .twitter-body .tweet-name,
html[data-appearance="dark"] #twitter-page .twitter-body .tweet-text,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .tweet-name,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .tweet-text {
    color: var(--twitter-x-text) !important;
}

html[data-appearance="dark"] #twitter-page .twitter-body .tweet-handle,
html[data-appearance="dark"] #twitter-page .twitter-body .tweet-time,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .tweet-handle,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .tweet-time {
    color: var(--twitter-x-muted) !important;
    fill: var(--twitter-x-muted) !important;
}

html[data-appearance="dark"] #twitter-page .twitter-char-profile-avatar-wrap.twitter-profile-avatar-wrap {
    background: #536471 !important;
    color: #e7e9ea !important;
    border-color: #000 !important;
}

html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn.is-primary,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn.is-secondary {
    border-color: var(--twitter-x-line) !important;
    background: var(--twitter-x-bg) !important;
    color: var(--twitter-x-text) !important;
    box-shadow: none !important;
}

html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-char-profile-action-btn[data-tcp-following="0"] {
    border-color: var(--twitter-x-text) !important;
    background: var(--twitter-x-text) !important;
    color: var(--twitter-x-bg) !important;
}

html[data-appearance="dark"] #twitter-page .twitter-char-profile-tabs .twitter-profile-tab,
html[data-appearance="dark"] #twitter-page .twitter-char-profile-overlay .twitter-profile-empty {
    color: var(--twitter-x-muted) !important;
}

html[data-appearance="dark"] #twitter-page .twitter-char-profile-tabs .twitter-profile-tab.active {
    color: var(--twitter-x-text) !important;
}

@media (max-width: 380px) {
    #twitter-page .twitter-feed-tab { font-size: 13px; }
    #twitter-page #twitter-body-following .tweet,
    #twitter-page #twitter-body-foryou .tweet,
    #twitter-page #twitter-body-entertainment .tweet { padding: 11px 12px !important; }
    #twitter-page .twitter-char-profile-overlay .twitter-profile-sheet { padding-left: 12px !important; padding-right: 12px !important; }
    #twitter-page .twitter-char-profile-overlay .twitter-char-profile-tabs.twitter-profile-tabs,
    #twitter-page .twitter-char-profile-overlay .twitter-char-profile-tab-panels { width: calc(100% + 24px); margin-left: -12px !important; margin-right: -12px !important; }
}
