:root {
    --bg-deep: #080808;
    --bg-surface: #111111;
    --bg-elevated: #1a1a1a;
    --bg-hover: #222222;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.14);
    --text-primary: #f5f5f5;
    --text-secondary: #9a9a9a;
    --text-muted: #666;
    --accent: #e8e8e8;
    --link-color: #1d9bf0;
    --danger: #c44;
    --success: #6a6;
    --radius: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-h: 56px;
    --footer-h: 56px;
    --mobile-header-h: 48px;
    --tabbar-h: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
    /* Semantic surfaces */
    --app-bg: #000000;
    --shell-bg: #000000;
    --chrome-bg: rgba(0, 0, 0, 0.92);
    --sticky-head-bg: rgba(0, 0, 0, 0.92);
    --post-bg: #1a1a1a;
    --post-bg-mobile: #000000;
    --hover-surface: rgba(255, 255, 255, 0.06);
    --hover-surface-strong: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.35);
    --overlay-scrim: rgba(0, 0, 0, 0.7);
    --toast-bg: rgba(20, 20, 20, 0.95);
    --search-panel-bg: #000000;
    --search-btn-bg: #ffffff;
    --search-btn-text: #000000;
    --badge-fill: #ffffff;
    --badge-ink: #000000;
    --badge-glow: rgba(255, 255, 255, 0.55);
    --chat-unread-badge-fill: linear-gradient(180deg, #f0f0f0, #d8d8d8);
    --chat-unread-badge-ink: #111111;
    --chat-unread-badge-glow: rgba(255, 255, 255, 0.35);
    --unread-pill-bg: linear-gradient(180deg, #f0f0f0, #d8d8d8);
    --unread-pill-text: #111111;
    --notif-active-color: var(--text-primary);
    --btn-primary-bg: linear-gradient(180deg, #f0f0f0, #d8d8d8);
    --btn-primary-text: #111111;
    --btn-accent: #1d9bf0;
    --btn-accent-text: #ffffff;
    --nav-active-bg: linear-gradient(180deg, #f0f0f0, #d0d0d0);
    --nav-active-text: #111111;
    --section-divider: #0a0a0a;
    --skeleton-a: #1a1a1a;
    --skeleton-b: #2a2a2a;
    --avatar-ph-bg: linear-gradient(135deg, #333333, #111111);
    --avatar-ph-text: #ffffff;
    --dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --editor-stage-bg: #0a0f14;
    --editor-viewport-bg: #111111;
    --editor-border: rgba(255, 255, 255, 0.12);
    --icon-on-media: #ffffff;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(255,255,255,0.04) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 75%, rgba(255,255,255,0.03) 0%, transparent 50%),
        linear-gradient(165deg, #0a0a0a 0%, #141414 35%, #0d0d0d 70%, #111 100%);
    background-attachment: fixed;
}

input, textarea, [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
}

#login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 500;
}

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--app-bg);
}

#app { display: none; }

.app-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(26,26,26,0.95), rgba(14,14,14,0.98));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.login-logo {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 6px;
}

.login-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.12);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.login-error {
    color: #f87171;
    font-size: 0.85rem;
    margin: 12px 0 0;
    min-height: 1.2em;
}

.login-status {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 8px 0 0;
    min-height: 1.2em;
}

.login-note {
    margin-top: 20px;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* ── Top bar (desktop) ── */
.hub-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    background: var(--chrome-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.hub-brand {
    position: absolute;
    left: 20px;
    font-family: var(--font-display);
    letter-spacing: 4px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hub-user {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hub-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
}

.hub-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
}

.hub-nav-btn:hover { color: var(--text-primary); border-color: var(--border); }

.hub-nav-btn.active {
    color: var(--nav-active-text);
    background: var(--nav-active-bg);
    border-color: transparent;
}

.hub-nav-btn.home-btn {
    padding: 10px 26px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 3px;
}

/* ── Mobile bottom tab bar (Instagram-style) ── */
.mobile-app-header {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    height: calc(var(--mobile-header-h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 16px 0;
    background: var(--shell-bg);
    border-bottom: 1px solid var(--border);
    z-index: 110;
}

.mobile-app-logo {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1;
}

.mobile-header-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
}

.mobile-header-btn:active {
    background: var(--hover-surface-strong);
}

.mobile-header-btn.active {
    color: var(--text-primary);
    background: var(--hover-surface);
}

.mobile-header-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.hub-tabbar {
    display: none;
    flex-shrink: 0;
    position: relative;
    z-index: 120;
    height: var(--tabbar-h);
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    background: var(--shell-bg);
    border-top: 1px solid var(--border);
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
}

.tab-item {
    flex: 1;
    max-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 4px 6px;
    min-width: 0;
    min-height: var(--footer-h);
    -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
    color: var(--text-primary);
}

.tab-item.active .tab-svg {
    stroke-width: 2.25;
}

.tab-svg {
    width: 26px;
    height: 26px;
    display: block;
    flex-shrink: 0;
}

.tab-svg-plus {
    width: 22px;
    height: 22px;
}

.tab-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}

.tab-unread-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--chat-unread-badge-fill);
    color: var(--chat-unread-badge-ink);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 8px var(--chat-unread-badge-glow);
}

.tab-item.tab-create {
    flex: 0 0 auto;
    max-width: none;
    color: var(--text-primary);
    padding-left: 6px;
    padding-right: 6px;
}

.tab-create-inner {
    width: 48px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.tab-icon-profile {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent center/cover no-repeat;
    box-sizing: border-box;
    display: block;
}

.tab-item.active .tab-icon-profile.has-avatar {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

@media (max-width: 768px) {
    body {
        background: var(--app-bg);
        background-attachment: scroll;
    }

    .hub-topbar-desktop { display: none !important; }

    .mobile-app-header { display: flex; }

    .hub-tabbar { display: flex; }

    .hub-main {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .hub-view:not(#view-home):not(#view-chat) {
        padding: 12px 12px 20px;
    }

    #view-chat.active {
        padding: 0;
    }

    #login-screen {
        padding: env(safe-area-inset-top, 0px) 20px env(safe-area-inset-bottom, 0px);
        align-items: flex-start;
        padding-top: max(15vh, 48px);
        background: var(--app-bg);
    }

    .login-card {
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        max-width: 100%;
        padding: 24px 0;
    }

    .login-card::before { display: none; }

    .btn-signout-desktop { display: none; }
}

@media (max-width: 768px) {
    .hub-view:not(#view-home):not(#view-chat) {
        padding: 12px 12px 20px;
    }

    #view-chat.active {
        padding: 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .hub-column-center {
        border-left: none;
        border-right: none;
    }
}

@media (min-width: 769px) {
    .hub-tabbar,
    .mobile-app-header { display: none !important; }

    #app { min-height: 100dvh; }

    .btn-profile-back { display: none; }
}

/* ── Views ── */
.hub-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.hub-view { display: none; animation: hubFade 0.25s ease; }
.hub-view.active { display: block; }

@keyframes hubFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.section-sub {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 24px;
}

/* ── Feed cards ── */
.feed-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.platform-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    overflow: hidden;
}

.platform-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.platform-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feed-author {
    font-size: 0.85rem;
    font-weight: 500;
}

.feed-platform-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.feed-media {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    background: #0a0a0a;
    display: block;
}

.feed-media.ratio-916 { aspect-ratio: 9/16; }
.feed-media.ratio-169 { aspect-ratio: 16/9; }
.feed-media.ratio-11 { aspect-ratio: 1/1; }

.feed-media img,
.feed-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-open-external {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
}

.feed-body { padding: 12px 14px 16px; }

.feed-caption {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 8px;
}

.feed-tags {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 14px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.feed-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 14px;
}

/* ── Apps grid ── */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.app-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.app-tile:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.app-tile-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-tile-name {
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.apps-mode-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: -12px 0 20px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.app-tile.demo.connected::after {
    background: #888;
    box-shadow: none;
}

.app-tile.demo::before {
    content: 'Preview';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.55rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(0,0,0,0.4);
    padding: 2px 5px;
    border-radius: 4px;
}

.app-tile.connected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(102,170,102,0.6);
}

/* ── Platform view ── */
.platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.platform-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 2px;
}

/* ── Upload ── */
.upload-dropzone {
    border: 2px dashed var(--border-light);
    border-radius: 14px;
    padding: 48px 24px;
    text-align: center;
    background: rgba(0,0,0,0.25);
    transition: 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.04);
}

.upload-dropzone p { color: var(--text-secondary); font-size: 0.88rem; margin-top: 8px; }

.upload-preview {
    max-width: 100%;
    max-height: 280px;
    border-radius: 10px;
    margin: 0 auto 16px;
    display: none;
}

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

.form-group label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.form-group textarea { min-height: 72px; resize: vertical; }

.platform-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.platform-check-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.platform-check-row.disabled { opacity: 0.45; pointer-events: none; }

.platform-check-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.platform-check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ccc;
}

.spec-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    width: 100%;
    padding-left: 24px;
}

.btn-upload-all {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.85rem;
}

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

.upload-progress {
    margin-top: 16px;
    display: none;
}

.upload-progress.show { display: block; }

.progress-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #555, #eee);
    transition: width 0.3s;
}

.upload-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ── Toast ── */
#hub-toast-root {
    position: fixed;
    bottom: calc(var(--footer-h) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 90vw;
}

@media (min-width: 769px) {
    #hub-toast-root { bottom: 24px; }
}

.hub-toast {
    background: var(--toast-bg);
    border: 1px solid var(--border-light);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.3s;
    box-shadow: var(--shadow);
}

.hub-toast.show { opacity: 1; transform: none; }
.hub-toast-success { border-color: rgba(102,170,102,0.4); }
.hub-toast-error { border-color: rgba(204,68,68,0.4); color: #faa; }

/* ── Modal ── */
.hub-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--overlay-scrim);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hub-modal-overlay.open { display: flex; }

.hub-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.hub-modal h3 {
    font-family: var(--font-display);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hub-modal p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hub-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.hub-modal-actions .btn-primary { width: auto; flex: 1; }

.login-card-wide { max-width: 440px; padding: 40px 36px; }

.login-tagline {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.login-oauth-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-oauth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.btn-oauth:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.06);
}

.btn-oauth-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.login-tab.active {
    color: var(--nav-active-text);
    background: var(--nav-active-bg);
    border-color: transparent;
}

.login-form .form-group { margin-bottom: 14px; }

.field-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: normal;
}

.login-admin-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.btn-admin-entry {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

.login-admin-panel {
    margin-top: 8px;
}

.login-admin-back {
    width: 100%;
    margin-top: 10px;
}

.profile-private-field {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.socials-profile-handle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.username-setup-overlay {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    padding: 20px;
}

.username-setup-overlay[hidden] {
    display: none !important;
}

.username-setup-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.username-setup-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

#auth-boot {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-bg);
    padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 0px);
}

#auth-boot[hidden],
#auth-boot.is-hidden {
    display: none !important;
}

.auth-boot-inner { text-align: center; }

.auth-boot-label { margin-top: 16px; }

.hub-skeleton {
    background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%);
    background-size: 200% 100%;
    animation: hubSkeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}

.hub-skeleton-logo {
    width: 120px;
    height: 24px;
    margin: 12px auto 0;
}

.hub-skeleton-line {
    height: 10px;
    margin: 8px auto 0;
    max-width: 200px;
}

.hub-skeleton-line.w60 { width: 60%; }
.hub-skeleton-line.w50 { width: 50%; }
.hub-skeleton-line.w40 { width: 40%; }
.hub-skeleton-line.w70 { width: 70%; }

.hub-skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.hub-skeleton-media {
    width: 100%;
    aspect-ratio: 4/5;
    margin: 10px 0;
    border-radius: 4px;
}

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

.feed-skeleton-wrap { padding: 8px 0; }

.feed-skeleton-compose {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 16px;
    border-bottom: 1px solid var(--border);
}

.feed-skeleton-compose .hub-skeleton-line {
    flex: 1;
    height: 40px;
    border-radius: 8px;
}

.feed-skeleton-card {
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border);
}

.profile-skeleton-wrap {
    padding: 0 0 24px;
}

.profile-skeleton-banner {
    height: 120px;
    border-radius: 0;
    margin-bottom: -32px;
}

.profile-skeleton-avatar {
    width: 80px;
    height: 80px;
    margin: 0 16px 12px;
    border: 4px solid var(--bg-primary, #000);
}

.profile-skeleton-wrap .hub-skeleton-line {
    margin: 8px 16px;
}

.profile-skeleton-grid {
    height: 180px;
    margin: 16px;
    border-radius: 12px;
}

.feed-load-more-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
}

.socials-profile-grid.profile-tab-skeleton {
    pointer-events: none;
}

.socials-profile-grid.profile-tab-skeleton .socials-grid-cell.hub-skeleton {
    aspect-ratio: 1;
    min-height: 72px;
    border-radius: 4px;
}

.chat-skeleton-wrap {
    padding: 4px 0;
}

.chat-skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.chat-skeleton-lines {
    flex: 1;
    min-width: 0;
}

.chat-skeleton-lines .hub-skeleton-line + .hub-skeleton-line {
    margin-top: 8px;
}

.home-apps-strip {
    display: none !important;
}

.home-apps-strip-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px;
}

.home-apps-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.home-apps-row::-webkit-scrollbar { display: none; }

.home-app-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
    padding: 8px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    position: relative;
}

.home-app-chip.connected { border-color: rgba(100, 200, 120, 0.35); }

.home-app-chip.locked { opacity: 0.75; }

.home-app-chip-icon { width: 28px; height: 28px; line-height: 1; }

.platform-check-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    vertical-align: middle;
    margin-right: 6px;
}

.profile-conn-badge {
    padding: 3px;
}

.home-app-chip-name {
    font-size: 0.62rem;
    color: var(--text-muted);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-app-chip-lock {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.55rem;
    opacity: 0.8;
}

.membership-hero-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0 12px;
    letter-spacing: 0.5px;
}

.membership-status.pitch {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.plan-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: left;
}

.plan-perks li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.plan-perks li:last-child { border-bottom: none; }

.platform-check-locked { cursor: pointer; }

.platform-check-locked:hover { background: rgba(255,255,255,0.03); }

.app-tile-tag.connected {
    color: #8fd4a0;
    border-color: rgba(100, 200, 120, 0.3);
}

.hub-user { cursor: pointer; }
.hub-user:hover #user-name { color: var(--text-primary); }

.profile-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    object-fit: cover;
}

.profile-name-lg {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.profile-email-lg {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.profile-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-edit-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.profile-edit-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: -4px 0 16px;
    line-height: 1.45;
}

.profile-edit-section .form-group label {
    text-align: left;
}

.account-profile-save {
    width: 100%;
    margin-top: 4px;
}

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

.profile-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.profile-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-connections-title {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-conn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.profile-conn-row:last-child { border-bottom: none; }

.profile-conn-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px 0;
}

