/* Externalized from feed/index.html for CSP. */
:root {
            --panel: rgba(15, 20, 32, 0.92);
            --panel-soft: rgba(10, 14, 22, 0.9);
            --text: #e5e7eb;
            --muted: #9ca3af;
            --accent: #3b82f6;
            --accent-2: #1e3a8a;
            --green: #22c55e;
            --yellow: #f59e0b;
            --border: rgba(148, 163, 184, 0.16);
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            background:
                radial-gradient(800px 480px at 80% -10%, rgba(59, 130, 246, 0.2), transparent 60%),
                radial-gradient(700px 420px at 10% -20%, rgba(30, 58, 138, 0.3), transparent 60%),
                #020617;
            color: var(--text);
            font-family: var(--seen-font);
            min-height: 100vh;
        }

        .img-loading {
            background: linear-gradient(90deg,
                    rgba(30, 41, 59, 0.45),
                    rgba(59, 130, 246, 0.3),
                    rgba(30, 41, 59, 0.45));
            background-size: 200% 100%;
            animation: shimmer 1.15s ease-in-out infinite;
        }

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

            100% {
                background-position: 200% 0;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .img-loading {
                animation: none;
            }
        }

        main.feed {
            max-width: 860px;
            margin: 0 auto;
            padding: 16px 18px 28px;
            display: grid;
            gap: 14px;
        }

        .feed-hero {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 18px;
            border-radius: 20px;
            border: 1px solid var(--border);
            background:
                radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.16), transparent 48%),
                linear-gradient(160deg, rgba(9, 14, 24, 0.92), rgba(8, 12, 20, 0.9));
            box-shadow: 0 20px 42px rgba(2, 6, 23, 0.26);
        }

        .feed-hero-copy {
            display: grid;
            gap: 8px;
            min-width: 0;
        }

        .feed-kicker {
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: rgba(147, 197, 253, 0.92);
        }

        .feed-hero h1 {
            margin: 0 0 4px;
            font-size: clamp(24px, 3vw, 30px);
            letter-spacing: 0.02em;
        }

        .feed-subtitle {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
        }

        .feed-status-wrap {
            display: grid;
            gap: 6px;
            justify-items: end;
            flex: 0 0 auto;
        }

        .feed-status-label {
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: rgba(148, 163, 184, 0.86);
        }

        .feed-status {
            display: inline-flex;
            align-items: center;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            background: rgba(15, 23, 42, 0.7);
            font-size: 12px;
            color: rgba(226, 232, 240, 0.95);
            font-weight: 700;
            text-align: left;
        }

        .feed-tabs {
            display: grid;
            gap: 10px;
            padding: 12px;
            background: var(--panel-soft);
            border: 1px solid var(--border);
            border-radius: 18px;
            box-shadow: 0 18px 36px rgba(2, 6, 23, 0.2);
        }

        .feed-tabs-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .feed-tabs-copy {
            display: grid;
            gap: 4px;
            min-width: 0;
        }

        .feed-tabs-label {
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: rgba(147, 197, 253, 0.88);
        }

        .feed-tabs-note {
            font-size: 12px;
            color: rgba(148, 163, 184, 0.9);
        }

        .tab-group {
            display: flex;
            gap: 8px;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding-bottom: 2px;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }

        .tab-group::-webkit-scrollbar {
            display: none;
        }

        .tab {
            border: 1px solid rgba(148, 163, 184, 0.16);
            background: rgba(15, 23, 42, 0.46);
            color: var(--muted);
            padding: 8px 14px;
            border-radius: 999px;
            font-weight: 700;
            font-size: 12px;
            cursor: pointer;
            white-space: nowrap;
        }

        .tab.active {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(30, 64, 175, 0.24));
            border-color: rgba(59, 130, 246, 0.4);
            color: var(--text);
        }

        .events-filters {
            display: grid;
            gap: 10px;
            margin-top: 2px;
            padding: 10px;
            border-radius: 14px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            background: rgba(15, 23, 42, 0.44);
        }

        .events-pill-row {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .events-pill {
            border: 1px solid rgba(148, 163, 184, 0.24);
            background: rgba(15, 23, 42, 0.58);
            color: rgba(226, 232, 240, 0.92);
            padding: 7px 12px;
            border-radius: 999px;
            font-weight: 700;
            font-size: 12px;
            cursor: pointer;
        }

        .events-pill.active {
            border-color: rgba(59, 130, 246, 0.52);
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(29, 78, 216, 0.3));
            color: #f8fbff;
        }

        .events-filter-note {
            margin: 0;
            color: rgba(148, 163, 184, 0.95);
            font-size: 12px;
            line-height: 1.45;
        }

        .feed-add {
            min-width: 74px;
            height: 36px;
            padding: 0 14px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.25);
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.92));
            color: var(--text);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.03em;
            cursor: pointer;
        }

        .feed-now {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 14px;
            display: grid;
            gap: 12px;
            box-shadow: 0 18px 36px rgba(2, 6, 23, 0.18);
        }

        .now-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 11px;
            color: var(--muted);
            font-weight: 800;
            letter-spacing: 0.18em;
        }

        .now-chips {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .now-chip {
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            font-size: 11px;
            color: var(--muted);
            letter-spacing: 0.02em;
        }

        .story-strip {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: 118px;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .story-card {
            background: linear-gradient(160deg, rgba(20, 24, 38, 0.9), rgba(12, 15, 24, 0.9));
            border: 1px solid rgba(148, 163, 184, 0.16);
            border-radius: 16px;
            padding: 8px;
            display: grid;
            gap: 6px;
            position: relative;
        }

        .story-img {
            width: 100%;
            aspect-ratio: 1 / 1;
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(15, 23, 42, 0.7));
            position: relative;
            overflow: hidden;
        }

        .story-img img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
        }

        .story-name {
            font-weight: 700;
            font-size: 13px;
        }

        .story-time {
            color: var(--muted);
            font-size: 11px;
        }

        .story-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--green);
            box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
        }

        .story-dot.yellow {
            background: var(--yellow);
            box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
        }

        .story-dot.gray {
            background: rgba(148, 163, 184, 0.7);
            box-shadow: none;
        }

        .story-img.img-failed::after {
            content: "Tap to retry";
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #fecaca;
            background: rgba(2, 6, 23, 0.78);
            pointer-events: none;
        }

        .story-img.img-failed img {
            opacity: 0.4;
            filter: grayscale(1);
        }

        .feed-list {
            display: grid;
            gap: 12px;
        }

        .post-card {
            background: rgba(12, 16, 26, 0.78);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 12px;
            display: grid;
            gap: 10px;
            position: relative;
            box-shadow: 0 16px 36px rgba(2, 6, 23, 0.35);
            content-visibility: auto;
            contain-intrinsic-size: 360px;
        }

        .post-delete {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(239, 68, 68, 0.65);
            background: rgba(127, 29, 29, 0.4);
            color: #fecaca;
            font-weight: 800;
            cursor: pointer;
            display: grid;
            place-items: center;
        }

        .post-edit {
            position: absolute;
            top: 10px;
            right: 46px;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.4);
            background: rgba(148, 163, 184, 0.12);
            color: var(--text);
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
        }

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

        .avatar {
            width: 34px;
            height: 34px;
            border-radius: 12px;
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(148, 163, 184, 0.4);
            display: grid;
            place-items: center;
            font-size: 12px;
            font-weight: 800;
            color: var(--text);
            position: relative;
            overflow: hidden;
        }

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

        .avatar.img-failed::after {
            content: "Tap to retry";
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            font-size: 8px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #fecaca;
            background: rgba(2, 6, 23, 0.78);
            pointer-events: none;
        }

        .avatar.img-failed img {
            opacity: 0.4;
            filter: grayscale(1);
        }

        .avatar.green {
            border-color: var(--green);
            box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
        }

        .avatar.yellow {
            border-color: var(--yellow);
            box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
        }

        .avatar.gray {
            border-color: rgba(148, 163, 184, 0.55);
            box-shadow: none;
        }

        .post-user-link {
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            padding: 0;
            margin: 0;
            cursor: pointer;
            text-align: left;
        }

        .post-user-link:disabled {
            cursor: default;
        }

        .avatar.post-user-link {
            padding: 0;
        }

        .post-name {
            font-weight: 700;
            color: var(--text);
        }

        .post-name.post-user-link:hover {
            text-decoration: underline;
        }

        .post-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--muted);
            font-size: 12px;
        }

        .post-badge {
            padding: 3px 9px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.2);
            color: #cfe1ff;
            font-size: 11px;
            font-weight: 700;
        }

        .post-body {
            color: #d5dbea;
            font-size: 14px;
            line-height: 1.4;
        }

        .event-meta {
            display: grid;
            gap: 4px;
            margin-bottom: 6px;
            color: #bfdbfe;
            font-size: 12px;
            font-weight: 700;
        }

        .event-meta span {
            display: block;
        }

        .post-body a {
            color: #9cc3ff;
            text-decoration: underline;
        }

        .link-card {
            display: grid;
            grid-template-columns: 120px 1fr;
            gap: 12px;
            padding: 0;
            border-radius: 14px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            background: rgba(15, 23, 42, 0.55);
            overflow: hidden;
            text-decoration: none;
            color: var(--text);
        }

        .link-card.no-image {
            grid-template-columns: 1fr;
        }

        .link-thumb {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(15, 23, 42, 0.7));
            object-fit: cover;
        }

        .link-meta {
            padding: 10px 12px;
            display: grid;
            gap: 6px;
        }

        .link-site {
            font-size: 11px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--muted);
        }

        .link-title {
            font-size: 14px;
            font-weight: 700;
        }

        .link-desc {
            font-size: 12px;
            color: var(--muted);
        }

        .post-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            border-top: 1px solid rgba(148, 163, 184, 0.12);
            padding-top: 8px;
            color: var(--muted);
            font-size: 12px;
        }

        .post-actions span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .post-action-btn {
            border: 1px solid rgba(148, 163, 184, 0.28);
            background: rgba(148, 163, 184, 0.09);
            color: var(--text);
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            padding: 5px 11px;
            cursor: pointer;
        }

        .post-action-btn:hover {
            background: rgba(148, 163, 184, 0.18);
            border-color: rgba(148, 163, 184, 0.4);
        }

        .post-action-btn.like.is-active {
            background: rgba(37, 99, 235, 0.28);
            border-color: rgba(37, 99, 235, 0.55);
            color: #dbeafe;
        }

        .post-action-btn:disabled {
            opacity: 0.5;
            cursor: default;
        }

        .post-action-metric {
            margin-left: auto;
            color: var(--muted);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .post-comment-thread {
            display: grid;
            gap: 8px;
            border-top: 1px solid rgba(148, 163, 184, 0.14);
            padding-top: 10px;
        }

        .post-comment-list {
            display: grid;
            gap: 8px;
        }

        .post-comment-item {
            background: rgba(15, 23, 42, 0.48);
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 12px;
            padding: 8px 10px;
            display: grid;
            gap: 4px;
        }

        .post-comment-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 11px;
        }

        .post-comment-author {
            color: #dbeafe;
            font-weight: 700;
        }

        .post-comment-time {
            color: var(--muted);
            font-weight: 600;
        }

        .post-comment-body {
            color: #d6e0f3;
            font-size: 13px;
            line-height: 1.35;
            word-break: break-word;
        }

        .post-comment-empty {
            color: var(--muted);
            font-size: 12px;
            font-weight: 650;
        }

        .post-comment-compose {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .post-comment-input {
            flex: 1 1 auto;
            background: rgba(15, 23, 42, 0.56);
            border: 1px solid rgba(148, 163, 184, 0.24);
            border-radius: 999px;
            color: var(--text);
            font-size: 13px;
            padding: 8px 12px;
            min-width: 0;
        }

        .post-comment-send {
            border: 1px solid rgba(37, 99, 235, 0.55);
            background: rgba(37, 99, 235, 0.22);
            color: #dbeafe;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            padding: 7px 12px;
            cursor: pointer;
        }

        .post-comment-send:disabled {
            opacity: 0.55;
            cursor: default;
        }

        .photo-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .photo-cell {
            position: relative;
            aspect-ratio: 1 / 1;
            border-radius: 12px;
            overflow: hidden;
            display: block;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(15, 23, 42, 0.7));
        }

        .photo-cell img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
        }

        .photo-cell.img-failed::after {
            content: "Tap to retry";
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #fecaca;
            background: rgba(2, 6, 23, 0.78);
            pointer-events: none;
        }

        .photo-cell.img-failed img {
            opacity: 0.4;
            filter: grayscale(1);
        }

        .photo-cell.photo-placeholder {
            display: block;
        }

        .poll {
            display: grid;
            gap: 8px;
        }

        .poll-option {
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 999px;
            padding: 8px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
        }

        .poll-option.active {
            background: rgba(59, 130, 246, 0.25);
            border-color: rgba(59, 130, 246, 0.6);
        }

        .summary {
            background: rgba(15, 23, 42, 0.75);
            border-radius: 16px;
            padding: 10px 12px;
            font-size: 12px;
            color: var(--muted);
            border: 1px solid rgba(148, 163, 184, 0.16);
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .summary .spark {
            width: 26px;
            height: 26px;
            border-radius: 10px;
            background: rgba(59, 130, 246, 0.2);
            display: grid;
            place-items: center;
            color: #cfe1ff;
            font-size: 13px;
        }

        .empty {
            border: 1px dashed rgba(148, 163, 184, 0.5);
            border-radius: 12px;
            padding: 18px;
            text-align: center;
            font-size: 14px;
            color: var(--muted);
        }

        .feed-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.72);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 18px;
            z-index: 80;
        }

        .feed-modal.is-open {
            display: flex;
        }

        .feed-modal-card {
            width: min(560px, 94vw);
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 16px;
            display: grid;
            gap: 12px;
            box-shadow: 0 20px 40px rgba(2, 6, 23, 0.55);
        }

        .feed-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .feed-modal-title {
            margin: 0;
            font-size: 18px;
            font-weight: 800;
        }

        .feed-modal-close {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(15, 23, 42, 0.7);
            color: var(--text);
            font-size: 18px;
            cursor: pointer;
        }

        .feed-modal textarea {
            width: 100%;
            min-height: 110px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 12px;
            color: var(--text);
            padding: 10px 12px;
            font-size: 14px;
            resize: vertical;
        }

        .feed-modal label {
            font-size: 12px;
            color: var(--muted);
            font-weight: 700;
        }
        .feed-admin-toggle {
            display: none;
            align-items: center;
            gap: 10px;
            margin: 10px 0 6px;
            font-size: 13px;
            color: var(--muted);
            font-weight: 600;
        }
        .feed-admin-toggle input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #22c55e;
        }

        .feed-chat-card {
            width: min(460px, 94vw);
        }

        .feed-chat-target {
            font-size: 12px;
            color: var(--muted);
            font-weight: 700;
        }

        .feed-chat-note {
            font-size: 12px;
            color: var(--muted);
            margin-top: -4px;
        }

        .feed-photo-list {
            display: grid;
            gap: 8px;
        }

        .feed-photo-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .feed-photo-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .feed-photo-row input {
            flex: 1 1 auto;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 12px;
            padding: 8px 10px;
            color: var(--text);
            font-size: 13px;
        }

        .feed-photo-remove {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(148, 163, 184, 0.08);
            color: var(--text);
            cursor: pointer;
            font-size: 16px;
        }

        .feed-photo-add {
            width: fit-content;
            padding: 6px 12px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(15, 23, 42, 0.5);
            color: var(--text);
            font-size: 12px;
            cursor: pointer;
        }

        .feed-undo {
            position: fixed;
            left: 50%;
            bottom: calc(20px + env(safe-area-inset-bottom));
            transform: translateX(-50%);
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid rgba(148, 163, 184, 0.3);
            border-radius: 999px;
            padding: 8px 14px;
            display: none;
            gap: 12px;
            align-items: center;
            color: var(--text);
            z-index: 85;
            font-size: 12px;
        }

        .feed-undo.is-visible {
            display: inline-flex;
        }

        .feed-undo button {
            border: 0;
            background: transparent;
            color: #93c5fd;
            font-weight: 700;
            cursor: pointer;
        }

        .feed-modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .feed-btn {
            padding: 10px 16px;
            border-radius: 999px;
            font-weight: 700;
            border: 1px solid transparent;
            cursor: pointer;
        }

        .feed-btn.secondary {
            background: rgba(148, 163, 184, 0.15);
            color: var(--text);
        }

        .feed-btn.primary {
            background: rgba(37, 99, 235, 0.75);
            color: #f8fafc;
            border-color: rgba(37, 99, 235, 0.9);
        }

        .feed-modal-error {
            color: #fca5a5;
            font-size: 12px;
            min-height: 16px;
        }

        .profile-basics-copy {
            margin: 0;
            color: #cbd5e1;
            line-height: 1.55;
        }

        .basics-disabled-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 16px;
            border: 1px solid rgba(96, 165, 250, 0.28);
            background: rgba(2, 6, 23, 0.84);
            color: #dbeafe;
            box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
        }

        .basics-disabled-banner[hidden] {
            display: none;
        }

        .basics-disabled-banner-copy {
            margin: 0;
            font-size: 13px;
            line-height: 1.45;
        }

        .basics-disabled-banner-btn {
            border: 1px solid rgba(37, 99, 235, 0.78);
            background: linear-gradient(135deg, #2563eb, #06b6d4);
            color: #eff6ff;
            border-radius: 999px;
            min-height: 40px;
            padding: 9px 14px;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
        }

        .feed-upload-status {
            font-size: 12px;
            color: var(--muted);
            min-height: 16px;
        }

        .feed-upload-status-list {
            display: grid;
            gap: 6px;
        }

        .feed-upload-status-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .feed-upload-status-name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .feed-upload-status-state[data-state="complete"] { color: #86efac; }
        .feed-upload-status-state[data-state="failed"] { color: #fca5a5; }

        .feed-load-more {
            width: 100%;
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(15, 23, 42, 0.6);
            color: var(--text);
            font-weight: 700;
            cursor: pointer;
        }

        /* -----------------------------
           Mobile: split nav (top vs bottom)
        ------------------------------*/
        :root {
            --top-nav-h: calc(56px + env(safe-area-inset-top));
            --bottom-nav-h: 56px;
        }

        .bottom-nav {
            display: none;
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
            padding: 6px 10px calc(env(safe-area-inset-bottom) + 6px);
            background: linear-gradient(to top,
                    rgba(15, 23, 42, 0.98),
                    rgba(15, 23, 42, 0.80));
            border-top: 1px solid rgba(148, 163, 184, 0.25);
            backdrop-filter: blur(10px);
            z-index: 60;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
        }

        .bottom-nav-row {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: space-around;
        }

        .bn-link {
            flex: 1 1 0;
            text-align: center;
            padding: 10px 12px;
            border-radius: 999px;
            text-decoration: none;
            color: rgba(229, 231, 235, 0.92);
            font-weight: 800;
            font-size: 13px;
            border: 1px solid transparent;
            background: rgba(148, 163, 184, 0.10);
        }

        .bn-link:hover {
            background: rgba(148, 163, 184, 0.18);
        }

        .bn-link.active {
            background: rgba(37, 99, 235, 0.28);
            border-color: rgba(37, 99, 235, 0.38);
        }

        .bottom-nav-status {
            text-align: center;
            color: rgba(156, 163, 175, 0.95);
            font-size: 12px;
            font-weight: 750;
            text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
            line-height: 1.1;
            min-height: 14px;
        }

        @media (max-width: 720px) {
            :root {
                --bottom-nav-h: 64px;
                --mobile-bottom-gap: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 24px);
            }

            html,
            body {
                height: 100%;
                min-height: 0;
                overflow: hidden;
                overscroll-behavior: none;
                scroll-padding-bottom: var(--mobile-bottom-gap);
            }

            body {
                display: flex;
                flex-direction: column;
                padding-bottom: 0;
            }

            .top-nav {
                flex: 0 0 auto;
            }

            main.feed {
                width: 100%;
                flex: 1 1 auto;
                min-height: 0;
                overflow-x: hidden;
                overflow-y: auto;
                overscroll-behavior-y: contain;
                -webkit-overflow-scrolling: touch;
                scroll-padding-bottom: var(--mobile-bottom-gap);
                padding: 14px 14px 24px;
                padding-bottom: var(--mobile-bottom-gap);
                gap: 12px;
            }

            .feed-hero {
                padding: 14px;
                align-items: flex-start;
                flex-direction: column;
            }

            .feed-status-wrap {
                justify-items: start;
            }

            .feed-tabs {
                padding: 10px;
                gap: 10px;
            }

            .feed-tabs-top {
                align-items: flex-start;
            }

            .feed-tabs-note {
                font-size: 11px;
            }

            .tab {
                min-height: 34px;
                padding: 7px 12px;
            }

            .feed-add {
                min-width: 68px;
                height: 34px;
                padding: 0 12px;
            }

            .now-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .now-chips {
                width: 100%;
                overflow-x: auto;
                padding-bottom: 2px;
            }

            .nav-mobile-hide {
                display: none !important;
            }

            .bottom-nav {
                display: flex;
            }

            .bn-link {
                padding: 8px 10px;
                font-size: 12px;
            }

            .bottom-nav-status {
                font-size: 11px;
                min-height: 11px;
            }

            /* Map page: keep bottom bar from covering map */
            #map {
                bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
            }

            /* Chat page: keep bottom bar from covering layout */
            .chat-shell {
                height: calc(100dvh - var(--top-nav-h) - var(--bottom-nav-h));
            }
        }
