/* sentiment-page.css — moved out of sentiment.html's first inline <style> on 2026-10-05,
   unchanged, so it can be cached (served immutable via ?v=). Bump the ?v= in
   sentiment.html on any edit: node frontend/scripts/bump-cache-version.js sentiment-page.css */
        /* ALL YOUR EXISTING CSS STYLES - KEPT INTACT */
        :root {
            --primary-green: #2ec27e;
            --very-bullish: #7C3AED;
            --bullish: #3b82f6;
            --bearish: #F59E0B;
            --very-bearish: #DC2626;
            --gold: #f59e0b;
            --silver: #cbd5e1;
            --bronze: #b45309;
        }

        /* Aliases for variables referenced throughout this page but never defined
           in the theme system — without these, 45 declarations silently fall back
           (wrong button text color in light theme, transparent tab strips). */
        :root, body {
            --white: #ffffff;
            --secondary-bg: var(--bg-color, #0c0e14);
            --gray-600: #4b5563;
            --gray-800: #1f2937;
            --primary-color: var(--primary-accent, #c87941);
            --background-color: var(--bg-color, #0c0e14);
        }

        /* FIXED BODY AND HEADER SPACING */
        body {
            padding-top: 0;
            margin: 0;
            position: relative;
        }

        .sentiment-banner {
            display: none;
        }

        .sentiment-scroll {
            display: flex;
            gap: 50px;
            animation: scroll 40s linear infinite;
            white-space: nowrap;
            padding: 0 20px;
        }

        .sentiment-item {
            display: flex;
            align-items: center;
            gap: 15px;
            color: var(--white);
            font-weight: 700;
            font-size: 18px;
            padding: 12px 20px;
            border-radius: 25px;
            min-width: max-content;
        }

        .very-bullish {
            background: linear-gradient(135deg, var(--very-bullish), #6D28D9);
        }

        .bullish {
            background: var(--bullish);
        }

        .bearish {
            background: var(--bearish);
        }

        .very-bearish {
            background: linear-gradient(135deg, var(--very-bearish), #B91C1C);
        }

        .stock-code {
            font-weight: 900;
            font-size: 20px;
        }

        .sentiment-label {
            font-weight: 800;
            margin-left: 5px;
        }

        @keyframes scroll {
            0% {
                transform: translateX(100%);
            }

            100% {
                transform: translateX(-100%);
            }
        }

        .sentiment-container {
            width: 100%;
            margin: 0 auto;
            padding: 10px 40px 40px;
            display: grid;
            grid-template-columns: 350px 1fr;
            gap: 40px;
            align-items: start;
            max-width: 1200px;
            position: relative;
            z-index: 1;
        }

        .sentiment-sidebar {
            position: sticky;
            top: 165px;
            padding: 0 20px 0 0;
            border-right: 1px solid var(--border-color);
            height: fit-content;
            z-index: 80;
        }

        /* Sidebar collapse */
        .sentiment-container.sidebar-collapsed { grid-template-columns: 44px 1fr; }
        .sentiment-sidebar.sidebar-collapsed { padding: 4px 0; border-right: none; width: 44px; }
        .sentiment-sidebar.sidebar-collapsed .sentiment-nav-item {
            padding: 10px; justify-content: center; gap: 0;
            border-radius: 6px; border-left: none;
        }
        .sentiment-sidebar.sidebar-collapsed .sentiment-nav-item.active {
            background: rgba(var(--primary-accent-rgb, 14,185,129), 0.12);
        }
        .sentiment-sidebar.sidebar-collapsed .sentiment-nav-item span { display: none; }
        .sentiment-sidebar.sidebar-collapsed #exchange-sidebar-note,
        .sentiment-sidebar.sidebar-collapsed #season-sidebar-widget { display: none !important; }
        .sidebar-toggle-btn {
            display: flex; align-items: center; justify-content: center;
            width: 28px; height: 28px;
            background: transparent; border: 1px solid var(--border-color); border-radius: 6px;
            cursor: pointer; color: var(--text-color); opacity: 0.45;
            margin-bottom: 14px;
            transition: opacity 0.15s, color 0.15s;
        }
        .sidebar-toggle-btn:hover { opacity: 1; color: var(--primary-accent); }
        .sidebar-toggle-btn i { font-size: 14px; transition: transform 0.25s; }
        .sentiment-sidebar.sidebar-collapsed .sidebar-toggle-btn {
            margin: 0 auto 12px; opacity: 0.55;
        }
        .sentiment-sidebar.sidebar-collapsed .sidebar-toggle-btn i { transform: rotate(180deg); }

        .sentiment-nav {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .sentiment-nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 14px;
            background: transparent;
            border-radius: 8px;
            text-decoration: none;
            color: inherit;
            transition: background 0.15s ease, color 0.15s ease, border-left-color 0.15s ease;
            font-weight: 600;
            font-size: 0.88rem;
            border: none;
            border-left: 3px solid transparent;
        }

        .sentiment-nav-item:hover {
            background: rgba(var(--primary-accent-rgb, 14,185,129), 0.07);
            border-left-color: rgba(var(--primary-accent-rgb, 14,185,129), 0.4);
        }

        .sentiment-nav-item.active {
            background: rgba(var(--primary-accent-rgb, 14,185,129), 0.1);
            color: var(--primary-accent);
            border-left-color: var(--primary-accent);
        }

        .sentiment-nav-item i {
            font-size: 18px;
            width: 20px;
            text-align: center;
            flex-shrink: 0;
        }

        .sentiment-main {
            min-height: 600px;
            /* Grid items default to min-width:auto — the widest table's min-content
               was stretching the 1fr track past the viewport on mobile (633px on a
               390px phone), forcing whole-page horizontal scroll. */
            min-width: 0;
        }
        .sentiment-sidebar { min-width: 0; }

        .section-title {
            color: var(--text-color);
            margin-bottom: 22px;
            font-size: 18px;
            border-left: 4px solid var(--primary-accent);
            border-bottom: none;
            padding: 0 0 0 12px;
            font-weight: 700;
        }

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

        .search-input {
            width: 100%;
            padding: 12px 45px 12px 20px;
            border: 1px solid var(--border-color);
            border-radius: 25px;
            font-size: 16px;
            background: var(--bg-color);
            color: var(--text-color);
        }
        .search-input::placeholder { color: var(--text-color); opacity: 0.45; }

        .search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-600);
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
        }

        .search-result-item {
            padding: 10px 15px;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
        }

        .search-result-item:hover {
            background: var(--primary-accent);
            color: var(--white);
        }

        .prediction-filters {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
        }

        .filter-btn {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            color: var(--text-color);
        }

        .filter-btn.active {
            background: var(--primary-accent);
            color: var(--white);
            border-color: var(--primary-accent);
        }

        .prediction-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .prediction-card {
            background: var(--bg-color);
            padding: 20px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            transition: border-color 180ms ease, box-shadow 180ms ease;
            position: relative;
        }
        .prediction-card:hover {
            border-color: var(--primary-accent);
            box-shadow: inset 2px 0 0 var(--primary-accent);
        }
        .prediction-card.msm-skin-gold {
            border-color: rgba(212,168,67,.4);
            box-shadow: 0 0 8px rgba(212,168,67,.1);
        }
        .prediction-card.msm-skin-neon {
            border-color: rgba(34,211,238,.3);
            box-shadow: 0 0 8px rgba(34,211,238,.08);
        }
        .prediction-card.msm-skin-holographic {
            border-image: linear-gradient(135deg, #f0abfc, #818cf8, #34d399, #fbbf24) 1;
            animation: msm-holo-shimmer 3s linear infinite;
        }

        /* Card skins in the Following feed — a list row, not a grid card, so it
           gets its own left-accent treatment instead of reusing the full-border
           .prediction-card rules above (this is per-author, driven by the feed
           API's user.card_skin — see _renderFeed()). */
        .msm-feed-item.msm-skin-gold {
            border-left: 3px solid #d4a843 !important;
            box-shadow: inset 0 0 14px rgba(212,168,67,.07);
        }
        .msm-feed-item.msm-skin-neon {
            border-left: 3px solid #22d3ee !important;
            box-shadow: inset 0 0 14px rgba(34,211,238,.06);
        }
        .msm-feed-item.msm-skin-holographic {
            border-left: 3px solid transparent !important;
            border-image: linear-gradient(180deg, #f0abfc, #818cf8, #34d399, #fbbf24) 1;
            animation: msm-holo-shimmer 3s linear infinite;
        }

        .prediction-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .prediction-stock {
            font-weight: 900;
            font-size: 20px;
            color: var(--primary-accent);
        }

        .prediction-accuracy {
            background: var(--secondary-accent);
            color: var(--white);
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: bold;
        }

        .prediction-price {
            font-size: 24px;
            font-weight: 800;
            margin-bottom: 10px;
            color: var(--text-color);
        }

        .prediction-details {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.8;
        }

        .prediction-input {
            margin-top: 25px;
        }

        .prediction-input label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text-color);
        }

        .prediction-input input,
        .prediction-input textarea,
        .prediction-input select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 16px;
            margin-bottom: 15px;
            background: var(--bg-color);
            color: var(--text-color);
        }

        .prediction-input textarea {
            min-height: 80px;
            resize: vertical;
        }

        .privacy-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
            color: var(--text-color);
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--border-color);
            transition: background-color .2s;
            border-radius: 24px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 4px;
            background-color: var(--text-color);
            opacity: 0.7;
            transition: transform .2s, background-color .2s;
            border-radius: 50%;
        }

        input:checked+.toggle-slider {
            background-color: var(--secondary-accent) !important;
        }

        input:checked+.toggle-slider:before {
            transform: translateX(26px);
        }

        .submit-btn {
            background: var(--secondary-accent);
            color: var(--white);
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 15px;
            transition: all 0.3s ease;
            width: 100%;
        }

        .submit-btn:hover {
            background: var(--primary-accent);
        }

        .disclaimer {
            background: rgba(var(--primary-accent-rgb), 0.06);
            border: 1px solid rgba(var(--primary-accent-rgb), 0.2);
            border-radius: 8px;
            padding: 15px;
            margin: 20px 0;
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.85;
        }

        .prediction-history-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            /* Auto table layout lets column content push the table past 100% —
               scroll the overflow inside its own box instead of bleeding past
               the card edge and reading as off-centre vs the form above it. */
            display: block;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .prediction-history-table th,
        .prediction-history-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-color);
        }

        .prediction-history-table th {
            background: transparent;
            font-weight: 700;
            font-size: 0.71rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.55;
        }

        /* Prediction history collapse */
        .history-toggle-btn {
            display: flex; align-items: center; gap: 6px;
            background: transparent; border: none; color: var(--text-color);
            opacity: 0.5; cursor: pointer; font-size: 0.78rem; font-weight: 600;
            padding: 4px 8px; border-radius: 4px;
            transition: opacity 0.15s, color 0.15s;
        }
        .history-toggle-btn:hover { opacity: 1; color: var(--primary-accent); }
        .history-toggle-btn i { font-size: 16px; transition: transform 0.22s; }
        .prediction-history.ph-collapsed .history-toggle-btn i { transform: rotate(-90deg); }
        .prediction-history.ph-collapsed .prediction-history-body { display: none; }

        .report-card {
            background: var(--bg-color);
            padding: 25px;
            border-radius: 6px;
            margin-bottom: 30px;
            border: 1px solid var(--border-color);
        }

        .report-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .company-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .company-icon {
            width: 50px;
            height: 50px;
            background: var(--secondary-accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--white);
            font-weight: bold;
            font-size: 18px;
        }

        .company-details h2 {
            margin-bottom: 5px;
            color: var(--primary-accent);
        }

        .company-metrics {
            display: flex;
            gap: 20px;
            color: var(--text-color);
            opacity: 0.8;
            font-size: 14px;
        }

        .survey-section {
            margin-top: 25px;
        }

        .survey-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .survey-question {
            margin-bottom: 20px;
        }

        .question-text {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--text-color);
        }

        .rating-scale {
            display: flex;
            gap: 10px;
            margin-top: 5px;
        }

        .rating-option {
            flex: 1;
            text-align: center;
            padding: 8px;
            background: var(--card-bg);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-color);
            border: 1px solid var(--border-color);
        }

        .rating-option:hover {
            background: var(--secondary-accent);
            color: var(--white);
            border-color: var(--secondary-accent);
        }

        .rating-option.selected {
            background: var(--secondary-accent);
            color: var(--white);
            border-color: var(--secondary-accent);
        }

        .ceo-section {
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }

        .ceo-profile {
            display: flex;
            gap: 20px;
            margin-bottom: 30px;
        }

        .ceo-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: var(--secondary-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--white);
            font-size: 36px;
            font-weight: bold;
            overflow: hidden;
        }

        .ceo-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .ceo-details {
            flex: 1;
        }

        .ceo-details h2 {
            margin-bottom: 10px;
            color: var(--primary-accent);
        }

        .ceo-impact-score {
            display: inline-block;
            background: var(--secondary-accent);
            color: var(--white);
            padding: 5px 10px;
            border-radius: 20px;
            font-weight: bold;
            margin-top: 5px;
        }

        .ceo-history {
            margin-top: 25px;
        }

        .history-item {
            display: flex;
            justify-content: space-between;
            padding: 15px;
            background: var(--bg-color);
            border-radius: 8px;
            margin-bottom: 10px;
            border: 1px solid var(--border-color);
        }

        .history-company {
            font-weight: 600;
            color: var(--text-color);
        }

        .history-dates {
            color: var(--text-color);
            opacity: 0.8;
        }

        .company-profile {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }

        .profile-section {
            background: var(--bg-color);
            padding: 20px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }

        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .metric-item {
            display: flex;
            flex-direction: column;
        }

        .metric-label {
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .metric-value {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-color);
        }

        .company-link {
            color: var(--secondary-accent);
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin-top: 10px;
        }

        .company-link:hover {
            text-decoration: underline;
        }

        .agm-section {
            margin-top: 20px;
            padding: 15px;
            background: var(--bg-color);
            border-radius: 8px;
            border-left: 4px solid var(--secondary-accent);
            border: 1px solid var(--border-color);
        }

        .graph-container {
            background: var(--bg-color);
            padding: 20px;
            border-radius: 6px;
            margin-bottom: 30px;
            border: 1px solid var(--border-color);
        }

        .graph-controls {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
        }

        .graph-select {
            padding: 8px 15px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: var(--card-bg);
            color: var(--text-color);
        }

        .chart-wrapper {
            height: 400px;
            position: relative;
        }

        .user-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            border-top: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 28px;
        }

        .user-stats .stat-card {
            border-right: 1px solid var(--border-color);
            border-radius: 0;
            background: none;
            border-top: none;
            border-bottom: none;
            border-left: none;
            padding: 14px 10px;
        }

        .user-stats .stat-card:last-child { border-right: none; }

        .stat-card {
            padding: 18px;
            border-radius: 6px;
            text-align: center;
            border: 1px solid var(--border-color);
        }

        .stat-value {
            font-size: 28px;
            font-weight: 800;
            color: var(--secondary-accent);
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 13px;
            color: var(--text-color);
            opacity: 0.7;
        }

        .privacy-settings {
            margin-top: 30px;
        }

        .privacy-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .privacy-option:last-child { border-bottom: none; }

        .risk-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .risk-metric-card {
            padding: 16px 14px;
            border-radius: 8px;
            text-align: center;
            border-left: 3px solid var(--secondary-accent);
            border-top: 1px solid var(--border-color);
            border-right: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
        }

        .risk-metric-value {
            font-size: 24px;
            font-weight: 800;
            margin-bottom: 5px;
        }

        .risk-low {
            color: #10b981;
        }

        .risk-medium {
            color: #f59e0b;
        }

        .risk-high {
            color: #ef4444;
        }

        .risk-metric-label {
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.8;
        }

        .sector-performance {
            margin-top: 30px;
        }

        .sector-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .sector-card {
            background: var(--bg-color);
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            border: 1px solid var(--border-color);
        }

        .achievements-section {
            margin-top: 30px;
        }

        .achievements-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 12px;
            margin-top: 20px;
        }

        .achievement-card {
            background: var(--bg-color);
            padding: 18px;
            border-radius: 6px;
            text-align: center;
            transition: all 0.2s ease;
            position: relative;
            border: 1px solid var(--border-color);
        }

        .achievement-card.locked {
            opacity: 0.55;
            filter: grayscale(1);
        }

        .achievement-card.earned {
            border: 1px solid var(--gold);
            background: linear-gradient(135deg, var(--bg-color), #fef3c7);
        }

        [data-theme="dark"] .achievement-card.earned {
            background: linear-gradient(135deg, var(--bg-color), #78350f);
        }

        .achievement-card.featured {
            grid-column: span 2;
            display: flex;
            align-items: center;
            gap: 20px;
            text-align: left;
            padding: 22px 24px;
            border: 1px solid var(--gold);
            background: linear-gradient(135deg, var(--bg-color), #fef3c710);
            box-shadow: 0 4px 20px rgba(245,158,11,0.12);
        }

        [data-theme="dark"] .achievement-card.featured {
            background: linear-gradient(135deg, var(--bg-color), #78350f18);
        }

        .achievement-card.featured .achievement-icon {
            font-size: 2.5rem;
            margin-bottom: 0;
            flex-shrink: 0;
        }

        .achievement-card.featured .achievement-name {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .achievement-icon {
            font-size: 36px;
            margin-bottom: 10px;
            color: var(--secondary-accent);
        }

        .achievement-card.earned .achievement-icon {
            color: var(--gold);
        }

        .achievement-card.locked .achievement-icon {
            opacity: 0.5;
        }

        .achievement-name {
            font-weight: 700;
            margin-bottom: 5px;
            color: var(--text-color);
        }

        .achievement-desc {
            font-size: 14px;
            color: var(--text-color);
            opacity: 0.8;
            margin-bottom: 10px;
        }

        .achievement-progress {
            width: 100%;
            height: 6px;
            background: var(--border-color);
            border-radius: 3px;
            overflow: hidden;
            margin: 10px 0;
        }

        /* Achievement Stats */
        .achievement-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            border-top: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 24px;
        }

        .achievement-stats .stat-card {
            border-right: 1px solid var(--border-color);
            border-radius: 0;
            background: none;
            border-top: none;
            border-bottom: none;
            border-left: none;
            padding: 14px 10px;
        }

        .achievement-stats .stat-card:last-child { border-right: none; }

        /* Achievement Tabs */
        .achievement-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 18px;
            border-bottom: 1px solid var(--border-color);
        }

        .tab-btn {
            padding: 8px 14px;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            cursor: pointer;
            color: var(--text-color);
            font-weight: 600;
            font-size: 13px;
            opacity: 0.6;
            transition: color 0.15s ease, border-bottom-color 0.15s ease, opacity 0.15s ease;
        }

        .tab-btn:hover { opacity: 0.9; color: var(--secondary-accent); }

        .tab-btn.active {
            color: var(--secondary-accent);
            border-bottom-color: var(--secondary-accent);
            opacity: 1;
        }

        .achievements-grid {
            display: none;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .achievements-grid.active {
            display: grid;
        }


        .progress-bar {
            height: 100%;
            background: var(--secondary-accent);
            transition: width 0.3s ease;
        }

        .progress-text {
            font-size: 12px;
            color: var(--text-color);
            opacity: 0.8;
        }

        .leaderboard-section {
            margin-top: 30px;
        }

        .leaderboard-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .leaderboard-tab {
            padding: 10px 20px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            transition: all 0.3s ease;
            color: var(--text-color);
            font-weight: 600;
        }

        .leaderboard-tab.active {
            background: var(--secondary-accent);
            color: var(--white);
            border-color: var(--secondary-accent);
        }

        .leaderboard-search {
            margin-bottom: 20px;
        }

        .leaderboard-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .leaderboard-item {
            display: flex;
            align-items: center;
            padding: 15px;
            background: var(--bg-color);
            border-radius: 6px;
            transition: all 0.3s ease;
            cursor: pointer;
            border: 1px solid var(--border-color);
        }

        .leaderboard-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .leaderboard-rank {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            margin-right: 15px;
            position: relative;
        }

        .rank-1 {
            background: var(--gold);
            color: var(--white);
        }

        .rank-2 {
            background: var(--silver);
            color: var(--gray-800);
        }

        .rank-3 {
            background: var(--bronze);
            color: var(--white);
        }

        .rank-other {
            background: var(--border-color);
            color: var(--text-color);
        }

        .rank-medal {
            position: absolute;
            top: -5px;
            right: -5px;
            font-size: 14px;
        }

        .leaderboard-user {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--secondary-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 800;
            font-size: 14px;
            flex-shrink: 0;
            letter-spacing: 0;
            font-family: 'IBM Plex Sans', sans-serif;
            box-shadow: 0 1px 4px rgba(0,0,0,0.25);
            border: 2px solid rgba(255,255,255,0.08);
            user-select: none;
        }

        .leaderboard-accuracy {
            font-weight: 700;
            color: var(--secondary-accent);
        }

        /* ============ ENHANCED LEADERBOARD STYLES ============ */
        .leaderboard-header-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-color);
            padding: 15px 20px;
            border-radius: 6px;
            margin-bottom: 20px;
            border: 1px solid var(--border-color);
            flex-wrap: wrap;
            gap: 15px;
        }

        .leaderboard-stat {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .leaderboard-stat-icon {
            width: 40px;
            height: 40px;
            background: var(--secondary-accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .leaderboard-stat-info h4 {
            font-size: 12px;
            opacity: 0.7;
            margin-bottom: 4px;
        }

        .leaderboard-stat-info .stat-number {
            font-size: 20px;
            font-weight: 700;
            color: var(--secondary-accent);
        }

        .leaderboard-item {
            position: relative;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .leaderboard-item:hover {
            transform: translateX(5px);
            border-left-color: var(--secondary-accent);
            background: var(--card-bg);
        }

        .leaderboard-item.qualified-user {
            background: linear-gradient(90deg, rgba(46, 194, 126, 0.05), transparent);
            border-left-color: var(--secondary-accent);
        }

        .leaderboard-badge {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 6px;
            margin-left: 8px;
        }

        .badge-qualified {
            background: var(--secondary-accent);
            color: white;
        }

        .badge-following {
            background: var(--bullish);
            color: white;
        }

        .badge-hot-streak {
            background: #f59e0b;
            color: white;
        }

        .leaderboard-points {
            font-weight: 700;
            font-size: 16px;
        }

        .leaderboard-change {
            font-size: 11px;
            margin-left: 8px;
        }

        .change-up {
            color: #10b981;
        }

        .change-down {
            color: #ef4444;
        }

        .following-empty {
            text-align: center;
            padding: 60px 20px;
            background: var(--bg-color);
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }

        .following-empty i {
            font-size: 48px;
            opacity: 0.5;
            margin-bottom: 15px;
        }

        .follow-btn {
            background: none;
            border: 1px solid var(--border-color);
            padding: 4px 12px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s;
        }

        .follow-btn:hover {
            background: var(--secondary-accent);
            border-color: var(--secondary-accent);
            color: white;
        }

        .follow-btn.following {
            background: var(--secondary-accent);
            color: white;
            border-color: var(--secondary-accent);
        }

        .leaderboard-footer {
            margin-top: 20px;
            text-align: center;
            font-size: 12px;
            color: var(--text-color);
            opacity: 0.6;
            padding: 10px;
        }

        /* ── Skeleton rows — ore-grade copper sweep ── */
        .lb-skeleton-row {
            display: flex; align-items: center; gap: 15px;
            padding: 15px; border-radius: 6px;
            border: 1px solid var(--border-color);
            margin-bottom: 15px;
        }
        .lb-skel-circle {
            width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
            background: linear-gradient(90deg, var(--border-color) 25%, rgba(var(--primary-accent-rgb,181,101,29),0.18) 50%, var(--border-color) 75%);
            background-size: 200% 100%;
            animation: lbShimmer 1.6s ease-in-out infinite;
        }
        .lb-skel-line {
            height: 12px; border-radius: 6px;
            background: linear-gradient(90deg, var(--border-color) 25%, rgba(var(--primary-accent-rgb,181,101,29),0.18) 50%, var(--border-color) 75%);
            background-size: 200% 100%;
            animation: lbShimmer 1.6s ease-in-out infinite;
        }
        @keyframes lbShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

        /* ── Sparkline ── */

        /* ── Hover-reveal secondary metrics ── */
        .lb-metrics-default {
            display: flex; align-items: center; gap: 10px;
            max-width: 200px; overflow: hidden;
            transition: max-width 220ms cubic-bezier(0.16,1,0.3,1), opacity 180ms ease;
        }
        .lb-metrics-hover {
            display: flex; align-items: center; gap: 12px;
            max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
            transition: max-width 220ms cubic-bezier(0.16,1,0.3,1), opacity 180ms ease;
        }
        .leaderboard-item:hover .lb-metrics-default { max-width: 0; opacity: 0; }
        .leaderboard-item:hover .lb-metrics-hover   { max-width: 240px; opacity: 1; }
        .lb-reveal-stat { text-align: center; }
        .lb-reveal-stat-val { font-size: 13px; font-weight: 700; color: var(--text-color); }
        .lb-reveal-stat-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; opacity: 0.4; }

        /* ── Pin / watchlist star ── */
        .lb-pin-btn {
            background: none; border: none; cursor: pointer;
            color: var(--text-color); opacity: 0;
            font-size: 16px; line-height: 1; padding: 2px 4px; flex-shrink: 0;
            transition: opacity 100ms ease, color 100ms ease;
        }
        .leaderboard-item:hover .lb-pin-btn { opacity: 0.45; }
        .lb-pin-btn:hover { opacity: 1 !important; color: var(--primary-accent,#c87941); }
        .lb-pin-btn.pinned { opacity: 1; color: var(--primary-accent,#c87941); }

        /* ── You pinned row ── */
        .lb-you-divider { height: 1px; background: var(--border-color); margin: 8px 0; opacity: 0.6; }
        .lb-you-row {
            background: rgba(var(--primary-accent-rgb,181,101,29),0.05) !important;
            border-color: rgba(var(--primary-accent-rgb,181,101,29),0.22) !important;
        }
        .lb-you-badge {
            font-size: 9px; font-weight: 800; letter-spacing: 0.07em;
            padding: 1px 5px; border-radius: 3px; margin-left: 6px;
            background: rgba(var(--primary-accent-rgb,181,101,29),0.12);
            color: var(--primary-accent); vertical-align: middle;
        }

        .modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            /* Above header (1000), dropdowns (1002), drawer (1010), coach marks (9000)
               and onboarding (9001) — open modals must not be overlapped by floating widgets */
            z-index: 10000;
            align-items: center;
            justify-content: center;
            overscroll-behavior: contain;
        }

        .modal-content {
            background: var(--card-bg);
            border-radius: 6px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            max-height: 90svh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            border: 1px solid var(--border-color);
        }

        /* predSuccessModal — explicit TRBL + height so iOS Safari backdrop-filter doesn't miscalculate centering */
        #predSuccessModal {
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(8,11,20,0.75);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        #predSuccessModal .modal-content {
            max-height: none;
            overflow: hidden;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--primary-accent);
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--text-color);
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            flex: 1;
        }

        .btn-primary {
            background: var(--secondary-accent);
            color: var(--white);
        }

        .btn-secondary {
            background: var(--border-color);
            color: var(--text-color);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
            animation: tabFadeIn 150ms ease-out;
        }
        @keyframes tabFadeIn { from { opacity: 0; } to { opacity: 1; } }

        .msm-skel {
            display: block;
            height: 12px;
            border-radius: 3px;
            background: linear-gradient(90deg, var(--border-color) 25%, rgba(200,121,65,.08) 50%, var(--border-color) 75%);
            background-size: 200% 100%;
            animation: skelSweep 1.5s linear infinite;
        }
        @keyframes skelSweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

        .tab-content.active .section-title:first-child {
            margin-top: 20px;
        }

        /* Competitions Specific Styles */
        .comp-card {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 18px 20px;
            transition: border-color 0.15s;
        }
        .comp-card:hover { border-color: var(--primary-accent); }
        .comp-card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
        }
        .comp-card-name {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-color);
            margin-bottom: 6px;
        }
        .comp-card-sub {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .comp-tag {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            color: var(--text-color);
            opacity: 0.85;
            background: transparent;
            text-transform: capitalize;
        }
        .comp-tag-premium {
            border-color: rgba(245,158,11,0.5);
            color: #d97706;
        }
        .comp-tag-type {
            border-color: rgba(46,194,126,0.4);
            color: var(--primary-accent);
        }
        .comp-dot-info {
            font-size: 11px;
            opacity: 0.55;
        }
        .comp-card-rank {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-color);
            opacity: 0.45;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .comp-card-rules {
            font-size: 12px;
            opacity: 0.55;
            margin-bottom: 12px;
        }
        .comp-prog-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 14px;
        }
        .comp-prog-bar {
            flex: 1;
            height: 4px;
            background: var(--border-color);
            border-radius: 2px;
            overflow: hidden;
        }
        .comp-prog-bar > div {
            height: 100%;
            background: var(--primary-accent);
            border-radius: 2px;
            transition: width 0.3s;
        }
        .comp-prog-label {
            font-size: 11px;
            opacity: 0.5;
            white-space: nowrap;
        }
        .comp-card-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .comp-enter-btn {
            width: auto;
            padding: 8px 18px;
            font-size: 13px;
        }
        .comp-icon-btn {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-color);
            border-radius: 8px;
            padding: 8px 10px;
            cursor: pointer;
            font-size: 15px;
            display: flex;
            align-items: center;
            transition: border-color 0.15s;
        }
        .comp-icon-btn:hover { border-color: var(--primary-accent); }

        /* ENHANCED FORM STYLES */

        /* Progressive form steps */
        .form-step { display: none; }
        .form-step.step-visible {
            display: block;
            animation: stepFadeIn 0.22s ease;
        }
        @keyframes stepFadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* Stock search empty-state prompt */
        .prediction-prompt {
            padding: 38px 20px 30px;
            text-align: center;
            border-top: 1px solid var(--border-color);
            margin-top: 10px;
        }
        .prediction-prompt.pp-hidden { display: none; }
        .pp-icon {
            font-size: 3.6rem;
            color: var(--primary-accent);
            opacity: 0.22;
            display: block;
            margin-bottom: 16px;
        }
        .pp-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--text-color);
            opacity: 0.45;
            margin-bottom: 7px;
        }
        .pp-sub {
            font-size: 0.78rem;
            color: var(--text-color);
            opacity: 0.3;
            line-height: 1.65;
            margin-bottom: 26px;
        }
        .pp-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .pp-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 7px;
            opacity: 0.28;
        }
        .pp-step-num {
            width: 34px;
            height: 34px;
            border: 2px solid var(--border-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            font-weight: 800;
            color: var(--text-color);
        }
        .pp-step-lbl {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-color);
        }
        .pp-step-arrow {
            font-size: 1.1rem;
            opacity: 0.18;
            padding-bottom: 22px;
            color: var(--text-color);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--text-color);
        }

        .stock-select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 16px;
            background: var(--bg-color);
            color: var(--text-color);
        }

        .btn-submit {
            background: var(--secondary-accent);
            color: var(--white);
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 15px;
            transition: all 0.3s ease;
            width: 100%;
        }

        .btn-submit:hover {
            background: var(--primary-accent);
        }

        .btn-cancel {
            background: var(--border-color);
            color: var(--text-color);
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 15px;
            transition: all 0.3s ease;
            width: 100%;
        }

        .btn-cancel:hover {
            background: var(--gray-600);
            color: var(--white);
        }

        .loading-spinner {
            border: 3px solid var(--border-color);
            border-top: 3px solid var(--secondary-accent);
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .error-message {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
            padding: 10px;
            border-radius: 6px;
            margin: 15px 0;
        }
        @keyframes errShake {
            0%,100% { transform: translateX(0); }
            20%,60% { transform: translateX(-4px); }
            40%,80% { transform: translateX(4px); }
        }
        .error-message.flash { animation: errShake 0.35s ease; }

        .success-message {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #10b981;
            padding: 10px;
            border-radius: 6px;
            margin: 15px 0;
        }

        .validation-message {
            color: #ef4444;
            font-size: 14px;
            margin-top: 5px;
        }

        /* Smart Prediction Form Enhanced Styles */
        /* Stock Context Banner */
        .stock-context-banner {
            display: flex;
            justify-content: space-between;
            background: var(--bg-color);
            border-radius: 6px;
            padding: 12px 15px;
            margin: 15px 0;
            border: 1px solid var(--border-color);
            flex-wrap: wrap;
            gap: 10px;
        }

        .context-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 100px;
        }

        .context-label {
            font-size: 11px;
            color: var(--text-color);
            opacity: 0.7;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .context-value {
            font-weight: 700;
            font-size: 14px;
        }

        /* Method Selector */
        .prediction-method-selector {
            margin: 20px 0;
        }

        .prediction-method-selector h4 {
            margin-bottom: 15px;
            color: var(--text-color);
            font-size: 16px;
        }

        .method-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .method-option {
            position: relative;
        }

        .method-option input[type="radio"] {
            position: absolute;
            opacity: 0;
        }

        .option-content {
            border: 2px solid var(--border-color);
            border-radius: 6px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            height: 100%;
            background: var(--card-bg);
        }

        .method-option input:checked+.option-content {
            border-color: var(--secondary-accent);
            background: rgba(46, 194, 126, 0.05);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .option-icon {
            font-size: 28px;
            margin-bottom: 8px;
        }

        .option-title {
            font-weight: 700;
            font-size: 15px;
            margin-bottom: 4px;
            color: var(--text-color);
        }

        .option-desc {
            font-size: 12px;
            color: var(--text-color);
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .option-reward {
            font-size: 11px;
            font-weight: 600;
            color: var(--secondary-accent);
            margin-top: 6px;
        }

        /* Prediction Methods */
        .prediction-method {
            display: none;
        }

        .prediction-method.active {
            display: block;
        }

        /* Sentiment Quick Select */
        .sentiment-quick-select {
            display: flex;
            gap: 8px;
            margin: 15px 0;
            flex-wrap: wrap;
            justify-content: center;
        }

        .sentiment-btn {
            flex: 1;
            padding: 12px 8px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            background: var(--card-bg);
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            min-width: 90px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .sentiment-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .sentiment-btn.active {
            border-color: var(--secondary-accent);
            background: var(--secondary-accent);
            color: white;
        }

        .sentiment-btn.bearish {
            border-left-color: var(--very-bearish);
        }

        .sentiment-btn.bearish.active {
            background: var(--very-bearish);
        }

        .sentiment-btn.neutral {
            border-left-color: var(--text-color);
        }

        .sentiment-btn.neutral.active {
            background: var(--text-color);
        }

        .sentiment-btn.bullish {
            border-left-color: var(--bullish);
        }

        .sentiment-btn.bullish.active {
            background: var(--bullish);
        }

        .sentiment-icon {
            font-size: 20px;
        }

        .sentiment-text {
            font-weight: 600;
            font-size: 12px;
            white-space: nowrap;
        }

        .price-preview {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-color);
            white-space: nowrap;
        }

        .percentage-preview {
            font-size: 10px;
            color: var(--text-color);
            opacity: 0.7;
        }

        /* Smart Inputs */
        .smart-percentage-input,
        .smart-price-input {
            margin: 15px 0;
        }

        .input-with-preview {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 10px 0;
        }

        .input-with-preview input {
            flex: 1;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 16px;
            background: var(--bg-color);
            color: var(--text-color);
        }

        .unit {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-color);
            min-width: 30px;
        }

        .preview-badge {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 8px 12px;
            min-width: 110px;
            text-align: center;
        }

        .preview-label {
            font-size: 11px;
            color: var(--text-color);
            opacity: 0.7;
            margin-right: 4px;
            text-transform: uppercase;
        }

        .preview-value {
            font-weight: 700;
            font-size: 13px;
        }

        .price-input-group {
            flex: 1;
            display: flex;
            align-items: center;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            overflow: hidden;
            background: var(--bg-color);
        }

        .price-input-group .currency {
            padding: 0 8px 0 12px;
            font-weight: 600;
            color: var(--text-color);
            background: var(--card-bg);
            height: 100%;
            display: flex;
            align-items: center;
        }

        .price-input-group input {
            flex: 1;
            border: none;
            padding: 10px 12px;
            font-size: 16px;
            background: var(--bg-color);
            color: var(--text-color);
        }

        /* Penny Stock Controls */
        .penny-stock-controls {
            margin: 15px 0;
        }

        .control-label {
            font-size: 13px;
            color: var(--text-color);
            margin-bottom: 10px;
            font-weight: 600;
            text-align: center;
        }

        /* Contextual Help */
        .contextual-help {
            background: rgba(46, 194, 126, 0.1);
            border: 1px solid rgba(46, 194, 126, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            margin: 10px 0;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .contextual-help i {
            color: var(--secondary-accent);
            font-size: 14px;
        }

        /* Prediction Summary Card */
        .prediction-summary-card {
            background: var(--bg-color);
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
            border: 2px solid var(--border-color);
            transition: border-color .3s, box-shadow .3s;
        }
        /* ── Card Skins (equipped from Coins Shop) ── */
        .prediction-summary-card.msm-skin-gold {
            border-color: #d4a843;
            box-shadow: 0 0 12px rgba(212,168,67,.15), inset 0 0 0 1px rgba(212,168,67,.1);
            background: linear-gradient(135deg, var(--bg-color) 0%, rgba(212,168,67,.04) 100%);
        }
        .prediction-summary-card.msm-skin-gold .psc-header {
            border-bottom-color: rgba(212,168,67,.2);
        }
        .prediction-summary-card.msm-skin-neon {
            border-color: #22d3ee;
            box-shadow: 0 0 16px rgba(34,211,238,.12), inset 0 0 0 1px rgba(34,211,238,.08);
            background: linear-gradient(135deg, var(--bg-color) 0%, rgba(34,211,238,.03) 100%);
        }
        .prediction-summary-card.msm-skin-holographic {
            border-image: linear-gradient(135deg, #f0abfc, #818cf8, #34d399, #fbbf24) 1;
            box-shadow: 0 0 20px rgba(129,140,248,.1);
            animation: msm-holo-shimmer 3s linear infinite;
        }
        @keyframes msm-holo-shimmer {
            0%   { border-image-source: linear-gradient(135deg, #f0abfc, #818cf8, #34d399, #fbbf24); }
            33%  { border-image-source: linear-gradient(135deg, #818cf8, #34d399, #fbbf24, #f0abfc); }
            66%  { border-image-source: linear-gradient(135deg, #34d399, #fbbf24, #f0abfc, #818cf8); }
            100% { border-image-source: linear-gradient(135deg, #f0abfc, #818cf8, #34d399, #fbbf24); }
        }

        .summary-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .summary-header h4 {
            margin: 0;
            font-size: 16px;
            color: var(--text-color);
        }

        .scoring-badge {
            background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 13px;
        }

        .score-label {
            margin-right: 5px;
            opacity: 0.9;
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .summary-item {
            display: flex;
            flex-direction: column;
        }

        .summary-label {
            font-size: 11px;
            color: var(--text-color);
            opacity: 0.7;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .summary-value {
            font-weight: 600;
            font-size: 13px;
            color: var(--text-color);
        }

        .summary-value.highlight {
            color: var(--secondary-accent);
            font-size: 14px;
            font-weight: 700;
        }

        /* Responsive Design */
        @media (max-width: 1200px) {
            .sentiment-container,
            .sentiment-container.sidebar-collapsed {
                grid-template-columns: 1fr;
                padding: 165px 20px 20px;
            }

            .sentiment-sidebar,
            .sentiment-sidebar.sidebar-collapsed {
                position: static;
                order: 2;
                width: auto;
                padding: 0;
                border-right: none;
                border-top: 1px solid var(--border-color);
                padding-top: 16px;
            }

            .sentiment-sidebar.sidebar-collapsed .sentiment-nav-item {
                padding: 11px 14px; justify-content: flex-start; gap: 12px;
            }
            .sentiment-sidebar.sidebar-collapsed .sentiment-nav-item span { display: inline; }
            .sentiment-sidebar.sidebar-collapsed #exchange-sidebar-note,
            .sentiment-sidebar.sidebar-collapsed #season-sidebar-widget { display: block !important; }
            .sidebar-toggle-btn { display: none; }

            .sentiment-main {
                order: 1;
            }

            .survey-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .sentiment-container {
                padding: 10px 15px 15px;
            }

            /* Base rule already makes the table scroll inside its own box —
               on mobile also force single-line cells so that scroll is usable. */
            .prediction-history-table th,
            .prediction-history-table td {
                white-space: nowrap;
            }

            .sentiment-banner {
                padding: 10px 0;
            }

            .sentiment-item {
                font-size: 14px;
                padding: 8px 12px;
                gap: 8px;
            }

            .stock-code {
                font-size: 16px;
            }

            .company-profile {
                grid-template-columns: 1fr;
            }

            .user-stats {
                grid-template-columns: 1fr;
            }

            .prediction-cards {
                grid-template-columns: 1fr;
            }

            .achievements-grid {
                grid-template-columns: 1fr;
            }

            .risk-metrics {
                grid-template-columns: 1fr;
            }

            .sector-grid {
                grid-template-columns: 1fr;
            }

            .sentiment-sidebar {
                position: static;
            }

            /* Enhanced form responsive */
            .method-options {
                grid-template-columns: 1fr;
            }

            .sentiment-quick-select {
                flex-direction: column;
                align-items: stretch;
            }

            .sentiment-btn {
                min-width: 100%;
            }

            .summary-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .input-with-preview {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }

            .preview-badge {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .sentiment-container {
                padding-left: 12px;
                padding-right: 12px;
            }

            .user-stats {
                grid-template-columns: 1fr;
            }

            .metrics-grid {
                grid-template-columns: 1fr;
            }

            .summary-grid {
                grid-template-columns: 1fr;
            }

            .stock-ticker-large,
            .stock-price-display {
                font-size: 32px;
            }

            .section-title {
                font-size: 16px;
            }

            .modal-content {
                width: 94%;
                padding: 20px 14px;
                max-height: 92vh;
                max-height: 92svh;
                border-radius: 12px;
            }

            /* Horizon buttons — 3 per row on mobile instead of single row */
            .horizon-btn { min-width: calc(33% - 6px) !important; flex: 1 1 calc(33% - 6px) !important; }

            /* Stock overview mobile fixes */
            #stock-ov-stats { grid-template-columns: repeat(2, 1fr) !important; }
            .stock-ov-two-col { grid-template-columns: 1fr !important; }
            #stock-ov-compare-input { min-width: 0 !important; }
        }

        @media (max-width: 400px) {
            /* Stack compare input on very small screens */
            #stock-ov-compare-input,
            #stock-ov-compare-exch,
            #stock-ov-compare-btn { width: 100% !important; flex: none !important; }
        }

        /* Season Warning Styles */
        .season-warning {
            background: rgba(245, 158, 11, 0.1);
            border-left: 3px solid #f59e0b;
            padding: 12px 16px;
            margin: 10px 0;
            border-radius: 8px;
            font-size: 14px;
        }

        .sentiment-comparison-card {
            transition: all 0.2s ease;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
        }

        .sentiment-comparison-card:hover {
            background: var(--card-bg);
            transform: translateY(-1px);
        }

        .horizon-btn .season-days-left {
            font-size: 9px;
            margin-top: 2px;
            min-height: 14px;
        }

        .season-info-banner {
            margin-bottom: 15px;
        }

        /* ── ARCHIVED NAV ITEMS ── */
        .nav-archived {
            opacity: 0.45;
            pointer-events: none;
            cursor: default;
            position: relative;
        }
        .nav-coming-soon {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            background: #f59e0b;
            color: #fff;
            padding: 2px 6px;
            border-radius: 8px;
            margin-left: auto;
            flex-shrink: 0;
        }

        /* ── EXCHANGE SELECTOR ── */
        .exchange-selector {
            display: flex;
            gap: 8px;
            margin: 8px 0 16px;
        }
        .exchange-btn {
            flex: 1;
            padding: 9px 10px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            background: var(--card-bg);
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            transition: border-color 0.15s, background 0.15s;
            color: var(--text-color);
            text-align: center;
            line-height: 1.3;
        }
        .exchange-btn.active {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.08);
            color: var(--primary-accent);
        }
        .exchange-dot {
            display: inline-block;
            width: 7px; height: 7px;
            border-radius: 50%;
            margin-right: 4px;
            vertical-align: middle;
        }
        .dot-open  { background: #10b981; }
        .dot-closed { background: #ef4444; }

        /* ── COMPETITIONS ── */
        .msm-seasonal-banner {
            border: 1px solid var(--border-color);
            border-left: 3px solid var(--primary-accent);
            border-radius: 6px;
            padding: 18px 20px;
            margin-bottom: 22px;
            background: var(--bg-color);
        }
        .msm-seasonal-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        .msm-official-badge {
            background: rgba(46,194,126,0.12);
            color: var(--primary-accent);
            font-size: 10px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 8px;
            letter-spacing: 0.3px;
        }
        .msm-seasonal-meta {
            display: flex;
            gap: 16px;
            font-size: 12px;
            opacity: 0.6;
            flex-wrap: wrap;
            margin: 8px 0 14px;
        }
        .comp-tier-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 8px;
        }
        .tier-free     { background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }
        .tier-premium  { background: rgba(245,158,11,0.1);  color: #d97706; border: 1px solid rgba(245,158,11,0.2); }
        .comp-rule-tag {
            display: inline-block;
            font-size: 10px;
            padding: 2px 7px;
            border-radius: 6px;
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-color);
            margin-right: 4px;
            margin-top: 4px;
            opacity: 0.7;
        }
        .comp-actions-row {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .comp-actions-row .tier-note {
            margin-left: auto;
            font-size: 11px;
            opacity: 0.5;
        }
        /* Auto-enrolled notice */
        .comp-enrolled-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--primary-accent);
            font-weight: 600;
            margin-bottom: 12px;
        }
        /* ── Competition sub-tabs ── */
        .comp-sub-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 18px;
            background: var(--secondary-bg);
            border-radius: 10px;
            padding: 4px;
        }
        .comp-sub-tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 12px;
            border: none;
            border-radius: 7px;
            background: transparent;
            color: var(--text-color);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            opacity: 0.55;
            transition: background 0.15s, opacity 0.15s;
            position: relative;
        }
        .comp-sub-tab:hover { opacity: 0.85; }
        .comp-sub-tab.active {
            background: var(--bg-color);
            opacity: 1;
            box-shadow: 0 1px 4px rgba(0,0,0,0.12);
        }
        .comp-sub-tab i { font-size: 15px; }
        .comp-sub-badge {
            position: absolute;
            top: 4px; right: 6px;
            background: var(--primary-accent);
            color: white;
            font-size: 9px;
            font-weight: 800;
            border-radius: 10px;
            padding: 1px 5px;
            min-width: 14px;
            text-align: center;
        }
        .comp-subtab-content { animation: fadeIn 0.15s ease; }

        /* ── Browse comp card ── */
        .comp-browse-card {
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 14px 16px;
            background: var(--bg-color);
            display: flex;
            align-items: center;
            gap: 14px;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .comp-browse-card:hover {
            border-color: rgba(var(--primary-accent-rgb,14,185,129),0.4);
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .comp-browse-card.featured {
            border-color: rgba(245,158,11,0.35);
            background: linear-gradient(135deg, rgba(245,158,11,0.04) 0%, var(--bg-color) 60%);
        }
        .comp-browse-icon {
            width: 42px; height: 42px;
            border-radius: 10px;
            background: rgba(var(--primary-accent-rgb,14,185,129),0.1);
            display: flex; align-items: center; justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }
        .comp-browse-icon.h2h  { background: rgba(46,194,126,0.1); color: #2ec27e; }
        .comp-browse-icon.pts  { background: rgba(99,102,241,0.1);  color: #6366f1; }
        .comp-browse-meta { flex: 1; min-width: 0; }
        .comp-browse-name {
            font-size: 13px; font-weight: 700;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .comp-browse-sub { font-size: 11px; opacity: 0.5; margin-top: 2px; }
        .comp-browse-pills { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
        .comp-browse-pill {
            font-size: 10px; font-weight: 700;
            padding: 2px 7px; border-radius: 20px;
            background: var(--secondary-bg); opacity: 0.8;
        }
        .comp-browse-pill.official { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .comp-browse-pill.featured { background: rgba(245,158,11,0.12); color: #f59e0b; }
        .comp-browse-pill.h2h     { background: rgba(46,194,126,0.12);  color: #2ec27e; }
        .comp-browse-pill.pts     { background: rgba(99,102,241,0.12);  color: #6366f1; }
        .comp-browse-pill.open    { background: rgba(16,185,129,0.1);   color: #10b981; }
        .comp-browse-pill.full    { background: rgba(239,68,68,0.1);    color: #ef4444; }

        /* Head-to-head match box */
        .comp-h2h-box {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px 18px;
            margin: 14px 0 18px;
        }
        .comp-h2h-label {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            opacity: 0.4;
            margin-bottom: 14px;
        }
        .comp-h2h-matchup {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 10px;
        }
        .comp-h2h-side { flex: 1; text-align: center; }
        .comp-h2h-name { font-size: 13px; font-weight: 700; opacity: 0.85; }
        .comp-h2h-score {
            font-size: 26px;
            font-weight: 800;
            color: var(--primary-accent);
            line-height: 1.1;
            margin-top: 4px;
        }
        .comp-h2h-score.losing { color: #ef4444; }
        .comp-h2h-vs { font-size: 11px; font-weight: 700; opacity: 0.3; flex-shrink: 0; }
        .comp-h2h-record { font-size: 11px; opacity: 0.45; text-align: center; }
        /* Featured single competition */
        .comp-featured {
            border: 1px solid var(--border-color);
            border-left: 3px solid var(--primary-accent);
            border-radius: 6px;
            padding: 22px 24px;
            background: var(--bg-color);
            margin-bottom: 12px;
        }
        .comp-featured h3 {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-color);
            margin: 8px 0 8px;
        }
        .comp-featured > p {
            font-size: 13px;
            opacity: 0.65;
            margin: 0 0 18px;
            line-height: 1.55;
        }
        .comp-featured-stats {
            display: flex;
            gap: 28px;
            flex-wrap: wrap;
            margin-bottom: 20px;
            padding-bottom: 18px;
            border-bottom: 1px solid var(--border-color);
        }
        .comp-stat-item { display: flex; flex-direction: column; }
        .comp-stat-val  { font-size: 20px; font-weight: 800; color: var(--text-color); line-height: 1; }
        .comp-stat-lbl  { font-size: 11px; opacity: 0.45; margin-top: 4px; }
        .comp-featured-actions { display: flex; gap: 8px; flex-wrap: wrap; }
        /* Position card */
        .comp-position-card {
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 14px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            background: var(--bg-color);
            font-size: 13px;
        }
        .comp-position-rank {
            font-size: 22px;
            font-weight: 800;
            color: var(--primary-accent);
        }
        /* Premium upsell panel */
        .comp-premium-panel {
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            background: var(--bg-color);
            margin-top: 12px;
            flex-wrap: wrap;
        }
        .comp-premium-panel p {
            font-size: 12px;
            opacity: 0.6;
            margin: 3px 0 0;
            line-height: 1.5;
        }
        .comp-standing-link {
            background: none; border: none; color: var(--text-color); font-weight: 600;
            cursor: pointer; padding: 0; font-size: 13px; text-align: left;
            text-decoration: underline; text-decoration-color: transparent;
            transition: text-decoration-color 0.15s;
        }
        .comp-standing-link:hover { text-decoration-color: var(--primary-accent); color: var(--primary-accent); }
        /* User profile modal */
        .uprof-hero {
            display: flex; align-items: center; gap: 14px;
            padding: 14px 0 18px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px;
        }
        .uprof-avatar {
            width: 52px; height: 52px; border-radius: 50%;
            background: var(--primary-accent); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 22px; font-weight: 800; flex-shrink: 0;
        }
        .uprof-name { font-size: 16px; font-weight: 700; }
        .uprof-sub  { font-size: 12px; opacity: 0.5; margin-top: 3px; }
        .uprof-stats-grid {
            display: grid; grid-template-columns: repeat(3,1fr);
            gap: 1px; background: var(--border-color); border-radius: 8px; overflow: hidden;
            margin-bottom: 16px;
        }
        .uprof-stat {
            background: var(--bg-color); padding: 12px 14px; text-align: center;
        }
        .uprof-stat-val { font-size: 18px; font-weight: 800; }
        .uprof-stat-lbl { font-size: 10px; opacity: 0.4; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.4px; }
        .uprof-h2h-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 13px;
        }
        .uprof-h2h-row:last-child { border-bottom: none; }
        /* Standings inside modal */
        .comp-standing-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 9px 0;
            border-bottom: 1px solid var(--border-color);
            font-size: 13px;
        }
        .comp-standing-row:last-child { border-bottom: none; }
        .comp-standing-pos {
            width: 32px;
            font-size: 12px;
            font-weight: 700;
            opacity: 0.4;
            flex-shrink: 0;
            text-align: center;
        }
        .comp-standing-pos.podium { opacity: 1; font-size: 14px; }
        .comp-standing-name { flex: 1; font-weight: 600; }
        .comp-standing-score { font-size: 13px; font-weight: 700; color: var(--primary-accent); }
        .comp-standing-acc { font-size: 11px; opacity: 0.45; min-width: 38px; text-align: right; }
        .comp-your-row {
            background: rgba(46,194,126,0.06);
            border-radius: 6px;
            padding-left: 6px;
            margin: 0 -6px;
        }
        /* Stock packs grid */
        .stock-packs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 7px;
            margin-bottom: 4px;
        }
        .sp-pack {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 12px;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
            background: var(--bg-color);
        }
        .sp-pack:hover { border-color: var(--primary-accent); }
        .sp-pack.selected {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.05);
            grid-column: 1 / -1;
        }
        .sp-pack-name { font-size: 12px; font-weight: 700; color: var(--text-color); }
        .sp-pack-stocks { font-size: 10px; opacity: 0.45; margin-top: 3px; line-height: 1.4; }
        .sp-pack-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 10px;
        }
        .sp-pack-chip {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 6px;
            background: rgba(46,194,126,0.1);
            border: 1px solid rgba(46,194,126,0.25);
            color: var(--primary-accent);
            letter-spacing: 0.02em;
        }
        .sp-pack-desel {
            font-size: 11px;
            opacity: 0.4;
            margin-top: 8px;
            cursor: pointer;
            display: inline-block;
        }
        .sp-pack-desel:hover { opacity: 0.7; }
        .sp-section-label {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            opacity: 0.4;
            margin: 12px 0 7px;
        }
        .sp-section-label:first-child { margin-top: 0; }
        /* Stock picker */
        .stock-picker-wrap { margin-top: 10px; }
        .stock-picker-search {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-color);
            color: var(--text-color);
            font-size: 13px;
            margin-bottom: 8px;
            box-sizing: border-box;
        }
        .stock-picker-cats {
            display: flex;
            gap: 6px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .sp-cat-btn {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background: transparent;
            color: var(--text-color);
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.15s;
        }
        .sp-cat-btn.active { opacity: 1; border-color: var(--primary-accent); color: var(--primary-accent); }
        .stock-picker-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
            gap: 6px;
            max-height: 200px;
            overflow-y: auto;
            padding: 2px;
        }
        .sp-stock {
            padding: 6px 8px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            text-align: center;
            cursor: pointer;
            transition: all 0.12s;
            user-select: none;
            background: var(--bg-color);
            color: var(--text-color);
            display: flex;
            flex-direction: column;
            gap: 1px;
        }
        .sp-stock span { font-size: 9px; font-weight: 400; opacity: 0.5; }
        .sp-stock:hover { border-color: var(--primary-accent); }
        .sp-stock.selected {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.08);
            color: var(--primary-accent);
        }
        .sp-stock.disabled { opacity: 0.3; cursor: not-allowed; }
        .stock-picker-count {
            font-size: 12px;
            margin-top: 8px;
            font-weight: 600;
        }
        .stock-picker-count.valid { color: var(--primary-accent); }
        .stock-picker-count.invalid { color: #ef4444; }
        /* View competition modal tabs */
        .view-comp-tabs {
            display: flex;
            gap: 0;
            border-bottom: 1px solid var(--border-color);
            margin: -4px -24px 20px;
            padding: 0 24px;
        }
        .vc-tab {
            padding: 10px 16px;
            font-size: 13px;
            font-weight: 600;
            border: none;
            background: transparent;
            color: var(--text-color);
            opacity: 0.45;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: all 0.15s;
        }
        .vc-tab.active { opacity: 1; border-bottom-color: var(--primary-accent); color: var(--primary-accent); }
        .vc-tab-content { display: none; }
        .vc-tab-content.active { display: block; }
        /* History table */
        .comp-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
        .comp-history-table th {
            text-align: left;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.4;
            padding: 0 8px 8px;
        }
        .comp-history-table td {
            padding: 8px;
            border-top: 1px solid var(--border-color);
        }
        .comp-history-table tr:last-child td { border-bottom: none; }
        /* Participant manage row */
        .comp-participant-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 0;
            border-bottom: 1px solid var(--border-color);
            font-size: 13px;
        }
        .comp-participant-row:last-child { border-bottom: none; }
        .comp-participant-row .name { flex: 1; font-weight: 600; }
        .comp-participant-row .pts { opacity: 0.55; font-size: 12px; }
        .comp-kick-btn {
            font-size: 11px;
            padding: 3px 10px;
            border-radius: 5px;
            border: 1px solid rgba(239,68,68,0.3);
            background: rgba(239,68,68,0.06);
            color: #ef4444;
            cursor: pointer;
        }
        /* Competition nav badge */
        .comp-nav-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            background: #ef4444;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 0 4px;
            margin-left: 5px;
            vertical-align: middle;
            line-height: 16px;
            flex-shrink: 0;
        }
        /* Weekly competition prediction modal */
        .comp-week-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: rgba(46,194,126,0.05);
            border: 1px solid rgba(46,194,126,0.2);
            border-radius: 8px;
            margin-bottom: 18px;
            gap: 12px;
            flex-wrap: wrap;
        }
        .comp-week-header-side { text-align: center; flex: 1; min-width: 80px; }
        .comp-week-header-pts { font-size: 22px; font-weight: 800; line-height: 1; }
        .comp-week-header-lbl { font-size: 10px; opacity: 0.45; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.4px; }
        .comp-week-header-vs { font-size: 11px; font-weight: 700; opacity: 0.3; padding: 0 4px; }
        .comp-week-pts-rule {
            font-size: 11px;
            opacity: 0.45;
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid var(--border-color);
            line-height: 1.7;
        }
        /* Per-stock prediction row */
        /* ── % Prediction pick blocks (weekly + private comp modals) ── */
        .wp-stock-block {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 10px;
            transition: border-color 0.15s;
        }
        .wp-stock-block.has-pred { border-color: var(--primary-accent); }
        .wp-stock-block.bull-picked { border-color: rgba(46,194,126,0.4); }
        .wp-stock-block.bear-picked { border-color: rgba(239,68,68,0.4); }
        /* Block head: ticker + price + prev weeks */
        .wp-block-head {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 13px;
            background: var(--secondary-bg);
            border-bottom: 1px solid var(--border-color);
            flex-wrap: wrap;
        }
        .wp-stock-code  { font-size: 14px; font-weight: 800; }
        .wp-stock-price { font-size: 12px; opacity: 0.45; }
        .wp-block-prev  { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
        .wp-stock-implied {
            font-size: 12px; font-weight: 700;
            color: var(--primary-accent);
            padding: 2px 8px; border-radius: 4px;
            background: rgba(46,194,126,0.08);
        }
        .wp-stock-implied.neg { color: #ef4444; background: rgba(239,68,68,0.08); }
        /* Direction cards: Bull vs Bear */
        .wp-dir-body { display: flex; align-items: stretch; padding: 10px; gap: 0; }
        .wp-dir-btn {
            flex: 1;
            padding: 12px 8px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            background: var(--secondary-bg);
            color: var(--text-color);
            font-size: 13px; font-weight: 700;
            cursor: pointer;
            text-align: center;
            transition: all 0.15s;
            display: flex; flex-direction: column; align-items: center; gap: 5px;
        }
        .wp-dir-btn i { font-size: 20px; }
        .wp-dir-btn:hover { border-color: rgba(46,194,126,0.4); }
        .wp-dir-btn.bull.active {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.08);
            color: var(--primary-accent);
        }
        .wp-dir-btn.bear:hover { border-color: rgba(239,68,68,0.4); }
        .wp-dir-btn.bear.active {
            border-color: #ef4444;
            background: rgba(239,68,68,0.07);
            color: #ef4444;
        }
        /* Magnitude row (shown after direction picked) */
        .wp-mag-row {
            border-top: 1px solid var(--border-color);
            padding: 10px 13px 12px;
        }
        .wp-mag-label {
            font-size: 10px; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.5px; opacity: 0.4; margin-bottom: 8px;
        }
        .wp-mag-presets { display: flex; gap: 5px; margin-bottom: 9px; flex-wrap: wrap; }
        .wp-mag-preset {
            padding: 5px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: transparent;
            color: var(--text-color);
            font-size: 12px; font-weight: 700;
            cursor: pointer;
            transition: all 0.12s;
        }
        .wp-mag-preset:hover { border-color: var(--primary-accent); }
        .wp-mag-preset.active { background: rgba(46,194,126,0.1); border-color: var(--primary-accent); color: var(--primary-accent); }
        .wp-mag-preset.active.bear-mag { background: rgba(239,68,68,0.08); border-color: #ef4444; color: #ef4444; }
        .wp-mag-custom {
            display: flex; align-items: center; gap: 7px;
            font-size: 12px; opacity: 0.7;
        }
        .wp-custom-pct {
            width: 72px; padding: 5px 8px;
            border: 1px solid var(--border-color); border-radius: 6px;
            background: var(--bg-color); color: var(--text-color); font-size: 13px;
        }
        .wp-custom-pct:focus { border-color: var(--primary-accent); outline: none; }
        .wp-price-preview { opacity: 0.45; font-size: 11px; }
        .comp-week-submitted {
            display: none;
            text-align: center;
            padding: 20px 0 8px;
        }
        .comp-week-submitted-icon { font-size: 32px; color: var(--primary-accent); display: block; margin-bottom: 8px; }
        /* Invite link box */
        .comp-invite-box {
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid var(--border-color);
        }
        .comp-invite-box > label {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            opacity: 0.4;
            display: block;
            margin-bottom: 8px;
        }
        .comp-invite-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .comp-invite-url {
            flex: 1;
            padding: 9px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 11px;
            background: var(--bg-color);
            color: var(--text-color);
            font-family: var(--font-mono);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: default;
        }
        .join-code-box {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 16px 18px;
            margin-top: 16px;
            display: none;
        }
        .share-link-box {
            display: flex;
            gap: 8px;
            margin-top: 8px;
            align-items: center;
        }
        .share-link-box input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 13px;
            background: var(--bg-color);
            color: var(--text-color);
        }

        /* Form section dividers inside modal */
        .modal-section-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            color: var(--text-color);
            opacity: 0.45;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 6px;
            margin: 22px 0 12px;
        }
        .rule-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 8px;
        }
        .rule-option {
            position: relative;
        }
        .rule-option input[type="radio"] {
            position: absolute;
            opacity: 0;
        }
        .rule-option-label {
            display: block;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 12px;
            cursor: pointer;
            font-size: 12px;
            transition: border-color 0.15s, background 0.15s;
        }
        .rule-option-label:hover { border-color: var(--primary-accent); }
        .rule-option input:checked + .rule-option-label {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.05);
        }
        .rule-option-label strong {
            display: block;
            font-size: 13px;
            margin-bottom: 2px;
        }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â SENTIMENT VS PRICE TAB Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .svp-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: flex-end;
            margin-bottom: 16px;
            padding: 14px 16px;
            background: var(--bg-color);
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .svp-filter-group { display: flex; flex-direction: column; gap: 4px; }
        .svp-filter-group label { font-size: 11px; font-weight: 600; opacity: 0.6; }
        .svp-slider-wrap { display: flex; align-items: center; gap: 6px; }
        .svp-slider-wrap input[type=range] {
            width: 90px; accent-color: var(--primary-accent); cursor: pointer;
        }
        .svp-slider-val { font-size: 11px; font-weight: 700; color: var(--primary-accent); min-width: 28px; }
        .svp-chart-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-top: 14px;
        }
        .svp-chart-grid canvas { max-height: 220px; }
        .svp-mini-card {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 14px;
        }
        .svp-mini-title {
            font-size: 11px; font-weight: 700; opacity: 0.55;
            text-transform: uppercase; letter-spacing: 0.07em;
            margin-bottom: 10px;
        }
        .svp-heatmap {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 3px;
        }
        .svp-heatmap-day {
            aspect-ratio: 1;
            border-radius: 2px;
            background: var(--border-color);
            cursor: default;
        }
        .svp-heatmap-day[title] { cursor: help; }
        @media (max-width: 640px) { .svp-chart-grid { grid-template-columns: 1fr; } }
        #svp-chart-area {
            position: relative;
        }
        #svp-chart-area.gated > *:not(#svp-premium-gate) {
            filter: blur(5px);
            pointer-events: none;
            user-select: none;
            transition: filter 0.25s;
        }
        #svp-premium-gate {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            border-radius: 6px;
            background: rgba(0,0,0,0.08);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }
        .svp-gate-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            padding: 24px 32px;
            background: var(--card-bg, var(--bg-color));
            border: 1px solid rgba(245,158,11,0.4);
            border-radius: 14px;
            box-shadow: 0 8px 40px rgba(0,0,0,0.22);
            text-align: center;
            max-width: 340px;
        }
        .svp-gate-card .svp-gate-icon {
            font-size: 32px;
            color: #F59E0B;
            line-height: 1;
        }
        .svp-gate-card strong {
            font-size: 15px;
            color: var(--text-color);
        }
        .svp-gate-card p {
            font-size: 13px;
            opacity: 0.75;
            margin: 0;
            line-height: 1.5;
        }
        .svp-stats-row {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 14px;
            margin-bottom: 14px;
        }
        .svp-stat-chip {
            flex: 1;
            min-width: 100px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 14px;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .svp-chip-label { font-size: 11px; opacity: 0.6; font-weight: 600; }
        .svp-chip-val { font-size: 18px; font-weight: 800; color: var(--secondary-accent); }
        .svp-export-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 6px;
        }
        .svp-export-btn {
            padding: 6px 14px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
            color: var(--text-color);
            transition: all 0.2s;
        }
        .svp-export-btn:hover { background: var(--secondary-accent); color: white; border-color: var(--secondary-accent); }
        .svp-export-btn.premium-only { opacity: 0.55; }
        .svp-export-btn.premium-only:hover { opacity: 1; background: var(--bullish); color: white; border-color: var(--bullish); }
        .lock-badge { font-size: 10px; }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â WATCHLIST Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .wl-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 14px;
            overflow: hidden;
            transition: border-color 0.15s, box-shadow 0.15s;
        }
        .wl-card:hover { border-color: var(--secondary-accent); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
        .wl-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; }
        .wl-card-info { flex: 1; min-width: 0; }
        .wl-card-symbol { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
        .wl-card-name { font-size: 12px; opacity: 0.5; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .wl-card-price-block { text-align: right; flex-shrink: 0; }
        .wl-card-price { font-size: 14px; font-weight: 700; }
        .wl-card-pct { font-size: 11px; margin-top: 1px; }
        .wl-pred-badge { font-size: 10px; padding: 3px 9px; border-radius: 20px; background: rgba(46,194,126,0.1); color: var(--secondary-accent); font-weight: 700; flex-shrink: 0; border: 1px solid rgba(46,194,126,0.2); white-space: nowrap; }
        .wl-remove-btn { background: none; border: 1px solid var(--border-color); border-radius: 8px; padding: 5px 8px; cursor: pointer; color: var(--text-color); opacity: 0.4; transition: all 0.15s; font-size: 14px; flex-shrink: 0; line-height: 1; display: flex; align-items: center; justify-content: center; }
        .wl-remove-btn i { font-size: 14px; line-height: 1; display: block; }
        .wl-remove-btn:hover { border-color: var(--bearish); color: var(--bearish); opacity: 1; background: rgba(239,68,68,0.07); }
        .wl-exch-badge { font-size: 10px; padding: 2px 7px; border-radius: 10px; background: var(--border-color); opacity: 0.7; font-weight: 600; letter-spacing: 0.3px; }
        .wl-card-sentiment { padding: 10px 16px 14px; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.02); }
        .wl-sent-bar-wrap { height: 10px; border-radius: 5px; overflow: hidden; background: var(--border-color); display: flex; margin-bottom: 8px; }
        .wl-sent-bar-bull { background: var(--bullish); border-radius: 5px 0 0 5px; transition: width 0.4s; }
        .wl-sent-bar-neut { background: #6b7280; transition: width 0.4s; }
        .wl-sent-bar-bear { background: var(--bearish); border-radius: 0 5px 5px 0; transition: width 0.4s; }
        .wl-stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
        .wl-stat-bull { color: var(--bullish); font-weight: 700; }
        .wl-stat-bear { color: var(--bearish); font-weight: 700; }
        .wl-stat-label { font-weight: 800; font-size: 12px; }
        .wl-sent-nodata { font-size: 12px; opacity: 0.35; font-style: italic; padding: 4px 0; }
        /* Search result rows */
        .wl-sr-row { padding: 8px 12px; display: flex; align-items: center; gap: 8px; cursor: default; transition: background 0.1s; }
        .wl-sr-row:hover { background: rgba(46,194,126,0.04); }
        .wl-sr-symbol { font-weight: 800; font-size: 13px; min-width: 52px; }
        .wl-sr-name { font-size: 12px; opacity: 0.5; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .wl-sr-price { font-size: 12px; font-weight: 600; opacity: 0.65; flex-shrink: 0; }
        .wl-sr-add-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(46,194,126,0.1); border: 1px solid rgba(46,194,126,0.28); color: var(--secondary-accent); cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: all 0.15s; flex-shrink: 0; padding: 0; }
        .wl-sr-add-btn i { font-size: 15px; line-height: 1; display: block; }
        .wl-sr-add-btn:hover { background: var(--secondary-accent); color: #fff; border-color: var(--secondary-accent); transform: scale(1.1); }
        /* Popular suggestions (empty state) */
        .wl-suggestions-wrap { text-align: left; padding: 4px 0 8px; }
        .wl-suggestions-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; opacity: 0.55; margin-bottom: 22px; justify-content: center; }
        .wl-sugg-section { margin-bottom: 20px; }
        .wl-sugg-section-label { font-size: 10px; font-weight: 700; opacity: 0.4; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
        .wl-sugg-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
        .wl-sugg-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
        .wl-sugg-card:hover { border-color: var(--secondary-accent); background: rgba(46,194,126,0.04); }
        .wl-sugg-info { min-width: 0; }
        .wl-sugg-sym { font-weight: 800; font-size: 13px; }
        .wl-sugg-name { font-size: 10px; opacity: 0.42; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .wl-sugg-plus { width: 26px; height: 26px; border-radius: 50%; background: rgba(46,194,126,0.1); border: 1px solid rgba(46,194,126,0.2); color: var(--secondary-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; line-height: 1; }
        .wl-sugg-plus i { font-size: 13px; line-height: 1; display: block; }
        .wl-sugg-card:hover .wl-sugg-plus { background: var(--secondary-accent); color: #fff; border-color: var(--secondary-accent); transform: scale(1.08); }
        @media (max-width: 600px) {
            .wl-card-header { flex-wrap: wrap; }
            .wl-sugg-row { grid-template-columns: repeat(2, 1fr); }
        }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â ACHIEVEMENTS IMPROVEMENTS Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .achievement-level-banner {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px 20px;
            background: linear-gradient(135deg, var(--bg-color), rgba(46,194,126,0.06));
            border: 1px solid var(--border-color);
            border-radius: 6px;
            margin-bottom: 20px;
        }
        .ach-level-badge {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: var(--secondary-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            flex-shrink: 0;
        }
        .ach-level-info { flex: 1; }
        .ach-level-title { font-weight: 800; font-size: 16px; color: var(--text-color); }
        .ach-level-sub { font-size: 12px; opacity: 0.65; margin-bottom: 6px; }
        .ach-xp-bar {
            height: 6px;
            background: var(--border-color);
            border-radius: 3px;
            overflow: hidden;
        }
        .ach-xp-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--secondary-accent), var(--primary-accent));
            border-radius: 3px;
            transition: width 0.6s ease;
        }
        .ach-xp-label { font-size: 10px; opacity: 0.55; margin-top: 3px; }
        .achievement-category-tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .ach-cat-btn {
            padding: 5px 14px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            color: var(--text-color);
            transition: all 0.2s;
            font-weight: 600;
        }
        .ach-cat-btn.active { background: var(--secondary-accent); color: white; border-color: var(--secondary-accent); }
        .achievement-card { cursor: default; }
        .achievement-card .achievement-progress { position: relative; }
        .ach-progress-label {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            opacity: 0.65;
            margin-top: 4px;
        }
        .achievement-card.earned { box-shadow: 0 0 12px rgba(245,158,11,0.2); }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â LEADERBOARD IMPROVEMENTS Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .lb-rank-change {
            font-size: 11px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 6px;
            margin-left: 4px;
        }
        .lb-rank-up { background: rgba(16,185,129,0.15); color: #10b981; }
        .lb-rank-down { background: rgba(239,68,68,0.15); color: #ef4444; }
        .lb-rank-same { background: var(--border-color); color: var(--text-color); opacity: 0.5; }
        .lb-you-badge {
            font-size: 10px;
            padding: 2px 8px;
            background: var(--primary-accent);
            color: white;
            border-radius: 6px;
            margin-left: 6px;
            font-weight: 700;
        }
        .lb-podium-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px;
            margin-bottom: 20px;
        }
        .lb-podium-card {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 16px 12px;
            text-align: center;
            position: relative;
        }
        .lb-podium-card.rank-1 { border-color: var(--gold); background: linear-gradient(160deg, var(--bg-color), rgba(245,158,11,0.08)); }
        .lb-podium-card.rank-2 { border-color: var(--silver); background: linear-gradient(160deg, var(--bg-color), rgba(203,213,225,0.08)); }
        .lb-podium-card.rank-3 { border-color: var(--bronze); background: linear-gradient(160deg, var(--bg-color), rgba(180,83,9,0.08)); }
        .lb-podium-crown { font-size: 22px; margin-bottom: 4px; }
        .lb-podium-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: var(--secondary-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 16px;
            margin: 0 auto 8px;
        }
        .lb-podium-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .lb-podium-score { font-size: 18px; font-weight: 800; color: var(--secondary-accent); }
        .lb-podium-acc { font-size: 11px; opacity: 0.65; }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â HOW IT WORKS Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .hiw-info-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: rgba(var(--primary-accent-rgb, 200,121,65), 0.06);
            border: 1px solid rgba(var(--primary-accent-rgb, 200,121,65), 0.2);
            border-radius: 6px;
            margin-bottom: 18px;
            flex-wrap: wrap;
            gap: 10px;
        }
        .hiw-info-bar-text { font-size: 13px; color: var(--text-color); opacity: 0.85; }
        .hiw-info-bar-text strong { color: var(--primary-accent); }
        .hiw-open-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            background: none;
            color: var(--primary-accent);
            border: 1px solid rgba(var(--primary-accent-rgb, 200,121,65), 0.45);
            border-radius: 6px;
            font-family: var(--font-mono, 'IBM Plex Mono', monospace);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: .1em;
            text-transform: uppercase;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.2s, color 0.2s;
        }
        .hiw-open-btn:hover { background: rgba(var(--primary-accent-rgb, 200,121,65), 0.12); }

        /* How It Works modal content */
        .hiw-section { margin-bottom: 20px; }
        .hiw-section h4 { font-size: 15px; color: var(--secondary-accent); margin-bottom: 8px; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
        .hiw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
        .hiw-card {
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px;
            font-size: 13px;
        }
        .hiw-card-icon { font-size: 20px; margin-bottom: 6px; }
        .hiw-card-label { font-weight: 700; margin-bottom: 4px; }
        .hiw-card-desc { opacity: 0.7; font-size: 12px; }
        .hiw-points-table { width: 100%; border-collapse: collapse; font-size: 13px; }
        .hiw-points-table th, .hiw-points-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-color); text-align: left; }
        .hiw-points-table th { font-weight: 700; opacity: 0.7; font-size: 11px; }
        .hiw-points-table .pts { color: var(--secondary-accent); font-weight: 700; }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â IMPROVED PREDICTION SUMMARY CARD Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .prediction-summary-card {
            background: var(--bg-color);
            border-radius: 14px;
            padding: 20px;
            margin: 0;
            border: 2px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }
        .prediction-summary-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--very-bearish), var(--bearish), #94a3b8, var(--bullish), var(--very-bullish));
        }
        .psc-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }
        .psc-title { font-size: 15px; font-weight: 700; color: var(--text-color); }
        .psc-points-badge {
            background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
            color: white;
            padding: 5px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
        }
        .psc-direction-bar {
            height: 8px;
            background: var(--border-color);
            border-radius: 4px;
            overflow: hidden;
            margin: 12px 0;
            position: relative;
        }
        .psc-direction-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.4s ease, background 0.4s ease;
        }
        .psc-direction-labels {
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            opacity: 0.55;
            margin-top: 3px;
            margin-bottom: 14px;
        }
        .psc-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 14px;
        }
        .psc-item {
            background: var(--card-bg);
            border-radius: 8px;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
        }
        .psc-item-label { font-size: 10px; font-weight: 700; opacity: 0.55; letter-spacing: .04em; margin-bottom: 4px; }
        .psc-item-value { font-size: 16px; font-weight: 800; color: var(--text-color); }
        .psc-item-value.bullish-val { color: #10b981; }
        .psc-item-value.bearish-val { color: #ef4444; }
        .psc-item.span2 { grid-column: span 2; }
        .psc-item.span3 { grid-column: span 3; }
        .psc-community-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            background: rgba(46,194,126,0.06);
            border: 1px solid rgba(46,194,126,0.15);
            border-radius: 8px;
            font-size: 13px;
            margin-bottom: 10px;
        }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â REWARD GUIDE Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .psc-reward-guide {
            margin-top: 10px;
            border: 1px solid rgba(245,158,11,0.2);
            border-radius: 8px;
            overflow: hidden;
            font-size: 12px;
        }
        .psc-reward-guide summary {
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: rgba(245,158,11,0.06);
            cursor: pointer;
            font-weight: 700;
            font-size: 12px;
            color: var(--text-color);
            user-select: none;
        }
        .psc-reward-guide summary::-webkit-details-marker { display: none; }
        .psc-reward-guide summary .prg-caret { font-size: 10px; opacity: 0.5; transition: transform 0.2s; }
        .psc-reward-guide[open] summary .prg-caret { transform: rotate(180deg); }
        .prg-xp-badge {
            background: rgba(245,158,11,0.15);
            color: #f59e0b;
            border-radius: 6px;
            padding: 1px 8px;
            font-size: 11px;
            font-weight: 700;
        }
        .prg-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
        .prg-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 5px 8px;
            border-radius: 5px;
            background: var(--card-bg);
            color: rgba(255,255,255,0.7);
        }
        .prg-row.prg-top { background: rgba(46,194,126,0.1); color: #10b981; font-weight: 700; }
        .prg-row .prg-pts { font-weight: 700; color: var(--text-color); }
        .prg-row.prg-top .prg-pts { color: #10b981; }
        .prg-xp-inline { color: #f59e0b; font-weight: 700; }
        .prg-note { font-size: 11px; opacity: 0.45; text-align: center; padding-top: 2px; }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â SHARE FUNCTIONALITY Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .share-btn {
            background: none;
            border: none;
            color: var(--secondary-accent);
            cursor: pointer;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        .share-btn:hover { background: rgba(46,194,126,0.1); }
        .share-list-btn {
            padding: 8px 14px;
            background: var(--bg-color);
            border: 1px solid var(--secondary-accent);
            color: var(--secondary-accent);
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .share-list-btn:hover { background: var(--secondary-accent); color: white; }

        /* Share modal social card */
        .social-card-preview {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f2027 100%);
            border-radius: 16px;
            padding: 24px;
            color: white;
            font-family: var(--font-sans);
            position: relative;
            overflow: hidden;
            min-height: 200px;
        }
        .social-card-preview::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 4px;
            background: linear-gradient(90deg, #2ec27e, #3b82f6);
        }
        /* Share card header row (logo + brand) */
        .sc-header-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
        .sc-logo { height: 28px; width: auto; object-fit: contain; }
        .sc-brand { font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: 0.5; }
        /* User identity strip */
        .sc-user-bar { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 5px 10px; background: rgba(255,255,255,0.06); border-radius: 8px; }
        .sc-user-avatar { width: 22px; height: 22px; border-radius: 50%; background: #2ec27e; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .sc-user-name { font-size: 13px; font-weight: 700; flex: 1; }
        .sc-user-level { font-size: 10px; font-weight: 700; background: rgba(46,194,126,0.2); color: #2ec27e; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
        .sc-stock { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
        .sc-exch { font-size: 12px; opacity: 0.5; font-weight: 600; margin-top: 2px; margin-bottom: 12px; }
        .sc-row { display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
        .sc-metric { display: flex; flex-direction: column; }
        .sc-metric-label { font-size: 10px; opacity: 0.5; font-weight: 600; letter-spacing: .04em; }
        .sc-metric-value { font-size: 18px; font-weight: 800; }
        .sc-metric-value.green { color: #10b981; }
        .sc-metric-value.red { color: #ef4444; }
        .sc-sentiment-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 700;
            margin-bottom: 12px;
        }
        .sc-footer { font-size: 10px; opacity: 0.35; margin-top: 12px; }
        .share-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
        .share-action-btn {
            flex: 1;
            min-width: 100px;
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-color);
            color: var(--text-color);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s;
        }
        .share-action-btn:hover { background: var(--secondary-accent); color: white; border-color: var(--secondary-accent); }
        .share-action-btn.primary { background: var(--secondary-accent); color: white; border-color: var(--secondary-accent); }
        .share-action-btn.primary:hover { background: var(--primary-accent); border-color: var(--primary-accent); }

        /* Ã¢•ÂÃ¢•ÂÃ¢•Â FAVOURITES BAR Ã¢•ÂÃ¢•ÂÃ¢•Â */
        .fav-bar {
            margin-top: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .fav-label { font-size: 11px; font-weight: 700; opacity: 0.5; white-space: nowrap; }
        .fav-chip {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 5px 10px 5px 12px;
            background: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-color);
        }
        .fav-chip:hover { border-color: var(--secondary-accent); color: var(--secondary-accent); }
        .fav-chip .fav-remove {
            font-size: 10px;
            opacity: 0.5;
            margin-left: 2px;
            cursor: pointer;
            line-height: 1;
        }
        .fav-chip .fav-remove:hover { opacity: 1; color: #ef4444; }
        .fav-add-btn {
            background: none;
            border: 1px dashed var(--border-color);
            border-radius: 20px;
            padding: 5px 10px;
            font-size: 11px;
            cursor: pointer;
            color: var(--text-color);
            opacity: 0.65;
            transition: all 0.2s;
        }
        .fav-add-btn:hover { border-color: var(--secondary-accent); color: var(--secondary-accent); opacity: 1; }
        .fav-add-btn.is-fav { border-color: var(--gold); color: var(--gold); opacity: 1; }
        /* ── Tipping Competition — Dossier UI ── */
        .comp-dossier {
            border: 1px solid var(--border-color);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 16px;
            background: var(--bg-color);
        }
        .comp-dossier-top {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 16px;
            border-bottom: 1px solid var(--border-color);
            background: var(--secondary-bg);
            flex-wrap: wrap;
        }
        .comp-dossier-tag {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--primary-accent);
            background: rgba(46,194,126,0.1);
            border: 1px solid rgba(46,194,126,0.25);
            padding: 2px 8px;
            border-radius: 20px;
            flex-shrink: 0;
        }
        .comp-dossier-league { font-size: 13px; font-weight: 700; }
        .comp-dossier-sub { font-size: 11px; opacity: 0.4; }
        .comp-dossier-switch {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            font-weight: 600;
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            color: var(--text-color);
            opacity: 0.6;
            transition: opacity 0.15s, border-color 0.15s;
        }
        .comp-dossier-switch:hover { opacity: 1; border-color: var(--primary-accent); }
        .comp-dossier-mast {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 16px 12px;
        }
        .comp-dossier-left { flex: 1; min-width: 0; }
        .comp-dossier-overline {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            opacity: 0.4;
            margin-bottom: 5px;
        }
        h1.comp-dossier-round {
            font-size: 24px;
            font-weight: 800;
            line-height: 1.1;
            margin: 0 0 5px;
        }
        p.comp-dossier-blurb {
            font-size: 12px;
            opacity: 0.6;
            line-height: 1.5;
            margin: 0;
        }
        .comp-clock { text-align: center; flex-shrink: 0; min-width: 96px; }
        .comp-clock.shut { opacity: 0.45; }
        .comp-clock-lab {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            opacity: 0.4;
            margin-bottom: 5px;
        }
        .comp-clock-digits {
            display: flex;
            gap: 2px;
            justify-content: center;
            align-items: flex-end;
        }
        .comp-clock-unit { display: flex; flex-direction: column; align-items: center; gap: 1px; }
        .comp-clock-unit b { font-size: 19px; font-weight: 800; line-height: 1; }
        .comp-clock-unit small {
            font-size: 8px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            opacity: 0.4;
        }
        .comp-clock-unit.sep { font-size: 15px; font-weight: 800; opacity: 0.25; padding-bottom: 2px; }
        .comp-clock-when { font-size: 10px; opacity: 0.35; margin-top: 4px; }
        .comp-strip {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            border-top: 1px solid var(--border-color);
        }
        .comp-strip-cell {
            padding: 11px 14px;
            border-right: 1px solid var(--border-color);
            text-align: center;
        }
        .comp-strip-cell:last-child { border-right: none; }
        .comp-strip-num { font-size: 18px; font-weight: 800; line-height: 1; }
        .comp-strip-lab {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            opacity: 0.4;
            margin-top: 3px;
        }
        /* Section (CompSection) */
        .comp-section {
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: var(--bg-color);
            margin-bottom: 12px;
            overflow: hidden;
        }
        .comp-section-head {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            background: var(--secondary-bg);
        }
        .comp-section-idx {
            width: 22px; height: 22px;
            border-radius: 50%;
            background: rgba(46,194,126,0.1);
            border: 1px solid rgba(46,194,126,0.28);
            color: var(--primary-accent);
            font-size: 11px; font-weight: 800;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .comp-section-overline {
            font-size: 9px; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.4;
        }
        .comp-section-title { font-size: 14px; font-weight: 700; }
        .comp-section-action { margin-left: auto; }
        .comp-section-body { padding: 16px; }
        /* Feature fixture */
        .tip-feat {
            border: 1px solid rgba(245,158,11,0.28);
            border-radius: 8px;
            background: linear-gradient(135deg, rgba(245,158,11,0.04) 0%, transparent 60%);
            margin-bottom: 12px;
            overflow: hidden;
        }
        .tip-feat.tipped { border-color: rgba(46,194,126,0.32); background: linear-gradient(135deg,rgba(46,194,126,0.05) 0%,transparent 60%); }
        .tip-howto {
            font-size: 13px;
            line-height: 1.65;
            opacity: 0.6;
            margin: 0 0 16px;
            padding-left: 12px;
            border-left: 2px solid var(--primary-accent, #c87941);
        }
        .tip-feat-ribbon {
            display: flex; align-items: center; gap: 7px;
            padding: 8px 14px;
            background: rgba(245,158,11,0.07);
            border-bottom: 1px solid rgba(245,158,11,0.15);
            font-size: 11px; font-weight: 700; color: #d97706;
        }
        .tip-feat-ribbon i { font-size: 14px; }
        .tip-feat-blurb { font-size: 12px; opacity: 0.6; padding: 9px 14px 2px; line-height: 1.5; }
        /* Fixture body */
        .tip-fx-body { display: flex; align-items: stretch; padding: 12px; gap: 0; }
        /* Pick button */
        button.tip-side {
            flex: 1;
            background: var(--secondary-bg);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 11px 8px;
            cursor: pointer;
            text-align: center;
            color: var(--text-color);
            transition: border-color 0.15s, background 0.15s;
        }
        button.tip-side:hover { border-color: rgba(46,194,126,0.4); }
        button.tip-side.picked {
            border-color: var(--primary-accent);
            background: rgba(46,194,126,0.07);
        }
        .tip-side-tk { font-size: 13px; font-weight: 800; margin-bottom: 1px; }
        .tip-side-nm { font-size: 10px; opacity: 0.45; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .tip-side-px { font-size: 15px; font-weight: 800; line-height: 1; margin-bottom: 2px; }
        .tip-side-wk { font-size: 11px; font-weight: 600; margin-bottom: 5px; }
        .tip-side-wk.up { color: var(--primary-accent); }
        .tip-side-wk.dn { color: #ef4444; }
        .tip-side-form { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; margin-top: 3px; }
        .tip-vs {
            display: flex; align-items: center; justify-content: center;
            padding: 0 7px;
            font-size: 9px; font-weight: 800; opacity: 0.28;
            flex-shrink: 0;
        }
        .tip-vs.feat { font-size: 11px; }
        /* Margin slider */
        .tip-margin { padding: 9px 14px 13px; border-top: 1px solid var(--border-color); }
        .tip-margin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
        .tip-margin-lab { font-size: 11px; font-weight: 700; opacity: 0.6; display: flex; align-items: center; gap: 5px; }
        .tip-margin-val { font-size: 13px; font-weight: 800; color: var(--primary-accent); }
        input.tip-margin-slider { width: 100%; accent-color: var(--primary-accent); margin-bottom: 3px; cursor: pointer; }
        .tip-margin-scale { display: flex; justify-content: space-between; font-size: 9px; opacity: 0.3; font-weight: 600; }
        /* Regular fixture list */
        .tip-fx-list { display: flex; flex-direction: column; gap: 9px; }
        .tip-fx {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-color);
            overflow: hidden;
            transition: border-color 0.15s;
        }
        .tip-fx.tipped { border-color: rgba(46,194,126,0.28); }
        .tip-fx.banker { border-color: rgba(245,158,11,0.38); }
        /* Lock pressed with picks missing (_tipFlagMissing): outline what is left. */
        .tip-fx.tip-missing, .tip-feat.tip-missing { border-color: rgba(239,68,68,0.6); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); animation: tipMissingNudge .4s ease; }
        .tip-fx.tip-missing .tip-fx-n::after { content: ' \00b7  pick a side'; color: #dc2626; font-weight: 700; }
        .tip-missing-note { color: #dc2626; font-weight: 700; }
        button.tip-lockbtn.is-incomplete { opacity: .55; }
        @keyframes tipMissingNudge { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
        @media (prefers-reduced-motion: reduce) { .tip-fx.tip-missing, .tip-feat.tip-missing { animation: none; } }
        .tip-fx-head {
            display: flex; align-items: center; gap: 9px;
            padding: 7px 11px;
            border-bottom: 1px solid var(--border-color);
            background: var(--secondary-bg);
        }
        .tip-fx-n { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.4; flex-shrink: 0; }
        .tip-fx-split { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
        .tip-fx-split-bar { flex: 1; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; position: relative; }
        .tip-fx-split-a { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary-accent); border-radius: 2px; transition: width 0.3s; }
        .tip-fx-split-lab { font-size: 10px; opacity: 0.4; white-space: nowrap; flex-shrink: 0; }
        button.tip-banker {
            display: flex; align-items: center; gap: 3px;
            font-size: 10px; font-weight: 700;
            padding: 3px 7px; border-radius: 5px;
            border: 1px solid var(--border-color);
            background: transparent; color: var(--text-color);
            cursor: pointer; opacity: 0.4;
            transition: all 0.15s; flex-shrink: 0;
        }
        button.tip-banker:not(:disabled):hover { opacity: 0.85; border-color: #f59e0b; color: #f59e0b; }
        button.tip-banker.on { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.45); color: #d97706; opacity: 1; }
        button.tip-banker:disabled { cursor: not-allowed; }
        /* Lock bar */
        .tip-lockbar {
            margin-top: 14px;
            display: flex; align-items: center; gap: 12px;
            padding: 11px 14px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--secondary-bg);
        }
        .tip-lockbar.done { border-color: rgba(46,194,126,0.28); background: rgba(46,194,126,0.04); }
        .tip-lockbar-meta { flex: 1; font-size: 12px; opacity: 0.6; }
        button.tip-lockbtn { flex-shrink: 0; padding: 8px 18px; font-size: 13px; font-weight: 700; border-radius: 6px; border: none; cursor: pointer; }
        /* In-flight + confirmation states — locking the ballot is the biggest
           commitment in the comp and previously gave no feedback at all until a
           corner toast appeared. */
        button.tip-lockbtn:disabled { cursor: default; opacity: .75; }
        .tip-spin { display: inline-block; animation: tipSpin .8s linear infinite; }
        @keyframes tipSpin { to { transform: rotate(360deg); } }
        button.tip-lockbtn.is-success { animation: tipLockPop .6s cubic-bezier(0.34,1.56,0.64,1); }
        @keyframes tipLockPop { 40% { transform: scale(1.07); } }
        /* One-shot flourish across the ballot so the whole section acknowledges it */
        #comp-section-ballot.tip-just-locked {
            animation: tipLockedGlow 1.2s ease-out;
            border-radius: 12px;
        }
        @keyframes tipLockedGlow {
            0%   { box-shadow: 0 0 0 0 rgba(46,194,126,.35); }
            35%  { box-shadow: 0 0 26px 2px rgba(46,194,126,.28); }
            100% { box-shadow: 0 0 0 0 rgba(46,194,126,0); }
        }
        @media (prefers-reduced-motion: reduce) {
            .tip-spin, button.tip-lockbtn.is-success, #comp-section-ballot.tip-just-locked { animation: none; }
        }
        /* Ladder */
        .tip-ladder { width: 100%; border-collapse: collapse; font-size: 13px; }
        .tip-ladder-head th {
            text-align: left; padding: 0 8px 9px;
            font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.35;
        }
        .tip-ladder-head th:first-child { padding-left: 18px; }
        .tip-ladder-head th:last-child { padding-right: 18px; }
        .tip-ladder-head th.num { text-align: center; }
        .tip-ladder-row td { padding: 9px 8px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
        .tip-ladder-row td:first-child { padding-left: 18px; }
        .tip-ladder-row td:last-child { padding-right: 18px; }
        .tip-ladder-row:last-child td { border-bottom: none; }
        .tip-ladder-row.you td { background: rgba(46,194,126,0.04); }
        .tip-ladder-pos { font-size: 12px; font-weight: 800; opacity: 0.4; text-align: center; min-width: 26px; }
        .tip-ladder-user { display: flex; align-items: center; gap: 7px; min-width: 0; }
        .tip-ladder-av {
            width: 26px; height: 26px; border-radius: 50%;
            background: rgba(46,194,126,0.13); color: var(--primary-accent);
            display: flex; align-items: center; justify-content: center;
            font-size: 10px; font-weight: 800; flex-shrink: 0;
        }
        .tip-ladder-name { font-weight: 600; }
        .tip-ladder-youtag {
            font-size: 9px; font-weight: 800; color: var(--primary-accent);
            background: rgba(46,194,126,0.1); border: 1px solid rgba(46,194,126,0.22);
            padding: 1px 5px; border-radius: 10px; flex-shrink: 0;
        }
        .tip-num { text-align: center; font-weight: 700; }
        .tip-ladder-rd { font-size: 11px; color: var(--primary-accent); font-weight: 700; text-align: center; }
        .tip-ladder-total { font-size: 14px; font-weight: 800; text-align: center; }
        .form-col { display: flex; gap: 3px; }
        .tip-form-dot {
            width: 14px; height: 14px; border-radius: 50%;
            font-size: 8px; font-weight: 800;
            display: flex; align-items: center; justify-content: center; color: #fff;
        }
        .tip-form-dot.w { background: var(--primary-accent); }
        .tip-form-dot.l { background: #ef4444; }
        .tip-form-dot.d { background: #6b7280; }
        /* Momentum label (replaces form dots on pick buttons) */
        /* Previous 3 weeks indicator on pick buttons */
        .tip-side-prev { display: flex; gap: 3px; justify-content: center; margin-top: 5px; }
        .tip-prev-week {
            font-size: 10px; font-weight: 700;
            padding: 2px 5px; border-radius: 3px;
        }
        .tip-prev-week.up   { color: var(--primary-accent); background: rgba(46,194,126,0.1); }
        .tip-prev-week.dn   { color: #ef4444; background: rgba(239,68,68,0.1); }
        .tip-prev-week.flat { color: var(--text-color); opacity: 0.38; background: var(--secondary-bg); }
        .tip-prev-lab { font-size: 9px; opacity: 0.3; text-align: center; margin-top: 2px; letter-spacing: 0.3px; }
        /* Feature fixture split bar */
        .tip-feat-split {
            display: flex; align-items: center; gap: 8px;
            padding: 7px 14px;
            border-bottom: 1px solid rgba(245,158,11,0.12);
            font-size: 10px; opacity: 0.55;
        }
        .tip-feat-split-bar {
            flex: 1; height: 4px; background: var(--border-color);
            border-radius: 2px; overflow: hidden; position: relative;
        }
        .tip-feat-split-a { position: absolute; left:0; top:0; bottom:0; background: var(--primary-accent); border-radius: 2px; }
        .tip-feat-split-b { position: absolute; right:0; top:0; bottom:0; background: rgba(239,68,68,0.5); border-radius: 2px; }
        /* Scope toggle */
        .comp-scope { display: flex; gap: 3px; padding: 3px; background: var(--secondary-bg); border-radius: 7px; }
        .comp-scope-btn {
            padding: 4px 13px; font-size: 12px; font-weight: 700;
            border: none; border-radius: 5px;
            background: transparent; color: var(--text-color);
            cursor: pointer; opacity: 0.5; transition: all 0.15s;
        }
        .comp-scope-btn.on { background: var(--bg-color); opacity: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
        /* Form + rival */
        .comp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
        @media (max-width: 560px) { .comp-form-row { grid-template-columns: 1fr; } }
        .comp-rounds-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; opacity: 0.65; }
        .comp-rounds-avg { font-size: 11px; font-weight: 600; color: var(--primary-accent); opacity: 1; }
        .comp-rounds-bars { display: flex; align-items: flex-end; gap: 4px; height: 68px; }
        .comp-round-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
        .comp-round-col.live .comp-round-bar { background: rgba(46,194,126,0.35); border-color: rgba(46,194,126,0.45); }
        .comp-round-bar {
            width: 100%; background: var(--secondary-bg); border: 1px solid var(--border-color);
            border-radius: 3px 3px 0 0; position: relative;
            display: flex; align-items: flex-start; justify-content: center;
            min-height: 4px; transition: height 0.4s;
        }
        .comp-round-bar.pending { opacity: 0.28; }
        .comp-round-pts { font-size: 8px; font-weight: 800; opacity: 0.6; padding: 2px 0; }
        .comp-round-r { font-size: 9px; opacity: 0.32; font-weight: 600; }
        .comp-rival { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
        .comp-rival-head {
            display: flex; align-items: center; gap: 7px;
            padding: 9px 13px; border-bottom: 1px solid var(--border-color);
            font-size: 12px; font-weight: 700; background: var(--secondary-bg);
        }
        .comp-rival-vs { display: flex; align-items: stretch; padding: 13px; gap: 10px; }
        .comp-rival-side { flex: 1; text-align: center; }
        .comp-rival-side-av {
            width: 34px; height: 34px; border-radius: 50%;
            background: rgba(46,194,126,0.12); color: var(--primary-accent);
            display: flex; align-items: center; justify-content: center;
            font-size: 13px; font-weight: 800; margin: 0 auto 5px;
        }
        .comp-rival-side-nm { font-size: 12px; font-weight: 700; }
        .comp-rival-side-pts { font-size: 19px; font-weight: 800; color: var(--primary-accent); line-height: 1.1; margin-top: 3px; }
        .comp-rival-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; }
        .comp-rival-mid-vs { font-size: 9px; font-weight: 800; opacity: 0.22; }
        .comp-rival-mid-rec { font-size: 11px; opacity: 0.45; white-space: nowrap; }
        .comp-rival-foot { padding: 8px 13px; border-top: 1px solid var(--border-color); font-size: 11px; opacity: 0.45; text-align: center; }
        /* Trophy */
        .comp-trophy { display: flex; align-items: flex-start; gap: 16px; }
        .comp-trophy-glyph { font-size: 38px; color: #f59e0b; flex-shrink: 0; line-height: 1; }
        .comp-trophy-body { flex: 1; }
        .comp-trophy-name { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
        .comp-trophy-desc { font-size: 12px; opacity: 0.6; line-height: 1.55; margin-bottom: 12px; }
        .comp-trophy-pod { display: flex; gap: 7px; flex-wrap: wrap; }
        .comp-pod {
            display: flex; align-items: center; gap: 5px;
            padding: 6px 11px; border-radius: 7px;
            font-size: 12px; font-weight: 700; border: 1px solid;
        }
        .comp-pod.gold   { background: rgba(245,158,11,0.07);  border-color: rgba(245,158,11,0.28);  color: #d97706; }
        .comp-pod.silver { background: rgba(148,163,184,0.07); border-color: rgba(148,163,184,0.28); color: #94a3b8; }
        .comp-pod.bronze { background: rgba(180,116,89,0.07);  border-color: rgba(180,116,89,0.28);  color: #b47459; }
        .comp-trophy-countdown { margin-top: 13px; font-size: 11px; opacity: 0.42; }
        .comp-trophy-countdown b { color: var(--text-color); opacity: 1; font-weight: 800; }

        /* ── Tipping Resolution Results ── */
        .tip-results-banner {
            display: flex; align-items: center; gap: 14px;
            padding: 13px 16px;
            background: rgba(46,194,126,0.06);
            border: 1px solid rgba(46,194,126,0.2);
            border-radius: 8px; margin-bottom: 14px;
        }
        .tip-results-score { font-size: 30px; font-weight: 800; line-height: 1; color: var(--primary-accent); flex-shrink: 0; }
        .tip-results-score span { font-size: 13px; opacity: 0.6; margin-left: 2px; font-weight: 600; }
        .tip-results-summary { font-size: 13px; opacity: 0.7; line-height: 1.5; }
        .tip-result-fx { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; margin-bottom: 9px; }
        .tip-result-fx.feat { border-color: rgba(245,158,11,0.25); }
        .tip-result-fx-head {
            display: flex; align-items: center; gap: 10px;
            padding: 7px 11px;
            background: var(--secondary-bg); border-bottom: 1px solid var(--border-color);
        }
        .tip-result-draw-badge { font-size: 10px; font-weight: 700; opacity: 0.4; margin-left: auto; }
        .tip-result-sides { display: flex; align-items: stretch; }
        .tip-result-side { flex: 1; padding: 11px 8px; text-align: center; position: relative; }
        .tip-result-side.win  { background: rgba(46,194,126,0.05); }
        .tip-result-side.loss { background: var(--secondary-bg); opacity: 0.7; }
        .tip-result-side.draw { background: var(--secondary-bg); opacity: 0.6; }
        .tip-result-badge {
            position: absolute; top: 5px; right: 5px;
            width: 17px; height: 17px; border-radius: 50%;
            font-size: 9px; font-weight: 800;
            display: flex; align-items: center; justify-content: center;
        }
        .tip-result-badge.win  { background: var(--primary-accent); color: #fff; }
        .tip-result-badge.loss { background: #ef4444; color: #fff; }
        .tip-result-tk  { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
        .tip-result-chg { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
        .tip-result-chg.up { color: var(--primary-accent); }
        .tip-result-chg.dn { color: #ef4444; }
        .tip-result-pick { font-size: 10px; font-weight: 700; display: block; margin-top: 2px; }
        .tip-result-pick.correct { color: var(--primary-accent); }
        .tip-result-pick.wrong   { color: #ef4444; }
        .tip-result-margin {
            padding: 8px 13px; border-top: 1px solid var(--border-color);
            font-size: 11px; opacity: 0.65; line-height: 1.6;
        }
        .tip-result-margin strong { opacity: 1; font-weight: 700; }
        .tip-result-margin .bonus { color: var(--primary-accent); font-weight: 700; opacity: 1; }

        /* ── Mobile overrides (≤480px) ───────────────────────────────────── */
        @media (max-width: 480px) {
            /* Tipping comp pick buttons — stack side-by-side but shrink gracefully */
            .tip-fx-body { padding: 8px; gap: 0; }
            button.tip-side { padding: 9px 5px; }
            .tip-side-tk { font-size: 12px; }
            .tip-side-nm { font-size: 9px; }
            .tip-side-px { font-size: 13px; }

            /* Fixture row head — hide split bar label on very small screens */
            .tip-fx-split-lab { display: none; }

            /* Dossier strip — 2×2 grid on mobile */
            .comp-strip { grid-template-columns: repeat(2, 1fr); }
            .comp-strip-cell:nth-child(2) { border-right: none; }

            /* Form + rival — single column already handled by media query in CSS */

            /* Dossier clock — hide on very small screens, info is in strip */
            .comp-clock { display: none; }

            /* Ensure all buttons meet 44px minimum tap target height */
            .btn-primary, .btn-secondary, .submit-btn,
            button.tip-side, .comp-scope-btn, .comp-dossier-switch,
            .sentiment-nav-item, .filter-btn {
                min-height: 44px;
            }

            /* Comp section head — tighten on mobile */
            .comp-section-head { padding: 10px 12px; }
            .comp-section-body { padding: 12px; }

            /* Modal content — full width on small phones */
            .modal-content { width: 96% !important; margin: 0 2%; }
        }

        /* ── Sentiment Flow ───────────────────────────────────────────────── */
        .sf-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 18px;
            padding-top: 20px;
        }
        .sf-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .sf-count-chip {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 20px;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            color: var(--text-color);
            opacity: 0.7;
            letter-spacing: .03em;
        }
        .sf-updated-chip {
            font-size: 10px;
            opacity: 0.35;
            letter-spacing: .03em;
        }
        .sf-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .sf-pills { display: flex; gap: 5px; flex-wrap: wrap; }
        .sf-pill {
            padding: 5px 12px;
            border-radius: 20px;
            border: 1px solid var(--border-color);
            background: transparent;
            color: var(--text-color);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all .15s;
            opacity: 0.65;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .sf-pill:hover { opacity: 1; border-color: var(--primary-accent); color: var(--primary-accent); }
        .sf-pill.active {
            background: var(--primary-accent);
            border-color: var(--primary-accent);
            color: #fff;
            opacity: 1;
        }
        .sf-right-controls { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
        .sf-search-wrap { position: relative; }
        .sf-search {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-color);
            font-size: 12px;
            padding: 6px 10px 6px 28px;
            width: 140px;
            outline: none;
            transition: border-color .15s;
        }
        .sf-search:focus { border-color: var(--primary-accent); }
        .sf-sort-select {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-color);
            font-size: 11px;
            padding: 6px 10px;
            outline: none;
            cursor: pointer;
        }

        /* Grid */
        .sf-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
            gap: 7px;
        }

        /* Tile */
        .sf-tile {
            padding: 10px 11px 9px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            cursor: pointer;
            position: relative;
            transition: border-color .15s, transform .12s;
            overflow: hidden;
        }
        .sf-tile::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 3px;
        }
        .sf-tile:hover { transform: translateY(-1px); }
        .sf-tile:hover .sf-tile-symbol { color: var(--primary-accent); }

        /* Conviction colour bands */
        .sf-tile[data-conv="strong-bull"] { background: rgba(46,194,126,0.10); }
        .sf-tile[data-conv="strong-bull"]::before { background: #2ec27e; }
        .sf-tile[data-conv="strong-bull"]:hover { border-color: #2ec27e; }

        .sf-tile[data-conv="mild-bull"] { background: rgba(46,194,126,0.05); }
        .sf-tile[data-conv="mild-bull"]::before { background: rgba(46,194,126,0.5); }
        .sf-tile[data-conv="mild-bull"]:hover { border-color: rgba(46,194,126,0.6); }

        .sf-tile[data-conv="split"] { background: rgba(100,116,139,0.07); }
        .sf-tile[data-conv="split"]::before { background: #475569; }
        .sf-tile[data-conv="split"]:hover { border-color: #64748b; }

        .sf-tile[data-conv="mild-bear"] { background: rgba(239,68,68,0.05); }
        .sf-tile[data-conv="mild-bear"]::before { background: rgba(239,68,68,0.5); }
        .sf-tile[data-conv="mild-bear"]:hover { border-color: rgba(239,68,68,0.6); }

        .sf-tile[data-conv="strong-bear"] { background: rgba(239,68,68,0.10); }
        .sf-tile[data-conv="strong-bear"]::before { background: #ef4444; }
        .sf-tile[data-conv="strong-bear"]:hover { border-color: #ef4444; }

        .sf-tile-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 7px; }
        .sf-tile-symbol {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: -.01em;
            color: var(--text-color);
            line-height: 1;
            transition: color .15s;
        }
        .sf-tile-exch {
            font-size: 9px;
            font-weight: 700;
            letter-spacing: .06em;
            text-transform: uppercase;
            padding: 2px 5px;
            border-radius: 4px;
            line-height: 1.4;
            flex-shrink: 0;
        }
        .sf-exch-asx    { background: rgba(46,194,126,0.15); color: #2ec27e; }
        .sf-exch-nasdaq { background: rgba(59,130,246,0.15); color: #60a5fa; }
        .sf-exch-crypto { background: rgba(245,158,11,0.15); color: #f59e0b; }
        .sf-exch-commodity { background: rgba(168,85,247,0.15); color: #c084fc; }
        .sf-exch-other  { background: rgba(100,116,139,0.15); color: #94a3b8; }

        .sf-tile-name {
            font-size: 10px;
            opacity: 0.4;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 8px;
            line-height: 1.2;
        }

        /* Sentiment bar */
        .sf-bar-wrap { margin-bottom: 5px; }
        .sf-bar-nums {
            display: flex;
            justify-content: space-between;
            margin-bottom: 3px;
        }
        .sf-bar-nums span { font-size: 10px; font-weight: 700; }
        .sf-bar-track {
            height: 4px;
            border-radius: 2px;
            background: rgba(239,68,68,0.3);
            overflow: hidden;
        }
        .sf-bar-fill {
            height: 100%;
            border-radius: 2px;
            background: #2ec27e;
            transition: width .4s ease;
        }
        .sf-tile-footer {
            font-size: 9px;
            opacity: 0.35;
            letter-spacing: .03em;
            text-transform: uppercase;
            margin-top: 4px;
        }

        /* Skeleton */
        .sf-skeleton {
            height: 100px;
            border-radius: 8px;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }
        .sf-skeleton::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
            animation: sfShimmer 1.4s ease infinite;
            background-size: 200% 100%;
        }
        @keyframes sfShimmer {
            0%   { background-position: -200% 0; }
            100% { background-position:  200% 0; }
        }

        @media (max-width: 900px) {
            .sf-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
        }
        @media (max-width: 600px) {
            .sf-grid { grid-template-columns: repeat(2, 1fr); }
            .sf-right-controls { margin-left: 0; width: 100%; }
            .sf-search { width: 100%; }
        }
        /* ── End Sentiment Flow ────────────────────────────────────────────── */

    

/* Hover opacities that were onmouseover/onmouseout (CSP phase 2, 2026-10-08).
   The resting opacity is inline, so the hover needs !important. */
.sn-hov-full:hover { opacity: 1 !important; }
.sn-hov-mid:hover  { opacity: .7 !important; }
.sn-hov-high:hover { opacity: .8 !important; }

.sn-hov-lock:hover { opacity: 1 !important; }   /* locked strategy tile, was onmouseover (stage 3) */
