* { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: var(--font-sans);
            background: var(--background);
            color: var(--foreground);
            line-height: 1.6;
        }

        /* ═══ APP SHELL ═══ */
        .app-shell {
            display: flex;
            min-height: 100vh;
        }

        /* ═══ SIDEBAR ═══ */
        .note-sidebar {
            width: 220px;
            background: var(--sidebar);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 16px 8px;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            flex-shrink: 0;
        }
        .sidebar-logo {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--foreground);
            padding: 4px 12px 16px;
            letter-spacing: -0.02em;
        }
        .sidebar-logo small {
            display: block;
            font-size: 0.65rem;
            font-weight: 400;
            color: var(--muted-fg);
            letter-spacing: 0;
            margin-top: 2px;
        }
        .nav-section-label {
            font-size: 0.6rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--muted-fg);
            padding: 16px 12px 4px;
            opacity: 0.5;
            user-select: none;
        }
        .nav-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 8px 12px;
            border: none;
            background: none;
            border-radius: 10px;
            font-size: 0.82rem;
            color: var(--sidebar-fg);
            cursor: pointer;
            transition: 0.15s;
            text-align: left;
            font-family: var(--font-sans);
            opacity: 0.7;
            position: relative;
        }
        .nav-btn:hover {
            opacity: 1;
            background: var(--sidebar-accent);
        }
        .nav-btn.active {
            opacity: 1;
            background: var(--sidebar-accent);
            color: var(--sidebar-accent-fg);
            font-weight: 600;
        }
        .nav-btn.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 16px;
            border-radius: 999px;
            background: var(--primary);
        }
        .nav-btn .badge {
            margin-left: auto;
            background: var(--primary);
            color: #fff;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 1px 6px;
            border-radius: 999px;
            min-width: 18px;
            text-align: center;
        }
        .sidebar-bottom {
            padding: 8px 4px;
            border-top: 1px solid var(--border);
            margin-top: 8px;
        }
        .sidebar-stats {
            font-size: 0.7rem;
            color: var(--muted-fg);
            padding: 4px 12px;
            line-height: 1.8;
        }
        .sidebar-stats b { color: var(--foreground); font-weight: 600; }

        /* ═══ MAIN CONTENT ═══ */
        .main-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }

        /* ═══ TOP BAR ═══ */
        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 24px;
            border-bottom: 1px solid var(--border);
            background: var(--card);
            position: sticky;
            top: 0;
            z-index: 10;
        }
        .topbar-title {
            font-size: 1rem;
            font-weight: 600;
        }
        .topbar-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .search-box {
            display: flex;
            align-items: center;
            gap: 6px;
            background: var(--muted);
            border: 1px solid transparent;
            border-radius: var(--radius);
            padding: 5px 12px;
            transition: 0.15s;
            min-width: 240px;
        }
        .search-box:focus-within {
            border-color: var(--primary);
            background: var(--card);
        }
        .search-box input {
            border: none;
            outline: none;
            font-size: 0.8rem;
            width: 100%;
            background: transparent;
            color: var(--foreground);
        }
        .search-icon { font-size: 0.8rem; color: var(--muted-fg); }
        .kbd {
            font-size: 0.6rem;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 3px;
            padding: 1px 5px;
            color: var(--muted-fg);
            font-family: var(--font-mono);
        }

        /* ═══ PAGE CONTAINER ═══ */
        .page { padding: 24px; max-width: 760px; margin: 0 auto; width: 100%; }
        .page-section { display: none; }
        .page-section.active { display: block; }

        /* ═══ COMPOSER ═══ */
        .composer {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 14px 16px;
            margin-bottom: 20px;
            transition: 0.2s;
        }
        .composer:focus-within {
            box-shadow: var(--shadow-md);
            border-color: var(--primary);
        }
        .composer-textarea {
            width: 100%;
            min-height: 72px;
            border: none;
            outline: none;
            resize: vertical;
            font-family: var(--font-sans);
            font-size: 0.88rem;
            line-height: 1.7;
            color: var(--foreground);
            background: transparent;
        }
        .composer-textarea::placeholder { color: var(--muted-fg); }
        .composer-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid var(--muted);
        }
        .toolbar-left {
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 1;
        }
        .tag-chip {
            background: var(--accent);
            color: var(--primary);
            font-size: 0.7rem;
            font-weight: 500;
            padding: 2px 8px;
            border-radius: 999px;
            cursor: pointer;
            transition: 0.1s;
        }
        .tag-chip:hover { background: var(--primary); color: #fff; }
        .tag-chip.removable::after { content: ' \00d7'; font-weight: 700; }
        .tag-input {
            border: none;
            outline: none;
            font-size: 0.78rem;
            color: var(--muted-fg);
            background: transparent;
            width: 140px;
        }
        .visibility-select {
            font-size: 0.75rem;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 3px 8px;
            background: var(--card);
            color: var(--muted-fg);
            cursor: pointer;
            outline: none;
            margin-right: 8px;
        }
        .btn-compose {
            background: var(--primary);
            color: #fff;
            border: none;
            padding: 6px 16px;
            border-radius: var(--radius);
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: 0.15s;
        }
        .btn-compose:hover { background: var(--primary-hover); }
        .btn-compose:disabled { opacity: 0.4; cursor: not-allowed; }

        /* ═══ FILTER TABS (below composer) ═══ */
        .filter-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }
        .filter-pill {
            font-size: 0.75rem;
            padding: 4px 12px;
            border-radius: 999px;
            cursor: pointer;
            border: 1px solid transparent;
            background: var(--muted);
            color: var(--secondary-fg);
            font-weight: 500;
            transition: 0.15s;
        }
        .filter-pill:hover, .filter-pill.active {
            background: var(--primary-light);
            color: var(--primary);
            border-color: var(--primary);
        }

        /* ═══ NOTE CARD ═══ */
        .note-list { display: flex; flex-direction: column; gap: 8px; }

        .note-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 14px 16px;
            transition: 0.2s;
            position: relative;
        }
        .note-card:hover { box-shadow: var(--shadow-md); }
        .note-card.pinned { border-left: 3px solid var(--primary); }
        .note-card .pin-badge {
            position: absolute;
            top: 10px;
            right: 12px;
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--primary);
        }

        .note-body {
            font-size: 0.86rem;
            line-height: 1.7;
            color: var(--foreground);
            word-wrap: break-word;
        }
        .note-body p { margin-bottom: 0.4em; }
        .note-body p:last-child { margin-bottom: 0; }
        .note-body code {
            background: var(--muted);
            padding: 1px 5px;
            border-radius: 3px;
            font-size: 0.8rem;
            font-family: var(--font-mono);
        }
        .note-body pre {
            background: #f5f4f0;
            padding: 10px;
            border-radius: var(--radius);
            overflow-x: auto;
            margin: 6px 0;
        }
        .note-body pre code { background: none; padding: 0; }
        .note-body ul, .note-body ol { padding-left: 1.4em; margin: 4px 0; }
        .note-body blockquote {
            border-left: 3px solid var(--border);
            padding-left: 12px;
            color: var(--muted-fg);
            margin: 6px 0;
        }
        .note-body h1, .note-body h2, .note-body h3 { margin: 8px 0 4px; }

        .note-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            padding-top: 6px;
            border-top: 1px solid var(--muted);
        }
        .note-footer-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .note-time {
            font-size: 0.7rem;
            color: var(--muted-fg);
        }
        .note-tags { display: flex; gap: 4px; flex-wrap: wrap; }
        .note-tag {
            font-size: 0.67rem;
            background: var(--accent);
            color: var(--primary);
            padding: 1px 7px;
            border-radius: 999px;
            font-weight: 500;
            cursor: pointer;
        }
        .note-tag:hover { background: var(--primary); color: #fff; }

        .note-actions {
            display: flex;
            gap: 2px;
            opacity: 0;
            transition: 0.15s;
        }
        .note-card:hover .note-actions { opacity: 1; }
        .act-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.75rem;
            padding: 3px 7px;
            border-radius: var(--radius-sm);
            color: var(--muted-fg);
            transition: 0.15s;
        }
        .act-btn:hover { background: var(--muted); color: var(--foreground); }
        .act-btn.danger:hover { background: var(--error-light); color: var(--error); }

        /* ═══ EDIT MODE ═══ */
        .note-card.editing .note-body { display: none; }
        .note-card .edit-panel { display: none; }
        .note-card.editing .edit-panel { display: block; }
        .edit-panel textarea {
            width: 100%;
            min-height: 72px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 10px;
            font-family: var(--font-mono);
            font-size: 0.82rem;
            resize: vertical;
            outline: none;
            line-height: 1.6;
        }
        .edit-panel textarea:focus { border-color: var(--primary); }
        .edit-btns {
            display: flex;
            gap: 6px;
            margin-top: 6px;
            justify-content: flex-end;
        }
        .edit-btns button {
            padding: 4px 14px;
            border-radius: var(--radius);
            font-size: 0.78rem;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid var(--border);
            background: var(--card);
        }
        .edit-btns .btn-ok { background: var(--primary); color: #fff; border-color: var(--primary); }

        /* ═══ EMPTY STATE ═══ */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--muted-fg);
        }
        .empty-state p { font-size: 0.88rem; margin-top: 6px; }

        /* ═══ ARCHIVED SECTION ═══ */
        .archived-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }
        .archived-header h2 { font-size: 1.1rem; font-weight: 600; }
        .restore-btn {
            font-size: 0.75rem;
            padding: 3px 10px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            background: var(--card);
            cursor: pointer;
            color: var(--primary);
        }
        .restore-btn:hover { background: var(--primary-light); }

        /* ═══ SETTINGS SECTION ═══ */
        .settings-grid {
            display: grid;
            gap: 16px;
        }
        .setting-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 16px 20px;
        }
        .setting-card h3 {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .setting-card p {
            font-size: 0.8rem;
            color: var(--muted-fg);
            margin-bottom: 10px;
        }
        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 0;
        }
        .setting-label { font-size: 0.82rem; color: var(--secondary-fg); }
        .setting-value { font-size: 0.82rem; font-weight: 500; }

        /* ═══ TOAST ═══ */
        .toast {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: var(--foreground);
            color: #fff;
            padding: 10px 20px;
            border-radius: var(--radius);
            font-size: 0.8rem;
            font-weight: 500;
            opacity: 0;
            transform: translateY(10px);
            transition: 0.3s;
            z-index: 999;
            pointer-events: none;
        }
        .toast.show { opacity: 1; transform: translateY(0); }

        /* ═══ RESPONSIVE ═══ */
        @media (max-width: 768px) {
            .note-sidebar { display: none; }
            .page { padding: 16px; }
            .search-box { min-width: 160px; }
        }

        /* ═══ CHATBOT WIDGET ═══ */
        .chat-fab {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--primary);
            color: #fff;
            border: none;
            cursor: pointer;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            box-shadow: 0 4px 16px rgba(59,89,152,0.35);
            transition: 0.2s;
        }
        .chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(59,89,152,0.45); }
        .chat-fab.open { background: var(--error); }
        .chat-fab .pulse {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: var(--primary);
            opacity: 0.25;
            animation: fabPulse 2s infinite;
        }
        @keyframes fabPulse { 0%,100%{transform:scale(1);opacity:0.25} 50%{transform:scale(1.35);opacity:0} }

        .chat-panel {
            position: fixed;
            bottom: 88px;
            right: 24px;
            width: 400px;
            height: 520px;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.12);
            z-index: 99;
            display: none;
            flex-direction: column;
            overflow: hidden;
            transition: 0.25s;
        }
        .chat-panel.show { display: flex; }
        .chat-panel.expanded {
            width: min(600px, calc(100vw - 48px));
            height: min(800px, calc(100vh - 100px));
        }

        .chat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            background: var(--muted);
        }
        .chat-header-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .chat-dot {
            width: 8px; height: 8px;
            border-radius: 50%;
            background: #16a34a;
        }
        .chat-header-title {
            font-size: 0.85rem;
            font-weight: 600;
        }
        .chat-header-sub {
            font-size: 0.68rem;
            color: var(--muted-fg);
        }
        .chat-header-btns {
            display: flex;
            gap: 2px;
        }
        .chat-hdr-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 50%;
            color: var(--muted-fg);
            font-size: 0.82rem;
            transition: 0.15s;
        }
        .chat-hdr-btn:hover { background: var(--sidebar-accent); color: var(--foreground); }
        .chat-hdr-btn.danger:hover { color: var(--error); }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .chat-bubble {
            max-width: 85%;
            padding: 10px 14px;
            border-radius: 14px;
            font-size: 0.82rem;
            line-height: 1.6;
            box-shadow: var(--shadow-xs);
        }
        .chat-bubble.user {
            align-self: flex-end;
            background: var(--primary);
            color: #fff;
            border-bottom-right-radius: 4px;
        }
        .chat-bubble.ai {
            align-self: flex-start;
            background: var(--muted);
            color: var(--foreground);
            border: 1px solid var(--border);
            border-bottom-left-radius: 4px;
        }
        .chat-bubble.ai p { margin-bottom: 0.3em; }
        .chat-bubble.ai p:last-child { margin-bottom: 0; }
        .chat-bubble.ai code {
            background: rgba(0,0,0,0.06);
            padding: 1px 4px;
            border-radius: 3px;
            font-size: 0.78rem;
            font-family: var(--font-mono);
        }
        .chat-bubble.ai pre {
            background: rgba(0,0,0,0.04);
            padding: 8px;
            border-radius: 6px;
            overflow-x: auto;
            margin: 4px 0;
        }
        .chat-bubble.ai pre code { background: none; padding: 0; }
        .chat-typing {
            align-self: flex-start;
            background: var(--muted);
            border: 1px solid var(--border);
            padding: 10px 14px;
            border-radius: 14px;
            border-bottom-left-radius: 4px;
            font-size: 0.78rem;
            color: var(--muted-fg);
            display: none;
            align-items: center;
            gap: 6px;
        }
        .chat-typing.show { display: flex; }
        .typing-dots span {
            display: inline-block;
            width: 5px; height: 5px;
            border-radius: 50%;
            background: var(--muted-fg);
            animation: typingBounce 1.2s infinite;
        }
        .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
        .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes typingBounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-4px)} }

        .chat-load-more {
            text-align: center;
            margin-bottom: 6px;
        }
        .chat-load-more button {
            font-size: 0.7rem;
            padding: 3px 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: var(--card);
            color: var(--muted-fg);
            cursor: pointer;
        }
        .chat-load-more button:hover { background: var(--muted); }

        .chat-input-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            border-top: 1px solid var(--border);
            background: var(--card);
        }
        .chat-input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 0.82rem;
            background: var(--muted);
            padding: 8px 14px;
            border-radius: 12px;
            color: var(--foreground);
            font-family: var(--font-sans);
        }
        .chat-input:focus { box-shadow: 0 0 0 1px var(--primary); }
        .chat-send-btn {
            background: var(--primary);
            color: #fff;
            border: none;
            width: 34px; height: 34px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.15s;
        }
        .chat-send-btn:hover { opacity: 0.9; }
        .chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

        @media (max-width: 640px) {
            .chat-panel { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
        }

        /* ═══ SOCIAL FEATURES ═══ */
        .note-creator { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
        .creator-avatar { width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,var(--primary-light),var(--primary)); display:flex; align-items:center; justify-content:center; font-size:0.65rem; font-weight:700; color:#fff; flex-shrink:0; }
        .creator-info { display:flex; flex-direction:column; min-width:0; }
        .creator-name { font-size:0.78rem; font-weight:600; color:var(--foreground); }
        .creator-time { font-size:0.68rem; color:var(--muted-fg); }
        .note-header-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
        .action-menu-container { position:relative; }
        .action-menu-trigger { background:none; border:none; cursor:pointer; padding:4px; border-radius:4px; color:var(--muted-fg); font-size:0.9rem; transition:0.15s; opacity:0; display:flex; align-items:center; }
        .note-card:hover .action-menu-trigger { opacity:1; }
        .action-menu-trigger:hover { background:var(--muted); color:var(--foreground); }
        .action-menu-dropdown { position:absolute; top:100%; right:0; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-md); z-index:50; min-width:160px; padding:4px; display:none; }
        .action-menu-dropdown.show { display:block; }
        .action-menu-item { display:flex; align-items:center; gap:8px; width:100%; padding:6px 10px; border:none; background:none; border-radius:var(--radius-sm); font-size:0.78rem; color:var(--foreground); cursor:pointer; transition:0.1s; text-align:left; font-family:var(--font-sans); }
        .action-menu-item:hover { background:var(--muted); }
        .action-menu-item.danger { color:var(--error); }
        .action-menu-item.danger:hover { background:var(--error-light); }
        .menu-separator { height:1px; background:var(--border); margin:4px 0; }
        .comment-count-btn { background:none; border:none; cursor:pointer; display:flex; align-items:center; gap:3px; padding:2px 6px; border-radius:4px; color:var(--muted-fg); font-size:0.72rem; transition:0.15s; }
        .comment-count-btn:hover { background:var(--muted); color:var(--primary); }
        .vis-icon { font-size:0.65rem; padding:1px 6px; border-radius:999px; font-weight:500; }
        .vis-icon.public { background:#dcfce7; color:#16a34a; }
        .vis-icon.protected { background:#fef3c7; color:#d97706; }
        .vis-icon.private { background:var(--muted); color:var(--muted-fg); }

        /* MEMO DETAIL MODAL */
        .memo-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:200; display:none; align-items:center; justify-content:center; backdrop-filter:blur(2px); }
        .memo-modal-overlay.show { display:flex; }
        .memo-modal { background:var(--card); border-radius:16px; width:min(680px,calc(100vw - 48px)); max-height:calc(100vh - 64px); overflow:hidden; display:flex; flex-direction:column; box-shadow:0 12px 48px rgba(0,0,0,0.18); animation:modalSlideUp 0.25s ease-out; }
        @keyframes modalSlideUp { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }
        .memo-modal-header { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; border-bottom:1px solid var(--border); }
        .memo-modal-header-left { display:flex; align-items:center; gap:10px; }
        .memo-modal-header-left .creator-avatar { width:32px; height:32px; font-size:0.7rem; }
        .memo-modal-title { font-size:0.82rem; font-weight:600; }
        .memo-modal-time { font-size:0.7rem; color:var(--muted-fg); }
        .memo-modal-actions { display:flex; align-items:center; gap:6px; }
        .memo-modal-btn { background:none; border:1px solid var(--border); padding:5px 12px; border-radius:var(--radius); font-size:0.75rem; cursor:pointer; color:var(--foreground); transition:0.15s; display:flex; align-items:center; gap:4px; font-family:var(--font-sans); }
        .memo-modal-btn:hover { background:var(--muted); }
        .memo-modal-close { background:none; border:none; cursor:pointer; font-size:1.2rem; color:var(--muted-fg); padding:4px 8px; border-radius:4px; transition:0.15s; }
        .memo-modal-close:hover { background:var(--muted); color:var(--foreground); }
        .memo-modal-body { flex:1; overflow-y:auto; padding:20px; }
        .memo-modal-content { font-size:0.88rem; line-height:1.8; color:var(--foreground); padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:20px; }
        .memo-modal-content p { margin-bottom:0.5em; }
        .memo-modal-content p:last-child { margin-bottom:0; }
        .memo-modal-content code { background:var(--muted); padding:1px 5px; border-radius:3px; font-size:0.82rem; font-family:var(--font-mono); }
        .memo-modal-content pre { background:#f5f4f0; padding:10px; border-radius:var(--radius); overflow-x:auto; margin:8px 0; }
        .memo-modal-content pre code { background:none; padding:0; }
        .memo-modal-tags { display:flex; gap:4px; flex-wrap:wrap; margin-top:10px; }

        /* COMMENTS */
        .comments-section { margin-top:0; }
        .comments-header { display:flex; align-items:center; gap:6px; margin-bottom:14px; font-size:0.85rem; font-weight:600; color:var(--foreground); }
        .comments-count-badge { background:var(--muted); color:var(--muted-fg); font-size:0.68rem; padding:1px 7px; border-radius:999px; font-weight:600; }
        .comment-list { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
        .comment-item { display:flex; gap:10px; padding:10px 12px; background:var(--muted); border-radius:var(--radius); animation:commentFadeIn 0.3s ease-out; }
        @keyframes commentFadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
        .comment-avatar { width:24px; height:24px; border-radius:50%; background:linear-gradient(135deg,#e0e7ff,#818cf8); display:flex; align-items:center; justify-content:center; font-size:0.55rem; font-weight:700; color:#fff; flex-shrink:0; margin-top:2px; }
        .comment-body { flex:1; min-width:0; }
        .comment-meta { display:flex; align-items:center; gap:6px; margin-bottom:3px; }
        .comment-author { font-size:0.75rem; font-weight:600; color:var(--foreground); }
        .comment-time { font-size:0.65rem; color:var(--muted-fg); }
        .comment-content { font-size:0.82rem; line-height:1.6; color:var(--foreground); }
        .comment-composer { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:12px; margin-top:6px; }
        .comment-name-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
        .comment-name-label { font-size:0.72rem; color:var(--muted-fg); white-space:nowrap; }
        .comment-name-input { border:1px solid var(--border); border-radius:var(--radius-sm); padding:4px 10px; font-size:0.78rem; width:200px; outline:none; color:var(--foreground); background:var(--card); font-family:var(--font-sans); }
        .comment-name-input:focus { border-color:var(--primary); }
        .comment-textarea { width:100%; min-height:60px; border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 10px; font-size:0.82rem; resize:vertical; outline:none; color:var(--foreground); background:var(--card); font-family:var(--font-sans); line-height:1.6; }
        .comment-textarea:focus { border-color:var(--primary); }
        .comment-toolbar { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
        .comment-submit-btn { background:var(--primary); color:#fff; border:none; padding:5px 16px; border-radius:var(--radius); font-size:0.78rem; font-weight:600; cursor:pointer; transition:0.15s; font-family:var(--font-sans); }
        .comment-submit-btn:hover { opacity:0.9; }
        .comment-submit-btn:disabled { opacity:0.4; cursor:not-allowed; }
        .comment-cta { display:flex; align-items:center; justify-content:center; padding:12px; gap:8px; }
        .comment-write-btn { background:none; border:1px solid var(--border); padding:6px 16px; border-radius:var(--radius); font-size:0.78rem; cursor:pointer; color:var(--foreground); transition:0.15s; display:flex; align-items:center; gap:5px; font-family:var(--font-sans); }
        .comment-write-btn:hover { background:var(--muted); border-color:var(--primary); color:var(--primary); }
        .comments-empty { text-align:center; padding:16px; color:var(--muted-fg); font-size:0.8rem; }

        /* INBOX */
        .inbox-filters { display:flex; gap:6px; margin-bottom:14px; }
        .inbox-filter-btn { font-size:0.75rem; padding:4px 12px; border-radius:999px; cursor:pointer; border:1px solid transparent; background:var(--muted); color:var(--secondary-fg); font-weight:500; transition:0.15s; font-family:var(--font-sans); }
        .inbox-filter-btn:hover,.inbox-filter-btn.active { background:var(--primary-light); color:var(--primary); border-color:var(--primary); }
        .notification-list { display:flex; flex-direction:column; gap:6px; }
        .notification-item { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); cursor:pointer; transition:0.15s; }
        .notification-item:hover { box-shadow:var(--shadow-md); }
        .notification-item.unread { border-left:3px solid var(--primary); background:var(--primary-light); }
        .notification-avatar { width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,#fecdd3,#f43f5e); display:flex; align-items:center; justify-content:center; font-size:0.6rem; font-weight:700; color:#fff; flex-shrink:0; margin-top:2px; }
        .notification-body { flex:1; min-width:0; }
        .notification-text { font-size:0.8rem; line-height:1.5; color:var(--foreground); }
        .notification-text strong { font-weight:600; }
        .notification-time { font-size:0.68rem; color:var(--muted-fg); margin-top:2px; }
        .inbox-empty { text-align:center; padding:40px 20px; color:var(--muted-fg); }
        .inbox-mark-all { background:none; border:1px solid var(--border); padding:4px 12px; border-radius:var(--radius); font-size:0.72rem; cursor:pointer; color:var(--muted-fg); transition:0.15s; font-family:var(--font-sans); }
        .inbox-mark-all:hover { background:var(--muted); color:var(--primary); }