#ht-turn-ended-root {
    position: absolute;
    inset: 0;
    
    width: 100%;
    height: 100%;
    
    z-index: 20;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: rgba(2, 2, 5, 0.7);
    
    box-sizing: border-box;
    
    animation:
        ht-turn-ended-fade-in
        0.35s ease-out
        forwards;
}

#ht-turn-ended-panel {
    width: min(70%, 900px);
    min-height: 55%;
    
    display: flex;
    flex-direction: column;
    
    justify-content: space-between;
    
    padding: 2rem;
    
    color: white;
    
    background: rgba(255, 255, 255, 0.05);
    
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 1.5rem;
    
    box-shadow:
        0 0 25px rgba(0, 212, 255, 0.2);
    
    box-sizing: border-box;
    
    transform-origin: center;
    
    animation:
        ht-turn-ended-grow
        0.4s
        cubic-bezier(0.2, 0.8, 0.2, 1)
        forwards;
}

#ht-turn-ended-header {
    text-align: center;
}

#ht-turn-ended-header h2 {
    margin: 0;
    
    color: #00d4ff;
    
    font-family: myOtherFont;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    
    letter-spacing: 0.2rem;
    
    text-shadow:
        0 0 10px rgba(0, 212, 255, 0.7);
}

#ht-turn-ended-header p {
    margin-top: 1rem;
    
    color: #aaa;
    
    font-family: myOtherFont;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
}

#ht-turn-ended-buttons {
    display: grid;
    
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    
    gap: 1rem;
    
    width: 100%;
}

#ht-turn-ended-buttons button {
    min-height: 4rem;
    
    padding: 0.75rem;
    
    color: #00d4ff;
    
    font-family: myOtherFont;
    font-size: clamp(0.75rem, 1.4vw, 1.1rem);
    
    letter-spacing: 0.05rem;
    
    background: rgba(0, 0, 0, 0.55);
    
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.6rem;
    
    cursor: pointer;
    
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

#ht-turn-ended-buttons button:hover {
    color: white;
    
    background: rgba(0, 212, 255, 0.12);
    
    border-color: rgba(0, 212, 255, 0.8);
    
    box-shadow:
        0 0 18px rgba(0, 212, 255, 0.35);
}

#ht-turn-ended-buttons button:active {
    transform: scale(0.97);
}

@keyframes ht-turn-ended-fade-in {
    from {
        opacity: 0;
    }
    
    to {
        opacity: 1;
    }
}

@keyframes ht-turn-ended-grow {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (orientation: portrait) {
    #ht-turn-ended-panel {
        width: min(88%, 600px);
        min-height: 60%;
    }
    
    #ht-turn-ended-buttons {
        grid-template-columns: 1fr;
    }
    
    #ht-turn-ended-buttons button {
        min-height: 3.5rem;
    }
}