        /* All styles remain unchanged */
        :root {
            --blurt-blue: #2e3856;
            --blurt-blue-dark: #1f2940;
            --blurt-link: #357ce6;
            --blurt-link-hover: #1e63c9;
            --blurt-red: #fa6c8d;
            --blurt-green: #4ba85a;
            --blurt-orange: #f0ad4e;
            --bg-body: #87ceeb;
            --bg-card: #ffffff;
            --border-light: #e1e4e8;
            --border-mid: #cfd3d6;
            --text-primary: #1a1a1a;
            --text-secondary: #6a6f7a;
            --text-muted: #9a9fa6;
            --gray-pill: #f0f0ef;
            --shadow-card: 0 1px 2px rgba(0, 0, 0, .06);
            --radius: 3px;
        }
        /* Admin → Settings → Theme: the only value that changes anything visually
           today is "dark" (anything else, including "default"/empty, uses the
           :root palette above completely unchanged). Every existing rule in this
           file is already written against these same custom properties, so this
           re-themes the whole site without touching layout/structure. */
        :root[data-theme="dark"] {
            --bg-body: #0f1420;
            --bg-card: #1a2030;
            --border-light: #2a3142;
            --border-mid: #3a4254;
            --text-primary: #e8eaf0;
            --text-secondary: #a8b0c0;
            --text-muted: #6f7890;
            --gray-pill: #232a3a;
            --blurt-link: #5b9bf5;
            --blurt-link-hover: #7fb1ff;
            --shadow-card: 0 1px 3px rgba(0, 0, 0, .4);
        }
        /* Common HTML utility classes some authors embed directly in their post
           body (e.g. <div class="text-justify">...</div>). marked.js + DOMPurify
           already pass these classes through untouched (DOMPurify's default
           allow-list keeps `class`) — the only reason they didn't visibly do
           anything was that no matching CSS rule existed anywhere in this file. */
        .text-justify { text-align: justify; }
        .text-center { text-align: center; }
        .text-left { text-align: left; }
        .text-right { text-align: right; }

        * {
            box-sizing: border-box;
        }
        html,
        body {
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }
        body {
            font-family: 'Source Sans Pro', 'Noto Sans Bengali', sans-serif;
            background: var(--bg-body);
            color: var(--text-primary);
            font-size: 15px;
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
        }
        a {
            color: var(--blurt-link);
            text-decoration: none;
            cursor: pointer;
        }
        a:hover {
            color: var(--blurt-link-hover);
            text-decoration: underline;
        }
        button {
            font-family: inherit;
            cursor: pointer;
        }
        img {
            max-width: 100%;
        }
        ::selection {
            background: #cfe2ff;
        }

        .topnav {
            background: var(--blurt-blue);
            color: #fff;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
        }
        .topnav-inner {
            max-width: 1280px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 0 16px;
            height: 56px;
        }
        .mobile-menu-toggle {
            display: none;
            background: transparent;
            border: none;
            color: #fff;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            padding: 4px 6px;
            flex-shrink: 0;
        }
        .brand {
            font-size: 21px;
            font-weight: 700;
            color: #fff;
            letter-spacing: .2px;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .brand:hover {
            text-decoration: none;
            color: #fff;
        }
        .brand .dot {
            color: var(--blurt-red);
        }
        .brand-logo {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }
        .nav-search {
            flex: 1;
            max-width: 480px;
            position: relative;
        }
        .nav-search input {
            width: 100%;
            padding: 8px 12px 8px 34px;
            border-radius: 16px;
            border: none;
            background: rgba(255, 255, 255, .15);
            color: #fff;
            font-size: 14px;
            outline: none;
            transition: background .15s;
        }
        .nav-search input::placeholder {
            color: rgba(255, 255, 255, .65);
        }
        .nav-search input:focus {
            background: rgba(255, 255, 255, .25);
        }
        .nav-search svg {
            position: absolute;
            left: 11px;
            top: 50%;
            transform: translateY(-50%);
            opacity: .65;
        }
        .nav-tabs {
            display: flex;
            gap: 2px;
            margin-left: 6px;
        }
        .nav-tabs button {
            background: none;
            border: none;
            color: rgba(255, 255, 255, .75);
            padding: 8px 12px;
            border-radius: 3px;
            font-size: 14px;
            font-weight: 600;
            border-bottom: 2px solid transparent;
        }
        .nav-tabs button:hover {
            color: #fff;
        }
        .nav-tabs button.active {
            color: #fff;
            border-bottom-color: var(--blurt-red);
        }
        .nav-right {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }
        .btn {
            border: 1px solid transparent;
            border-radius: 3px;
            padding: 8px 16px;
            font-size: 14px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: background .15s, border-color .15s;
        }
        .btn-submit {
            background: var(--blurt-red);
            color: #fff;
        }
        .btn-submit:hover {
            background: #e85578;
            color: #fff;
        }
        .btn-outline {
            background: transparent;
            border-color: rgba(255, 255, 255, .4);
            color: #fff;
        }
        .btn-outline:hover {
            background: rgba(255, 255, 255, .1);
        }
        .btn-secondary {
            background: var(--gray-pill);
            color: var(--text-primary);
            border-color: var(--border-mid);
        }
        .btn-secondary:hover {
            background: #e6e6e4;
        }
        .btn-block {
            width: 100%;
            justify-content: center;
        }
        .btn-sm {
            padding: 5px 10px;
            font-size: 13px;
        }
        .btn:disabled {
            opacity: .5;
            cursor: not-allowed;
        }

        .user-chip {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, .1);
            padding: 5px 10px 5px 5px;
            border-radius: 18px;
            color: #fff;
            position: relative;
        }
        .user-chip img {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #555;
        }
        .user-chip .uname {
            font-weight: 600;
            font-size: 13.5px;
        }
        .user-chip .caret {
            font-size: 10px;
            opacity: .7;
        }
        .user-menu {
            position: absolute;
            top: 46px;
            right: 0;
            /* Was a hardcoded #fff while the text uses --text-primary, which
               turns light in dark mode (phones set to dark) — light text on a
               white menu. --bg-card is white in light mode, dark in dark mode. */
            background: var(--bg-card);
            color: var(--text-primary);
            border-radius: var(--radius);
            box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
            min-width: 200px;
            display: none;
            overflow: hidden;
            border: 1px solid var(--border-light);
        }
        .user-menu.show {
            display: block;
        }
        .user-menu a,
        .user-menu button {
            display: block;
            width: 100%;
            text-align: left;
            padding: 10px 16px;
            background: none;
            border: none;
            font-size: 14px;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
        }
        .user-menu a:last-child,
        .user-menu button:last-child {
            border-bottom: none;
        }
        .user-menu a:hover,
        .user-menu button:hover {
            background: var(--bg-body);
            text-decoration: none;
        }

        .page {
            max-width: 1280px;
            margin: 0 auto;
            display: flex;
            gap: 24px;
            padding: 20px 16px 60px;
            align-items: flex-start;
        }
        .col-left {
            width: 220px;
            flex-shrink: 0;
            position: sticky;
            top: 76px;
        }
        .col-main {
            flex: 1;
            min-width: 0;
        }
        .col-right {
            width: 300px;
            flex-shrink: 0;
            position: sticky;
            top: 76px;
        }
        @media(max-width:1100px) {
            .col-right {
                display: none;
            }
        }
        @media(max-width:860px) {
            .mobile-menu-toggle {
                display: block;
            }
            .col-left {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                width: min(280px, 85vw);
                max-width: 85vw;
                z-index: 300;
                background: var(--bg-card);
                padding: 16px 12px;
                overflow-y: auto;
                box-shadow: 2px 0 16px rgba(0, 0, 0, .25);
                margin: 0;
            }
            .col-left.mobile-open {
                display: block;
            }
            .mobile-sidebar-backdrop {
                display: none;
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, .45);
                z-index: 290;
            }
            .mobile-sidebar-backdrop.show {
                display: block;
            }
            body.mobile-menu-open {
                overflow: hidden;
            }
        }

        .side-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            margin-bottom: 16px;
            overflow: hidden;
        }
        .side-card h3 {
            margin: 0;
            padding: 12px 14px;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: .4px;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-light);
            background: #fafafa;
        }
        .side-nav a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 14px;
            color: var(--text-primary);
            font-weight: 600;
            font-size: 14.5px;
            border-bottom: 1px solid var(--border-light);
        }
        .side-nav a:last-child {
            border-bottom: none;
        }
        .side-nav a:hover {
            background: var(--bg-body);
            text-decoration: none;
        }
        .side-nav a.active {
            color: var(--blurt-red);
        }
        .tag-cloud {
            padding: 12px 14px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .tag-pill {
            background: var(--gray-pill);
            border: 1px solid var(--border-mid);
            border-radius: 14px;
            padding: 4px 10px;
            font-size: 12.5px;
            color: var(--text-secondary);
            font-weight: 600;
            cursor: pointer;
        }
        .tag-pill:hover {
            background: #e6e6e4;
            text-decoration: none;
        }
        .notif-item:hover {
            background: var(--gray-pill);
        }

        .feed-tabs {
            display: flex;
            gap: 4px;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 4px;
            margin-bottom: 16px;
        }
        .feed-tabs button {
            flex: 1;
            background: none;
            border: none;
            padding: 9px 6px;
            font-weight: 600;
            font-size: 13.5px;
            color: var(--text-secondary);
            border-radius: 3px;
            white-space: nowrap;
        }
        .feed-tabs button.active {
            background: var(--blurt-blue);
            color: #fff;
        }
        .feed-tabs button:hover:not(.active) {
            background: var(--bg-body);
        }
        @media(max-width:600px) {
            /* .feed-tabs holds up to 6 buttons (feed sort tabs, and
               separately the Settings tabs) — flex:1 crams them into
               unreadably narrow slots on a phone. Scroll horizontally with
               natural button widths instead. */
            .feed-tabs {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            .feed-tabs button {
                flex: none;
                padding: 9px 12px;
            }
        }

        .post-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            margin-bottom: 14px;
            box-shadow: var(--shadow-card);
        }
        .community-details {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            box-shadow: var(--shadow-card);
            padding: 16px;
            margin-bottom: 14px;
            display: flex;
            gap: 14px;
        }
        .community-details .community-avatar {
            width: 56px;
            height: 56px;
            border-radius: 8px;
            object-fit: cover;
            flex-shrink: 0;
            background: var(--gray-pill);
        }
        .community-details .community-about {
            font-size: 13.5px;
            color: var(--text-secondary);
            margin: 2px 0 10px;
            line-height: 1.5;
        }
        .community-details .community-description {
            font-size: 13.5px;
            color: var(--text-primary);
            line-height: 1.6;
            margin: 0 0 10px;
        }
        .community-details .community-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            font-size: 12.5px;
            color: var(--text-muted);
        }
        .community-details .community-stats b {
            color: var(--text-primary);
        }
        .vote-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 1px solid var(--border-mid);
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            transition: .15s;
        }
        .vote-btn:hover {
            border-color: var(--blurt-green);
            color: var(--blurt-green);
        }
        .vote-btn.upvoted {
            background: var(--blurt-green);
            border-color: var(--blurt-green);
            color: #fff;
        }
        .vote-btn.down:hover {
            border-color: var(--blurt-red);
            color: var(--blurt-red);
        }
        .vote-btn.downvoted {
            background: var(--blurt-red);
            border-color: var(--blurt-red);
            color: #fff;
        }
        .payout-icon {
            width: 14px;
            height: 14px;
            vertical-align: -2px;
            border-radius: 50%;
            margin-right: 2px;
        }
        /* Upvote button moved below the post, alongside comments/reblurt/share */
        .vote-btn-inline {
            border: none;
            background: transparent;
            padding: 0;
            font: inherit;
            cursor: pointer;
        }
        .vote-btn-inline svg {
            flex-shrink: 0;
        }
        .vote-btn-inline:hover {
            color: var(--blurt-green);
        }
        .vote-btn-inline.upvoted {
            color: var(--blurt-green);
        }

        .post-body {
            min-width: 0;
            padding: 14px 16px;
        }
        .post-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        .post-meta img.avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #ddd;
        }
        .post-meta .author {
            font-weight: 700;
            color: var(--text-primary);
        }
        .post-meta .author:hover {
            text-decoration: underline;
        }
        .post-meta .reputation {
            color: var(--text-muted);
            font-size: 12px;
        }
        .post-meta .community-tag {
            background: var(--gray-pill);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11.5px;
            font-weight: 600;
        }
        .post-title {
            font-size: 19px;
            font-weight: 700;
            margin: 4px 0 6px;
            color: var(--text-primary);
            line-height: 1.3;
        }
        .post-title a {
            color: inherit;
        }
        .post-title a:hover {
            color: var(--blurt-link-hover);
            text-decoration: none;
        }
        .post-excerpt {
            color: var(--text-secondary);
            font-size: 14.5px;
            margin-bottom: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .post-thumb {
            width: 100%;
            max-height: 340px;
            object-fit: cover;
            border-radius: var(--radius);
            margin-bottom: 10px;
            background: #eee;
        }
        .post-actions {
            display: flex;
            align-items: center;
            gap: 18px;
            font-size: 13px;
            color: var(--text-secondary);
            flex-wrap: wrap;
        }
        .post-actions .pa-item {
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--text-secondary);
            font-weight: 600;
        }
        .post-actions .pa-item:hover {
            color: var(--blurt-link);
            text-decoration: none;
        }
        .post-actions svg {
            flex-shrink: 0;
        }
        .post-actions .pa-item.resteemed {
            color: var(--blurt-green);
        }

        .article-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 24px 28px;
            margin-bottom: 16px;
        }
        .article-title {
            font-size: 28px;
            font-weight: 700;
            line-height: 1.25;
            margin: 0 0 14px;
        }
        .article-meta {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 18px;
            padding-bottom: 18px;
            border-bottom: 1px solid var(--border-light);
            flex-wrap: wrap;
        }
        .article-meta img.avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #ddd;
        }
        .article-meta .meta-text .author {
            font-weight: 700;
            font-size: 15px;
        }
        .article-meta .meta-text .sub {
            font-size: 12.5px;
            color: var(--text-muted);
        }
        .article-content {
            font-size: 16.5px;
            line-height: 1.7;
            color: var(--text-primary);
        }
        .article-content img {
            border-radius: var(--radius);
            margin: 10px 0;
            max-width: 100%;
        }
        .article-content h1,
        .article-content h2,
        .article-content h3 {
            margin-top: 1.4em;
        }
        .article-content p {
            margin: 0 0 1em;
        }
        .article-content blockquote {
            border-left: 3px solid var(--border-mid);
            margin: 1em 0;
            padding: .2em 1em;
            color: var(--text-secondary);
        }
        .article-content code {
            background: var(--gray-pill);
            padding: 2px 5px;
            border-radius: 3px;
            font-size: .9em;
        }
        .article-content pre {
            background: #272822;
            color: #f8f8f2;
            padding: 14px;
            border-radius: var(--radius);
            overflow-x: auto;
        }
        .article-content pre code {
            background: none;
            color: inherit;
            padding: 0;
        }
        /* User-embedded GFM markdown tables can be arbitrarily wide — scroll
           them horizontally instead of breaking the page layout on mobile. */
        .article-content table,
        .comment-text table {
            display: block;
            max-width: 100%;
            overflow-x: auto;
            border-collapse: collapse;
        }
        .article-content th, .article-content td,
        .comment-text th, .comment-text td {
            border: 1px solid var(--border-mid);
            padding: 6px 10px;
        }
        /* Comments are rendered by the same renderMarkdown() as article
           bodies, so they need the same image/code-block safeguards. */
        .comment-text img {
            max-width: 100%;
            border-radius: var(--radius);
            margin: 6px 0;
        }
        .comment-text pre {
            background: #272822;
            color: #f8f8f2;
            padding: 12px;
            border-radius: var(--radius);
            overflow-x: auto;
        }
        .comment-text code {
            background: var(--gray-pill);
            padding: 2px 5px;
            border-radius: 3px;
            font-size: .9em;
        }
        .comment-text pre code {
            background: none;
            color: inherit;
            padding: 0;
        }
        .article-content a {
            word-break: break-word;
        }
        .article-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .payout-bar {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 16px 0;
            border-top: 1px solid var(--border-light);
            margin-top: 16px;
            flex-wrap: wrap;
        }
        .payout-amt {
            font-size: 18px;
            font-weight: 700;
            color: var(--blurt-green);
        }

        .comment-box {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 18px;
            margin-bottom: 14px;
        }
        .comment-box textarea {
            width: 100%;
            min-height: 90px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 10px;
            font-family: inherit;
            font-size: 14.5px;
            resize: vertical;
            outline: none;
        }
        .comment-box textarea:focus {
            border-color: var(--blurt-link);
        }
        .comment-thread {
            margin-top: 6px;
        }
        .comment-item {
            display: flex;
            gap: 10px;
            padding: 14px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .comment-item:last-child {
            border-bottom: none;
        }
        .comment-item img.avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: #ddd;
            flex-shrink: 0;
        }
        .comment-body {
            flex: 1;
            min-width: 0;
        }
        .comment-head {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            margin-bottom: 4px;
        }
        .comment-head .author {
            font-weight: 700;
            color: var(--text-primary);
        }
        .comment-text {
            font-size: 14.5px;
            color: var(--text-primary);
            line-height: 1.55;
            margin-bottom: 6px;
            word-wrap: break-word;
        }
        .comment-actions {
            display: flex;
            gap: 14px;
            font-size: 12.5px;
            color: var(--text-secondary);
            align-items: center;
        }
        .comment-actions span,
        .comment-actions a,
        .comment-actions button {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 12.5px;
            padding: 0;
        }
        .comment-actions a:hover,
        .comment-actions button:hover {
            color: var(--blurt-link);
            text-decoration: none;
        }
        .comment-vote-btn.upvoted {
            color: var(--blurt-green) !important;
        }
        .comment-reply-box {
            margin-top: 10px;
            margin-left: 0;
        }
        .comment-children {
            margin-left: 30px;
            margin-top: 6px;
            border-left: 2px solid var(--border-light);
            padding-left: 14px;
        }

        .editor-wrap {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 20px;
        }
        .editor-wrap input[type=text] {
            width: 100%;
            font-size: 22px;
            font-weight: 700;
            border: none;
            border-bottom: 1px solid var(--border-light);
            padding: 8px 2px 14px;
            outline: none;
            margin-bottom: 14px;
            font-family: inherit;
        }
        .editor-wrap textarea.md-editor {
            width: 100%;
            min-height: 340px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 14px;
            font-family: 'Consolas', monospace;
            font-size: 14.5px;
            resize: vertical;
            outline: none;
            line-height: 1.6;
        }
        .editor-wrap textarea.md-editor:focus {
            border-color: var(--blurt-link);
        }
        .md-toolbar {
            display: flex;
            gap: 4px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        .md-toolbar button {
            background: var(--gray-pill);
            border: 1px solid var(--border-mid);
            border-radius: 3px;
            width: 32px;
            height: 30px;
            font-weight: 700;
            font-size: 13.5px;
            color: var(--text-primary);
        }
        .md-toolbar button:hover {
            background: #e6e6e4;
        }
        .preview-pane {
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 16px;
            min-height: 340px;
            background: #fff;
        }
        .editor-footer {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-top: 16px;
            flex-wrap: wrap;
        }
        .editor-footer input[type=text].tags-input {
            flex: 1;
            min-width: 200px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 9px 12px;
            font-size: 14px;
            outline: none;
            font-weight: 400;
        }
        .editor-footer input.tags-input:focus {
            border-color: var(--blurt-link);
        }
        .field-label {
            font-size: 12.5px;
            color: var(--text-secondary);
            font-weight: 600;
            margin-bottom: 5px;
            display: block;
            text-transform: uppercase;
            letter-spacing: .3px;
        }
        .markdown-help {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 6px;
        }
        .editor-select {
            width: 100%;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 9px 12px;
            font-size: 14.5px;
            outline: none;
            font-family: inherit;
            background: #fff;
            color: var(--text-primary);
        }
        .editor-select:focus {
            border-color: var(--blurt-link);
        }
        .beneficiary-section {
            margin-top: 16px;
        }
        .beneficiary-row {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 8px;
        }
        .beneficiary-row-locked {
            background: var(--gray-pill);
            border-radius: var(--radius);
            padding: 8px 10px;
        }
        .ben-locked-label {
            font-size: 13.5px;
            color: var(--text-primary);
        }
        .beneficiary-row input[type=text] {
            flex: 1;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 8px 10px;
            font-size: 14px;
            outline: none;
            font-family: inherit;
        }
        .beneficiary-row input.ben-percent {
            width: 90px;
            flex: none;
        }
        .beneficiary-row input:focus {
            border-color: var(--blurt-link);
        }
        .beneficiary-row .ben-remove {
            background: none;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            width: 32px;
            height: 32px;
            color: var(--blurt-red);
            font-weight: 700;
            flex: none;
        }
        .beneficiary-row .ben-remove:hover {
            background: #fdeef1;
        }
        .beneficiary-total {
            font-size: 12.5px;
            color: var(--text-secondary);
            margin-top: 4px;
        }
        .beneficiary-total.over {
            color: var(--blurt-red);
            font-weight: 700;
        }
        .upload-zone {
            border: 2px dashed var(--border-mid);
            border-radius: var(--radius);
            padding: 14px;
            text-align: center;
            color: var(--text-muted);
            font-size: 13px;
            cursor: pointer;
            margin-bottom: 10px;
            transition: border-color .2s, color .2s;
        }
        .upload-zone:hover {
            border-color: var(--blurt-link);
            color: var(--blurt-link);
        }
        .upload-zone.dragover {
            border-color: var(--blurt-green);
            color: var(--blurt-green);
            background: #f0faf0;
        }

        .wallet-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
            margin-bottom: 20px;
        }
        .wallet-tile {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            padding: 18px;
        }
        .wallet-tile .wt-label {
            font-size: 12.5px;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: .3px;
            font-weight: 700;
            margin-bottom: 6px;
        }
        .wallet-tile .wt-value {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
        }
        .wallet-tile .wt-sub {
            font-size: 12.5px;
            color: var(--text-muted);
            margin-top: 4px;
        }
        .wallet-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .tx-table-wrap {
            width: 100%;
            overflow-x: auto;
        }
        .tx-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13.5px;
        }
        .tx-table th {
            text-align: left;
            padding: 8px 10px;
            color: var(--text-secondary);
            border-bottom: 2px solid var(--border-light);
            font-size: 12px;
            text-transform: uppercase;
        }
        .tx-table td {
            padding: 9px 10px;
            border-bottom: 1px solid var(--border-light);
        }

        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(20, 22, 30, .55);
            display: none;
            align-items: flex-start;
            justify-content: center;
            z-index: 1000;
            padding: 60px 16px;
            overflow-y: auto;
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal-box {
            background: #fff;
            border-radius: 6px;
            max-width: 420px;
            width: 100%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
        }
        .modal-box.wide {
            max-width: 560px;
        }
        .modal-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-light);
        }
        .modal-head h2 {
            margin: 0;
            font-size: 18px;
        }
        .modal-close {
            background: none;
            border: none;
            font-size: 20px;
            color: var(--text-muted);
            line-height: 1;
        }
        .modal-close:hover {
            color: var(--text-primary);
        }
        .modal-body {
            padding: 20px;
        }
        .modal-body label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
            margin-top: 14px;
        }
        .modal-body label:first-child {
            margin-top: 0;
        }
        .modal-body input[type=text],
        .modal-body input[type=password],
        .modal-body textarea {
            width: 100%;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            padding: 10px 12px;
            font-size: 14.5px;
            outline: none;
            font-family: inherit;
        }
        .modal-body input:focus,
        .modal-body textarea:focus {
            border-color: var(--blurt-link);
        }
        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-light);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        .login-method-toggle {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
        }
        .login-method-toggle button {
            flex: 1;
            padding: 9px;
            border: 1px solid var(--border-mid);
            border-radius: var(--radius);
            background: #fff;
            font-weight: 600;
            font-size: 13.5px;
            color: var(--text-secondary);
        }
        .login-method-toggle button.active {
            background: var(--blurt-blue);
            color: #fff;
            border-color: var(--blurt-blue);
        }
        .helper-text {
            font-size: 12.5px;
            color: var(--text-muted);
            margin-top: 6px;
            line-height: 1.5;
        }
        .error-text {
            font-size: 13px;
            color: var(--blurt-red);
            margin-top: 8px;
            font-weight: 600;
            display: none;
        }
        .error-text.show {
            display: block;
        }

        #toast-wrap {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .toast {
            background: #222;
            color: #fff;
            padding: 12px 18px;
            border-radius: 6px;
            font-size: 14px;
            box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
            min-width: 240px;
            display: flex;
            align-items: center;
            gap: 10px;
            animation: slideIn .25s ease;
        }
        .toast.success {
            border-left: 4px solid var(--blurt-green);
        }
        .toast.error {
            border-left: 4px solid var(--blurt-red);
        }
        .toast.info {
            border-left: 4px solid var(--blurt-link);
        }
        @keyframes slideIn {
            from {
                transform: translateX(40px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .spinner {
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, .4);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin .7s linear infinite;
            display: inline-block;
        }
        .spinner.dark {
            border: 2px solid rgba(0, 0, 0, .15);
            border-top-color: var(--blurt-blue);
        }
        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }
        .skeleton {
            background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
            background-size: 200% 100%;
            animation: shimmer 1.4s infinite;
            border-radius: var(--radius);
        }
        @keyframes shimmer {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        .skel-card {
            height: 170px;
            margin-bottom: 14px;
        }

        .profile-banner {
            background: var(--blurt-blue);
            height: 90px;
            border-radius: var(--radius) var(--radius) 0 0;
            position: relative;
            overflow: hidden;
        }
        .profile-banner-placeholder {
            background: linear-gradient(135deg, var(--blurt-blue) 0%, #2a4a8a 100%);
        }
        .profile-banner-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .profile-head {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            overflow: hidden;
            margin-bottom: 16px;
        }
        .profile-info {
            display: flex;
            gap: 18px;
            padding: 0 20px 20px;
            margin-top: -36px;
            align-items: flex-end;
            flex-wrap: wrap;
            /* .profile-banner is position:relative, and positioned boxes paint
               above non-positioned ones — so the banner covered the top 36px of
               the avatar pulled up by the negative margin above. Positioning
               this row (with z-index:1) paints it above the banner. */
            position: relative;
            z-index: 1;
        }
        .profile-info img.avatar-big {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            border: 4px solid #fff;
            background: #ddd;
        }
        .profile-name {
            font-size: 21px;
            font-weight: 700;
            margin: 6px 0 2px;
        }
        .profile-stats {
            display: flex;
            gap: 18px;
            padding: 0 20px 16px;
            font-size: 13.5px;
            color: var(--text-secondary);
            flex-wrap: wrap;
        }
        .profile-stats b {
            color: var(--text-primary);
        }

        footer.site-footer {
            text-align: center;
            padding: 30px;
            color: var(--text-muted);
            font-size: 12.5px;
        }

        .hidden {
            display: none !important;
        }
        .text-center {
            text-align: center;
        }
        .mt-2 {
            margin-top: 10px;
        }
        .load-more-wrap {
            text-align: center;
            margin: 24px 0;
        }

        /* ---------- PHASE 1: Settings, Followers/Following, Account Info ---------- */
        .settings-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .settings-row:last-child { border-bottom: none; }
        .settings-help {
            font-size: 12.5px;
            color: var(--text-muted);
            margin-top: 3px;
            line-height: 1.5;
        }
        /* Simple toggle switch, built from a checkbox — no extra JS needed. */
        .switch {
            position: relative;
            display: inline-block;
            width: 42px;
            height: 24px;
            flex-shrink: 0;
        }
        .switch input { opacity: 0; width: 0; height: 0; }
        .switch .slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background-color: var(--border-mid);
            border-radius: 24px;
            transition: .15s;
        }
        .switch .slider::before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: #fff;
            border-radius: 50%;
            transition: .15s;
        }
        .switch input:checked + .slider { background-color: var(--blurt-link); }
        .switch input:checked + .slider::before { transform: translateX(18px); }

        .user-list-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .user-list-row:last-child { border-bottom: none; }
        .user-list-row img.avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #ddd;
            flex-shrink: 0;
        }

        .stat-link { cursor: pointer; }
        .stat-link:hover { text-decoration: underline; }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 14px;
        }
        .info-item {
            background: var(--gray-pill);
            border-radius: var(--radius);
            padding: 12px 14px;
        }
        .info-label {
            font-size: 11.5px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: .3px;
            margin-bottom: 4px;
        }
        .info-value {
            font-size: 14.5px;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* ---------- PHASE 2: Posting System ---------- */
        .video-embed {
            position: relative;
            width: 100%;
            max-width: 640px;
            aspect-ratio: 16 / 9;
            margin: 10px 0;
            border-radius: var(--radius);
            overflow: hidden;
            background: #000;
        }
        .video-embed iframe {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        .draft-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .draft-row:last-child { border-bottom: none; }
        .draft-title {
            font-weight: 600;
            font-size: 14.5px;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .editor-fullscreen {
            position: fixed !important;
            inset: 0;
            z-index: 500;
            background: var(--bg-card);
            overflow-y: auto;
            padding: 20px !important;
            max-width: none !important;
        }
        .editor-fullscreen .md-editor {
            min-height: 50vh;
        }

        @media(max-width:860px) {
            .article-card {
                padding: 16px;
            }
            .article-title {
                font-size: 22px;
            }
            /* Previously .nav-search and .nav-tabs were just display:none below
               600px with no replacement — search and feed-sort tabs were
               completely unreachable on mobile. Now the header wraps onto a
               second row instead of hiding them: search gets its own full-width
               row, and the feed tabs become a horizontally-scrollable strip
               (a standard, low-effort mobile nav pattern) rather than vanishing. */
            .topnav-inner {
                flex-wrap: wrap;
                height: auto;
                padding: 8px 12px;
                row-gap: 8px;
            }
            .nav-search {
                order: 3;
                flex: 1 1 100%;
                max-width: none;
            }
            .nav-tabs {
                order: 4;
                flex: 1 1 100%;
                margin-left: 0;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }
            .nav-tabs::-webkit-scrollbar {
                display: none;
            }
            .nav-tabs button {
                flex-shrink: 0;
                white-space: nowrap;
            }
            .nav-right {
                order: 2;
            }
            .editor-wrap {
                padding: 14px;
            }
            .settings-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .info-grid {
                grid-template-columns: 1fr 1fr;
            }
            .tag-explorer-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ---------- PHASE 3: Discovery ---------- */
        .tag-explorer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 10px;
        }
        .tag-explorer-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            background: var(--gray-pill);
            border-radius: var(--radius);
            padding: 10px 12px;
            cursor: pointer;
        }
        .tag-explorer-item:hover {
            background: var(--border-light);
        }
        .tag-explorer-name {
            font-weight: 600;
            font-size: 13.5px;
            color: var(--text-primary);
        }
        .tag-explorer-count {
            font-size: 11.5px;
            color: var(--text-muted);
        }

        .search-result-section {
            margin-bottom: 22px;
            padding-bottom: 18px;
            border-bottom: 1px solid var(--border-light);
        }
        .search-result-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        .search-result-section h3 {
            font-size: 14.5px;
            margin: 0 0 10px;
        }

        /* ---------- PHASE 4: Wallet History ---------- */
        .history-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 11px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .history-row:last-child { border-bottom: none; }
        .history-icon {
            font-size: 17px;
            width: 24px;
            text-align: center;
            flex-shrink: 0;
        }
        .history-text {
            font-size: 14px;
            color: var(--text-primary);
        }
        .history-text a {
            color: var(--blurt-link);
            cursor: pointer;
        }
        .history-amount {
            font-weight: 600;
            font-size: 13.5px;
            white-space: nowrap;
            color: var(--text-primary);
        }

        /* ---------- PHASE 5: Proposals ---------- */
        .proposal-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-light);
        }
        .proposal-row:last-child { border-bottom: none; }

        /* ---------- PHASE 8: Comment deep-linking ---------- */
        .comment-highlighted {
            animation: commentHighlightFade 3s ease-out;
            border-radius: var(--radius);
        }
        @keyframes commentHighlightFade {
            0% { background: rgba(255, 214, 0, 0.35); }
            100% { background: transparent; }
        }

        /* ---------- COAL warnings (scam / phishing / abuse list) ---------- */
        .coal-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 7px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.6;
            vertical-align: middle;
            color: #8a1c1c;
            background: #fde2e2;
            border: 1px solid #f5b5b5;
            cursor: help;
            white-space: nowrap;
        }
        .coal-banner {
            margin: 12px 0;
            padding: 10px 14px;
            border-radius: var(--radius);
            font-size: 13.5px;
            line-height: 1.5;
            color: #8a1c1c;
            background: #fde2e2;
            border: 1px solid #f5b5b5;
        }
        :root[data-theme="dark"] .coal-badge,
        :root[data-theme="dark"] .coal-banner {
            color: #ffb4b4;
            background: #3a1d22;
            border-color: #6b2b33;
        }
        .coal-slot:empty, .coal-banner-slot:empty { display: none; }
