/* css/canvas.css */

#companion-container {
    position: relative;
    width: 100%; 
    aspect-ratio: 1 / 1; 
    height: auto;
    background-color: #0f172a; 
    border: 1px solid #4cc9f0; 
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    
    /* THE FIX: Forces the browser to strictly obey internal z-indexes */
    isolation: isolate; 
    z-index: 1;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.color-tint {
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    pointer-events: auto; 
}

.overlay {
    pointer-events: none; 
}

/* Mythical Animation Layer */
.mythical-layer {
    animation: flowGradient 12s ease-in-out infinite !important;
    filter: blur(0.2px); 
    background-repeat: repeat !important;
    image-rendering: -webkit-optimize-contrast;
}

@keyframes flowGradient {
    0% { background-position: 0% 50% !important; }
    50% { background-position: 100% 50% !important; }
    100% { background-position: 0% 50% !important; }
}

#profile-canvas .layer {
    transform: scale(1.4) translateY(20%) !important;
    transform-origin: center bottom !important;
}