
        :root {
            --x-bg: #000000;
            --x-panel: #0a0a0a;
            --x-card: #121212;
            --x-border: #262626;
            --x-text: #f5f5f5;
            --x-muted: #737373;
            --x-accent: #ffffff;
            --x-accent-hover: #e5e5e5;
            --x-accent-text: #000000;
            --x-hover-overlay: rgba(255, 255, 255, 0.08);
            --x-subtle-overlay: rgba(255, 255, 255, 0.03);
        }

        :root.light-mode {
            --x-bg: #ffffff;
            --x-panel: #fafafa;
            --x-card: #f5f5f5;
            --x-border: #e5e5e5;
            --x-text: #171717;
            --x-muted: #8a8a8a;
            --x-accent: #000000;
            --x-accent-hover: #262626;
            --x-accent-text: #ffffff;
            --x-hover-overlay: rgba(0, 0, 0, 0.06);
            --x-subtle-overlay: rgba(0, 0, 0, 0.02);
        }

        body {
            background: var(--x-bg) !important;
            color: var(--x-text);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            overflow-x: hidden;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .bg-theme-bg { background-color: var(--x-bg) !important; }
        .bg-theme-panel { background-color: var(--x-panel) !important; }
        .bg-theme-card { background-color: var(--x-card) !important; }
        .border-theme-color { border-color: var(--x-border) !important; }
        .text-theme-main { color: var(--x-text) !important; }
        .text-theme-muted { color: var(--x-muted) !important; }

        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: var(--x-border);
            border-radius: 9999px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: var(--x-muted);
        }

        .x-app-shell {
            width: min(1230px, 100%);
            margin: 0 auto;
            display: grid;
            grid-template-columns: 275px minmax(0, 600px) 350px;
            align-items: start;
            min-height: 100vh;
        }

        .x-left-rail {
            grid-column: 1;
            grid-row: 1;
            position: sticky;
            top: 0;
            height: 100vh;
            padding: 12px 12px 16px;
            border-right: 1px solid var(--x-border);
            background-color: var(--x-bg);
            z-index: 80;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .x-left-inner {
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        /* The rail stays fixed while only the expandable menu list scrolls. */
        .x-nav-scroll {
            min-height: 0;
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 2px 4px 8px 0;
            scrollbar-gutter: stable;
        }

        .x-nav-account {
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding-top: 4px;
        }

        /* Keep the PC login/profile action rows the same size. */
        .x-nav-account > .x-nav-link,
        .x-nav-account > .x-user-pill {
            width: 100%;
            min-height: 64px;
            box-sizing: border-box;
        }

        .x-nav-account > .x-nav-link {
            padding: 12px;
            gap: 12px;
        }

        @media (min-width: 1101px) {
            .x-nav-account > .x-nav-link,
            .x-nav-account > .x-user-pill {
                height: 64px;
                min-height: 64px;
                align-self: stretch;
                margin-top: 0;
            }

            .x-nav-account > .x-post-btn {
                width: 100%;
            }
        }

        .x-nav-link {
            display: flex;
            align-items: center;
            gap: 20px;
            width: fit-content;
            min-height: 50px;
            padding: 12px 20px 12px 12px;
            border-radius: 9999px;
            color: var(--x-text);
            font-size: 19px;
            font-weight: 500;
            transition: background .16s ease, color .16s ease;
            position: relative;
        }
        .x-nav-link:hover {
            background: var(--x-hover-overlay);
        }

        .x-nav-link.is-active {
            font-weight: 700;
        }
        .x-nav-link.is-active::before {
            content: "";
            position: absolute;
            left: -12px;
            top: 15%;
            height: 70%;
            width: 4px;
            background-color: var(--x-border);
            border-radius: 0 4px 4px 0;
        }

        .x-logo-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 52px;
            height: 52px;
            border-radius: 9999px;
            transition: background .16s ease;
            margin-bottom: 4px;
        }
        .x-logo-btn:hover {
            background: var(--x-hover-overlay);
        }

        .x-logo-img {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            object-fit: cover;
        }

        .x-post-btn {
            width: 90%;
            min-height: 52px;
            margin-top: 16px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 9999px;
            background: var(--x-accent);
            color: var(--x-accent-text);
            font-size: 17px;
            font-weight: 700;
            transition: background .16s ease, color .16s ease;
        }
        .x-post-btn:hover {
            background: var(--x-accent-hover);
        }

        .x-user-pill {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            margin-top: auto;
            padding: 12px;
            border-radius: 9999px;
            transition: background .16s ease;
        }
        .x-user-pill:hover {
            background: var(--x-hover-overlay);
        }

        .x-user-pill img {
            width: 40px;
            height: 40px;
            border-radius: 9999px;
            object-fit: cover;
        }

        .x-user-meta {
            display: flex;
            flex-direction: column;
            text-align: left;
        }
        .x-user-meta strong {
            display: block;
            font-size: 14px;
            font-weight: 700;
            color: var(--x-text);
        }
        .x-user-meta small {
            display: block;
            font-size: 12px;
            color: var(--x-muted);
        }

        .x-home-main {
            grid-column: 2;
            grid-row: 1; /* 다른 사이드바 요소에 밀려 새로운 행으로 내려가는 현상 차단 */
            width: 100%;
            border-right: 1px solid var(--x-border);
            border-left: 1px solid var(--x-border);
            min-height: 100vh;
            background: var(--x-bg);
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .x-top-composer {
            position: relative;
            background: var(--x-bg);
            border-bottom: 1px solid var(--x-border);
            z-index: 95;
            padding: 8px 16px;
            transition: border-color 0.2s ease, background-color 0.2s ease;
        }

        .x-compose-box {
            position: relative;
            border-radius: 9999px;
            background: var(--x-card);
            padding: 8px 16px;
            transition: border-color .2s ease, background-color .2s ease;
            border: 1px solid transparent;
        }
        .x-compose-box:focus-within {
            background: var(--x-bg);
            border-color: var(--x-accent);
        }

        .feed-composer-toolbar {
            min-width: 0;
        }

        .feed-composer-tools {
            min-width: 0;
            flex: 1 1 auto;
            overflow-x: auto;
            overflow-y: hidden;
            flex-wrap: nowrap;
            white-space: nowrap;
            scrollbar-width: thin;
            -webkit-overflow-scrolling: touch;
        }

        .feed-composer-tools > button {
            flex: 0 0 auto;
        }

        .feed-composer-submit {
            flex: 0 0 auto;
        }
        .x-compose-box.has-console-value .x-command-panel {
            display: none !important;
        }

        .x-command-panel {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 8px);
            z-index: 100;
            display: none;
            border-radius: 16px;
            background: var(--x-bg);
            border: 1px solid var(--x-border);
            box-shadow: 0 8px 30px rgba(0,0,0,0.2);
            padding: 12px 0;
            overflow: hidden;
        }
        .x-compose-box:focus-within .x-command-panel,
        .x-command-panel:hover {
            display: block;
        }

        .x-command-section {
            padding: 8px 16px 4px;
            color: var(--x-muted);
            font-size: 13px;
            font-weight: 700;
        }

        .x-command-panel button {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 16px;
            color: var(--x-text);
            text-align: left;
            transition: background .16s ease;
        }
        .x-command-panel button:hover {
            background: var(--x-hover-overlay);
        }
        .x-command-panel button > i {
            font-size: 18px;
            color: var(--x-muted);
        }
        .x-command-panel button:hover > i,
        .x-command-panel button:hover strong {
            color: var(--x-accent);
        }

        .x-command-panel kbd {
            margin-left: auto;
            min-width: 22px;
            height: 20px;
            background: var(--x-card);
            border: 1px solid var(--x-border);
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: var(--x-muted);
            font-size: 11px;
            font-family: monospace;
            padding: 0 4px;
        }

        .x-right-rail {
            grid-column: 3;
            grid-row: 1; /* 다른 요소에 밀리지 않고 1행의 맨 오른쪽에 고정되도록 강제 설정 */
            position: sticky;
            top: 0;
            height: 100vh;
            padding: 12px 0 24px 24px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            overflow-y: auto;
        }

        .x-side-card {
            border-radius: 16px;
            background: var(--x-card);
            border: 1px solid var(--x-border);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: background-color 0.2s ease, border-color 0.2s ease;
        }
        .x-side-card h2 {
            padding: 12px 16px;
            font-size: 20px;
            font-weight: 800;
            color: var(--x-text);
        }

        .x-trend {
            padding: 12px 16px;
            border-top: 1px solid var(--x-border);
            transition: background-color 0.2s ease;
            text-align: left;
        }
        .x-trend:hover {
            background-color: var(--x-hover-overlay);
        }

        .divide-theme-color > :not([hidden]) ~ :not([hidden]) {
            border-color: var(--x-border) !important;
        }

        .ai-code-block {
            display: block;
            white-space: pre-wrap;
            overflow-x: auto;
            margin: .55rem 0;
            padding: .75rem;
            border-radius: 1rem;
            border: 1px solid var(--x-border);
            background: var(--x-bg);
            color: var(--x-text);
            font: 10px/1.65 monospace;
        }

        .aether-chat-shell {
            background: var(--x-panel);
            border: 1px solid var(--x-border);
            border-radius: 8px;
            overflow: hidden;
        }
        .aether-chat-head {
            min-height: 44px;
            padding: 8px 10px;
            border-bottom: 1px solid var(--x-border);
            background: var(--x-bg);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .aether-chat-title {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            color: var(--x-text);
            font-size: 12px;
            font-weight: 800;
        }
        .aether-chat-title i {
            color: var(--x-muted);
            font-size: 15px;
        }
        .aether-chat-tool {
            width: 30px;
            height: 30px;
            border-radius: 9999px;
            border: 1px solid var(--x-border);
            color: var(--x-muted);
            background: var(--x-card);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background .16s ease, color .16s ease, border-color .16s ease;
        }
        .aether-chat-tool:hover {
            background: var(--x-hover-overlay);
            color: var(--x-text);
            border-color: var(--x-muted);
        }
        .aether-chat-stream {
            min-height: 260px;
            background: var(--x-bg);
            isolation: isolate;
        }
        .aether-chat-page-stream {
            height: auto !important;
            max-height: none !important;
            min-height: 0 !important;
        }
        .aether-chat-stream::before {
            content: "";
            position: sticky;
            display: block;
            height: 100%;
            inset: 0;
            margin-bottom: -100%;
            background: var(--chat-bg-image, none) center / contain no-repeat;
            opacity: var(--chat-bg-opacity, .07);
            filter: var(--chat-bg-filter, saturate(.9) contrast(1.08));
            pointer-events: none;
            z-index: 0;
            transition: opacity .28s ease, filter .28s ease, background-size .28s ease;
        }
        .aether-chat-stream > * {
            position: relative;
            z-index: 1;
        }
        /* 피드 인라인 채팅은 헤더 바로 아래에서 첫 메시지가 잘리지 않게 한다. */
        .aether-chat-shell > .inline-chat-stream {
            position: relative;
            display: block;
            overflow-y: auto !important;
            overflow-x: hidden;
            padding-top: 18px !important;
            padding-bottom: 18px !important;
            scroll-padding-top: 18px;
            mask-image: none !important;
            -webkit-mask-image: none !important;
        }
        .aether-chat-shell > .inline-chat-stream::before {
            display: none !important;
            content: none !important;
        }
        .aether-chat-shell > .inline-chat-stream > #inline-chat-body {
            position: relative;
            z-index: 1;
            padding-top: 2px;
        }
        .aether-message-row {
            display: flex;
            gap: 12px;
            align-items: flex-end;
            margin: 22px 0;
        }
        .aether-message-row.is-user {
            justify-content: flex-end;
        }
        .aether-message-row.is-narration {
            justify-content: center;
        }
        .aether-avatar {
            width: 26px;
            height: 26px;
            border-radius: 9999px;
            background: var(--x-card);
            border: 1px solid var(--x-border);
            color: var(--x-muted);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }
        .aether-bubble {
            max-width: min(82%, 460px);
            border: 1px solid var(--x-border);
            border-radius: 8px;
            padding: 11px 13px;
            color: var(--x-text);
            background: var(--x-card);
            font-size: 13px;
            line-height: 1.55;
            word-break: break-word;
        }
        .aether-message-row.is-user .aether-bubble {
            background: var(--x-accent);
            color: var(--x-accent-text);
            border-color: var(--x-accent);
        }
        .aether-message-row.is-narration .aether-bubble {
            max-width: min(88%, 520px);
            background: rgba(0,0,0,.34);
            color: var(--x-muted);
            border-style: dashed;
            font-style: italic;
            text-align: center;
        }
        .aether-input-blocks {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 4px 4px 8px;
        }
        .aether-input-blocks.hidden {
            display: none;
        }
        .aether-input-block {
            max-width: 100%;
            border: 1px solid var(--x-border);
            border-radius: 8px;
            padding: 6px 9px;
            color: var(--x-text);
            background: var(--x-card);
            font-size: 12px;
            line-height: 1.45;
            word-break: break-word;
        }
        .aether-input-block.is-narration {
            color: var(--x-muted);
            border-style: dashed;
            font-style: italic;
            background: rgba(0,0,0,.22);
        }
        .aether-bubble.is-pending::after {
            content: "";
            display: inline-block;
            width: 6px;
            height: 6px;
            margin-left: 6px;
            border-radius: 9999px;
            background: currentColor;
            opacity: .45;
            animation: bubbleRise .8s ease-in-out infinite alternate;
        }
        .aether-section-panel {
            border: 1px solid var(--x-border);
            background: var(--x-bg);
            border-radius: 8px;
        }
        .aether-section-button {
            border-radius: 6px;
            color: var(--x-muted);
        }
        .aether-section-button:hover,
        .aether-section-button.is-active {
            background: var(--x-card);
            color: var(--x-text);
        }
        .follow-icon-btn {
            width: 32px;
            height: 32px;
            border-radius: 9999px;
            border: 1px solid var(--x-border);
            background: var(--x-card);
            color: var(--x-text);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background .16s ease, color .16s ease, border-color .16s ease;
        }
        .follow-icon-btn:hover {
            background: var(--x-hover-overlay);
            border-color: var(--x-border);
        }
        .follow-icon-btn.is-following {
            background: var(--x-accent);
            color: var(--x-accent-text);
            border-color: var(--x-accent);
        }
        .follow-icon-btn.is-mutual {
            background: var(--x-accent);
            color: var(--x-accent-text);
            border-color: var(--x-accent);
            box-shadow: inset 0 0 0 1px var(--x-accent);
        }
        #profile-popover .follow-icon-btn.is-following {
            background: #fff;
            color: #111;
            border-color: #fff;
        }
        #profile-popover .follow-icon-btn.is-disabled,
        .profile-icon-btn.is-disabled {
            opacity: .45;
            cursor: not-allowed;
            pointer-events: none;
            filter: grayscale(1);
        }
        .profile-verification-badge {
            display: inline-block;
            margin-right: .2rem;
            color: var(--x-accent);
            vertical-align: -0.08em;
            font-size: .9em;
        }

        textarea, input {
            color: var(--x-text) !important;
        }
        textarea::placeholder, input::placeholder {
            color: var(--x-muted) !important;
        }

        @media (max-width: 1100px) {
            .x-app-shell {
                grid-template-columns: minmax(88px, 1fr) minmax(0, 600px) minmax(88px, 1fr);
                justify-content: stretch;
            }
            .x-right-rail { display: none !important; }
            .x-nav-link span, .x-post-btn span, .x-user-meta, .x-user-pill i { display: none !important; }
            .x-left-rail {
                grid-column: 1;
                justify-self: end;
                width: 88px;
            }
            .x-post-btn {
                width: 50px;
                height: 50px;
                min-height: 50px;
                border-radius: 9999px;
                padding: 0;
            }
            .x-post-btn::before { content: "\eb80"; font-family: remixicon; font-size: 22px; }
        }

        @media (max-width: 720px) {
            .x-app-shell {
                display: grid !important;
                width: 100% !important;
                grid-template-columns: 64px minmax(0, 1fr) !important;
                justify-content: stretch !important;
            }
            .x-left-rail {
                position: fixed !important;
                left: 0 !important;
                right: auto !important;
                top: 0 !important;
                bottom: auto !important;
                width: 64px !important;
                height: 100vh !important;
                padding: 8px 0 !important;
                border-right: 1px solid var(--x-border) !important;
                border-top: 0 !important;
                background: var(--x-bg) !important;
                z-index: 100 !important;
            }
            .x-left-inner {
                height: 100% !important;
                flex-direction: column !important;
                justify-content: flex-start !important;
                align-items: center !important;
                gap: 4px !important;
            }
            .x-nav-scroll {
                width: 64px !important;
                min-width: 64px !important;
                box-sizing: border-box;
                padding: 0 !important;
                display: flex;
                flex-direction: column;
                align-items: center;
                align-self: center;
                scrollbar-gutter: auto;
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            .x-nav-scroll::-webkit-scrollbar {
                display: none;
                width: 0;
                height: 0;
            }
            .x-nav-account {
                width: 64px !important;
                min-width: 64px !important;
                box-sizing: border-box;
                align-items: center;
                align-self: center;
            }
            .x-logo-btn,
            .x-nav-link,
            .x-post-btn,
            .x-user-pill {
                display: inline-flex !important;
                width: 46px !important;
                height: 46px !important;
                min-height: 46px !important;
                min-width: 46px !important;
                flex: 0 0 46px !important;
                aspect-ratio: 1 / 1 !important;
                padding: 0 !important;
                justify-content: center !important;
            }
            .x-logo-btn img,
            .x-user-pill img {
                width: 36px !important;
                height: 36px !important;
            }
            .x-nav-link i { font-size: 21px !important; }
            .x-logo-btn,
            .x-nav-scroll > .x-nav-link,
            .x-nav-account > .x-nav-link,
            .x-nav-account > .x-post-btn,
            .x-nav-account > .x-user-pill {
                box-sizing: border-box !important;
                padding: 0 !important;
                gap: 0 !important;
                margin-left: auto !important;
                margin-right: auto !important;
            }
            .x-nav-link i {
                width: 24px !important;
                min-width: 24px !important;
                box-sizing: border-box !important;
                display: inline-flex !important;
                align-items: center;
                justify-content: center !important;
                padding-left: 0 !important;
                text-align: center !important;
                line-height: 1 !important;
            }
            .x-nav-scroll > .x-nav-link,
            .x-nav-account > .x-nav-link,
            .x-nav-account > .x-post-btn,
            .x-nav-account > .x-user-pill {
                align-self: center !important;
                left: auto !important;
                right: auto !important;
                transform: none !important;
            }
            .x-home-main {
                grid-column: 2 !important;
                grid-row: 1 !important;
                width: 100% !important;
                min-width: 0 !important;
                overflow-x: hidden !important;
                max-width: none !important;
                border-left: 0 !important;
                border-right: 0 !important;
                padding-bottom: 40px !important;
            }
        }

        @media (min-width: 721px) and (max-width: 1100px) {
            .x-left-inner {
                width: 88px;
                align-items: center;
            }

            .x-nav-scroll,
            .x-nav-account {
                width: 88px;
                min-width: 88px;
                align-items: center;
                align-self: center;
                box-sizing: border-box;
            }

            .x-nav-scroll {
                padding: 0;
            }

            .x-logo-btn,
            .x-nav-scroll > .x-nav-link,
            .x-nav-account > .x-nav-link,
            .x-nav-account > .x-post-btn,
            .x-nav-account > .x-user-pill {
                width: 50px;
                min-width: 50px;
                height: 50px;
                min-height: 50px;
                flex: 0 0 50px;
                padding: 0;
                margin-left: auto;
                margin-right: auto;
                justify-content: center;
                align-self: center;
                box-sizing: border-box;
            }

            .x-nav-scroll > .x-nav-link i,
            .x-nav-account > .x-nav-link i {
                width: 24px;
                min-width: 24px;
                padding: 0;
                justify-content: center;
                text-align: center;
            }

            .x-user-pill img {
                width: 36px;
                height: 36px;
            }
        }
