/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --bg: #ffffff;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    --bg-hover-strong: rgba(0, 0, 0, 0.06);
    --bg-subtle: rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 1);
    --glass-2: rgba(255, 255, 255, 1);
    --border: rgba(0, 0, 0, 0.1);
    --border-hi: rgba(0, 0, 0, 0.22);
    --border-light: rgba(0, 0, 0, 0.06);
    --text: #1a1a1a;
    --text-secondary: #374151;
    --muted: #6b7280;
    --accent: #0070f3;
    --accent-2: #7c3aed;
    --green: #16a34a;
    --red: #dc2626;
    --warn: #d97706;
    --radius: 18px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --pill-bg: rgba(0, 0, 0, 0.05);
    --pill-border: rgba(0, 0, 0, 0.12);
    --pill-text: #374151;
    --toggle-bg: rgba(0, 0, 0, 0.12);
    --toggle-knob: linear-gradient(135deg, #e5e7eb, #d1d5db);
    --modal-backdrop: rgba(0, 0, 0, 0.4);
    --modal-bg: #ffffff;
    --modal-border: rgba(0, 0, 0, 0.1);
    --modal-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg: #0b0e11;
    --bg-surface: #12151a;
    --bg-card: #12151a;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-hover-strong: rgba(255, 255, 255, 0.07);
    --bg-subtle: rgba(255, 255, 255, 0.05);
    --glass: rgba(18, 21, 26, 1);
    --glass-2: rgba(18, 21, 26, 1);
    --border: rgba(255, 255, 255, 0.06);
    --border-hi: rgba(255, 255, 255, 0.12);
    --border-light: rgba(255, 255, 255, 0.04);
    --text: #e8eaed;
    --text-secondary: #8b949e;
    --muted: #6e7681;
    --accent: #58a6ff;
    --accent-2: #a78bfa;
    --green: #22c55e;
    --red: #ef4444;
    --warn: #f59e0b;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    --pill-bg: rgba(255, 255, 255, 0.05);
    --pill-border: rgba(255, 255, 255, 0.08);
    --pill-text: #8b949e;
    --toggle-bg: rgba(255, 255, 255, 0.18);
    --toggle-knob: linear-gradient(135deg, #8b949e, #6e7681);
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --modal-bg: #161b22;
    --modal-border: rgba(255, 255, 255, 0.06);
    --modal-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    -webkit-tap-highlight-color: transparent;
}

.seo-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Dark mode toggle ──────────────────────────────────────── */
.dark-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}
.dark-mode-toggle:hover {
    background: var(--bg-hover-strong);
    transform: scale(1.05);
}
.dm-icon { display: block; }
.dm-icon-sun { display: none; }
[data-theme="dark"] .dm-icon-moon { display: none; }
[data-theme="dark"] .dm-icon-sun { display: block; }

/* ── Logo theme swap ───────────────────────────────────────── */
.brand-logo--dark { display: none; }
.anoncoin-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: inline-block; }
[data-theme="dark"] .anoncoin-logo--light { display: none; }
[data-theme="dark"] .anoncoin-logo--dark { display: inline-block; }

/* ── First-load overlay (heartbeat logo) ───────────────────── */
.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: opacity 0.35s ease;
}
.app-loading-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.app-loading-logo {
    width: 120px;
    height: auto;
}
.app-loading-logo--dark { display: none; }
[data-theme="dark"] .app-loading-logo--light { display: none; }
[data-theme="dark"] .app-loading-logo--dark { display: inline-block; }
.app-loading-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: app-loading-heartbeat 2.2s ease-in-out infinite;
    transform-origin: center center;
}
.app-loading-powered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: -14px;
    opacity: 0.9;
}
.app-loading-powered-text {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    text-transform: lowercase;
}
.app-loading-anoncoin {
    height: 22px;
    width: auto;
}
.app-loading-anoncoin--dark { display: none; }
[data-theme="dark"] .app-loading-anoncoin--light { display: none; }
[data-theme="dark"] .app-loading-anoncoin--dark { display: inline-block; }
@keyframes app-loading-heartbeat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.12); }
    50%      { transform: scale(0.96); }
    75%      { transform: scale(1.08); }
}

/* ── Dark mode component overrides ─────────────────────────── */
[data-theme="dark"] .market-marquee {
    background: var(--bg-surface);
    border-bottom-color: var(--border);
}
[data-theme="dark"] .market-marquee .ticker-price { color: var(--text); }
[data-theme="dark"] .market-marquee .ticker-name { color: var(--muted); }

[data-theme="dark"] .tweet-table thead {
    background: rgba(255, 255, 255, 0.03);
}
[data-theme="dark"] .tweet-table th {
    color: var(--text-secondary);
}
[data-theme="dark"] .tweet-table td {
    border-top-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .tweet-table th.sorted,
[data-theme="dark"] .tweet-table th.sortable:hover {
    color: #60a5fa;
}
[data-theme="dark"] #tweetTable tbody tr:hover {
    background: var(--bg-hover) !important;
}
[data-theme="dark"] .row-summary-title { color: var(--text); }
[data-theme="dark"] .row-summary-why { color: var(--muted); }

[data-theme="dark"] .cat-scroll { background: transparent; }
[data-theme="dark"] .cat-btn {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .cat-btn.active {
    color: #fff;
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.4);
}

[data-theme="dark"] .top-row { border-bottom-color: var(--border); }
[data-theme="dark"] .powered-by { color: var(--muted); }

[data-theme="dark"] .globe-activity-row { border-color: var(--border); }
[data-theme="dark"] .feed-activity-card { background: var(--bg-surface); border-color: var(--border); }

[data-theme="dark"] .toast.toast-ok { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .toast.toast-err { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); }
[data-theme="dark"] .toast.toast-info { background: rgba(59, 143, 246, 0.1); border-color: rgba(59, 143, 246, 0.25); }

[data-theme="dark"] .live-modal-content,
[data-theme="dark"] .screencast-modal-inner {
    background: var(--modal-bg);
    border-color: var(--modal-border);
    box-shadow: var(--modal-shadow);
}
[data-theme="dark"] .live-modal-content .modal-title { color: var(--text); }

[data-theme="dark"] .bm-modal-inner {
    background: var(--modal-bg);
    border-color: var(--modal-border);
    box-shadow: var(--modal-shadow);
}
[data-theme="dark"] .bm-modal-input {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text);
}
[data-theme="dark"] .bm-modal-label { color: var(--text-secondary); }

[data-theme="dark"] .exclude-elon-toggle .toggle-slider {
    background: var(--toggle-bg);
}
[data-theme="dark"] .exclude-elon-toggle .toggle-slider::after {
    background: var(--toggle-knob);
}
[data-theme="dark"] .exclude-elon-toggle input:checked + .toggle-slider::after {
    background: #fff;
}

[data-theme="dark"] .breaking-banner {
    background: var(--bg-surface);
    border-color: var(--border);
}
[data-theme="dark"] .breaking-banner .breaking-label { color: var(--red); }

[data-theme="dark"] .bookmark-disclaimer { color: #6b7280; }
[data-theme="dark"] .spike-arc-bg { stroke: rgba(255, 255, 255, 0.1) !important; }
[data-theme="dark"] .spike-value-text { fill: var(--text); }
[data-theme="dark"] .spike-sublabel-text { fill: var(--muted); }

[data-theme="dark"] .col-rank { color: var(--muted); }
[data-theme="dark"] .view-link { color: var(--accent); }
[data-theme="dark"] .share-btn {
    background: linear-gradient(135deg, #1d8cf8 0%, #0066dd 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(29, 140, 248, 0.3);
}
[data-theme="dark"] #tweetModalClose { color: #9ca3af !important; }
[data-theme="dark"] #tweetModalClose:hover { color: #e5e7eb !important; }
[data-theme="dark"] .empty-cell { color: var(--muted); }
[data-theme="dark"] .ticker-pill {
    color: var(--pill-text);
    background: var(--pill-bg);
    border-color: var(--pill-border);
}

/* Breaking cards */
[data-theme="dark"] .breaking-card {
    background: var(--bg-surface);
    border-color: var(--border);
}
[data-theme="dark"] .breaking-card:hover {
    background: var(--bg-hover-strong);
    border-color: var(--border-hi);
}

/* Globe */
[data-theme="dark"] .globe-hero {
    background: linear-gradient(180deg, rgba(88, 166, 255, 0.04), rgba(11, 14, 17, 0));
}
/* Dark mode fullscreen: force solid background so page content behind
   the overlay does not bleed through (overrides the gradient above which
   has higher specificity than .globe-hero-fs alone). */
[data-theme="dark"] .globe-hero-fs,
[data-theme="dark"] .globe-hero:fullscreen,
[data-theme="dark"] .globe-hero:-webkit-full-screen {
    background: var(--bg);
}
[data-theme="dark"] .globe-legend {
    background: rgba(18, 21, 26, 0.9);
}
[data-theme="dark"] .globe-rotate-toggle {
    background: rgba(18, 21, 26, 0.9);
}
[data-theme="dark"] .globe-zoom-btn {
    background: var(--bg-surface);
    border-color: var(--border);
    color: var(--text);
}
[data-theme="dark"] .globe-zoom-btn:hover {
    background: var(--bg-hover-strong);
}
[data-theme="dark"] .globe-hover-card {
    background: var(--bg-surface);
    box-shadow: var(--shadow);
}
[data-theme="dark"] .ghc-headline { color: var(--text); }
[data-theme="dark"] .ghc-region { color: var(--muted); }

/* Category pulse */
[data-theme="dark"] .category-pulse {
    background: rgba(18, 21, 26, 0.9);
}

/* Feed activity card */
[data-theme="dark"] .feed-activity {
    background: var(--bg-surface);
    border-color: var(--border);
}
[data-theme="dark"] .feed-activity-title { color: var(--text); }
[data-theme="dark"] .activity-stat-value { color: var(--text); }
[data-theme="dark"] .activity-stat-label { color: var(--muted); }

/* Buttons */
[data-theme="dark"] .btn-ghost {
    background: var(--bg-hover);
}
[data-theme="dark"] .btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover-strong);
}

/* Modals */
[data-theme="dark"] .live-modal-content {
    background: var(--modal-bg);
    border-color: var(--modal-border);
    box-shadow: var(--modal-shadow);
}
[data-theme="dark"] .modal-title { color: var(--text); }
[data-theme="dark"] .modal-meta { color: var(--muted); }
[data-theme="dark"] .modal-body { color: var(--text); }
[data-theme="dark"] .modal-detail-label { color: var(--muted); }
[data-theme="dark"] .modal-detail-value { color: var(--text); }

/* Table specifics */
[data-theme="dark"] .row-avatar--empty {
    background: var(--bg-hover-strong);
    color: var(--muted);
}
[data-theme="dark"] .col-posted { color: var(--muted); }
[data-theme="dark"] .coin-cta {
    color: var(--accent);
}

/* Marquee */
[data-theme="dark"] .market-marquee-items span:not(.market-change) { color: var(--text); }
[data-theme="dark"] .breaking-card-empty { color: var(--muted); }

/* Bg orbs — dim them in dark mode */
[data-theme="dark"] .bg-canvas { opacity: 0.15; }

/* Screencast modal */
[data-theme="dark"] .screencast-modal-inner {
    background: var(--modal-bg);
}

/* Table borders and separators */
[data-theme="dark"] .table-wrap {
    border-color: var(--border);
}

/* ── Animated background orbs ──────────────────────────────── */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: none;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, #00b4ff, transparent 70%);
    top: -200px;
    left: -200px;
    animation-duration: 20s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    top: 30%;
    right: -150px;
    animation-duration: 25s;
    animation-delay: -8s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0d6efd, transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-duration: 22s;
    animation-delay: -4s;
}

@keyframes orbDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(40px, 30px) scale(1.08);
    }

    100% {
        transform: translate(-20px, 50px) scale(0.96);
    }
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px 60px;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.top-title-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 260px;
}

.top-title-wrap .brand-sub {
    margin-top: 4px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
}

.live-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.live-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #16a34a;
    text-transform: uppercase;
}

.icon-refresh-btn {
    border: 1px solid var(--border-hi);
    background: linear-gradient(135deg, #0070f3, #00b4ff);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 112, 243, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.icon-refresh-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 180, 255, 0.45);
}

.icon-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.last-sync-wrap {
    font-size: 13px;
    color: var(--muted);
}

.last-sync-time {
    color: var(--text);
    font-weight: 600;
}

.col-cat {
    min-width: 90px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pill-text);
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
}


.ticker-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5b5cf0;
    background: rgba(91, 92, 240, 0.08);
    border: 1px solid rgba(91, 92, 240, 0.25);
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

.row-avatar--square {
    border-radius: 6px !important;
}

.coin-cta {
    color: #5b5cf0 !important;
}

@media (max-width: 700px) {
    .top-row {
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .top-title-wrap {
        min-width: 0;
        flex: 1 1 auto;
        gap: 2px;
    }

    .brand-logo {
        height: 58px;
    }

    .live-indicator {
        padding: 4px 10px;
        gap: 6px;
    }

    .live-text {
        font-size: 11px;
    }

    .powered-by-wrap {
        gap: 6px;
        white-space: nowrap;
    }

    .powered-by {
        font-size: 12px;
    }

    .anoncoin-logo {
        height: 34px;
        margin-left: -3px;
    }

    .metrics-toolbar {
        margin-left: auto;
    }
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 0 12px #00b4ff88);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 12px #00b4ff66);
    }

    50% {
        filter: drop-shadow(0 0 22px #00b4ffcc);
    }
}

.brand-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #ff6ec7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.brand-logo {
    height: 72px;
    width: auto;
}

.powered-by {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.powered-by-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.anoncoin-logo {
    height: 52px;
    width: auto;
    margin-left: -6px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #0070f3, #00b4ff);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 112, 243, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 180, 255, 0.55);
}

.btn-ghost {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-hi);
}

.btn-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Status badge ───────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.idle {
    background: rgba(90, 130, 160, 0.15);
    border-color: rgba(90, 130, 160, 0.3);
    color: var(--muted);
}

.status-badge.idle .status-dot {
    background: var(--muted);
}

.status-badge.running {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--warn);
}

.status-badge.running .status-dot {
    background: var(--warn);
    animation: blink 0.9s ease-in-out infinite;
}

.status-badge.done {
    background: rgba(34, 215, 138, 0.12);
    border-color: rgba(34, 215, 138, 0.4);
    color: var(--green);
}

.status-badge.done .status-dot {
    background: var(--green);
}

.status-badge.error {
    background: rgba(255, 77, 109, 0.12);
    border-color: rgba(255, 77, 109, 0.4);
    color: var(--red);
}

.status-badge.error .status-dot {
    background: var(--red);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.75);
    }
}

/* ── Stats row ──────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hi);
    box-shadow: 0 0 0 1px rgba(0, 180, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 26px;
    line-height: 1;
    opacity: 0.8;
}

.stat-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 4px;
}

.stat-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.stat-val--sm {
    font-size: 14px;
    font-weight: 600;
}

/* ── Toolbar ────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cat-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Native dropdown — used in place of chips on mobile */
.cat-select {
    display: none;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--border);
    outline: none;
    border-radius: 999px;
    padding: 6px 22px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 11px 11px;
    width: auto;
}

.cat-select:focus,
.cat-select:focus-visible,
.table-sort-mobile .sort-select:focus,
.table-sort-mobile .sort-select:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

@media (max-width: 640px) {
    .cat-scroll { display: none !important; }
    .cat-select { display: inline-block; }
}

.cat-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.03);
    color: var(--muted);
    transition: all 0.18s ease;
}

.cat-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-hi);
}

.cat-btn.active {
    background: rgba(0, 112, 243, 0.1);
    border-color: rgba(0, 112, 243, 0.35);
    color: #0070f3;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.2s;
}

.search-wrap:focus-within {
    border-color: var(--border-hi);
    box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.08);
}

.search-icon {
    font-size: 16px;
    color: var(--muted);
    user-select: none;
}

.search-input {
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text);
    width: 200px;
}

.search-input::placeholder {
    color: var(--muted);
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
    display: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
    animation: slideIn 0.25s ease;
}

.toast.show {
    display: block;
}

.toast.toast-ok {
    background: rgba(34, 215, 138, 0.1);
    border-color: rgba(34, 215, 138, 0.3);
    color: var(--green);
}

.toast.toast-err {
    background: rgba(255, 77, 109, 0.1);
    border-color: rgba(255, 77, 109, 0.3);
    color: var(--red);
}

.toast.toast-info {
    background: rgba(0, 180, 255, 0.08);
    border-color: rgba(0, 180, 255, 0.25);
    color: var(--accent);
}

/* ── Breaking News Banner ────────────────────────────────── */
.breaking-banner {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 420px;
    max-width: 700px;
    padding: 16px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.97), rgba(30, 15, 25, 0.97));
    border: 1px solid rgba(255, 50, 50, 0.4);
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.25), 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
}

.breaking-banner.show {
    top: 20px;
    opacity: 1;
    pointer-events: auto;
}

.breaking-banner .bb-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}

.breaking-banner .bb-close:hover {
    color: #fff;
}

.breaking-banner .bb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.breaking-banner .bb-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b3b;
    animation: bbPulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 59, 59, 0.6);
}

.breaking-banner .bb-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ff5555;
}

.breaking-banner .bb-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
}

.breaking-banner .bb-headline {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.breaking-banner .bb-source {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 6px;
}

.breaking-banner .bb-count {
    display: inline-block;
    background: rgba(255, 59, 59, 0.15);
    color: #ff6b6b;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
}

@keyframes bbPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

@media (max-width: 640px) {
    .breaking-banner {
        left: 12px;
        right: 12px;
        transform: none;
        min-width: 0;
        max-width: none;
        padding: 12px 16px;
        border-radius: 12px;
    }

    .breaking-banner.show {
        top: 12px;
    }

    .breaking-banner .bb-close {
        top: 8px;
        right: 10px;
        font-size: 18px;
    }

    .breaking-banner .bb-header {
        margin-bottom: 6px;
        gap: 8px;
    }

    .breaking-banner .bb-headline {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .breaking-banner .bb-source {
        font-size: 11px;
        margin-top: 4px;
    }

    .breaking-banner .bb-count {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 4px;
    }
}

/* Flash the table border when new breaking data arrives */
@keyframes breakingFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 4px rgba(255, 59, 59, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0);
    }
}

.table-flash {
    animation: breakingFlash 1.5s ease-out 2;
}

/* New breaking row slide-in + glow */
.row-breaking-new {
    animation: rowSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.row-breaking-new td {
    background: rgba(255, 59, 59, 0.08) !important;
    transition: background 1.5s ease;
}

@keyframes rowSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    40% {
        opacity: 1;
        transform: translateY(2px);
    }

    60% {
        transform: translateY(-1px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Global market marquee ────────────────────────────────── */
.market-marquee {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 8px 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 100;
}

.market-marquee-label {
    display: none;
}

.market-marquee-items {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
}

.market-track {
    display: flex;
    gap: 0;
    width: max-content;
    animation: tickerScroll 24s linear infinite;
    will-change: transform;
}

.market-track:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.market-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    white-space: nowrap;
    font-size: 13px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.market-symbol {
    color: var(--text);
    font-weight: 700;
}

.market-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.market-price {
    color: #374151;
    font-weight: 600;
}

.market-change {
    font-weight: 700;
    font-size: 12px;
}

.market-change.up {
    color: var(--green);
}

.market-change.down {
    color: var(--red);
}

.market-coin-tag {
    color: #ffd166;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Breaking news cards ────────────────────────────────────── */
.breaking-cards-wrap {
    position: relative;
    margin-bottom: 12px;
}

.breaking-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: opacity 0.2s, background 0.15s, transform 0.15s;
    opacity: 0;
    pointer-events: none;
}

.breaking-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.breaking-scroll-btn:hover {
    background: var(--bg-hover-strong);
    transform: translateY(-50%) scale(1.1);
}

.breaking-scroll-left {
    left: -6px;
}

.breaking-scroll-right {
    right: -6px;
}

.breaking-label-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 64px;
    min-height: 80px;
    padding: 10px 6px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.breaking-label-icon {
    font-size: 20px;
    line-height: 1;
}

.breaking-label-text {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red);
    white-space: nowrap;
}

.breaking-cards {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
}

.breaking-cards::-webkit-scrollbar {
    display: none;
}

.breaking-cards-track {
    display: flex;
    gap: 12px;
    padding: 2px 0;
    width: max-content;
}

.breaking-card {
    flex-shrink: 0;
    width: calc((100vw - 48px - 36px) / 3.5);
    min-width: 220px;
    max-width: 340px;
    padding: 14px 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;

    transition: background 0.15s, border-color 0.15s, transform 0.12s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breaking-card:hover {
    background: var(--bg-hover-strong);
    border-color: var(--border-hi);
    transform: translateY(-1px);
}

/* ── Live (first) card — red glow ── */
.breaking-card-live {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.15), 0 0 4px rgba(239, 68, 68, 0.1);
}

/* ── Top row: tag or time ── */
.breaking-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.breaking-card-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breaking-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

.breaking-tag-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ef4444;
}

.breaking-card-time {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Body — headline style ── */
.breaking-card-body {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Handle ── */
.breaking-card-handle {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breaking-card-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 12px 0;
    font-style: italic;
}

/* Breaking card entrance animation */
@keyframes breakingCardSlideIn {
    0%   { opacity: 0; transform: translateX(-30px) scale(0.9); }
    40%  { opacity: 1; transform: translateX(4px) scale(1.02); }
    60%  { transform: translateX(-2px) scale(1); }
    80%  { transform: translateX(1px) scale(1); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes breakingShake {
    0%, 100% { transform: translateX(0); }
    15%  { transform: translateX(-3px); }
    30%  { transform: translateX(3px); }
    45%  { transform: translateX(-2px); }
    60%  { transform: translateX(2px); }
    75%  { transform: translateX(-1px); }
}

@keyframes breakingFlashGlow {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50%  { box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.3); }
    100% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.15), 0 0 4px rgba(239, 68, 68, 0.1); }
}

.breaking-card-new {
    animation: breakingCardSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1),
               breakingFlashGlow 0.8s ease-out;
}

.breaking-cards-shake .breaking-card:not(.breaking-card-new) {
    animation: breakingShake 0.3s ease-in-out;
}

/* ── Tweet table ─────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tweet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tweet-table thead {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border);
}

.tweet-table th {
    padding: 13px 18px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    user-select: none;
}

.tweet-table th.sortable {
    cursor: pointer;
    transition: color 0.15s;
}

.tweet-table th.sortable:hover,
.tweet-table th.sorted {
    color: var(--accent);
}

.tweet-table th .sort-icon {
    opacity: 0.5;
    font-style: normal;
}

.tweet-table th.sorted .sort-icon {
    opacity: 1;
}

.tweet-table td {
    padding: 11px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: middle;
    color: var(--text);
}

.tweet-table tbody tr {
    transition: background 0.15s;
}

.tweet-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tweet-table .col-rank {
    width: 20px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
    font-weight: 800;
    font-size: 14px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.tweet-table .col-summary {
    max-width: 340px;
}

.tweet-table.breaking-view .col-summary {
    max-width: 600px;
}

.summary-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: hidden;
}

.summary-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
}

.tweet-table .col-bookmark {
    width: 24px;
    text-align: center;
    padding-left: 6px;
    padding-right: 0;
}

.bookmark-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--muted, #888);
    line-height: 0;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bookmark-btn:hover { color: #f5c518; background: rgba(245, 197, 24, 0.08); }
.bookmark-btn:active { transform: scale(0.92); }
.bookmark-btn.is-on { color: #f5c518; }
.bookmark-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.bookmark-btn.is-on .bookmark-icon { fill: currentColor; }

.bookmark-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding: 12px 16px;
    margin: 0;
}

.bookmark-add-bar {
    display: flex;
    align-items: center;
    margin-left: 12px;
}
.bookmark-add-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-hi);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.bookmark-add-open-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.bookmark-add-open-btn:active { transform: scale(0.97); }
.bookmark-add-open-btn svg { display: block; }

/* ── Add Bookmark Modal ──────────────────────────────────── */
.bm-modal[hidden] { display: none !important; }
.bm-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.bm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.bm-modal-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.bm-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.bm-modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    transition: color 0.15s ease;
}
.bm-modal-close:hover { color: var(--text); }
.bm-modal-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bm-modal-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.2px;
}
.bm-modal-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg);
    border: 1px solid var(--border-hi);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bm-modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.12);
}
.bm-modal-status {
    min-height: 16px;
    font-size: 12px;
    color: var(--muted);
}
.bm-modal-status.ok { color: #16a34a; }
.bm-modal-status.error { color: #dc2626; }
.bm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--border);
}
.bm-btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.bm-btn:active { transform: scale(0.97); }
.bm-btn-secondary {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-hi);
}
.bm-btn-secondary:hover { background: rgba(0, 0, 0, 0.04); }
.bm-btn-primary {
    background: var(--accent);
    color: #fff;
}
.bm-btn-primary:hover { background: #005bd1; }
.bm-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tweet-table .col-posted {
    white-space: nowrap;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.row-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
}

.row-avatar--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.08);
}

.tweet-table .col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    min-width: 80px;
}

.tweet-table .col-link {
    text-align: center;
    white-space: nowrap;
}

.view-link {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 112, 243, 0.06);
    border: 1px solid rgba(0, 112, 243, 0.15);
    text-decoration: none;
    transition: all 0.15s;
}

.view-link:hover {
    background: rgba(0, 112, 243, 0.12);
    border-color: rgba(0, 112, 243, 0.3);
}

/* delta inline */
.delta {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.delta.up {
    color: var(--green);
}

.delta.down {
    color: var(--red);
}

.delta.flat {
    color: var(--muted);
}

/* empty / loading */
.empty-cell {
    text-align: center;
    padding: 52px 20px;
    color: var(--muted);
    font-size: 14px;
}

.empty-cell .spinner {
    margin: 0 auto 12px;
}

.muted {
    color: var(--muted);
    font-style: italic;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 112, 243, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .breaking-label-text {
        display: none;
    }
    .breaking-label-card {
        width: 36px;
        min-height: 36px;
        padding: 6px;
    }
    .breaking-card {
        width: 300px;
        min-width: 280px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .search-input {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Tweet card ─────────────────────────────────────────────── */
.tweet-card {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    animation: cardIn 0.35s ease both;
    overflow: hidden;
}

.tweet-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.04), transparent 50%);
    pointer-events: none;
}

.tweet-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hi);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* rank badge */
.card-rank {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.25), rgba(124, 58, 237, 0.2));
    -webkit-background-clip: text;
    background-clip: text;
    user-select: none;
    letter-spacing: -2px;
}

/* author row */
.card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.card-avatar-empty {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
}

.card-author-info {}

.card-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    line-height: 1.2;
}

.card-handle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 1px;
}

/* category chip */
.card-category {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid;
}

/* summary */
.card-summary {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary.pending {
    color: var(--muted);
    font-weight: 500;
    font-style: italic;
}

/* metrics row */
.card-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 14px 0 16px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.metric {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.metric em {
    font-style: normal;
    color: var(--text);
}

/* delta badges */
.deltas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.delta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.delta-badge.up {
    background: rgba(34, 215, 138, 0.12);
    color: var(--green);
}

.delta-badge.down {
    background: rgba(255, 77, 109, 0.12);
    color: var(--red);
}

.delta-badge.flat {
    background: rgba(90, 130, 160, 0.1);
    color: var(--muted);
}

/* footer */
.card-footer {
    display: flex;
    justify-content: flex-end;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 112, 243, 0.06);
    border: 1px solid rgba(0, 112, 243, 0.15);
    text-decoration: none;
    transition: all 0.18s ease;
}

.card-link:hover {
    background: rgba(0, 180, 255, 0.15);
    border-color: rgba(0, 180, 255, 0.4);
    box-shadow: 0 0 16px rgba(0, 112, 243, 0.1);
}

/* ── Empty / loading states ─────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 15px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 112, 243, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .search-input {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Live view modal ───────────────────────────────────────── */
.live-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-modal[hidden] {
    display: none;
}

.live-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
}

.live-modal-content {
    position: relative;
    width: min(1100px, 92vw);
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.live-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.live-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1a1a1a;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5060;
    box-shadow: 0 0 0 0 rgba(75, 80, 96, 0);
}

.live-dot.active {
    background: #22c55e;
    animation: live-pulse 1.2s infinite;
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.live-modal-body {
    position: relative;
    padding: 12px;
    overflow: auto;
    background: #f0f1f3;
}

.live-modal-body img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.live-modal-body img:not([src]) {
    display: none;
}

/* Share button — full-width CTA at bottom of tweet modal */
.share-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0070f3 0%, #0051cc 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 112, 243, 0.25);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0, 112, 243, 0.35);
}

.share-btn:active {
    transform: scale(0.98);
}

/* Ripple effect */
.share-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: shareRipple 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes shareRipple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Success state */
.share-btn.copied {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.3);
}

/* Checkmark animation */
.share-btn .check-icon {
    display: inline-block;
    animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes checkPop {
    0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.live-empty {
    padding: 48px 20px;
    text-align: center;
    color: #6b7280;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

/* ── Infinite scroll sentinel ────────────────────────────────── */
.scroll-sentinel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 28px;
}

/* ── Half-globe hero ─────────────────────────────────────────── */
.globe-hero {
    position: relative;
    margin: 14px 0;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(0, 112, 243, 0.04), rgba(255, 255, 255, 0));
    border: 1px solid var(--border);
}

.globe-hero:fullscreen,
.globe-hero-fs {
    background: var(--bg);
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Simulated fullscreen: fill viewport via fixed positioning (iOS) */
.globe-hero-fs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — avoids iOS Safari toolbar */
    overflow: hidden;
}

/* Hide the feed-activity sidebar when globe is fullscreen */
.globe-hero-fs ~ .feed-activity {
    display: none !important;
}

.globe-hero:fullscreen .globe-canvas-wrap,
.globe-hero-fs .globe-canvas-wrap {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

.globe-hero:fullscreen .globe-legend,
.globe-hero-fs .globe-legend {
    position: absolute;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.globe-hero:fullscreen .globe-zoom-controls,
.globe-hero-fs .globe-zoom-controls {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.globe-hero:fullscreen .globe-rotate-toggle,
.globe-hero-fs .globe-rotate-toggle {
    position: absolute;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.globe-canvas-wrap {
    position: relative;
    width: 100%;
    height: 360px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .globe-canvas-wrap {
        height: 240px;
    }
}

#globeCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.globe-legend {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.globe-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.tier-spiking {
    background: var(--red);
}

.tier-rising {
    background: var(--warn);
}

.tier-active {
    background: var(--accent);
}

.globe-rotate-toggle {
    position: absolute;
    right: 14px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}

.globe-rotate-toggle .rotate-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: rotate-pulse 1.6s ease-in-out infinite;
}

.globe-rotate-toggle.off .rotate-dot {
    background: var(--muted);
    animation: none;
}

@keyframes rotate-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.globe-marquee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50px;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    font-size: 12px;
    color: var(--muted);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.globe-marquee-item {
    display: inline-block;
    padding: 0 22px;
    border-right: 1px solid var(--border);
}

.globe-hover-card {
    position: absolute;
    width: 230px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 5;
    font-size: 12px;
}

.ghc-region {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ghc-delta {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.ghc-headline {
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 8px;
}

.ghc-metrics {
    display: flex;
    gap: 12px;
    color: var(--muted);
}

/* Fullscreen: scale hover card 25% to match callout bubbles */
:fullscreen .globe-hover-card,
::backdrop .globe-hover-card,
.globe-hero-fs .globe-hover-card {
    width: 288px;
    padding: 13px 15px;
    font-size: 15px;
    border-radius: 14px;
}
:fullscreen .ghc-region, .globe-hero-fs .ghc-region { font-size: 14px; margin-bottom: 5px; }
:fullscreen .ghc-delta, .globe-hero-fs .ghc-delta  { font-size: 18px; margin-bottom: 8px; }
:fullscreen .ghc-headline, .globe-hero-fs .ghc-headline { line-height: 1.4; margin-bottom: 10px; }
:fullscreen .ghc-metrics, .globe-hero-fs .ghc-metrics { gap: 15px; font-size: 14px; }

/* Make the table flush with the globe */
.globe-hero+.table-wrap {
    /* no longer flush; globe is now its own section above the ticker */
}

.globe-zoom-controls {
    position: absolute;
    right: 14px;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 4;
}

.globe-zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.globe-zoom-btn:hover {
    background: #fff;
    border-color: var(--border-hi);
}

/* ── Globe + Category Pulse + Feed Activity Row ──────────────────────── */
.globe-activity-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 14px 0;
}

.globe-activity-row .globe-hero {
    flex: 66;
    min-width: 0;
    margin: 0;
}

.globe-activity-row .feed-activity,
.globe-activity-row .top-stories {
    flex: 34;
}

.globe-activity-row .globe-canvas-wrap {
    height: 378px;
}

/* ── Category Pulse Card ─────────────────────────────────────────────── */
.category-pulse {
    flex: 1;
    min-width: 0;
    height: 380px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.pulse-subtitle {
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
}

/* Stacked bar */
.pulse-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    gap: 2px;
}

.pulse-bar-segment {
    height: 100%;
    border-radius: 3px;
    transition: flex 0.4s ease;
}

/* Category rows */
.pulse-rows {
    flex: 1;
    overflow-y: auto;
}

.pulse-row {
    display: flex;
    align-items: center;
    padding: 5px 0;
    font-size: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.pulse-cat-name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.pulse-pct {
    font-weight: 600;
    color: var(--text);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pulse-placeholder {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 20px 0;
}

/* Top tweet callout */
.pulse-top-tweet {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    min-height: 65px;
}

.pulse-top-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pulse-top-summary {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pulse-top-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Feed Activity Card ──────────────────────────────────────────────── */
.feed-activity {
    flex: 1;
    min-width: 0;
    height: 380px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

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

.activity-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.country-select {
    font-size: 10px;
    font-weight: 500;
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    outline: none;
    max-width: 120px;
}

.country-select:focus {
    border-color: var(--accent);
}

/* Spike Meter */
.spike-meter {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.spike-arc {
    width: 160px;
    height: 96px;
    display: block;
    margin: 0 auto;
}

.spike-value-text {
    font-size: 32px;
    font-weight: 800;
    fill: var(--text);
    font-family: Inter, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

.spike-sublabel-text {
    font-size: 11px;
    font-weight: 600;
    fill: var(--muted);
    letter-spacing: 1px;
    font-family: Inter, system-ui, sans-serif;
}

.spike-description {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* Chart */
.activity-chart-wrap {
    margin-bottom: 10px;
    margin-top: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.chart-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.chart-subtitle {
    font-size: 10px;
    color: var(--muted);
}

#activityChart {
    width: 100%;
    height: 92px;
    border-radius: 8px;
}

/* Stats */
.activity-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    min-height: 0;
}

.stat-box {
    background: transparent;
    padding: 0;
    text-align: left;
}

.stat-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

/* ── Top Stories Card ────────────────────────────────────────────────── */
.top-stories {
    flex: 1;
    min-width: 0;
    height: 380px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px 12px 8px;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .top-stories {
    background: var(--bg-surface);
    border-color: var(--border);
}

.top-stories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.top-stories-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.top-stories-grok {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
}

[data-theme="dark"] .top-stories-grok {
    background: rgba(255, 255, 255, 0.04);
}

.top-stories-grok svg {
    opacity: 0.85;
}

.top-stories-grok .grok-logo {
    display: inline-block;
    width: 3.05em;
    height: 1.18em;
    background-color: currentColor;
    -webkit-mask: url('/rag/grok-logo.svg') center / contain no-repeat;
    mask: url('/rag/grok-logo.svg') center / contain no-repeat;
    opacity: 0.85;
    vertical-align: -0.18em;
}

.top-stories-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.top-story-item {
    flex: 1 1 0;
    min-height: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
}

.top-story-item:last-child {
    border-bottom: none;
}

.top-story-link,
.top-story-item > .top-story-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: background 120ms ease;
}

.top-story-link:hover {
    background: rgba(0, 0, 0, 0.025);
    border-radius: 8px;
}

[data-theme="dark"] .top-story-link:hover {
    background: rgba(255, 255, 255, 0.04);
}

.top-story-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .top-story-thumb {
    background: rgba(255, 255, 255, 0.06);
}

.top-story-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}

.top-story-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-story-meta {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-story-empty {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 30px 8px;
}


/* ── Toolbar ─────────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Exclude Elon toggle */
.exclude-elon-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    margin-left: 16px;
}

.exclude-elon-toggle input {
    display: none;
}

.toggle-slider {
    width: 32px;
    height: 18px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.exclude-elon-toggle input:checked+.toggle-slider {
    background: var(--accent, #6366f1);
}

.exclude-elon-toggle input:checked+.toggle-slider::after {
    transform: translateX(14px);
}

/* ── Region selector ────────────────────────────────────────── */
.top-right-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.region-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.region-flag {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
    line-height: 1;
}
.region-select {
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
    outline: none;
    border-radius: 999px;
    height: 36px;
    padding: 0 26px 0 36px;
    font-size: 13px;
    font-weight: 600;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 4.5l3 3 3-3'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 11px 11px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.region-select:hover {
    background-color: var(--bg-hover-strong);
}
/* Flag-only compact trigger: hide the selected option's text, show only the flag span. */
.region-select-wrap--flag-only .region-select {
    width: 52px;
    height: 30px;
    padding: 0 18px 0 26px;
    color: transparent;
    text-shadow: none;
    background-position: right 6px center;
    background-size: 10px 10px;
}
.region-select-wrap--flag-only .region-select option {
    color: var(--text);
}
.region-select:focus,
.region-select:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

/* ── Region summary cards (3 aspects) ───────────────────────── */
.region-summary-section {
    margin: 14px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.region-summary-header {
    display: flex;
    align-items: center;
}
.region-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 4px 6px;
    margin: 0 0 0 -6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border-radius: 6px;
}
.region-summary-toggle:hover { color: var(--text); }
.region-summary-chevron {
    transition: transform 160ms ease;
}
.region-summary-section.is-collapsed .region-summary-chevron {
    transform: rotate(-90deg);
}
.region-summary-section.is-collapsed .region-summary {
    display: none;
}
.region-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.region-summary-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
}
.region-summary-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.region-summary-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent, #58a6ff);
    opacity: 0.85;
}
.region-summary-card[data-aspect="1"] .region-summary-title::before { background: var(--green, #22c55e); }
.region-summary-card[data-aspect="2"] .region-summary-title::before { background: var(--accent-2, #a78bfa); }
.region-summary-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.region-summary.is-error .region-summary-body {
    color: var(--muted);
}
@media (max-width: 768px) {
    .region-summary-section { margin: 10px 0; gap: 8px; }
    .region-summary { grid-template-columns: 1fr; gap: 8px; }
    .region-summary-card { padding: 12px 14px; min-height: 0; }
    .region-summary-body { font-size: 13px; }
}

.toggle-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 1100px) {
    .globe-activity-row {
        flex-direction: column;
    }

    .globe-activity-row .globe-hero,
    .globe-activity-row .feed-activity,
    .globe-activity-row .top-stories {
        flex: none;
        width: 100%;
    }

    .feed-activity,
    .top-stories {
        height: auto;
        max-height: 360px;
    }
}

@media (max-width: 640px) {
    .globe-activity-row .globe-canvas-wrap {
        height: 280px;
    }

    .feed-activity,
    .top-stories {
        height: auto;
        max-height: none;
        padding: 14px 16px 18px;
    }

    .top-stories-header {
        flex-direction: row;
        align-items: center;
    }

    .top-stories-grok {
        font-size: 9px;
    }

    .top-stories-list {
        overflow: visible;
    }

    .top-story-item {
        flex: none;
        min-height: unset;
    }

    .top-story-title {
        font-size: 14px;
    }

    .activity-header {
        margin-bottom: 4px;
    }

    .spike-meter {
        margin-bottom: 0;
    }

    .spike-arc {
        width: 140px;
        height: 84px;
    }

    .spike-description {
        margin-top: 2px;
    }

    .activity-chart-wrap {
        margin-bottom: 6px;
        margin-top: 0;
    }

    .activity-stats {
        margin-top: 10px;
        padding-top: 10px;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .toolbar {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .exclude-elon-toggle {
        margin-left: 0;
    }

    .globe-wrap {
        height: 260px;
    }
}

@media (max-width: 480px) {
    .toolbar {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .cat-scroll {
        width: 100%;
        overflow-x: auto;
    }

    .cat-select,
    .table-sort-mobile .sort-select {
        min-width: 0;
        max-width: 40vw;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .region-select-wrap { margin-left: 4px; }
    .region-select {
        max-width: 34vw;
        text-overflow: ellipsis;
        overflow: hidden;
        height: 32px;
        padding-left: 30px;
        padding-right: 22px;
    }
    .region-select-wrap--flag-only .region-select {
        width: 60px;
        padding: 0 20px 0 28px;
    }
    .region-flag { left: 11px; font-size: 14px; }

    .dark-mode-toggle {
        width: 32px;
        height: 32px;
    }
    .dark-mode-toggle .dm-icon { width: 16px; height: 16px; }

    .exclude-elon-toggle {
        align-self: center;
        margin-left: auto;
        flex-shrink: 0;
        margin-left: auto;
        gap: 6px;
    }

    .exclude-elon-toggle .toggle-label {
        font-size: 11px;
    }
}

/* ── Mobile sort dropdown (hidden on desktop) ───────────────────── */
.table-sort-mobile {
    display: none;
    align-items: center;
}

.table-sort-mobile .sort-select {
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--border);
    outline: none;
    border-radius: 999px;
    padding: 6px 22px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 11px 11px;
}

/* ── Card layout: tables → cards on small screens ───────────────── */
@media (max-width: 640px) {
    .table-sort-mobile { display: inline-flex; }

    .table-wrap {
        overflow-x: visible;
        border: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .tweet-table { border-collapse: separate; border-spacing: 0; }
    .tweet-table thead { display: none; }
    .tweet-table,
    .tweet-table tbody { display: block; width: 100%; }

    .tweet-table tr {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 8px;
        padding: 14px 14px 12px;
        margin: 0 0 10px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--glass);
    }

    .tweet-table tr:hover { background: var(--glass); }

    .tweet-table td {
        display: inline-flex;
        align-items: center;
        padding: 0;
        border: none;
        font-size: 13px;
        color: var(--text);
        background: transparent;
    }

    /* Hide secondary columns on mobile */
    .tweet-table .col-rank,
    .tweet-table .col-link,
    .tweet-table .col-num[data-label="Δ1h"] { display: none; }

    /* Bookmark: top-right corner */
    .tweet-table .col-bookmark {
        position: absolute;
        top: 8px;
        right: 8px;
    }

    /* Hide category on mobile cards */
    .tweet-table .col-cat { display: none; }
    /* Posted: right-aligned on stats row */
    .tweet-table .col-posted {
        order: 5;
        margin-left: auto;
        font-size: 11px;
        color: var(--muted);
    }
    .tweet-table .col-posted::before {
        content: none;
    }

    /* Summary: full-width primary content */
    .tweet-table .col-summary {
        order: 3;
        flex: 0 0 100%;
        padding-right: 32px; /* space for absolute bookmark btn */
    }
    .tweet-table .col-summary .summary-cell {
        align-items: flex-start;
        gap: 10px;
        overflow: visible;
    }
    .tweet-table .col-summary .summary-text {
        display: block;
        font-size: 14px;
        line-height: 1.45;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
        -webkit-line-clamp: none;
        line-clamp: none;
    }
    .tweet-table .row-avatar {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    /* Stats strip: likes / views / pct */
    .tweet-table .col-num {
        order: 4;
        font-size: 12.5px;
        color: var(--muted);
        gap: 4px;
    }
    .tweet-table .col-num[data-label="Likes"] {
        margin-left: 48px; /* align with summary text (avatar 38px + gap 10px) */
    }
    .tweet-table .col-num[data-label="Δ1H%"] {
        margin-left: -4px; /* tighten gap between views and pct */
    }
    .tweet-table .col-num[data-label="Likes"]::before,
    .tweet-table .col-num[data-label="Views"]::before {
        content: "";
        display: inline-block;
        width: 13px;
        height: 13px;
        margin-right: 4px;
        background-color: currentColor;
        opacity: 0.75;
        -webkit-mask-repeat: no-repeat;
                mask-repeat: no-repeat;
        -webkit-mask-position: center;
                mask-position: center;
        -webkit-mask-size: contain;
                mask-size: contain;
    }
    .tweet-table .col-num[data-label="Likes"]::before {
        -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/></svg>");
                mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/></svg>");
    }
    .tweet-table .col-num[data-label="Views"]::before {
        -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 5C6 5 1.73 9.11 1 12c.73 2.89 5 7 11 7s10.27-4.11 11-7c-.73-2.89-5-7-11-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/></svg>");
                mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 5C6 5 1.73 9.11 1 12c.73 2.89 5 7 11 7s10.27-4.11 11-7c-.73-2.89-5-7-11-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/></svg>");
    }
    /* Δ1H% — no label, color/arrow conveys meaning */
    .tweet-table .col-num[data-label="Δ1H%"]::before { content: none; }

    /* Loading row resets card styling so skeletons render cleanly */
    .tweet-table tr.loading-row {
        display: block;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
    }
    .tweet-table tr.loading-row td {
        display: block;
        padding: 0;
        border: none;
        background: transparent;
    }
}

/* ── Skeleton loader (mobile cards) ───────────────────────────── */
.loading-mobile { display: none; }
.loading-row--mobile { display: none; }

/* Desktop: real <tr class="skeleton-tr"> rows aligned to the table columns. */
.skeleton-tr td {
    padding: 14px 8px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.skeleton-tr td .skel-line { display: block; width: 80%; margin: 4px 0; }
.skeleton-tr td .skel-line + .skel-line { width: 60%; }
.skeleton-tr .col-rank .skel-line { width: 50%; }
.skeleton-tr .col-cat .skel-pill { width: 70%; max-width: 80px; height: 18px; display: block; }
.skeleton-tr .col-posted .skel-line { width: 70%; }
.skeleton-tr .col-num .skel-line { width: 70%; margin-left: auto; }

@media (max-width: 640px) {
    .skeleton-tr { display: none; }
    .loading-row--mobile { display: table-row; }
    .loading-mobile { display: block; }
}
.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    margin: 0 0 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass);
}

.skel-meta { display: flex; align-items: center; gap: 8px; }
.skel-summary { display: flex; gap: 10px; align-items: flex-start; }
.skel-lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }
.skel-stats { display: flex; gap: 10px; margin-top: 2px; }

.skel {
    background: linear-gradient(
        90deg,
        rgba(127, 127, 127, 0.12) 0%,
        rgba(127, 127, 127, 0.22) 50%,
        rgba(127, 127, 127, 0.12) 100%
    );
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}

.skel-pill { width: 64px; height: 18px; border-radius: 999px; }
.skel-time { width: 50px; height: 12px; }
.skel-avatar { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px; }
.skel-line { height: 13px; }
.skel-line--lg { width: 95%; }
.skel-line--md { width: 80%; }
.skel-line--sm { width: 55%; }
.skel-chip { width: 60px; height: 14px; }

@keyframes skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Global Chat ─────────────────────────────────────────── */
.chat-bubble-btn {
    display: none !important;
}

.chat-panel[hidden],
.chat-unread-badge[hidden],
.chat-auth-gate[hidden],
.chat-account-bar[hidden],
.chat-reply-preview[hidden],
.chat-composer[hidden] {
    display: none !important;
}

.chat-dock-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.chat-dock-avatar-icon {
    font-size: 17px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-dock-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
.chat-dock-logo--dark { display: none; }
[data-theme="dark"] .chat-dock-logo--light { display: none; }
[data-theme="dark"] .chat-dock-logo--dark { display: inline-block; }

.chat-dock-status {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.chat-dock-label {
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.chat-unread-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--bg-card) 60%, transparent);
}

.chat-panel {
    position: fixed;
    right: 20px;
    bottom: 0;
    width: min(500px, calc(100vw - 24px));
    height: 54px;
    max-height: calc(100dvh - 24px);
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
    z-index: 1201;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: height .38s cubic-bezier(.22, 1, .36, 1), box-shadow .38s ease;
    font-family: var(--font);
    will-change: height;
}

.chat-panel.is-visible {
    height: min(760px, calc(100dvh - 24px));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
}

.chat-panel.is-closing {
    height: 54px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
}

.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex: 0 0 54px;
}

.chat-panel-header-btn {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1 1 auto;
    min-width: 0;
    font-family: inherit;
}

.chat-panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
}

.chat-panel-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    flex: 0 0 34px;
    transform: scaleX(1.4);
    transition: transform .38s cubic-bezier(.22, 1, .36, 1), color .15s ease;
}

.chat-panel.is-visible .chat-panel-close {
    transform: scaleX(1.4) rotate(180deg);
}

.chat-panel-close:hover {
    background: transparent;
    color: var(--text);
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px;
}

.chat-account-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex: 0 0 auto;
}

.chat-account-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-account-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-subtle);
    flex: 0 0 24px;
}

.chat-account-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-logout-btn {
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    min-height: 30px;
    padding: 7px 11px;
    flex: 0 0 auto;
}

.chat-logout-btn:hover {
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-subtle));
}

.chat-logout-btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.chat-auth-gate {
    border-top: 1px solid var(--border);
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-card);
    min-height: 64px;
    flex: 0 0 auto;
}

.chat-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: #fff;
    background: var(--accent);
    border-radius: 13px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    transition: transform .15s ease, filter .15s ease;
}

.chat-login-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: color-mix(in srgb, var(--bg-card) 96%, var(--bg-subtle));
    scrollbar-width: thin;
}

.chat-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 8px 2px;
}

.chat-message-row {
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chat-message-row.is-group-continue {
    margin-top: -8px;
}

.chat-message-avatar-spacer {
    flex: 0 0 30px;
    width: 30px;
    height: 1px;
}

.chat-message-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 2px;
    padding-left: 2px;
}

.chat-message-row.is-me {
    flex-direction: row-reverse;
}

.chat-message-shell {
    flex: 1 1 auto;
    max-width: calc(100% - 46px - 84px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
}

.chat-message-row.is-me .chat-message-shell {
    align-items: flex-end;
}

.chat-message-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
    object-fit: cover;
    background: var(--bg-subtle);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chat-message-avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.chat-message {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid transparent;
    border-radius: 18px;
    background: #eff3f4;
    color: #0f1419;
    padding: 8px 14px 8px 14px;
    box-shadow: none;
}

[data-theme="dark"] .chat-message {
    background: #2f3336;
    color: #fff;
}

.chat-message.is-me {
    background: #1d9bf0;
    border-color: #1d9bf0;
    color: #fff;
    border-radius: 18px;
}

.chat-message.is-pending {
    opacity: 0.6;
}

.chat-message.is-failed {
    opacity: 0.9;
}

.chat-message-failed {
    flex: 0 0 auto;
    align-self: flex-end;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f4212e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    margin-left: 6px;
    margin-bottom: 4px;
    cursor: default;
    user-select: none;
}

.chat-message-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
    font-size: 11.5px;
    color: var(--muted);
    flex-wrap: wrap;
}

.chat-message.is-me .chat-message-meta {
    justify-content: flex-end;
}

.chat-message-meta strong {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-meta span::before {
    content: "·";
    margin-right: 6px;
}

.chat-message-text {
    display: inline;
    font-size: 14px;
    line-height: 1.35;
    color: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-message-text a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-message-time {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    vertical-align: baseline;
}

.chat-message.is-me .chat-message-time {
    color: rgba(255, 255, 255, 0.75);
}

.chat-message:not(.is-me) .chat-message-time {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .chat-message-time {
    color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .chat-message:not(.is-me) .chat-message-time {
    color: rgba(255, 255, 255, 0.55);
}

.chat-message.is-me .chat-message-text {
    text-align: left;
}

.chat-message-meta--time-only {
    display: inline-flex;
    gap: 0;
    margin: 0 0 0 8px;
    float: right;
    font-size: 11px;
    color: var(--muted);
}

.chat-message-meta--time-only span::before {
    content: "";
    margin: 0;
}

.chat-reply-chip {
    border-left: 2px solid var(--accent);
    background: var(--bg-card);
    border-radius: 9px;
    font-size: 11.5px;
    color: var(--muted);
    padding: 5px 7px;
    margin-bottom: 6px;
}

.chat-reply-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--muted);
    margin: 0 4px 2px 4px;
}

.chat-message-row.is-me .chat-reply-meta {
    justify-content: flex-end;
}

.chat-reply-meta-arrow {
    font-size: 12px;
    line-height: 1;
    color: var(--muted);
}

.chat-reply-quote {
    align-self: flex-start;
    max-width: 90%;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    padding: 6px 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message-row.is-me .chat-reply-quote {
    align-self: flex-end;
    border-color: #1d9bf0;
    color: #1d9bf0;
}

.chat-message-avatar-link {
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 0;
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(29, 155, 240, 0.2);
}

.chat-message-avatar-link img,
.chat-message-avatar-link .chat-message-avatar {
    pointer-events: none;
}

.chat-message-avatar-link:hover {
    opacity: 0.9;
}

.chat-message-link {
    color: #1d9bf0;
    text-decoration: none;
    word-break: break-all;
}

.chat-message-link:hover {
    text-decoration: underline;
}

.chat-message.is-me .chat-message-link {
    color: #ffffff;
    text-decoration: underline;
}

.chat-link-preview {
    margin-top: 6px;
    width: 100%;
    max-width: 420px;
}

.chat-link-preview-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-subtle);
    transition: background 0.15s ease;
    cursor: pointer;
}

.chat-link-preview-card:hover {
    background: var(--bg-hover-strong);
}

.chat-link-preview-image {
    width: 100%;
    background: #ffffff;
    overflow: hidden;
    display: block;
    max-height: 220px;
}

.chat-link-preview-image img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
}

.chat-link-preview-body {
    padding: 8px 12px 10px;
}

.chat-link-preview-site {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-link-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-link-preview-desc {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-message-bubble-wrap {
    position: relative;
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
}

.chat-message-row.is-me .chat-message-bubble-wrap {
    align-self: flex-end;
}

.chat-msg-quick-actions {
    position: absolute;
    top: 50%;
    left: calc(100% + 6px);
    right: auto;
    transform: translateY(-50%) translateX(-4px);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
    flex: 0 0 auto;
    white-space: nowrap;
    z-index: 2;
}

.chat-message-row.is-me .chat-msg-quick-actions {
    left: auto;
    right: calc(100% + 6px);
    transform: translateY(-50%) translateX(4px);
}

@media (hover: hover) {
    .chat-message-row:hover .chat-msg-quick-actions {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
        pointer-events: auto;
    }
    .chat-message-row.is-me:hover .chat-msg-quick-actions {
        transform: translateY(-50%) translateX(0);
    }
}

.chat-message-row.is-touched .chat-msg-quick-actions,
.chat-message-row.is-me.is-touched .chat-msg-quick-actions {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.chat-quick-action {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    transition: background .12s ease, color .12s ease;
}

.chat-quick-action:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--text);
}

.chat-quick-action-plus {
    position: absolute;
    right: 1px;
    bottom: 0;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    background: var(--bg-card);
    border-radius: 999px;
    padding: 0 2px;
}

.chat-reaction-summary {
    position: absolute;
    right: 6px;
    bottom: -10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    z-index: 1;
    pointer-events: auto;
}

.chat-message-row.is-me .chat-reaction-summary {
    right: auto;
    left: 6px;
}

.chat-reaction-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 20px;
    padding: 2px 6px 2px 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.chat-reaction-summary-chip:hover {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.chat-reaction-summary-chip.is-active {
    background: color-mix(in srgb, var(--accent) 15%, var(--bg-card));
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.chat-emoji-picker-wrap {
    position: fixed;
    z-index: 1300;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border);
}

.chat-emoji-picker-wrap[hidden] {
    display: none !important;
}

.chat-emoji-picker {
    --background: var(--bg-card);
    --border-color: var(--border);
    --indicator-color: var(--accent);
    --input-border-color: var(--border);
    --input-font-color: var(--text);
    --input-placeholder-color: var(--muted);
    --button-active-background: color-mix(in srgb, var(--accent) 15%, transparent);
    --button-hover-background: color-mix(in srgb, var(--accent) 8%, transparent);
    --category-emoji-padding: 4px;
    --num-columns: 8;
    width: min(320px, calc(100vw - 40px));
    height: 360px;
}

html[data-theme="dark"] .chat-emoji-picker {
    --background: var(--bg-card);
}

.chat-action-menu {
    position: fixed;
    z-index: 1300;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    padding: 4px;
    display: flex;
    flex-direction: column;
}

.chat-action-menu[hidden] {
    display: none !important;
}

.chat-action-menu-item {
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-family: inherit;
}

.chat-action-menu-item[hidden] {
    display: none !important;
}

.chat-action-menu-item:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.chat-action-menu-item--danger {
    color: #f4212e;
}

.chat-action-menu-item--danger:hover {
    background: color-mix(in srgb, #f4212e 12%, transparent);
}

.chat-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-confirm-modal[hidden] {
    display: none;
}

.chat-confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(91, 112, 131, 0.4);
}

.chat-confirm-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #000;
    color: #e7e9ea;
    border-radius: 16px;
    padding: 28px 32px 24px;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.chat-confirm-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #e7e9ea;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}

.chat-confirm-modal-close:hover {
    background: rgba(239, 243, 244, 0.1);
}

.chat-confirm-modal-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
}

.chat-confirm-modal-body {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.4;
    color: #71767b;
}

.chat-confirm-modal-btn {
    display: block;
    width: 100%;
    border-radius: 9999px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
}

.chat-confirm-modal-btn + .chat-confirm-modal-btn {
    margin-top: 12px;
}

.chat-confirm-modal-btn--danger {
    background: #f4212e;
    color: #fff;
}

.chat-confirm-modal-btn--danger:hover {
    background: #d61a26;
}

.chat-confirm-modal-btn--secondary {
    background: transparent;
    color: #e7e9ea;
    border-color: #536471;
}

.chat-confirm-modal-btn--secondary:hover {
    background: rgba(239, 243, 244, 0.1);
}

.chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 6px;
    font-size: 12px;
    color: var(--muted);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    min-height: 22px;
}

.chat-typing-indicator[hidden] {
    display: none;
}

.chat-typing-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

.chat-typing-dots {
    display: inline-flex;
    gap: 3px;
    flex: 0 0 auto;
}

.chat-typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: chat-typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.chat-typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes chat-typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.chat-reply-preview {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 0;
    padding: 8px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    align-self: stretch;
    flex: 0 0 auto;
}

.chat-reply-preview-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
}

.chat-reply-preview-name {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-reply-preview-body {
    font-size: 14px;
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.chat-reply-clear {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-composer {
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-card);
    min-height: 64px;
    flex: 0 0 auto;
    position: relative;
}

.chat-input {
    resize: none;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    max-height: 92px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text);
    padding: 11px 48px 11px 16px;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.35;
    outline: none;
    overflow-y: auto;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.chat-input::placeholder {
    color: var(--muted);
    opacity: 0.75;
}

.chat-input:focus {
    border-color: var(--border-hi);
    box-shadow: none;
}

.chat-send-btn {
    position: absolute;
    right: 18px;
    bottom: calc(env(safe-area-inset-bottom) + 18px);
    border: 0;
    background: var(--text);
    color: var(--bg-card);
    border-radius: 50%;
    padding: 0;
    width: 30px;
    height: 30px;
    min-height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, opacity .15s ease;
    z-index: 1;
}

.chat-send-btn svg {
    display: block;
}

.chat-composer:not(.has-text) .chat-send-btn {
    display: none;
}

.chat-send-btn:not(:disabled):hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 640px) {
    .chat-bubble-btn {
        right: 10px;
        bottom: 0;
        width: calc(100vw - 20px);
        min-height: 52px;
        padding: 8px 12px;
    }

    .chat-panel {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100vw;
        max-width: 100vw;
        height: 54px;
        min-height: 0;
        max-height: 100dvh;
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    .chat-panel.is-visible {
        height: 100dvh;
        border-radius: 0;
    }

    .chat-panel.is-closing {
        height: 54px;
    }

    .chat-panel-header {
        min-height: 54px;
        padding: 8px 14px;
    }

    .chat-messages {
        padding: 12px 10px 10px;
    }

    .chat-message-avatar {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .chat-message-avatar-spacer {
        flex-basis: 28px;
        width: 28px;
    }

    .chat-message-shell {
        max-width: 72%;
    }

    .chat-composer {
        padding: 9px 10px calc(11px + env(safe-area-inset-bottom));
    }

    .chat-auth-gate {
        padding: 9px 10px calc(11px + env(safe-area-inset-bottom));
    }

    .chat-send-btn {
        width: 58px;
        flex-basis: 58px;
    }
}
