        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f0f0f0;
            height: 100vh;
            max-height: 100vh;
            overflow: hidden;
            padding: 4px;
            color: #333;
        }
        html { height: 100%; overflow: hidden; }
        html, body { max-width: 100%; overflow-x: hidden; }

        .container {
            max-width: 100%;
            background: #fff;
            border-radius: 8px;
            padding: 6px;
            height: calc(100vh - 8px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .container { overflow-x: clip; }
        .custom-dropdown { overflow: visible; }
        .main-content { overflow: visible; }
        .topic-section { overflow: visible; }

        /* Header Section - Minimized */
        .header {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px;
            flex-shrink: 0;
            text-align: center;
        }
        .header-row { display: flex; align-items: center; gap: 10px; justify-content: center; }

        /* Old emoji logo kept commented in HTML; using image logo with glow */
        .app-logo-img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            filter: drop-shadow(0 0 6px rgba(102,126,234,0.6));
            animation: glowShift 4s linear infinite;
        }
        @keyframes swipe-boundary {
            0%   { transform: translateX(0); }
            30%  { transform: translateX(-10px); }
            70%  { transform: translateX(10px); }
            100% { transform: translateX(0); }
        }
        .swipe-at-boundary { animation: swipe-boundary 0.28s ease; }

        @keyframes glowShift {
            0% { filter: drop-shadow(0 0 6px rgba(255,107,107,0.6)) hue-rotate(0deg); }
            50% { filter: drop-shadow(0 0 10px rgba(30,144,255,0.7)) hue-rotate(180deg); }
            100% { filter: drop-shadow(0 0 6px rgba(153,50,204,0.6)) hue-rotate(360deg); }
        }

        @keyframes rainbow {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .app-title {
            font-size: 1.2em;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 5px;
        }

        /* Header icon buttons */
        .header-btns {
            display: flex;
            align-items: center;
            gap: 5px;
            margin-top: 6px;
        }
        .hdr-btn {
            background: white;
            color: #666;
            border: 1.5px solid #d0d0d0;
            padding: 4px 8px;
            border-radius: 7px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            font-size: 11px;
            line-height: 1;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .hdr-btn:hover {
            border-color: #667eea;
            color: #4a5bbd;
            background: #f0f2ff;
        }
        /* Sync status indicator — not a button */
        .hdr-status {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 6px;
            cursor: default;
            user-select: none;
            opacity: 0.6;
        }
        .hdr-status.sync-online  { color: #4caf50; opacity: 1; }
        .hdr-status.sync-offline { color: #ff9800; opacity: 1; }
        /* Platform visibility */
        .hdr-desktop-only { display: none; }
        .hdr-mobile-only  { display: none; }
        @media (max-width: 768px) {
            .hdr-mobile-only  { display: inline-flex !important; }
            #cryptoUnlockedBar { display: none !important; }
        }
        /* Sync button states (legacy compat) */
        .hdr-btn.sync-online {
            background: rgba(76, 175, 80, 0.1);
            color: #388e3c;
            border-color: #a5d6a7;
        }
        .hdr-btn.sync-offline {
            background: rgba(255, 152, 0, 0.1);
            color: #e65100;
            border-color: #ffcc80;
        }
        /* Done mode active state */
        body.done-mode #toggleDoneBtn {
            background: #e8f5e9;
            color: #2e7d32;
            border-color: #66bb6a;
            box-shadow: 0 1px 4px rgba(76,175,80,0.2);
        }

        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-height: 0;
        }

        /* Desktop Global Actions (hidden on mobile) */
        .global-actions { display: none; }

        .topic-section {
            margin-bottom: 4px;
        }

        .topic-dropdown {
            width: 100%;
            padding: 5px 8px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            margin-bottom: 4px;
        }

        /* Custom JS dropdown */
        .custom-dropdown {
            position: relative;
            width: 100%;
            margin-bottom: 4px;
            user-select: none;
        }
        .custom-dropdown-selected {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 10px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            cursor: pointer;
            gap: 6px;
        }
        .custom-dropdown-selected:active { background: #f5f5f5; }
        .custom-dropdown-list {
            display: none;
            position: absolute;
            top: calc(100% + 2px);
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ccc;
            border-radius: 6px;
            z-index: 500;
            max-height: 550px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            display: none;
            flex-direction: column;
        }
        .custom-dropdown.open .custom-dropdown-list { display: flex; }
        .custom-dropdown-items-scroll {
            overflow-y: auto;
            flex: 1;
        }
        .custom-dropdown-item {
            padding: 7px 10px;
            font-size: 13px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }
        .custom-dropdown-item:last-child { border-bottom: none; }
        .custom-dropdown-item:active,
        .custom-dropdown-item.selected {
            font-weight: 700;
            box-shadow: inset 0 0 0 3.5px #667eea;
            position: relative;
        }
        .custom-dropdown-item.selected::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, #99aaff, #667eea);
            border-radius: 2px 0 0 2px;
        }

        /* Desktop topic actions */
        .topic-actions {
            display: flex;
            gap: 4px;
            margin-bottom: 4px;
            flex-wrap: wrap;
        }

        .note-input-container {
            margin-bottom: 4px;
        }

        .note-input {
            width: 100%;
            min-height: 80px;
            padding: 6px 8px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 15px;
            resize: vertical;
            font-family: inherit;
            transition: border-color 0.2s ease;
        }

        .note-input:focus {
            border-color: #888;
            outline: none;
        }

        .add-note-btn {
            width: 100%;
            margin-top: 10px;
        }

        /* Notes list */
        .notes-list {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            margin-bottom: 4px;
        }
        .note-row { margin-bottom: 3px; }

        /* Note item */
        .note-item {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            padding: 5px 6px;
            background: #fafafa;
            border: 1px solid #ddd;
            border-left: 3px solid #aaa;
            border-radius: 4px;
        }

        /* Default: horizontal buttons */
        .note-actions {
            display: flex;
            flex-direction: row;
            gap: 3px;
            flex-shrink: 0;
            align-items: center;
        }
        /* Tall note: vertical buttons (class toggled by JS ResizeObserver) */
        .note-item.actions-col .note-actions {
            flex-direction: column;
            align-items: flex-start;
        }
        .note-item.actions-col { align-items: flex-start; }
        /* During delete confirm: always keep buttons horizontal, aligned top */
        .note-item.actions-visible .note-actions {
            flex-direction: row !important;
            align-items: flex-start !important;
        }
        .note-item.actions-visible { align-items: flex-start; }

        .note-body {
            flex: 1;
            min-width: 0;
        }
        .note-meta {
            font-size: 11px;
            color: #999;
            margin-top: 2px;
            display: none;
        }
        .note-meta.visible { display: block; }

        .note-action-btn {
            background: #f5f5f5;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #777;
            transition: all 0.12s;
            padding: 0;
            flex-shrink: 0;
        }
        .note-action-btn:hover { background: #e0e0e0; color: #222; }
        .note-action-btn.danger { color: #e57373; }
        .note-action-btn.danger:hover { background: #ffebee; color: #c62828; }
        .note-action-btn:disabled { opacity: 0.3; cursor: not-allowed; }

        .note-topic-tag {
            display: inline-block;
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
            padding: 1px 6px;
            border-radius: 6px;
            font-size: 0.65em;
            font-weight: bold;
            margin-bottom: 4px;
        }

        /* Notes Done mode indicator */
        body.done-mode .container {
            background: #d6efd6;
            background-image: repeating-linear-gradient(
                45deg,
                transparent,
                transparent 12px,
                rgba(0,0,0,0.035) 12px,
                rgba(0,0,0,0.035) 13px
            );
        }
        body.done-mode .notes-list .note-item {
            border-color: rgba(76, 175, 80, 0.5);
            background: #e8f5e9;
        }
        body.done-mode .app-title {
            background: linear-gradient(135deg, #43a047, #2e7d32);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .done-mode-label {
            display: none;
            font-size: 11px;
            font-weight: 700;
            color: #388e3c;
            letter-spacing: 0.04em;
            padding: 1px 6px;
            background: rgba(76,175,80,0.12);
            border-radius: 6px;
            margin-left: 4px;
        }
        body.done-mode .done-mode-label { display: inline; }

        .note-content {
            font-size: 14px;
            line-height: 1.4;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        /* Bottom Section - Always at bottom */
        .bottom-section {
            padding-top: 4px;
            border-top: 1px solid #e8e8e8;
            flex-shrink: 0;
        }

        .stats {
            display: flex;
            justify-content: space-around;
            background: #f5f5f5;
            border-radius: 6px;
            padding: 4px;
            margin-bottom: 4px;
            font-size: 0.75em;
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-weight: bold;
            font-size: 1.1em;
            color: #444;
        }

        /* Topic name section moved to bottom */
        .topic-name-section {
            margin-bottom: 4px;
        }

        .topic-name-container {
            display: flex;
            gap: 6px;
        }

        .topic-name-input {
            flex: 1;
            padding: 5px 8px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
        }

        .search-container {
            margin-bottom: 4px;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 5px 8px 18px 8px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
        }

        .search-results-info {
            font-size: 0.8em;
            color: transparent;
        }

        .bottom-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .btn-smart, .btn-export, .btn-sort { display: none; }

        /* Button Styles */
        .btn {
            flex: 0;
            padding: 7px 12px;
            border: none;
            border-radius: 9px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 110px;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s;
            pointer-events: none;  /* ADD THIS LINE éé */ 
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        .btn-secondary {
            background: rgba(102, 126, 234, 0.15);
            color: #667eea;
            border: 2px solid rgba(102, 126, 234, 0.3);
        }

        .btn-danger {
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
        }

        .btn-success {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: white;
        }

        .btn-smart {
            background: linear-gradient(135deg, #9c27b0, #673ab7);
            color: white;
            border: none;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-small {
            padding: 5px 9px;
            font-size: 12px;
            min-width: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        /* Increase size for note action buttons (copy, edit, delete) */
        .note-actions .btn-small {
            padding: 5px 10px;
            font-size: 12px;
            border-radius: 7px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* Topic position indicator */
        .topic-position-indicator {
            font-size: 12px;
            color: #666;
            padding: 0 4px;
            min-width: 36px;
            text-align: center;
            align-self: center;
        }

        /* Increase size for topic name edit and reorder buttons */
        .topic-name-container .btn-small {
            padding: 7px 10px;
            font-size: 12px;
            min-width: 34px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: #999;
        }

        .empty-state-icon {
            font-size: 3em;
            margin-bottom: 15px;
        }

        /* Toast */
        @keyframes toastSparkle {
            0%   { transform: scale(1); opacity: 1; }
            30%  { transform: scale(1.18); opacity: 0.9; }
            60%  { transform: scale(0.85) rotate(6deg); opacity: 0.5; }
            100% { transform: scale(0) rotate(-8deg); opacity: 0; }
        }
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            background: #4CAF50;
            color: white;
            padding: 10px 16px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 13px;
            z-index: 1000;
            transform: translateX(300px);
            transition: transform 0.25s ease;
            cursor: pointer;
            user-select: none;
        }
        .toast.show { transform: translateX(0); }
        .toast.sparkle-out {
            animation: toastSparkle 0.35s ease forwards;
            pointer-events: none;
        }

        .toast.error {
            background: #f44336;
        }

        /* Status-specific gradients (yellow → green) */
        .toast.status-sending {
            background: linear-gradient(135deg, #FBC02D, #FFD54F); /* deep yellow → light yellow */
            color: #263238;
        }
        .toast.status-sent {
            background: linear-gradient(135deg, #F9A825, #AED581); /* amber → light green */
            color: #1b3a2a;
        }
        .toast.status-saved {
            background: linear-gradient(135deg, #66BB6A, #43A047); /* mid green */
        }
        .toast.status-verified {
            background: linear-gradient(135deg, #2E7D32, #1B5E20); /* dark green */
        }

        .highlight {
            background-color: yellow;
            padding: 2px 4px;
            border-radius: 3px;
        }

		/* Auth overlay */
		.auth-overlay {
			position: fixed;
			inset: 0;
			display: none;
			align-items: center;
			justify-content: center;
			background: linear-gradient(135deg, rgba(102,126,234,0.9), rgba(118,75,162,0.9));
			z-index: 3000;
		}
		.auth-card {
			width: min(380px, 94vw);
			background: #fff;
			border-radius: 12px;
			padding: 24px 20px;
			box-shadow: 0 8px 32px rgba(0,0,0,0.2);
			text-align: center;
		}
		.auth-card h2 { margin-bottom: 8px; font-size: 18px; }
		.auth-card p { color: #666; margin-bottom: 14px; font-size: 14px; }
		.auth-input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 16px; margin-bottom: 10px; box-sizing: border-box; }
		.auth-actions { margin-top: 6px; }

		/* Logout button inline under search */
		.logout-sticky {
			position: static;
			left: auto;
			bottom: auto;
			transform: none;
			z-index: auto;
			opacity: 1;
			transition: none;
			display: inline-block;
		}
		/* Do not auto-hide on scroll in inline mode */
		.logout-sticky.hidden { opacity: 1; pointer-events: auto; transform: none; }

        /* Logout placement containers */
        .bottom-logout, .bottom-logout-desktop { width: 100%; }
        @media (max-width: 768px) {
            .bottom-logout { display: flex; justify-content: center; }
            .bottom-logout-desktop { display: none; }
        }
        @media (min-width: 769px) {
            .bottom-logout { display: none; }
            .bottom-logout-desktop { display: flex; justify-content: center; margin-top: 10px; }
            /* Desktop: show only arrows on both top and bottom move buttons */
            #upTargetEmoji, #downTargetEmoji, #upTargetEmojiBottom, #downTargetEmojiBottom { display: none; }
        }

        /* Simple modals for WebView-safe prompts */
        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }
        /* Prevent click-through when modal open */
        body.modal-open .container { pointer-events: none; }
        body.modal-open .modal-backdrop, body.modal-open .modal { pointer-events: auto; }
        .modal {
            width: min(600px, 92vw);
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.25);
            padding: 16px;
            border: 2px solid rgba(102, 126, 234, 0.2);
        }
        .modal h3 { margin-bottom: 10px; font-size: 16px; color: #444; }
        .modal textarea {
            width: 100%;
            min-height: 120px;
            padding: 10px;
            border: 2px solid rgba(102, 126, 234, 0.3);
            border-radius: 10px;
            font-size: 15px;
            resize: vertical;
        }
        .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

        /* Force confirm modal to center on all screen sizes */
        #confirmModalBackdrop {
            align-items: center !important;
            justify-content: center !important;
        }
        #confirmModalBackdrop .modal {
            margin: 0 !important;
        }

        /* Clear Topic popup */
        #clearTopicModalBackdrop {
            align-items: center !important;
            justify-content: center !important;
        }
        #clearTopicModalBackdrop .modal {
            margin: 0 !important;
            border: 2px solid rgba(244,67,54,0.25);
        }
        .clear-topic-step { display: none; }
        .clear-topic-step.active { display: block; }
        .clear-topic-warning {
            background: rgba(244,67,54,0.07);
            border: 1.5px solid rgba(244,67,54,0.2);
            border-radius: 10px;
            padding: 12px 14px;
            margin: 10px 0 14px;
            font-size: 13px;
            color: #b71c1c;
            line-height: 1.5;
        }
        .clear-topic-warning strong { display: block; font-size: 15px; margin-bottom: 4px; color: #c62828; }
        .clear-topic-note-count {
            font-size: 28px;
            font-weight: 800;
            color: #e53935;
            text-align: center;
            margin: 6px 0 2px;
        }
        .clear-topic-step2-msg {
            text-align: center;
            font-size: 13px;
            color: #555;
            margin-bottom: 14px;
        }

        /* Topic position popup */
        .topic-pos-popup {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2500;
        }
        .topic-pos-popup-box {
            background: white;
            border-radius: 14px;
            padding: 20px 22px;
            width: min(300px, 88vw);
            box-shadow: 0 16px 48px rgba(0,0,0,0.22);
            border: 2px solid rgba(102,126,234,0.18);
        }
        .topic-pos-popup-box h4 { margin-bottom: 10px; font-size: 15px; color: #444; }
        .topic-pos-popup-box input {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid rgba(102,126,234,0.3);
            border-radius: 10px;
            font-size: 22px;
            font-weight: 700;
            text-align: center;
            margin-bottom: 14px;
            outline: none;
        }
        .topic-pos-popup-box input:focus { border-color: #667eea; }
        .topic-pos-popup-actions { display: flex; gap: 8px; justify-content: flex-end; }
        /* Desktop-only note move buttons */
        .note-move-btn {
            background: #f0f2ff;
            border: 1px solid #c5ccf5;
            border-radius: 4px;
            width: 22px;
            height: 22px;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #667eea;
            transition: all 0.12s;
            padding: 0;
            flex-shrink: 0;
        }
        .note-move-btn:hover { background: #d8deff; color: #4a5bbd; }
        .note-move-btn:disabled { opacity: 0.25; cursor: not-allowed; }
        @media (min-width: 769px) {
            .note-move-btn { display: flex; }
        }

        /* Mobile Layout */
        @media (max-width: 768px) {
            .container {
                padding: 8px;
                border-radius: 12px;
            }
            
            .app-title {
                font-size: 1.0em;
            }
            
            .app-logo {
                font-size: 1.2em;
            }

            /* Mobile: Hide desktop global actions */
            .global-actions {
                display: none;
            }

            /* Mobile: Hide desktop topic actions */
            .topic-actions { display: none; }
            .stats { display: none; }
            .topic-dropdown { margin-bottom: 5px; }
            .topic-name-container { margin-bottom: 5px; }
            /* Shrink topic name input so 3 buttons fit on its right */
            .topic-name-container { display: flex; align-items: center; gap: 6px; width: 100%; overflow: hidden; }
            .topic-name-container .topic-name-input { flex: 1 1 auto; min-width: 0; }
            .topic-name-container .btn-small { flex: 0 0 auto; min-width: 34px; width: 34px; padding: 6px; }
            /* Hide target emojis inside arrows on mobile to keep buttons compact */
            #upTargetEmojiBottom, #downTargetEmojiBottom { display: none; }

            /* Mobile: Rearrange main content */
            .main-content {
                order: 1;
            }

            .notes-list {
                margin-bottom: 0;
            }

            /* Mobile: Bottom section becomes visible */
            .bottom-section {
                order: 2;
                margin-top: 2px;
                padding-top: 4px;
                border-top: 1px solid rgba(102, 126, 234, 0.1);
            }

            /* Mobile: compact bottom inputs and buttons */
            .topic-name-input {
                padding: 3px 6px;
                font-size: 12px;
            }
            .search-input {
                padding: 3px 6px 14px 6px;
                font-size: 12px;
            }
            .search-container {
                margin-bottom: 2px;
            }
            .topic-name-section {
                margin-bottom: 2px;
            }
            .stats {
                padding: 2px 4px;
                margin-bottom: 2px;
                font-size: 0.68em;
            }
            .stat-number {
                font-size: 1em;
            }
            .bottom-section .btn {
                padding: 3px 8px;
                font-size: 11px;
            }
            .bottom-section .btn svg {
                width: 11px;
                height: 11px;
            }

            /* Mobile: Hide topic and global copy/clear buttons */
            .mobile-topic-actions { display: none; }
            #copyTopicNotesBtn, #clearTopicBtn, #copyAllBtn, #clearAllBtn { display: none; }

            /* Mobile: Adjust button layout */
            .bottom-actions {
                flex-direction: column;
            }
            
            .btn {
                min-width: auto;
            }
            
            /* Mobile: note actions — smaller buttons, no copy button */
            .note-action-btn { width: 18px; height: 18px; }
            .note-action-btn svg { width: 10px; height: 10px; }
            .copy-btn { display: none; }
            .desktop-edit-btn { display: none !important; }
            .note-action-btn.delete-placeholder { display: none; }

            /* Mobile: Stats become more compact */
            .stats {
                font-size: 0.75em;
            }

            /* Mobile: logout button sizing and no wrap */
            .bottom-logout .logout-sticky { min-width: 130px; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
            /* Hide old bottom logout on mobile — replaced by header icon */
            .bottom-logout { display: none !important; }

            /* HERE é check here for centering modal buttons on mobile */
            .modal-actions { justify-content: center; }
            /* HERE é check here for making edit modal textarea higher on mobile */
            #editModalTextarea { min-height: 180px;}
            /* HERE é check here for making main write note textfield twice bigger */
            .note-input { min-height: 180px; }
            /* HERE é check here for modal buttons size on mobile */
            #editModalBackdrop .modal .modal-actions .btn,
            #confirmModalBackdrop .modal .modal-actions .btn {
                min-width: 50px;
                padding: 8px;
                font-size: 22px;
                line-height: 1;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                overflow: visible;
            }

            /* HERE é check here for making clear/save buttons bigger near note field */
            .note-input-container .btn-small { min-width: 40px; padding: 10px; font-size: 16px; }
            /* Util buttons column (refresh, clear, paste, save) on mobile — vertical, all equal size */
            .note-util-btns { display: flex; flex-direction: column; gap: 4px; align-self: stretch; }
            .mobile-util-btn { flex: 1 1 0 !important; width: 42px !important; min-width: 42px !important; height: auto !important; min-height: 0 !important; padding: 0 !important; display: flex !important; align-items: center; justify-content: center; border-radius: 8px; }
            .mobile-util-save { flex: 1 1 0 !important; }
            /* Hide redundant Add Note button on mobile */
            .add-note-btn { display: none; }
            /* Hide save-to-txt button on mobile (desktop only feature) */
            #saveTxtBtn { display: none; }

            /* HERE é check here for positioning the edit modal higher on mobile */
            #editModalBackdrop { align-items: flex-start; }
            #editModalBackdrop .modal { margin-top: 8vh; }

        }
        
        /* Desktop-only adjustments */
        @media (min-width: 769px) {
            /* Keep these four a bit wider */
            #copyTopicNotesBtn, #clearTopicBtn, #copyAllBtn, #clearAllBtn { min-width: 170px; }
            /* Hide note input and add button on desktop */
            .note-input-container { display: none; }
            /* Hide mobile-only util buttons */
            .mobile-util-btn { display: none !important; }
            .note-util-btns { display: none !important; }
        }

        /* Hide mobile topic actions on desktop */
        .mobile-topic-actions {
            display: none;
        }

        @media (max-width: 768px) {
            .mobile-topic-actions {
                display: none;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 10px;
            }
        }
        /* Logout confirm modal */
        .logout-modal {
            background: #fff;
            border-radius: 18px;
            padding: 28px 24px 20px;
            width: min(320px, 88vw);
            text-align: center;
            box-shadow: 0 24px 60px rgba(0,0,0,0.25);
            animation: logoutModalIn 0.22s cubic-bezier(.34,1.56,.64,1);
        }
        @keyframes logoutModalIn {
            from { transform: scale(0.85); opacity: 0; }
            to   { transform: scale(1);    opacity: 1; }
        }
        .logout-modal-icon {
            width: 52px; height: 52px;
            background: linear-gradient(135deg, #ff6b6b22, #ee5a2422);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 14px;
            color: #ee5a24;
        }
        .logout-modal-title {
            font-size: 18px; font-weight: 800; color: #222; margin-bottom: 6px;
        }
        .logout-modal-sub {
            font-size: 13px; color: #888; margin-bottom: 22px; line-height: 1.5;
        }
        .logout-modal-actions {
            display: flex; gap: 10px;
        }
        .logout-modal-cancel {
            flex: 1; padding: 11px; border-radius: 10px;
            border: 1.5px solid #e0e0e0; background: #f5f5f5;
            font-size: 14px; font-weight: 600; color: #555; cursor: pointer;
            transition: background 0.15s;
        }
        .logout-modal-cancel:hover { background: #eaeaea; }
        .logout-modal-confirm {
            flex: 1; padding: 11px; border-radius: 10px;
            border: none; background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            font-size: 14px; font-weight: 700; color: #fff; cursor: pointer;
            transition: opacity 0.15s;
        }
        .logout-modal-confirm:hover { opacity: 0.88; }

        @media (min-width: 769px) {
            .hdr-logout-btn { display: none !important; }
        }
        @media (max-width: 768px) {
            .hdr-logout-desktop { display: none !important; }
        }

        /* ── Tab Bar (desktop only) ─────────────────────────────────────── */
        .top-tab-bar {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 0 4px 4px 4px;
            border-bottom: 1.5px solid #e8e8e8;
            margin-bottom: 6px;
            flex-shrink: 0;
        }
        .tab-btn {
            background: none;
            border: none;
            padding: 5px 14px;
            border-radius: 7px 7px 0 0;
            font-size: 0.85em;
            font-weight: 600;
            color: #888;
            cursor: pointer;
            transition: all 0.18s;
            border-bottom: 2.5px solid transparent;
        }
        .tab-btn:hover { color: #667eea; background: #f3f1ff; }
        .tab-btn.active {
            color: #667eea;
            border-bottom: 2.5px solid #667eea;
            background: #f3f1ff;
        }
        @media (max-width: 768px) { .top-tab-bar { display: none !important; } }

        /* ── Password Bar ───────────────────────────────────────────────── */
        #cryptoPasswordBar {
            display: none;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #667eea22, #764ba222);
            border: 1.5px solid #667eea55;
            border-radius: 8px;
            padding: 8px 12px;
            margin-bottom: 8px;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        #cryptoPasswordBar .crypto-bar-label {
            font-size: 0.82em;
            font-weight: 600;
            color: #667eea;
            white-space: nowrap;
        }
        @media (max-width: 768px) {
            #cryptoPasswordBar .crypto-bar-label { display: none; }
        }
        #cryptoPasswordBar input[type="password"] {
            flex: 1;
            min-width: 140px;
            padding: 5px 10px;
            border: 1.5px solid #d0d0d0;
            border-radius: 6px;
            font-size: 0.85em;
            outline: none;
        }
        #cryptoPasswordBar input[type="password"]:focus { border-color: #667eea; }
        #cryptoPasswordBar .crypto-bar-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 5px 14px;
            border-radius: 6px;
            font-size: 0.83em;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }
        #cryptoPasswordError {
            display: none;
            width: 100%;
            font-size: 0.78em;
            color: #e05555;
            margin-top: 2px;
        }
        #cryptoLoadingMsg {
            display: none;
            font-size: 0.78em;
            color: #667eea;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .btn-spinner {
            display: inline-block;
            animation: spin 0.7s linear infinite;
            vertical-align: middle;
        }

        /* ── Migration Modal ────────────────────────────────────────────── */
        #migrationOverlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.55);
            z-index: 9000;
            align-items: center;
            justify-content: center;
        }
        #migrationOverlay.active { display: flex; }
        .migration-modal {
            background: white;
            border-radius: 14px;
            padding: 28px 28px 24px;
            max-width: 440px;
            width: 90%;
            box-shadow: 0 8px 40px rgba(102,126,234,0.18);
        }
        .migration-modal h2 {
            font-size: 1.1em;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
        }
        .migration-modal p { font-size: 0.88em; color: #555; margin-bottom: 14px; line-height: 1.5; }
        .migration-step { display: none; }
        .migration-step.active { display: block; }
        .migration-modal .mig-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 8px 18px;
            border-radius: 8px;
            font-size: 0.88em;
            font-weight: 700;
            cursor: pointer;
            margin-top: 6px;
        }
        .migration-modal .mig-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .migration-modal input[type="password"] {
            width: 100%;
            padding: 8px 12px;
            border: 1.5px solid #d0d0d0;
            border-radius: 7px;
            font-size: 0.88em;
            margin-bottom: 8px;
            outline: none;
            box-sizing: border-box;
        }
        .migration-modal input[type="password"]:focus { border-color: #667eea; }
        .migration-error { color: #e05555; font-size: 0.82em; margin-top: 4px; display: none; }

        /* ── Settings Modal ─────────────────────────────────────────────── */
        #settingsOverlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.4);
            z-index: 8000;
            align-items: center;
            justify-content: center;
        }
        #settingsOverlay.active { display: flex; }
        .settings-modal {
            background: white;
            border-radius: 14px;
            padding: 24px;
            max-width: 380px;
            width: 90%;
            box-shadow: 0 8px 32px rgba(102,126,234,0.15);
        }
        .settings-modal h2 {
            font-size: 1em;
            font-weight: 800;
            color: #333;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .settings-section { margin-bottom: 16px; }
        .settings-section-title {
            font-size: 0.74em;
            font-weight: 700;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            margin-bottom: 8px;
        }
        .settings-info-row {
            font-size: 0.82em;
            color: #666;
            margin-bottom: 5px;
            display: flex;
            justify-content: space-between;
        }
        .settings-info-row span { color: #333; font-weight: 600; }
        .settings-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            padding: 9px 14px;
            border-radius: 8px;
            border: 1.5px solid #e0e0e0;
            background: white;
            font-size: 0.85em;
            font-weight: 600;
            color: #444;
            cursor: pointer;
            margin-bottom: 7px;
            transition: all 0.15s;
            text-align: left;
        }
        .settings-btn:hover { border-color: #667eea; color: #667eea; background: #f3f1ff; }
        .settings-btn.danger:hover { border-color: #e05555; color: #e05555; background: #fff0f0; }
        .settings-submodal { display: none; margin-top: 12px; }
        .settings-submodal.active { display: block; }
        .settings-submodal input[type="password"] {
            width: 100%;
            padding: 7px 11px;
            border: 1.5px solid #d0d0d0;
            border-radius: 7px;
            font-size: 0.85em;
            margin-bottom: 7px;
            outline: none;
            box-sizing: border-box;
        }
        .settings-submodal input:focus { border-color: #667eea; }
        .settings-action-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 7px 16px;
            border-radius: 7px;
            font-size: 0.84em;
            font-weight: 700;
            cursor: pointer;
        }
        .settings-action-btn.danger { background: linear-gradient(135deg, #e05555, #c0392b); }

        /* ── Section Pages ──────────────────────────────────────────────── */
        .app-section { display: none; height: 100%; flex-direction: column; overflow: hidden; }
        .app-section.active { display: flex; }

        /* ── Files Page ─────────────────────────────────────────────────── */
        .files-toolbar {
            display: flex;
            align-items: center;
            gap: 7px;
            margin-bottom: 8px;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .files-toolbar select {
            flex: 1;
            min-width: 120px;
            padding: 6px 10px;
            border: 1.5px solid #d0d0d0;
            border-radius: 7px;
            font-size: 0.85em;
            outline: none;
        }
        .files-format-bar {
            display: flex;
            gap: 4px;
            margin-bottom: 6px;
            flex-shrink: 0;
            flex-wrap: wrap;
        }
        .fmt-btn {
            background: #f5f5f5;
            border: 1.5px solid #e0e0e0;
            border-radius: 5px;
            padding: 3px 9px;
            font-size: 0.8em;
            font-weight: 700;
            cursor: pointer;
            color: #555;
            transition: all 0.15s;
        }
        .fmt-btn:hover { background: #667eea; color: white; border-color: #667eea; }
        .files-editor {
            flex: 1;
            width: 100%;
            resize: none;
            border: 1.5px solid #e0e0e0;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 0.88em;
            font-family: 'Segoe UI', system-ui, sans-serif;
            line-height: 1.6;
            outline: none;
            box-sizing: border-box;
        }
        .files-editor:focus { border-color: #667eea; }
        .files-empty {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #bbb;
            font-size: 0.9em;
            gap: 12px;
        }

        /* ── Vault Page ─────────────────────────────────────────────────── */
        .vault-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            flex-shrink: 0;
        }
        .vault-list { flex: 1; overflow-y: auto; }
        .vault-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border: 1.5px solid #e8e8e8;
            border-radius: 8px;
            margin-bottom: 6px;
            background: white;
            transition: border-color 0.15s;
        }
        .vault-item:hover { border-color: #667eea33; }
        .vault-item-icon { font-size: 1.2em; flex-shrink: 0; }
        .vault-item-info { flex: 1; min-width: 0; }
        .vault-item-name { font-size: 0.88em; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .vault-item-meta { font-size: 0.75em; color: #aaa; margin-top: 2px; }
        .vault-item-actions { display: flex; gap: 5px; flex-shrink: 0; }
        .vault-empty {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #bbb;
            font-size: 0.9em;
            gap: 10px;
        }
        .vault-warning {
            background: #fff8e1;
            border: 1.5px solid #ffd54f;
            border-radius: 7px;
            padding: 7px 12px;
            font-size: 0.8em;
            color: #8a6d00;
            margin-bottom: 8px;
            display: none;
        }


		.done-overlay {
			position: fixed;
			left: 16px;
			bottom: 16px;
			background: rgba(244, 67, 54, 0.95);
			color: #fff;
			padding: 10px 14px;
			border-radius: 10px;
			font-weight: 700;
			z-index: 2500;
			transform: translateY(calc(100% + 32px));
			transition: transform 0.25s ease;
		}
		.done-overlay.show { transform: translateY(0); }

  /* ── Shared overlay base ─────────────────────────────────────────── */
  .pin-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(10, 10, 20, 0.97);
    backdrop-filter: blur(24px) saturate(0.4);
    -webkit-backdrop-filter: blur(24px) saturate(0.4);
    padding: 24px 16px 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  .pin-overlay.active { display: flex; }

  /* ── App content blur when PIN overlay is active ─────────────────── */
  body.pin-locked > *:not(.pin-overlay) {
    filter: blur(18px) brightness(0.3);
    pointer-events: none;
    user-select: none;
  }

  /* ── Header ─────────────────────────────────────────────────────── */
  @keyframes pin-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
  }
  .pin-overlay svg { animation: pin-pulse 2.4s ease-in-out infinite; }
  .pin-overlay-title {
    font-size: 1.22rem; font-weight: 700;
    color: #f0f0f5; letter-spacing: 0.02em; margin-bottom: 4px;
  }
  .pin-overlay-subtitle {
    font-size: 0.82rem; color: #8888aa;
    margin-bottom: 28px; text-align: center; max-width: 260px;
    line-height: 1.4;
  }

  /* ── PIN dot display ─────────────────────────────────────────────── */
  .pin-dots {
    display: flex; gap: 14px; margin-bottom: 28px;
  }
  .pin-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #555577;
    background: transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
  }
  .pin-dot.filled {
    background: #667eea;
    border-color: #667eea;
    transform: scale(1.15);
  }
  .pin-dot.error {
    background: #e05555;
    border-color: #e05555;
    animation: pin-shake 0.35s ease;
  }
  @keyframes pin-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px); }
    80%       { transform: translateX(-3px); }
  }

  /* ── Feedback message ────────────────────────────────────────────── */
  .pin-message {
    font-size: 0.8rem; color: #e05555;
    min-height: 18px; margin-bottom: 16px;
    text-align: center;
  }
  .pin-message.info { color: #8888aa; }

  /* ── Keyboard ────────────────────────────────────────────────────────────── */
  .pin-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
  }
  .pin-key-row {
    display: flex;
    gap: 5px;
    width: 100%;
  }
  .pin-key {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 10px;
    flex: 1;
    min-width: 0;
    height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, transform 0.07s;
  }
  .pin-key:active, .pin-key.pressed {
    background: rgba(102,126,234,0.32);
    transform: scale(0.91);
  }
  .pin-key-num {
    font-size: 1rem; font-weight: 600;
    color: #f0f0f5; line-height: 1;
    pointer-events: none;
  }
  /* Number rows — bigger, more prominent */
  .pin-key.pin-key-number {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.2);
    height: 52px;
  }
  .pin-key.pin-key-number .pin-key-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #c8d0ff;
  }
  /* Action keys */
  .pin-key.pin-key-action {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
    flex: 1.4;
  }
  .pin-key.pin-key-submit {
    background: rgba(102,126,234,0.22);
    border-color: rgba(102,126,234,0.4);
    flex: 2.5;
  }
  .pin-key svg { pointer-events: none; }

  /* ── Confirm step (setup mode) ───────────────────────────────────── */
  .pin-step { display: none; flex-direction: column; align-items: center; width: 100%; }
  .pin-step.active { display: flex; }

  /* ── Bottom link ─────────────────────────────────────────────────── */
  .pin-alt-link {
    margin-top: 22px; font-size: 0.78rem;
    color: #555577; cursor: pointer; text-decoration: underline;
    text-underline-offset: 2px;
  }
  .pin-alt-link:hover { color: #8888bb; }

  /* ── Ghost text input (alternative to numpad) ────────────────────── */
  .pin-text-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    text-align: center;
    padding: 6px 12px;
    margin: 8px 0 2px;
    width: 140px;
    outline: none;
    letter-spacing: 0.1em;
    caret-color: #667eea;
    transition: border-color 0.2s, color 0.2s;
  }
  .pin-text-input::placeholder { color: rgba(255,255,255,0.2); font-size: 0.72rem; }
  .pin-text-input:focus {
    border-bottom-color: rgba(102,126,234,0.6);
    color: rgba(255,255,255,0.8);
  }

  #forgetKeyConfirm {
    display: none; position: fixed; inset: 0; z-index: 8500;
    background: rgba(10,10,20,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center; justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  #forgetKeyConfirm.visible { display: flex; }
  .fk-box {
    background: rgba(25,25,45,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 300px; width: 88%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: fk-pop 0.2s ease;
  }
  @keyframes fk-pop {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
  }
  .fk-icon { font-size: 2rem; margin-bottom: 10px; }
  .fk-title { font-size: 1rem; font-weight: 700; color: #f0f0f5; margin-bottom: 6px; }
  .fk-body  { font-size: 0.8rem; color: #8888aa; line-height: 1.5; margin-bottom: 22px; }
  .fk-actions { display: flex; flex-direction: column; gap: 10px; }
  .fk-btn-confirm {
    background: rgba(224,85,85,0.2); border: 1px solid rgba(224,85,85,0.4);
    border-radius: 12px; color: #ff9999; font-size: 0.9rem; padding: 12px;
    cursor: pointer; transition: background 0.15s;
  }
  .fk-btn-confirm:active { background: rgba(224,85,85,0.4); }
  .fk-btn-cancel {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; color: #aaaacc; font-size: 0.9rem; padding: 12px;
    cursor: pointer; transition: background 0.15s;
  }
  .fk-btn-cancel:active { background: rgba(255,255,255,0.12); }

  #addTopicOverlay {
    display: none; position: fixed; inset: 0; z-index: 8500;
    background: rgba(10,10,20,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center; justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  #addTopicOverlay.visible { display: flex; }
  .add-topic-box {
    background: rgba(25,25,45,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 28px 24px;
    max-width: 320px; width: 88%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: at-pop 0.18s ease;
  }
  @keyframes at-pop {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
  }
  .add-topic-icon { font-size: 1.6rem; margin-bottom: 10px; text-align: center; }
  .add-topic-title {
    font-size: 1rem; font-weight: 700; color: #f0f0f5;
    margin-bottom: 4px; text-align: center;
  }
  .add-topic-sub {
    font-size: 0.78rem; color: #7777aa;
    margin-bottom: 18px; text-align: center;
  }
  .add-topic-input {
    width: 100%; box-sizing: border-box;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #f0f0f5; font-size: 0.95rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 18px;
  }
  .add-topic-input::placeholder { color: rgba(255,255,255,0.25); }
  .add-topic-input:focus { border-color: rgba(102,126,234,0.6); }
  .add-topic-actions { display: flex; gap: 10px; }
  .at-btn-create {
    flex: 1; background: rgba(102,126,234,0.22);
    border: 1px solid rgba(102,126,234,0.4);
    border-radius: 11px; color: #99aaff;
    font-size: 0.9rem; padding: 11px;
    cursor: pointer; transition: background 0.15s;
  }
  .at-btn-create:hover, .at-btn-create:active { background: rgba(102,126,234,0.38); }
  .at-btn-cancel {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 11px; color: #8888aa;
    font-size: 0.9rem; padding: 11px;
    cursor: pointer; transition: background 0.15s;
  }
  .at-btn-cancel:hover, .at-btn-cancel:active { background: rgba(255,255,255,0.1); }

