   /* -----------------------------------------------
           MEMORIES PAGE — MODERN REDESIGN
           Architecture: Story-viewer layout
           Inspired by: Instagram Stories + LinkedIn Status
           Signature: SVG progress-arc fade rings on avatars
        ----------------------------------------------- */

        /* --- Reset & page shell --- */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body[data-page="memories"] {
            background: #0a0a0a;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            height: 100vh;
            margin: 0;
        }
        body[data-page="memories"] main.main-content {
            padding: 0 !important;
            margin: 0;
            height: calc(100vh - 60px - var(--bottom-nav-height));
            overflow: hidden;
        }
        body[data-page="memories"] .app-header {
            background: rgba(10,10,10,0.92);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(255,255,255,0.07);
            position: sticky;
            top: 0;
            z-index: 100;
            height: 60px;
            display: flex;
            align-items: center;
            padding: 0 20px;
        }
        .app-header .logo { color: #fff; font-weight: 700; font-size: 1.2rem; }

        /* -- OUTER SHELL ------------------------------ */
        .mem-shell {
            display: grid;
            grid-template-columns: 1fr 340px;
            height: 100%;
            gap: 0;
            background: #0a0a0a;
        }

        /* -- LEFT AVATAR RAIL ------------------------- */
        .mem-rail {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 16px 0;
            overflow-y: auto;
            overflow-x: hidden;
            border-right: none; display: none !important;
            background: #0d0d0d;
            scrollbar-width: none;
        }
        .mem-rail::-webkit-scrollbar { display: none; }

        .mem-avatar-wrap {
            position: relative;
            width: 60px;
            height: 60px;
            cursor: pointer;
            flex-shrink: 0;
            transition: transform 0.18s ease;
        }
        .mem-avatar-wrap:hover { transform: scale(1.08); }
        .mem-avatar-wrap.active .mem-avatar-inner {
            border: 2px solid #ff6b35;
            box-shadow: 0 0 0 2px rgba(255,107,53,0.35);
        }
        .mem-avatar-wrap.live .mem-avatar-inner {
            border: 2px solid #e53935;
            box-shadow: 0 0 0 2px rgba(229,57,53,0.3);
        }
        .mem-avatar-ring {
            position: absolute;
            inset: 0;
            width: 60px;
            height: 60px;
            pointer-events: none;
            transform: rotate(-90deg);
        }
        .mem-avatar-ring .ring-bg {
            fill: none;
            stroke: rgba(255,255,255,0.08);
            stroke-width: 3;
        }
        .mem-avatar-ring .ring-fg {
            fill: none;
            stroke: #ff6b35;
            stroke-width: 3;
            stroke-dasharray: 170;
            stroke-dashoffset: 170;
            transition: stroke-dashoffset 0.8s ease;
        }
        .mem-avatar-wrap.seen .mem-avatar-ring .ring-fg {
            stroke-dashoffset: 0;
        }
        .mem-avatar-inner {
            position: absolute;
            inset: 5px;
            border-radius: 50%;
            overflow: hidden;
            background: #1a1a1a;
            border: 2px solid transparent;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .mem-avatar-inner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .mem-avatar-fallback {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            font-weight: 700;
            color: #fff;
        }
        .mem-avatar-username {
            font-size: 0.55rem;
            color: rgba(255,255,255,0.45);
            text-align: center;
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 72px;
            padding: 0 4px;
        }
        .mem-avatar-username.active-name {
            color: #ff6b35;
        }
        .mem-rail-divider {
            width: 32px;
            height: 1px;
            background: rgba(255,255,255,0.07);
            margin: 4px 0;
            flex-shrink: 0;
        }

        .mem-live-badge {
            position: absolute;
            bottom: 6px;
            right: 2px;
            background: #e53935;
            color: #fff;
            font-size: 0.45rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            padding: 1px 3px;
            border-radius: 3px;
            line-height: 1.4;
            border: 1px solid #0d0d0d;
            z-index: 2;
        }
        .mem-urgent-dot {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ff6b35;
            border: 1.5px solid #0d0d0d;
            animation: pulse-dot 1.6s ease-in-out infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }

        /* -- CENTRE: VIEWER --------------------------- */
        .mem-viewer {
            position: relative;
            display: flex;
            flex-direction: column;
            background: #000;
            overflow: hidden;
        }

        .mem-progress-strip {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 20;
            display: flex;
            gap: 3px;
            padding: 10px 12px 6px;
        }
        .mem-progress-seg {
            flex: 1;
            height: 2.5px;
            background: rgba(255,255,255,0.25);
            border-radius: 2px;
            overflow: hidden;
        }
        .mem-progress-seg-fill {
            height: 100%;
            background: #fff;
            border-radius: 2px;
            transition: width 0.1s linear;
        }
        .mem-progress-seg.done .mem-progress-seg-fill { width: 100%; }
        .mem-progress-seg.active .mem-progress-seg-fill { width: 0%; animation: story-progress 8s linear forwards; }
        .mem-progress-seg.pending .mem-progress-seg-fill { width: 0%; }
        @keyframes story-progress {
            from { width: 0%; }
            to { width: 100%; }
        }

        .mem-top-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 15;
            padding: 28px 16px 60px;
            background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 100%);
            pointer-events: none;
        }
        .mem-top-user-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 6px;
            pointer-events: all;
        }
        .mem-top-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid rgba(255,255,255,0.6);
            flex-shrink: 0;
            cursor: pointer;
        }
        .mem-top-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .mem-top-username {
            font-size: 0.88rem;
            font-weight: 700;
            color: #fff;
            cursor: pointer;
            line-height: 1;
        }
        .mem-top-meta {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.65);
            margin-top: 2px;
        }
        .mem-top-fade-pill {
            margin-left: auto;
            background: rgba(255,107,53,0.18);
            border: 1px solid rgba(255,107,53,0.45);
            color: #ff9d6a;
            font-size: 0.65rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 999px;
            white-space: nowrap;
        }
        .mem-top-fade-pill.urgent {
            background: rgba(229,57,53,0.25);
            border-color: rgba(229,57,53,0.6);
            color: #ff7676;
            animation: pill-glow 1.8s ease-in-out infinite;
        }
        .mem-top-fade-pill.live {
            background: #e53935;
            border-color: #e53935;
            color: #fff;
            animation: pill-glow 1.8s ease-in-out infinite;
        }
        @keyframes pill-glow {
            0%, 100% { box-shadow: none; }
            50% { box-shadow: 0 0 8px rgba(229,57,53,0.5); }
        }

        .mem-media-root {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background: #000;
        }
        .mem-media-root img,
        .mem-media-root video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            position: absolute;
            inset: 0;
        }
        .mem-media-blur-bg {
            position: absolute;
            inset: 0;
            z-index: 0;
            background-size: cover;
            background-position: center;
            filter: blur(28px) brightness(0.4) saturate(1.3);
            transform: scale(1.1);
        }
        .mem-media-layer {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .mem-media-layer img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            position: static;
        }
        .mem-text-memory {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            padding: 3rem;
        }
        .mem-text-memory p {
            font-size: clamp(1.2rem, 3vw, 2rem);
            font-weight: 600;
            color: #fff;
            text-align: center;
            line-height: 1.45;
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
            max-width: 520px;
        }

        .mem-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 20;
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.18);
            color: #fff;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1rem;
            transition: background 0.15s;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .mem-nav-btn:hover { background: rgba(255,255,255,0.22); }
        .mem-nav-btn.left { left: 12px; }
        .mem-nav-btn.right { right: 12px; }
        .mem-nav-btn[style*="none"] { display: none !important; }

        .mem-expand-btn {
            position: absolute;
            top: 52px;
            right: 12px;
            z-index: 20;
            background: rgba(0,0,0,0.4);
            border: none;
            color: rgba(255,255,255,0.6);
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.8rem;
            transition: color 0.15s;
        }
        .mem-expand-btn:hover { color: #fff; }

        .mem-bottom-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 15;
            padding: 60px 16px 16px;
            background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
        }
        .mem-caption {
            font-size: 0.88rem;
            color: rgba(255,255,255,0.9);
            line-height: 1.5;
            margin-bottom: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .mem-location-row {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.72rem;
            color: rgba(255,255,255,0.5);
            margin-bottom: 10px;
        }
        .mem-location-row i { font-size: 0.68rem; color: #ff6b35; }
        .mem-action-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .mem-action-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.15);
            color: #fff;
            font-size: 0.78rem;
            padding: 6px 12px;
            border-radius: 999px;
            cursor: pointer;
            transition: background 0.15s;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            white-space: nowrap;
        }
        .mem-action-btn:hover { background: rgba(255,255,255,0.18); }
        .mem-action-btn.liked { color: #e63946; border-color: rgba(230,57,70,0.4); background: rgba(230,57,70,0.12); }
        .mem-action-btn.liked i { color: #e63946; }
        .mem-action-btn i { font-size: 0.82rem; }
        .mem-action-spacer { flex: 1; }
        .mem-comment-quick {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 10px;
        }
        .mem-comment-quick input {
            flex: 1;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 999px;
            color: #fff;
            font-size: 0.8rem;
            padding: 7px 14px;
            outline: none;
            font-family: inherit;
        }
        .mem-comment-quick input::placeholder { color: rgba(255,255,255,0.35); }
        .mem-comment-quick input:focus { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.14); }
        .mem-comment-quick button {
            background: #ff6b35;
            border: none;
            color: #fff;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.78rem;
            transition: background 0.15s;
            flex-shrink: 0;
        }
        .mem-comment-quick button:hover { background: #e85d2a; }

        /* -- RIGHT PANEL ------------------------------ */
        .mem-panel {
            display: flex;
            flex-direction: column;
            background: #111;
            border-left: 1px solid rgba(255,255,255,0.06);
            overflow: hidden;
            padding-bottom: var(--bottom-nav-height);
        }
        .mem-panel-tabs {
            display: flex;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }
        .mem-panel-tab {
            flex: 1;
            padding: 12px 0;
            font-size: 0.75rem;
            font-weight: 600;
            color: rgba(255,255,255,0.35);
            text-align: center;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: color 0.15s, border-color 0.15s;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .mem-panel-tab.active {
            color: #ff6b35;
            border-bottom-color: #ff6b35;
        }
        .mem-panel-body {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,0.1) transparent;
        }
        .mem-panel-body::-webkit-scrollbar { width: 4px; }
        .mem-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

        .mem-tab-pane { display: none; padding: 14px; }
        .mem-tab-pane.active { display: block; }

        .mem-stats-row {
            display: flex;
            gap: 0;
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 14px;
        }
        .mem-stat-cell {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px 4px;
            gap: 2px;
            border-right: 1px solid rgba(255,255,255,0.07);
            cursor: pointer;
            transition: background 0.15s;
        }
        .mem-stat-cell:last-child { border-right: none; }
        .mem-stat-cell:hover { background: rgba(255,255,255,0.04); }
        .mem-stat-value {
            font-size: 0.95rem;
            font-weight: 700;
            color: #fff;
        }
        .mem-stat-label {
            font-size: 0.58rem;
            color: rgba(255,255,255,0.35);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .mem-stat-cell i { font-size: 0.9rem; color: rgba(255,255,255,0.3); }

        .mem-tags-wrap {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 14px;
        }
        .mem-tag {
            font-size: 0.68rem;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(255,107,53,0.1);
            color: #ff9d6a;
            border: 1px solid rgba(255,107,53,0.2);
        }

        .mem-comment-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 14px;
        }
        .mem-comment-item {
            display: flex;
            gap: 8px;
            align-items: flex-start;
        }
        .mem-comment-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 700;
            color: #fff;
            flex-shrink: 0;
            overflow: hidden;
        }
        .mem-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .mem-comment-body { flex: 1; min-width: 0; }
        .mem-comment-username {
            font-size: 0.72rem;
            font-weight: 700;
            color: rgba(255,255,255,0.85);
        }
        .mem-comment-text {
            font-size: 0.78rem;
            color: rgba(255,255,255,0.55);
            line-height: 1.45;
            margin-top: 1px;
        }
        .mem-comment-time {
            font-size: 0.6rem;
            color: rgba(255,255,255,0.25);
            margin-top: 2px;
        }
        .mem-empty-state {
            text-align: center;
            padding: 2rem 1rem;
            color: rgba(255,255,255,0.25);
            font-size: 0.8rem;
        }
        .mem-empty-state i {
            display: block;
            font-size: 1.8rem;
            margin-bottom: 8px;
            opacity: 0.3;
        }

        .mem-feed-card {
            display: flex;
            gap: 10px;
            align-items: center;
            padding: 10px 14px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.04);
            transition: background 0.13s;
        }
        .mem-feed-card:hover { background: rgba(255,255,255,0.03); }
        .mem-feed-card.active { background: rgba(255,107,53,0.06); }
        .mem-feed-thumb {
            width: 52px;
            height: 52px;
            border-radius: 8px;
            overflow: hidden;
            flex-shrink: 0;
            background: #1a1a1a;
            position: relative;
        }
        .mem-feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .mem-feed-thumb-icon {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
        .mem-feed-info { flex: 1; min-width: 0; }
        .mem-feed-username {
            font-size: 0.76rem;
            font-weight: 700;
            color: rgba(255,255,255,0.85);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .mem-feed-caption {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.4);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 2px;
        }
        .mem-feed-meta {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 4px;
            font-size: 0.62rem;
            color: rgba(255,255,255,0.3);
        }
        .mem-feed-meta i { font-size: 0.6rem; }
        .mem-feed-fade-bar {
            width: 100%;
            height: 2px;
            background: rgba(255,255,255,0.08);
            border-radius: 1px;
            margin-top: 4px;
            overflow: hidden;
        }
        .mem-feed-fade-fill {
            height: 100%;
            border-radius: 1px;
            background: #ff6b35;
            transition: width 0.3s;
        }
        .mem-feed-fade-fill.urgent { background: #e53935; }
        .mem-feed-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
            flex-shrink: 0;
        }
        .mem-feed-time {
            font-size: 0.6rem;
            color: rgba(255,255,255,0.25);
        }
        .mem-feed-pin {
            font-size: 0.65rem;
            color: #ff6b35;
        }

        .mem-panel-composer {
            display: flex;
            gap: 8px;
            align-items: flex-end;
            padding: 10px 14px;
            border-top: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }
        .mem-panel-composer textarea {
            flex: 1;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: #fff;
            font-size: 0.78rem;
            padding: 8px 12px;
            outline: none;
            font-family: inherit;
            resize: none;
            line-height: 1.4;
        }
        .mem-panel-composer textarea::placeholder { color: rgba(255,255,255,0.25); }
        .mem-panel-composer textarea:focus { border-color: rgba(255,107,53,0.4); }
        .mem-panel-composer button {
            background: #ff6b35;
            border: none;
            color: #fff;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.8rem;
            flex-shrink: 0;
            transition: background 0.15s;
        }
        .mem-panel-composer button:hover { background: #e85d2a; }

        /* -- FULLSCREEN MODE -------------------------- */
        .mem-viewer.fullscreen {
            position: fixed;
            inset: 0;
            z-index: 999;
            grid-column: 1 / -1;
        }
        .mem-viewer.fullscreen .mem-shell { display: none; }
        .mem-fullscreen-close {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 30;
            background: rgba(0,0,0,0.5);
            border: none;
            color: #fff;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1rem;
        }
        .mem-viewer.fullscreen .mem-fullscreen-close { display: flex; }

        /* -- MOBILE ----------------------------------- */
        @media (max-width: 900px) {
            body[data-page="memories"] { overflow: auto; }
            body[data-page="memories"] main.main-content { height: auto; overflow: auto; }
            .mem-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
            .mem-rail {
                flex-direction: row;
                overflow-x: auto;
                overflow-y: hidden;
                height: 90px;
                padding: 12px 12px;
                gap: 12px;
                border-right: none;
                border-bottom: 1px solid rgba(255,255,255,0.05);
                width: 100%;
            }
            .mem-avatar-username { display: none; }
            .mem-viewer { height: 70vw; min-height: 300px; max-height: 480px; }
            .mem-panel { display: flex !important; flex-direction: column; max-height: 380px; }
            .mem-expand-btn { display: flex !important; }
            .mem-panel { display: none; }
        }
        @media (max-width: 600px) {
            .mem-viewer { height: 80vw; }
        }

        /* -- LIGHT THEME OVERRIDES -------------------- */
        [data-theme="light"] body[data-page="memories"],
        [data-theme="light"] .mem-shell {
            background: #f0f0f0;
        }
        [data-theme="light"] .mem-rail {
            background: #f7f7f7;
            border-color: #e5e5e5;
        }
        [data-theme="light"] .mem-panel {
            background: #fafafa;
            border-color: #e5e5e5;
        }
        [data-theme="light"] .mem-panel-tabs { border-color: #e5e5e5; }
        [data-theme="light"] .mem-panel-tab { color: #999; }
        [data-theme="light"] .mem-panel-tab.active { color: #ff6b35; }
        [data-theme="light"] .mem-stats-row { border-color: #e5e5e5; }
        [data-theme="light"] .mem-stat-cell { border-color: #e5e5e5; }
        [data-theme="light"] .mem-stat-value { color: #111; }
        [data-theme="light"] .mem-stat-label { color: #aaa; }
        [data-theme="light"] .mem-feed-card { border-color: #efefef; }
        [data-theme="light"] .mem-feed-card:hover { background: #f5f5f5; }
        [data-theme="light"] .mem-feed-username { color: #111; }
        [data-theme="light"] .mem-feed-caption { color: #888; }
        [data-theme="light"] .mem-comment-username { color: #111; }
        [data-theme="light"] .mem-comment-text { color: #555; }
        [data-theme="light"] .mem-avatar-username { color: #aaa; }
        [data-theme="light"] .mem-panel-composer textarea { background: #f0f0f0; border-color: #ddd; color: #111; }
        [data-theme="light"] .mem-panel-composer textarea::placeholder { color: #bbb; }
        [data-theme="light"] .mem-panel-composer textarea:focus { border-color: rgba(255,107,53,0.5); }
        [data-theme="light"] .mem-feed-time { color: #bbb; }

        /* -- LOADING SKELETON ------------------------- */
        .mem-skeleton {
            background: rgba(255,255,255,0.05);
            border-radius: 6px;
            animation: skel-pulse 1.4s ease-in-out infinite;
        }
        @keyframes skel-pulse {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }

        /* -- PINNED INDICATOR ------------------------- */
        .mem-pinned-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            z-index: 22;
            background: rgba(0,0,0,0.55);
            border-radius: 6px;
            padding: 3px 7px;
            font-size: 0.62rem;
            color: #ff6b35;
            display: flex;
            align-items: center;
            gap: 4px;
            pointer-events: none;
        }

        .mem-media-count {
            position: absolute;
            bottom: 70px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 20;
            display: flex;
            gap: 5px;
        }
        .mem-media-dot {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255,255,255,0.35);
        }
        .mem-media-dot.active {
            background: #fff;
            width: 14px;
            border-radius: 3px;
        }
/* Comments in viewer modal â€” desktop: hidden (right panel handles it)
   mobile: visible since right panel is hidden */
@media (min-width: 901px) {
    .memory-viewer-comment-composer,
    #memViewerCommentsList,
    #memViewerCommentCount {
        display: none !important;
    }
}

@media (min-width: 901px) {
    .mem-comment-quick {
        display: none !important;
    }
}

/* Ensure bottom overlay clears the nav */
@media (min-width: 901px) {
    .mem-bottom-overlay {
        padding-bottom: calc(var(--bottom-nav-height) + 1rem);
    }
    /* Push AI FAB above the nav */
    .ai-fab {
        bottom: calc(var(--bottom-nav-height) + 1rem) !important;
    }
}
